Skip to content

feat(graph): left panel, commit details and diff (G1 Task 14) - #148

Open
dwikiriyadi wants to merge 2 commits into
mainfrom
feat/g1-task14-details-diff
Open

dwikiriyadi wants to merge 2 commits into
mainfrom
feat/g1-task14-details-diff

Conversation

@dwikiriyadi

Copy link
Copy Markdown
Member

G1 Task 14, built to the approved wireframes in plans/G1.md. All four questions went with their first option: shared state, stashes on the graph now, image diff now, and a temporary repository screen.

  • Shared state: RepositoryViewState in :module:presentation, one per repository tab. It holds:

    • the saved choices (state.json, one writer);
    • the selection;
    • the center (the graph, or one file's diff).

    The three screens talk through it alone.

  • Left panel:

    • Local, Remote, Tags and Stashes, with counts, / folders, a node per remote, and pinned refs first.
    • Hide, solo and pin (row buttons and a context menu), and speed search.
    • Arrows and Enter: selecting a ref selects its commit in the graph.
  • Commit details (S5):

    • Subject, hash, parents as links, author and committer, and the signature in words.
    • The body and trailers.
    • Files as a tree or a list, with status letters and counts. Enter opens the diff.
  • Diff screen (S6):

    • A breadcrumb back (Esc, Alt+←) and file stepping (Alt+Shift+←/→).
    • Unified or side by side (Mod+Alt+D) and Ignore whitespace, saved as the existing app settings.
    • States: binary sizes, images side by side, too large with Show anyway, renamed, mode only, submodule.
  • Stashes on the graph: a hollow node just above its base commit, its line curving into the base.

  • Data: FileContents.readBytes for the image diff.

  • RepositoryScreen docks the panel and details around the graph, until Task 20's host replaces it.

Rulings are in plans/progress.md. The main ones:

  • The files' tree-or-list choice isn't saved yet: it would change settings.json.
  • Stashes can't be hidden in G1.

GitNexus rates the change CRITICAL (70 flows). The cause is the graph view model's onAction, start and reload, reworked for the shared state and stashes. Its tests cover them.

Tests:

  • Data, presentation and graph view model tests.
  • Table layout and branch tree logic.
  • 10 view-model tests for the three screens, linked as in the app.
  • 3 page tests for labels and keys.
  • 12 screenshots. The Linux goldens come from this PR's first CI run, as before.
  • ./gradlew check passes on macOS.

Closes #22

🤖 Generated with Claude Code

dwikiriyadi and others added 2 commits November 17, 2026 10:27
The repository screen now has the left panel (Local, Remote, Tags,
Stashes, with hide, solo, pin and speed search), commit details (S5)
and the diff screen (S6), docked around the graph. They share one
RepositoryViewState: the saved choices, the selection, and what the
center shows.

- Stashes appear on the graph as hollow nodes just above their base
  commit.
- The diff screen steps through a commit's files and toggles unified
  or side by side and ignore whitespace (both app settings). It shows
  images side by side and handles binary, too-large, renamed,
  mode-only and submodule files.
- FileContents.readBytes reads a blob's bytes for the image diff.

Closes #22

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dwiki Riyadi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

:module:feature:graph: left panel, commit details and diff

1 participant