Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`stackmap` is a local-first terminal map for Git branches and Graphite stacks.
It keeps the full local branch topology open in a compact, searchable TUI,
shows parent-relative diffstats, marks worktree safety state, refreshes after
shows parent-relative branch diffstats and named-stack base-to-tip totals, marks worktree safety state, refreshes after
external Git changes, and optionally adds matching GitHub pull requests.

The current release is the unsigned, not-notarized `0.1.0-alpha.1` preview for
Expand Down Expand Up @@ -87,8 +87,19 @@ Markers are independent of color:

Stack colors are deterministic. Yellow is reserved for PR data, while green
and red represent insertions and deletions. Set `NO_COLOR=1` for non-color
output. At 120 columns and wider, a detail pane shows the selected branch's
exact local commit time and PR title.
output. At 120 columns and wider, press `d` to show or hide a detail pane for
the selected branch's exact local commit time and PR title. It starts hidden.

Visual feature sections split a real stack into repository-local presentation
ranges without changing Git or Graphite. Press `i` on a branch to start or
remove a section. Successive sections indent branch-name text while leaving
the real circles, rails, and connectors fixed. Custom stack and section titles
remain white while branch names, dividers, and topology retain identity colors.

A named stack gets its own title row, followed by one blank hierarchy row.
That title shows the net diff from the validated parent of the stack's bottom
branch to its real displayed tip; it is not a sum of branch rows. Named visual
sections remain directly above the first visible branch they own.

## Keys

Expand All @@ -102,11 +113,13 @@ exact local commit time and PR title.
| `h` | Focus the selected stack and shared ancestry; repeat to show all |
| `H` | Focus the selected trunk (or Untrunked); repeat to show all |
| `s` | Toggle blank rows between adjacent stacks (on by default) |
| `d` | Show/hide the wide branch-detail sidebar (off by default) |
| `+` / `-` / `0` | Increase / decrease lane pitch; reset to automatic width |
| `/` | Filter by branch name; ancestors remain as dimmed context |
| `Enter` | Ask Git to switch to the selected branch |
| `c` / `C` | Cycle the selected stack color / open its color picker |
| `n` | Name the selected stack; submit an empty name to clear it |
| `Enter`, `Enter` | Arm and confirm switching the selected branch; one `Enter` edits a selected label |
| `i` | Add/remove a purely visual section boundary on the selected branch |
| `c` / `C` | Cycle/open color for the selected section boundary/label, otherwise its stack |
| `n` | Create a missing stack/section label and edit it inline |
| `x` | Archive/restore the selected branch and move focus to the nearest branch above |
| `v`, arrows, `Enter` | Preview and apply a contiguous archive/restore range |
| `a` | Toggle Active / Archive view |
Expand All @@ -117,7 +130,8 @@ exact local commit time and PR title.
| `Esc` | Close help/message or cancel a filter edit |
| `q`, `Ctrl-C` | Quit |

Checkout is intentionally conservative. `stackmap` runs an exact `git switch
Checkout is intentionally conservative. The first `Enter` arms the selected branch and the
second confirms it; `Esc` or navigation cancels. `stackmap` then runs an exact `git switch
-- <branch>` after re-reading live repository state. It never stashes, resets,
cleans, deletes, or forces. Git's normal overwrite and worktree protections are
preserved, and errors leave the current tree untouched.
Expand All @@ -136,12 +150,14 @@ blocks further deletion when the observed result is inconsistent.
Archiving is the normal cleanup operation and never changes Git. Archived names
persist in `<git-common-dir>/stackmap/config.toml`, are hidden from Active view,
and can always be restored from Archive view. The current branch and trunks
cannot be archived. Archive mode shows configured-upstream state plus whether
the commit is contained by any locally available remote-tracking ref. Dim,
nonselectable ancestry keeps each archived branch oriented in its stack. It never
fetches: `local only` means no current local remote-tracking ref contains that
commit, not that the commit is absent from the server. `remote ?` and
`unavailable` are intentionally not treated as safe deletion evidence.
cannot be archived. Active and Archive rows show compact configured-upstream
and local remote-ref state in the right-side metadata: `✓ pushed`, `↑n ahead`,
`↓n behind`, `↕n/n div`, `× gone`, `○ no remote`, or `? remote`. Dim,
nonselectable ancestry keeps each archived branch oriented in its stack. This
evidence never fetches: `○ no remote` means there is no configured upstream and
no current local remote-tracking ref contains the commit, not that the commit
is absent from the server. Unknown evidence is intentionally not treated as
safe deletion evidence.

## Refresh and resource behavior

Expand All @@ -150,7 +166,9 @@ commit, not that the commit is absent from the server. `remote ?` and
refresh queue. There is at most one active refresh and one pending request.
- Structural snapshots publish immediately while an independent latest-state
diff coordinator uses at most four workers and a 2,048-entry object-pair
cache. Older enriched snapshots cannot replace newer structure.
cache shared by branch and stack-title diffs. Older enriched snapshots cannot
replace newer structure. Branch/shared results publish before aggregate-only
stack work, so title summaries cannot delay ordinary branch evidence.
- All inter-thread queues, subprocess output, and caches are bounded.
- Immutable snapshots are replaced as a unit; stale diff snapshots are rejected
by generation, while delayed PR results require a matching branch and object ID.
Expand All @@ -162,9 +180,9 @@ commit, not that the commit is absent from the server. `remote ?` and
- The implementation contains no application `unsafe` blocks. Rust ownership,
bounded queues/caches, subprocess timeouts, and snapshot-release tests protect
the long-running process from retained generations and unbounded growth.
- Archive-only remote-ref checks use one active/latest-pending coordinator,
bounded targets, output, result queue, deadline, and cache. Leaving Archive
cancels obsolete work; Active view never starts containment checks.
- Visible-row remote-ref checks use one active/latest-pending coordinator with
bounded targets, output, result queue, deadline, and cache in both Active and
Archive views. View and scroll changes replace obsolete work.

Run the deterministic 500-branch projection benchmark with:

Expand Down Expand Up @@ -197,7 +215,7 @@ state; every Git-local branch remains visible as an independent root. The tool
never writes or migrates Graphite files.

GitHub enrichment is optional. A single-flight, TTL-limited bounded `gh pr list`
request retrieves open PRs, and results attach only when branch name and tip
request retrieves PRs in all states, and results attach only when branch name and tip
object ID still match. Missing auth, offline operation, timeout, or malformed
JSON is shown as provider state and does not affect local navigation.

Expand Down
47 changes: 47 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## 2026-07-29

- Added a reviewed implementation plan for manual Stackmap-aware workflow preflight, dirty-safe committed-parent worktree routing, reversible local skill pilots, and color-coded main-row agent status beside the timestamp.
- Rendered user-authored stack and visual-section titles in white across ordinary, selected, focused, and `NO_COLOR` states while branch names retain their stack/section identity colors and selected-row contrast.
- [LEARN] “Names” in this UI refers to user-authored stack/section titles unless branch names are explicitly mentioned.
- Expanded GitHub enrichment from open-only PRs to all states and added compact `Merged`, `Closed`, and `Approved` status labels, with the full status included in branch detail.
- Added a right-side main-page remote safety column for pushed, ahead, behind, diverged, gone, no-remote, checking, and unavailable states; bounded no-fetch containment evidence now covers visible rows in Active and Archive views.
- Verified formatting, 206 all-target/all-feature tests, benchmarks, strict offline Clippy, and the offline release build; installed the matching `stackmap 0.1.0-alpha.1` binary at `/Users/matt/.cargo/bin/stackmap` with SHA-256 `125d5706162938ad224e1bbe9fe94c134c5fb07026469374758e237850b50e02`.

## 2026-07-28

- Kept focused trunks pinned while making Shift+Down and `J` onto the trunk reposition the scrollable stack rows to their bottom-most viewport state.

## 2026-07-27

- Increased diff-column precision so compact values below ten thousand render one decimal digit, such as `4.3K`, while preserving aligned fixed-width metadata.
- Extended downward stack navigation so Shift+Down and `J` move from the lowest stack to its configured trunk.
- Added standard cursor-aware inline name editing with Left/Right, Home/End, insertion, Backspace, and forward Delete.
- Added total owned branch counts to named stack rows.
- Installed the verified lockfile-exact `stackmap 0.1.0-alpha.1` release at `/Users/matt/.cargo/bin/stackmap`; SHA-256 is `33e420645192bb2186a05da778ffef7331f35a45bdb0f3a141cc2620da5a3390`.
- Added deferred roadmap notes for cross-host agent activity awareness and assisted Stackmap organization, with explicit boundaries around lifecycle reporting, inference confidence, terminal scraping, and Graphite-owned restacking.
- Replaced the easy-to-miss footer-only branch checkout prompt with a centered confirmation popup that names the target and keeps Enter/Escape actions visible at the 40-column minimum.
- Made structural branch-tip updates move the cursor to the newest changed branch visible in the current view, helping surface branches advanced by coding agents without reacting to enrichment-only refreshes.
- Changed selected stack and visual-section labels to retain their identity-color highlight while rendering label and stack-summary diff text in white.
- Bottom-aligned short focused sections above their pinned trunk row, removing the large empty gap previously left by top-aligned content.
- Built the lockfile-exact offline release and installed the matching `stackmap 0.1.0-alpha.1` binary at `/Users/matt/.cargo/bin/stackmap`; SHA-256 is `c659871f5d0a386fd505344cd930dff066201541a9a64ab797b5e5a5492413bc`.

## 2026-07-21

- Added named-stack net diff summaries using each displayed topology group's validated base and real primary tip; branch rows remain parent-relative and side stacks keep independent endpoints.
- Published branch/shared diff enrichment before aggregate-only summary work, retained four-worker/cache/cancellation bounds, and added 500/5,000-group scheduling characterization.
- Added one dedicated nonselectable spacer below stack titles, kept section titles directly adjacent to their owned branches, and added a fixed diff-to-worktree metadata gutter.
- Verified formatting, strict all-target/all-feature Clippy, 194 unit/binary tests, responsiveness benchmarks, 2 doctests, release build, and diff hygiene; installed the lockfile-exact release binary and passed disposable-repository startup/quit smoke testing.
- Added a reviewed implementation plan for true cumulative stack-title diffs, clearer stack/section title hierarchy, and diff-to-worktree spacing, including fork/filter/archive correctness and an eager-enrichment performance gate.
- Added explicit spacing between timestamp and diff columns and between the PR column and the terminal edge, with focused geometry/rendering coverage.
- Added double-Enter branch checkout confirmation: the first Enter arms the exact selected branch, the second executes the existing protected checkout, and Escape or navigation cancels without invoking Git. Updated help/docs and installed the verified build.
- Added a reviewed implementation plan for a versioned read-only agent status CLI, complete per-worktree dirty evidence, and `fm-mobile-review`/`worktree-rules` integration. Deferred JSONL watch, agent annotations, MCP, and mutations until one-shot usage demonstrates need.
- Added persistent, purely visual feature sections: `i` creates/removes branch-anchored boundaries, section ranges accumulate name-only indentation, and Git/Graphite topology remains unchanged.
- Added atomic section name/color persistence with coalesced-write, stale-completion, authoritative-pruning, deletion-cleanup, and cross-refresh protection.
- Added adjacent-safe effective section colors, contextual `c`/`C`, colored dividers/labels/branch names, and non-color depth cues for 40-column layouts.
- Made stack and section labels selectable and editable inline. `n` creates only missing labels; Enter edits selected labels; empty Enter removes a label; Escape cancels and restores selection.
- Fixed name editing so printable navigation letters, key repeats, Backspace/Shift-Backspace, and ordinary text are consumed before global bindings; Ctrl-C cannot quit while editing.
- Added dedicated topology, reducer, input, archive/filter, refresh/coalescing, rendering, `NO_COLOR`, and narrow-width coverage. Parent verification passes formatting, strict offline Clippy, 178 library tests, 8 binary tests, benchmark targets, 2 doctests, and the offline release build.
- Installed the verified local test build at `/Users/matt/.cargo/bin/stackmap` and exercised section creation, inline `j/k/G/J` entry, persistence across restart, unchanged Git OID, and terminal restoration in a disposable repository.
- Made the wide branch-detail sidebar hidden by default and session-toggleable with `d`, returning its width to the branch map when dismissed.
- Improved row contrast: selected rows render branch names and all metadata in black over the full identity-color fill, while the unselected checked-out branch uses a 40% identity-color tint instead of a fixed dark background.

## 2026-07-20

- Made monitoring non-interfering and event-driven: passive Git commands disable optional locks, relevant filesystem events debounce after a quiet period, noisy `.git` paths are ignored, and periodic reconciliation moved from 30 seconds to five minutes.
Expand Down
Loading