atriumatrium

Source control pane

Git working tree, staging, diffs, commits, branches, and the diff-review surface.

The source control pane is atrium's git panel. It shows changes for the focused workspace's repository, drives staging/committing/branch operations, and hosts the diff-stack review surface — the place where you walk a change set and leave per-file comments for an agent.

Opening

  • Cmd+Shift+G opens the source control pane or focuses it if already open.
  • Toolbar tile, or Cmd+T G from the launcher chain.

Sections

The top of the pane has a branch picker with switch / create / delete / rebase / merge actions and per-worktree quick-jump.

Below that, a review-mode dropdown chooses what set of changes the diff stack shows:

  • Working Tree — staged + unstaged + untracked, vs HEAD.
  • Branch — working tree plus unpushed commits, all diffed against the upstream merge-base. Auto-selected when the working tree is clean so the pane has something to show.
The diff stack itself renders one file diff block per changed file, with per-file +added/−removed counts in the header and a click-to-collapse chevron. By default the stack auto-expands when there are 9 or fewer unreviewed files; larger sets collapse to keep the column scannable. Solo-file change sets always render expanded.

Below the diff stack, collapsible sections show the unpushed commit list (with multi-select for bulk push / amend / drop) and the unpulled commit list. Each commit row shows a per-commit additions/deletions chip, and rows past the initial prefetch window lazy-load their chips as you scroll. Files are color-coded: green (added), red (removed), yellow (modified), gray (untracked).

Large repos paint noticeably faster than they did in earlier builds — git log builds via a boundary-aware revwalk with cursor-based pagination, blame/diff/lint results are cached by HEAD plus index mtime, and get_repo_overview fans out its subprocesses in parallel.

Per-file actions

  • Stage / unstage from the file row.
  • Discard changes (with confirmation).
  • Delete an untracked file.
  • Open in editor to jump to the file in an editor pane at the matching line.
  • Mark reviewed — the chevron with the check icon. Reviewed files collapse and stop auto-advancing the keyboard cursor; reviewed state is keyed per repo + scope and shared with the diff review pane.

Diff-stack keyboard

Focus the diff stack and use:

ChordAction
/ Step the focused-block cursor.
/ Collapse / expand the focused block.
EnterEngage Monaco scroll-trap on the focused block (overflowing files only).
SpaceToggle Mark reviewed and auto-advance to the next unreviewed file. The bottom CTA is a virtual stop after the last file.
Shift+TabReturn focus to the file list above the stack.
A keyboard cheat-sheet is available from the pane menu.

Comments

Click any line in a file diff block to open an inline composer and leave a comment. Comments are stored in ~/.atrium/review.db, anchor to a file path + hunk + context hash, and survive line drift via re-anchoring. Threads accept replies; Resolve and Reopen both record state-change rows so the audit history stays intact.

Comment counts surface as badges on each file row and in the diff header. The same threads are visible from the CLI: atrium review list, atrium review reply, atrium review resolve. See CLI → review.

Send to agent

Once you've left review feedback, click Send to agent (or use the bottom CTA when the stack is keyboard-focused) to dispatch the comments. The dialog lets you:

  • Pick which threads go (selection follows root → replies).
  • Pick a target — an existing agent pane in the workspace, or a launch profile to start a new one.
  • Preview the rendered message (a fenced syntax-highlighted snippet per anchored comment plus a review list invocation the agent can run for context).
  • Send. The dispatch writes directly to the target pane's PTY; the agent picks up review threads via atrium review list and addresses them.
After dispatch, atrium opens a diff-review pane tracking the agent's work-in-progress so you can follow along.

Diff review

The diff-review pane is a slim follow-along surface attached to a Send-to-agent dispatch. It renders the same diff stack the source control pane uses, but:

  • Scope is locked to the agent's working tree — no review-mode dropdown.
  • The bottom CTA is Approve instead of Send to agent.
  • The same comment threads, reviewed-file state, and attribution gutter are visible, so when the agent finishes you can confirm each fix and click Approve when satisfied.
The earlier multi-tier review pane (Inbox, file list, separate single-file diff view, dispatch preview, keyboard cheat sheet) was retired in this rewrite — the diff stack is now the single review surface.

Commits

  • Click a commit to expand it: full message, author, date, and per-file diff blocks rendered the same way as working-tree changes. A second plain click toggles the row closed; the row also closes when you click another commit.
  • Multi-select commits with Shift-click for bulk operations from the row menu.
  • Compose a commit message in the diff controls; stage/unstage groups; amend the last commit; sign commits (GPG) if configured.

Session changes pill

Adapter panes (Claude Code, Codex, Gemini, etc.) show a footer with elapsed time and a session changes pill displaying the number of files the agent has touched since its session began. Click the pill to open a scoped diff view filtered to just that session's changes — same diff stack as the source control pane, ready for review and a Send-to-agent dispatch. Clicking the pill again toggles the view closed. The count resets to zero after you commit.

The pill is also where you'd jump to scoped review on long-running sessions without scrolling through unrelated working-tree changes.

Branches and worktrees

The branch selector supports switching, creating, deleting, rebasing, and merging branches. Branch metadata (current branch, ahead/behind counts, worktree list) is watched via fs::watch on the resolved git directory — watchers run on the parent directory filtered by basename, so atomic save-over-file patterns (Vim, fsync-aware editors) keep firing change events instead of silently going stale.

Create a worktree from the branch selector and atrium opens it as a sibling workspace with its own data scope, so running agents and panes are isolated from the parent workspace. In the workspace sidebar's summary view, each worktree's change counts are diffed against its fork base rather than the parent's HEAD, so the badges reflect branch-specific work.

Opening the New worktree dialog no longer beachballs the UI on large repos — the file-copy preview now sits behind a disclosure and only computes on demand.

Persistent state

  • Section expansion toggles.
  • Selected file path (resilient to reordering when files change).
  • Expanded commit hashes.
  • Review mode (working-tree / branch).
  • Reviewed-file marks (per repo + scope).
  • Git repository root (auto-detected via gix).

Constraints

  • Only active when the focused workspace is a git repository.
  • Reviewed-file state is shared between the source control pane and the diff-review pane; marking a file reviewed in one updates the other.
  • Does not rewrite history beyond amend; use the terminal for interactive rebase.