I'm considering making a tui version of this using BubbleTea so that it's a bit more interactive/alive feeling. explore the command set that we have and the visuals they produce and give me a balanced evaluation of whether this is worth doing or not
Assistant· claude-opus-4-7
I'll explore the command set and UI patterns to give you a grounded evaluation. Let me look at the codebase.
Assistant· claude-opus-4-7
I have what I need. Let me peek at one more spot to be sure about a key constraint.
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
The codebase has 21 commands but only 4 are meaningfully interactive: switch (fzf picker), prune (sequential y/n), watch (live redraw), list (two-phase with spinner). The other 17 are fire-and-forget — wt new foo, wt close, etc.
The WT_CD_FILE side-channel and RunPassthrough for git operations both depend on stdout being a real terminal. BubbleTea's alt-screen mode would need to coordinate with both — feasible (use tea.ExecProcess, exit cleanly, then write the cd file) but a real constraint.
"Alive feeling" already exists in the wave spinner (spinner.go:18-27) and the wt watch ANSI redraw loop (watch.go:155-196). BubbleTea would extend this aesthetic, not invent it.
─────────────────────────────────────────────────
Balanced Evaluation
The question reframed
There are two flavors of "BubbleTea version" and they have very different ROIs:
Replace the CLI with a TUI (one entrypoint, menus, sub-screens) — bad idea, would regret.
Add a wt dash / wt ui command that opens a live dashboard (like lazygit or k9s) and keeps all 21 existing commands as-is — potentially worth it.
Don't conflate them. The first is what people often imagine when they say "TUI"; the second is what actually solves a real problem here.
What the command set tells us
Most commands don't benefit from a TUI:
code
fire-and-forget (17): new, init, submit, close, rename, move, pull,
pr, open, feedback, shell, completion, rebase
(+continue/abort), root status
genuinely interactive (4): switch, prune, watch, list
For the 17 fire-and-forget commands, wt new sidebar will always beat wt → arrows → "new" → type "sidebar" → enter. Don't TUI-ify these.
Where a TUI would actually win
Only one of the four interactive commands is a clear win. The rest are mixed:
code
Current state TUI version Verdict
─────────────────────────────────────────────────────────────────────
wt list static table, live dashboard: STRONG WIN
two-phase render polling PR status,
multi-select rows,
keys for sw/rebase/
open/close/prune
wt prune y/n in sequence multi-select list, MODERATE WIN
space to toggle,
apply at end
wt watch ANSI redraw every smoother updates, MARGINAL
15s, already feels progress on CI (already alive)
live
wt switch fzf picker bubbles list LIKELY LOSS
(fzf's fuzzy
matching is
better, and
fzf is a soft
dependency
already)
So really the question is: "is wt dash worth building?"
That's basically wt list plus key bindings, refreshing every ~10s in the background, with the cd-side-channel firing on [s]witch-then-quit.
Honest costs
Binary size: BubbleTea + bubbles + lipgloss adds ~4–6 MB to a currently small Go binary. Not a dealbreaker but real for a Homebrew tool.
Subprocess interaction: wt rebase calls git.RunPassthrough — interactive output, conflicts, etc. From inside a TUI you'd need tea.ExecProcess to suspend the model, run git, then resume. It works but it's a known source of bugs (terminal state, signal handling).
Stateful UI is harder to test than the current pure-function commands. The codebase has init_test.go and ui_test.go; a BubbleTea model needs teatest or similar.
No machine readability: a TUI can't be piped, so it's purely additive to existing --output json|toon flows. That's fine, but it means you're adding a third UX surface (CLI, agent JSON, TUI) to maintain.
The cd-side-channel is fragile under alt-screen: works in principle (file write happens before exit), but you'd need to test that fish/bash/zsh wrappers still read WT_CD_FILE correctly after the model tears down. Not hard, just one more thing.
What I'd push back on
"more interactive/alive feeling"
The current UI is already fairly alive — the wave spinner, the two-phase list, the watch redraws, the colored glyphs. If the goal is aesthetics, BubbleTea is overkill for the payoff. The real reason to do this is workflow speed: doing 5 things from one screen without typing 5 commands. If you're not feeling that pain, the project isn't ready for it.
Also worth noting: this tool's agentic surface (CTAs, --output toon, --yes) is actively maintained — there's effort being spent making wt consumable by AI agents. A TUI is the opposite direction. Not contradictory, but they don't reinforce each other.
Recommendation
Don't TUI-ify the whole tool. Do consider building wt dash as a single new entrypoint if — and only if — you'd actually use it. Concretely:
Start with a read-only dashboard: just wt list rendered in BubbleTea with auto-refresh. ~1 day's work.
See if you reach for it. If yes, add actions (s switch, r rebase, p toggle-then-prune, o open). If you don't, kill it.
Keep prune as a candidate for a small refactor to multi-select even without the full dashboard — that's the cleanest standalone TUI win in the codebase.
The strongest argument against doing this is that every single command except prune and the dashboard already has a better non-TUI design, and you'd be adding a parallel UX that competes with itself. The strongest argument for is that "what's the state of all my worktrees + PRs at once" is genuinely a thing humans want to see, and the current table is a snapshot, not a console.
I'd lean: build a minimal wt dash prototype (a day or two), use it for a week, then decide. Don't commit to a TUI rewrite based on imagining how nice it'd be.
User
prune, list, and watch are the key ones that would be helpful to have I think. any others you might recommend?
Assistant· claude-opus-4-7
Let me look at the multi-worktree rebase and the pr/pull commands to see if any pattern matches.
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
rebase --all in rebase.go:297-386 is a serial loop that prints one status line per worktree — exactly the shape of prune and list. It's the missing fourth in the "live multi-row dashboard" pattern.
wt pr and wt pull currently require args. A TUI picker when no arg is given would be a feature addition, not a TUI-ification — different beast.
─────────────────────────────────────────────────
One strong add: wt rebase --all
This fits the exact pattern you've already identified. Look at the structure:
code
prune: N worktrees, status per row, decision per row, action per row
list: N worktrees, status per row, live PR data
watch: 1 PR, live state, polling
rebase --all: N worktrees, sequential operation per row, status per row
The common shape is a row-per-worktree view with state that changes over time. rebase --all is currently the worst version of this pattern — it dumps one line at a time, you can't see what's in flight, and any per-worktree failure scrolls past the action. A BubbleTea version could:
code
REBASE ALL onto main
──────────────────────────────────────────────────────────
wt ✓ up to date
sidebar ▃▁▃ rebasing... (12 commits)
docs-pass ⏳ queued
cleanup-mod ⚠ skipped (uncommitted changes)
rebase-flags ✗ conflicts — abort or resolve manually
──────────────────────────────────────────────────────────
2 done · 1 in flight · 1 queued · 1 skipped · 1 failed
[enter] open failed worktree [a]bort all [q]uit
Bonus: you could parallelize the rebases (each worktree is independent), which is hard to display sanely with sequential fmt.Println but trivial with BubbleTea's message bus. That's a real capability gain, not just a paint job.
Borderline: not quite worth it
User
okay lets try it out. make a new branch and start small, then we can add features as we go
Assistant· claude-opus-4-7
Good. Let me start by checking the repo state and creating a branch.
Assistant· claude-opus-4-7
Repo is clean (the .claude noise is unrelated). Here's the plan for "start small":
Branch: feat/tui
First command: wt prune — smallest scope of the four, immediate UX win (y/n loop → multi-select), no polling or cd-coordination yet. Lets us establish the BubbleTea pattern before tackling list/watch/rebase --all.
Deps: bubbletea + lipgloss. Skip bubbles for now — a minimal multi-select is less code than wiring up bubbles/list.
Layout: new internal/tui/ package, scan/apply phases stay in internal/cmd/prune.go, the TUI is purely the picker.
Creating the branch and pulling in deps.
Assistant· claude-opus-4-7
Branch created, deps in (Go 1.24 bumped automatically). Now writing the picker package.
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
Returning "" from View() after setting done = true is the inline-mode pattern for clean teardown. BubbleTea renders once more before exiting, and an empty view ANSI-clears the picker area so phase 2 output starts clean.
The model takes []PruneItem (plain data) and returns PruneResult (plain data). All git/github logic stays in internal/cmd/prune.go. This separation matters: when we test the TUI later with teatest, we don't need to mock filesystem or gh.
Opt-out default (all selected) matches user intent better than opt-in here — prune already curated the list to merged/closed PRs, so the user's job is "untick exceptions," not "tick everything."
─────────────────────────────────────────────────
Now wiring it into the prune command, preserving --dry-run, --yes, and non-TTY behavior.
Assistant· claude-opus-4-7
LSP hasn't refreshed; let me verify with the real compiler. Continuing with the prune.go edits in parallel.
Assistant· claude-opus-4-7
go mod tidy pruned the deps because they weren't imported yet when I ran it. Re-adding now that the code references them.
Assistant· claude-opus-4-7
Builds clean. Running tests and vet to confirm nothing else regressed.
Assistant· claude-opus-4-7
Clean build, clean vet, all tests pass. Let me read through the modified prune.go end-to-end to be sure the wiring is right before handing off.
Assistant· claude-opus-4-7
One nit — on cancel, I'm returning errSilent which would exit 1. The switch command's fzf cancellation path (switch.go:130-132) returns nil (exit 0). Matching that.
Assistant· claude-opus-4-7
All green. Binary is at /tmp/wt-tui — 14 MB (was probably ~5 MB before; the charm libs cost ~9 MB unstripped, matching what I flagged earlier).
You'll need a repo with at least one merged-PR worktree to see the picker. If you want to fake one for testing, wt new test-tui and merge an empty PR, or temporarily lower the threshold to expose closed branches.
Next when you're ready
In order of payoff:
list as a live dashboard — biggest visible win, but the most state (polling, refresh ticker). Establishes the pattern for watch to reuse.
watch — already does ANSI redraws; porting to BubbleTea is mostly refactoring with a nicer paint job. Could reuse list's polling scaffolding.
rebase --all — the parallelization opportunity is the real prize here, not just the visuals.
I'd suggest prune → list → watch → rebase --all in that order, since list unlocks the polling pattern that watch and the dashboard refresh both need.
User
did you set it up to be a different persistent dashboard or does it only run when I run one of the other commands? how do I evaluate this vs. what we had before?
Assistant· claude-opus-4-7
It only runs when you run wt prune. No persistent dashboard yet — that would be the wt list work (item #1 on the next-up list). What we built is a drop-in replacement for the y/n prompt loop inside prune. Everything before (scanning) and after (removal) is the same code path as before.
The mental model
code
Before Now
───────────────── ───────────────────
wt prune scan with spinner scan with spinner
for each stale: TUI multi-select picker
print name (all selected by default,
print branch space to untick,
print reason enter to apply)
y/n prompt exit picker
exec removals exec removals
So the only thing you'll notice is the prompt phase. The first and last thirds are unchanged.
Evaluating it
You need at least one stale (merged/closed) worktree to see the picker at all. Easiest paths in order of effort:
Wait until you naturally have one — best signal, but slow.
Build both versions, A/B them on the same scenario — most rigorous:
sh
git stash && git checkout main && go build -o /tmp/wt-old ./cmd/wt
git checkout feat/tui && git stash pop # already built at /tmp/wt-tui
/tmp/wt-old prune # the y/n loop
/tmp/wt-tui prune # the picker
You'd hit the prompt phase twice (re-scan), so back out of the second one with q if you don't actually want to prune.
Just play with the picker in isolation — I can add a one-shot wt prune --demo that feeds fake items into the TUI so you can drive it without real stale data. ~5 min of work. Want me to wire that up?
Questions worth asking yourself while testing
Is "all selected by default" the right call, or does it feel dangerous? (I chose opt-out; flipping is one line.)
Are the keybindings discoverable from the footer alone, or do you keep forgetting a?
Does it feel snappier than y/n/y/n, or just different?
Does the exit-and-print-removal-results split feel jarring, or fine? (Later we can absorb phase 2 into the TUI for live per-row status.)
The "alive feeling" you mentioned will register harder on wt list since that's where state is changing on its own. Prune is a one-shot picker — the upgrade is purely input ergonomics, not animation.
User
build the wt list one too then
Assistant· claude-opus-4-7
Going to build it as a new wt dash command rather than overload wt list. Three reasons:
wt list has heavy script/agent usage (--output json|toon, the CTA hints) — those depend on predictable output. Routing it through a TUI by default would surprise pipelines.
A dashboard owns the terminal (alt-screen, refreshes). That's a fundamentally different UX from "print a table and exit."
Easy to evolve independently — add panels, filters, actions to dash without polluting list.
If you'd rather it replace list entirely (or be a flag on list), say so and I'll refactor — the TUI package itself doesn't care.
MVP scope: render worktrees + PR status, periodic refresh, cursor nav, enter to switch, q to quit. No other actions yet.
Assistant· claude-opus-4-7
Building the dashboard now. Two files: TUI in internal/tui/dash.go, command wiring in internal/cmd/dash.go.
Assistant· claude-opus-4-7
Now the command wiring.
Assistant· claude-opus-4-7
Let me fix those lint nits and confirm the build.
Assistant· claude-opus-4-7
Tests pass, vet clean, wt dash registered in the Workflow group. Build artifact at /tmp/wt-tui.
What landed
code
internal/tui/dash.go new — model, view, RunDashboard, ~310 LOC
internal/cmd/dash.go new — wt dash command + gatherDashItems helper
internal/tui/prune.go lint fixes (fmt.Fprintf, max() modernization)
The gatherDashItems function in cmd/dash.go reuses collectWorktreeInfos and fetchPRData from list.go — same data source as wt list, so they stay in sync.
Behavior
code
wt dash # opens TUI (requires TTY)
wt dash (non-TTY) # errors with hint to use wt list --output json
Inside the TUI:
key
effect
↑↓ / jk
move cursor
g / G
jump to top / bottom
enter
switch to highlighted worktree (cd via shell wrapper)
r
manual refresh
q / esc / ⌃c
quit without action
Refresh tick fires every 15s. Refresh runs in a tea.Cmd so the UI stays responsive while gh is slow. Cursor clamps if a worktree disappears between ticks.
Things I'd watch for when you try it
Cursor row background tint — lipgloss is supposed to soft-merge an outer Background() style with inner foreground colors. If the highlight row looks broken (e.g., loses the yellow name color), it'll need a different approach (per-cell rendering or lipgloss.Place).
Alt-screen → cd transition — when you press enter, alt-screen tears down, we print the "● shortname" line, write WT_CD_FILE, exit. Shell wrapper should cd. If that breaks, the WT_CD_FILE write timing relative to alt-screen restore is the suspect.
Initial load latency — there's a ~1–2s spinner before the dashboard appears (waiting on gh). Could split this later: enter the TUI immediately with name-only rows, fetch PR data inside the TUI with a "loading…" state per row. More code; deferred for v1.
Empty case — repo with only the base branch shows a single row. Functional but anticlimactic.
Try it
sh
make install && wt dash
# or
/tmp/wt-tui dash
If the cursor highlight looks weird or the cd-on-enter doesn't fire, those are the most likely papercuts. The refresh cadence and the keybindings should otherwise feel natural.
User
how can I test this against a different repo with more worktrees? pass a path?
Assistant· claude-opus-4-7
No -C path flag exists — wt resolves the repo from cwd. Two practical options:
Quickest: cd there
fish
cd ~/some-other-repo
/tmp/wt-tui dash
In fish, cd - after takes you back to the previous dir if you want a one-liner round trip.
Heads up — enter-to-cd needs the shell wrapper
The raw binary at /tmp/wt-tui will render the dashboard fine, but pressing enter on a row won't actually cd your shell. The cd happens via the wt fish function (set up by wt init-shell fish), which reads WT_CD_FILE after the binary exits. The function calls command wt, not /tmp/wt-tui.
To exercise the full cd-on-enter flow against another repo:
fish
make install # puts new binary on PATH as `wt`
cd ~/some-other-repo
wt dash # uses the shell wrapper → cd works
If you don't want to overwrite your installed wt, a one-off fish wrapper does the same job:
fish
function wt-tui
set -l cdfile (mktemp -t wt-cd.XXXXXX)
WT_CD_FILE=$cdfile /tmp/wt-tui $argv
set -l rc $status
if test -s $cdfile
cd (cat $cdfile)
end
rm -f $cdfile
return $rc
end
cd ~/some-other-repo
wt-tui dash
Want a -C path flag?
Git-style wt -C path dash is ~10 lines on rootCmd (a persistent flag + os.Chdir in PersistentPreRunE). Useful for testing today and as a permanent feature. Say the word and I'll add it — it's a clean addition that doesn't touch the TUI work.
User
so adding a -C flag would let me pass in an arbitrary dir to run it against?
Assistant· claude-opus-4-7
Yes — exactly. wt -C ~/some-repo dash would run the dashboard against that repo without you having to cd first.
Mechanism: a persistent flag on rootCmd plus os.Chdir(path) in PersistentPreRunE. Every command already reads cwd via os.Getwd() and runs git from there, so chdir-at-startup propagates transparently — no per-command changes needed.
Bonus: it works for every command, not just dash. wt -C ~/other-repo list --output json lets agents query any repo too.
Want me to add it?
User
sure
Assistant· claude-opus-4-7
Adding it now.
Assistant· claude-opus-4-7
Works. Verified two cases:
sh
/tmp/wt-tui -C /tmp list # errors cleanly (not a repo)
/tmp/wt-tui -C ~/Dev/wt list --output toon # enumerates wt's own worktrees
So you can now do:
sh
/tmp/wt-tui -C ~/some-big-repo dash
without leaving your current dir. Same flag works on every command (-C ~/other-repo list --output json, etc.).
Notes
-C accepts relative or absolute paths; relative resolves against your current cwd, not the repo's.
Errors at the chdir step are clean: cannot change to /bad/path: … before any git ops run.
I haven't updated README or CLAUDE.md for the new flag yet — easy to do when you're ready to land this; let me know if you want me to do that now or after the TUI work settles.
Heads up: still need the shell wrapper for the enter-to-cd flow inside dash. The -C change doesn't help with that — the same make install (or the temporary fish function from earlier) applies.
User
i feel like we should add a command on the dashboard to prune a branch if it has already been merged
this should be non-blocking so that I can kick off a few prunes at once if I want whiel still navigating between branches. also, what about an extended info panel that changes as I scroll between the worktrees listed? maybe showing files changed, commit history on that branch, etc.
Assistant· claude-opus-4-7
Both are good adds. Let me think about scope before diving in.
Feature 1 (inline prune): Clear ask, well-bounded. ~100 LOC. Adds an async-action pattern the rest of the dashboard can reuse (rebase, open PR, etc. later). Non-blocking via tea.Cmd — each p press spawns its own goroutine, multiple prunes run in parallel, the UI never waits.
Feature 2 (detail panel): Bigger, more design questions. ~150–200 LOC. Big choices: what to show, where to put it, how to fetch lazily without lag.
I'll build feature 1 now, then come back with concrete options for the panel — having a single feature land at a time keeps each batch reviewable, and feature 1 is a confirmed ask while the panel is a "what about." If you'd rather I push straight through both, say so and I'll keep going.
★ Insight ─────────────────────────────────────
BubbleTea's actor model means each p press just emits a tea.Cmd. The runtime spawns a goroutine for each one; multiple concurrent prunes run in true parallel. The Update loop only processes messages one at a time, but the work is fully async — exactly the "non-blocking" you asked for.
The TUI shouldn't import internal/git (layering inversion). Instead, the cmd layer passes a prune func(path, branch string) error closure to RunDashboard. Same pattern as gather — TUI stays pure, business logic stays in cmd.
Per-row ephemeral state (pruning… / ✓ pruned / ✗ failed) is decoupled from the refresh data flow. A prunes map[path]*state in the model overlays on top of items; once a prune succeeds, a 1.5s tick triggers cleanup + refresh so the row disappears naturally.
─────────────────────────────────────────────────
Assistant· claude-opus-4-7
Now wire up the p key, the new messages, and rendering. Switching renderRow into a method so it can access m.prunes.
Assistant· claude-opus-4-7
Expected — cmd/dash.go callsite needs updating. Finishing the model first.
Assistant· claude-opus-4-7
Now updating the rendering to display prune state in place of the PR/review/CI cells, and adding p prune to the footer.
Assistant· claude-opus-4-7
Now wiring up the prune closure in cmd/dash.go.
Assistant· claude-opus-4-7
Clean build. Feature 1 landed.
What you can do now in the dashboard
key
effect
p
prune highlighted row (only when PR is merged/closed)
Behavior:
Press p on a stale row → [#PR] [review] [CI] columns get replaced with "pruning…" in yellow
Removal runs in a goroutine — keep navigating, kick off more prunes on other rows
Success → "✓ pruned" in green for 1.5s, then the row vanishes on the next refresh
Failure → "✗ " in red, sticks around until you manually refresh
No-op on: current worktree, base branch, rows with an open PR or no PR
The eligibility rules match wt prune exactly, so you can't accidentally remove something with unmerged work or that you're currently sitting in.
Feature 2 — the detail panel
Here's a concrete design. Tell me if any axis needs to change.
Recommended: bottom panel, ~10 lines, lazy+async load with per-path cache.
code
WORKTREES
──────────────────────────────────────────────────────────────────────
Name Branch Age Dirty Sync PR Review CI
rebase-... feat/... 2h — ✓ #142 ✓✓✓ ✓4/4
▸ sidebar feat/... 3d 3 ⇣2 #138 ✓✓◐ ◐2/4
docs-pass docs/... 1d — ✓ #140 ○ ✓3/3
──────────────────────────────────────────────────────────────────────
sidebar · feat/sidebar-foo · PR #138 Add expandable sidebar
5 commits ahead, +247 −82 across 14 files
a1b2c3d fix: handle edge case in resize handler 2h ago
e4f5g6h refactor: extract drag logic 1d ago
i7j8k9l feat: add expandable sidebar 2d ago
m0n1o2p test: cover collapse animation 2d ago
q3r4s5t wip: initial scaffold 3d ago
──────────────────────────────────────────────────────────────────────
↑↓ move · enter switch · p prune · r refresh · q quit
User
bottom
lets try all of these, we can prune down if needed
okay, would this handle status changing too? as ci processes for instance
Assistant· claude-opus-4-7
Good answers. The CI/status-changing question deserves a direct answer:
Yes, but it needs one tweak baked in. The plan as I described would only refresh the detail when the cursor moves. To handle live status changes (CI flipping pending→pass while you're hovering on the row), I'll also re-fetch the focused row's detail on every 15s refresh tick. Same cadence as the main table. CI columns in the main table already update — adding focused-detail-refresh closes the gap.
If 15s feels too slow for watching CI, I can add a faster cadence specifically for the focused row's detail (e.g., 5s) — flag if you want that.
Let me check what helpers exist before building the fetch path.
Assistant· claude-opus-4-7
Got the lay of the land. Adding helpers in git/github packages, then extending the TUI. Going to refactor RunDashboard to take a config struct since we're now at 4 callbacks.
Assistant· claude-opus-4-7
There's already a FileChange in status.go with different fields. Renaming mine to avoid the collision.
Assistant· claude-opus-4-7
Now adding GetPRDetail for title/author/body.
Assistant· claude-opus-4-7
Now to the bigger piece — refactoring RunDashboard to a config struct and threading detail through the model.
Assistant· claude-opus-4-7
Now adding the detail panel render between the table and the footer.
Assistant· claude-opus-4-7
Now updating cmd/dash.go to use the new config struct and wire up fetchDetail.
Assistant· claude-opus-4-7
Folding the named CI checks into the same GetPRDetail call — saves an extra gh round-trip per detail fetch.
Assistant· claude-opus-4-7
Detail panel is wired. Build is clean.
What landed this round
code
internal/git/detail.go new — LogOnelineIn, DiffStatsIn, DiffFilesIn
internal/github/github.go GetPRDetail (also pulls named CI checks)
internal/tui/dash.go + DashDetail types, cache, dispatch logic,
renderDetail panel; RunDashboard now
takes a DashConfig struct
internal/cmd/dash.go + gatherDashDetail, firstParagraph, wired
into RunDashboard via DashConfig
Behavior
Move cursor → panel for the new row shows "loading detail…" for ~200ms (no-PR rows) or ~700ms (with PR), then renders
Cache hit on revisit → instant
Refresh tick (every 15s) → main table refreshes and focused row's detail force-refreshes. CI changing pending→pass appears in the named-checks line without you doing anything
──────────────────────────────────────────────────────────────────
sidebar · feat/sidebar-foo · PR #138 Add expandable sidebar
opened by @mvwi
Refactors the sidebar into a controlled-collapse component with…
5 commits ahead, +247 −82 across 14 files
a1b2c3d fix: handle edge case in resize handler 2h
e4f5g6h refactor: extract drag logic 1d
i7j8k9l feat: add expandable sidebar 2d
m0n1o2p test: cover collapse animation 2d
q3r4s5t wip: initial scaffold 3d
Files: M src/sidebar.tsx A test/sidebar.test.tsx M src/index.tsx +11 more
CI: ✓ test-unit · ◐ test-e2e · ◐ deploy-preview · ✓ lint
──────────────────────────────────────────────────────────────────
↑↓ move · enter switch · p prune · r refresh · q quit updated 3s ago
User
i think the detail panel could use more color/organization. the commit messages are the really important part, the hashes don't really do much. maybe we slim it down to be just the key human information and then you can do a button press to get more detail on that commit if needed? how can I drill in more? how can I move the cursor from the worktree list to the commits on that worktree? open to ideas but these are the limitations as I seen them atm
Assistant· claude-opus-4-7
Three good asks, and they're interconnected. Let me address each:
★ Insight ─────────────────────────────────────
The pattern you're asking for is modal focus — Tab cycles between panes (worktrees ↔ commits), each pane owns its own cursor. Same pattern as lazygit. The current dashboard has one cursor and one pane; we need two.
For drill-in, the cleanest move is tea.ExecProcess to suspend the TUI and run git show <hash> in your $PAGER. Drops you back into the dashboard on q. No new fetch code, full diff, integrates with your existing git config. Lazygit does this too.
Conventional-commit prefix coloring is the highest-leverage visual change. The first word of each subject (feat:, fix:, refactor:) is the most scannable signal on the screen — coloring it gives instant visual texture without any layout reshuffling.
─────────────────────────────────────────────────
Plan for this turn
Visual redesign: section labels (CHANGES / COMMITS / FILES / CI), conventional-commit type column colored by type, drop hashes from default view.
Focus model: Tab toggles focus between worktrees and commits. j/k (and arrows) operate on whichever pane is focused. Esc always returns to worktrees.
Drill-in: enter on a focused commit suspends the TUI and runs git show <hash> in your pager. q to return.
Context-aware footer: keybinding hints change based on focus.
I'll keep hashes available internally (needed for git show) but hide them in the default view. Let me build it.
Assistant· claude-opus-4-7
Adding cyan to the styles and rewriting the key handler for the focus model.
Assistant· claude-opus-4-7
Now the key handler — routing j/k/enter based on focus, adding Tab/Esc, and wiring git show via tea.ExecProcess.
Assistant· claude-opus-4-7
Now the per-pane key handlers, focus toggle, and the git-show drill-in.
Assistant· claude-opus-4-7
Now the visual redesign of renderDetail.
Assistant· claude-opus-4-7
Now context-aware footer hints.
Assistant· claude-opus-4-7
All green. Here's what shipped this round.
Visual redesign
Before / after:
code
BEFORE
sidebar · feat/sidebar-foo · PR #138 Add expandable sidebar
opened by @mvwi
Refactors the sidebar into a controlled-collapse...
5 commits ahead, +247 −82 across 14 files
a1b2c3d fix: handle edge case in resize handler 2h
e4f5g6h refactor: extract drag logic 1d
...
Files: M src/sidebar.tsx A test/sidebar.test.tsx ...
CI: ✓ test-unit · ◐ test-e2e · ◐ deploy-preview · ✓ lint
AFTER
sidebar · feat/sidebar-foo · PR #138 Add expandable sidebar @mvwi
Refactors the sidebar into a controlled-collapse component…
CHANGES 5 commits ahead, +247 −82 across 14 files
COMMITS
fix: handle edge case in resize handler 2h
refactor: extract drag logic 1d
feat: add expandable sidebar 2d
test: cover collapse animation 2d
wip: initial scaffold 3d
FILES M src/sidebar.tsx A test/sidebar.test.tsx M src/index.tsx +11
CI ✓ test-unit · ◐ test-e2e · ◐ deploy-preview · ✓ lint
What changed in the panel:
Section labels (CHANGES / COMMITS / FILES / CI) in bold dim — scannable hierarchy
Conventional commit types colored in a dedicated column: feat: green, fix: yellow, refactor: blue, perf: cyan, test: magenta, revert: red, others dim
User
the enter for git show just flashes the terminal input for a second then opens back up the dashboard tui
Assistant· claude-opus-4-7
That's git's default pager behavior. When git show's output fits on one screen, less exits immediately because git sets LESS=FRX by default — the F flag means "quit if one screen." For a small commit, output fits, less exits, you see the flash.
Fix is a one-liner: override LESS to drop the -F flag so less stays open even for short output.
Assistant· claude-opus-4-7
Pushed. Two changes:
LESS=R is set when you don't already have a LESS env var. Git's default is LESS=FRX — the F is "quit if output fits on one screen," which is what was making short commits flash by. Stripping it keeps less open until you press q.
Dropped --stat so git show includes the full diff — the diff is what you actually want when drilling into a commit. With --stat alone the output was almost always one-screen, which is what triggered the auto-quit in the first place.
Your existing LESS env (if you set one) is respected — only the empty case gets the override.
Try it
sh
make install && wt dash
# tab into commits, enter on one, you should land in less with the full diff
# press q to come back to the dashboard
If it still flashes after this
A couple of less-common configs that defeat the fix:
git config core.pager = cat (or similar non-pager) — no pager is invoked at all. Check with git config --get core.pager. Fix: unset it, or set it to less / delta / bat.
PAGER=cat in your shell env — same effect. Check with echo $PAGER.
No less installed — extremely rare on macOS, but pacman distros can be missing it.
If you'd rather have an in-TUI drill-down (full subject + body + per-commit files rendered inside the dashboard instead of dropping to a pager), that's the alternative — say so and I'll swap the approach. The pager route is leaner, but the in-TUI version is more "alive" and avoids the dependency on your pager config entirely.
User
do we have to make it run the actual git command? it kicks us out of the tui. can we show it in a third panel below?
Assistant· claude-opus-4-7
Yeah — let's drop the external pager entirely and render commit detail in a third panel that appears when commits are focused. Always-on preview, follows the cursor. No explicit "expand" step needed — Tab into commits, the panel shows up; Tab/Esc back, it goes away.
★ Insight ─────────────────────────────────────
This shifts from "explicit drill-in" to "always-on preview" — same pattern as a file-browser's preview pane. The act of focusing the commits list IS the drill-in; cursor movement updates the preview. No mental load of "expand vs collapse."
Two new git calls per commit: git show -s --format=... for metadata and git show --numstat --format= for files. Cached per hash forever (commit data is immutable). First hover ~150ms, every revisit instant.
Per-file status (A/M/D) can be inferred from numstat counts: +N −0 = added, +0 −N = deleted, +N −M = modified, − = binary. Saves one git call per commit by dropping --name-status.
─────────────────────────────────────────────────
Adding the git helper first.
Assistant· claude-opus-4-7
Now the TUI layer — adding the third panel, dropping the external git show.
Assistant· claude-opus-4-7
Now adding the DashCommitDetail types and the related messages/commands.
Assistant· claude-opus-4-7
Updating the commits key handler to drop git show and dispatch commit-detail fetches on cursor move.
Assistant· claude-opus-4-7
Cleaning up unused imports now that gitShowCmd is gone.
Assistant· claude-opus-4-7
Now handling commitDetailLoadedMsg in Update and rendering the third panel.
Assistant· claude-opus-4-7
Now the render. Adding the third panel call in View and the renderCommitDetail method.
Assistant· claude-opus-4-7
Adding the renderCommitDetail method. Putting it next to renderDetail for cohesion.
Assistant· claude-opus-4-7
Now the cmd-layer wiring for FetchCommitDetail.
Assistant· claude-opus-4-7
Adding the gatherCommitDetail helper.
Assistant· claude-opus-4-7
Clean build. External git show is gone — commit detail now renders in a third panel that appears when commits are focused.
Mock of the full layout
code
WORKTREES
─────────────────────────────────────────────────────────────────────
wt main — — — — —
rebase-flags feat/rebase 2h — ✓ #142 ✓✓✓ ✓4/4
▸ sidebar feat/sidebar 3d 3 ⇣2 #138 ✓✓◐ ◐2/4
docs-pass docs/pass 1d — ✓ #140 ○ ✓3/3
─────────────────────────────────────────────────────────────────────
sidebar · feat/sidebar · PR #138 Add expandable sidebar @mvwi
Refactors the sidebar into a controlled-collapse component…
CHANGES 5 commits ahead, +247 −82 across 14 files
COMMITS ▸ j/k navigate · esc back
fix: handle edge case in resize handler 2h
refactor: extract drag logic 1d
▸ feat: add expandable sidebar 2d
test: cover collapse animation 2d
wip: initial scaffold 3d
FILES M src/sidebar.tsx A test/sidebar.test.tsx +12
CI ✓ test-unit · ◐ test-e2e · ◐ deploy · ✓ lint
─────────────────────────────────────────────────────────────────────
COMMIT feat: add expandable sidebar
@mvwi · 2026-05-12
Adds a controlled-collapse component that takes a
`collapsed` boolean prop and animates the width
transition via framer-motion.
Closes #98.
FILES M src/sidebar.tsx +124 −38
A src/hooks/useCollapse.ts +43 −0
A test/sidebar.test.tsx +67 −0
M src/index.tsx +13 −5
─────────────────────────────────────────────────────────────────────
↑↓ move · esc back · tab worktrees · r refresh · q quit
User
i think enter/esc should zoom in and out of the panels. so fi you want to exit out entirely you hit esc a few times. i find myself hitting enter to zoom in to the next down panel and it closes the app. we could use 's' instead of enter for switching to that wt
Assistant· claude-opus-4-7
Good catch — that's a much better mental model. Let me rework the keys:
Enter = zoom in (worktrees → commits, no further levels for now)
Esc = zoom out one level (commits → worktrees → quit)
s = switch to highlighted worktree (works from either focus mode)
q = immediate quit (escape hatch, any level)
Tab = stays as an alias for the same zoom toggle
Assistant· claude-opus-4-7
Now remove the old enter→switch behavior and replace it with enter→zoom into commits.
Assistant· claude-opus-4-7
Updating the footer hints to reflect the new model.
Assistant· claude-opus-4-7
Clean. Here's the new key map:
key
worktrees focus
commits focus
↑↓ / jk
move worktree cursor
move commit cursor
enter / tab
zoom into commits
(no further levels)
esc
quit
back to worktrees
s
switch to highlighted wt
switch to highlighted wt
p
prune
(no-op)
r
refresh
refresh
q / ctrl+c
quit immediately
quit immediately
Two levels of zoom: enter goes one deeper, esc one back. From the top, esc exits. So mashing esc always gets you out regardless of where you are.
s works from either focus mode — the worktree cursor is preserved, so you can tab into commits, browse around, then s to jump into that worktree without going back to the worktree list first.
Footer hints
code
worktrees: ↑↓ move · enter commits · s switch · p prune · r refresh · q quit
commits: ↑↓ move · esc back · s switch · r refresh · q quit
Try it
sh
make install && wt dash
Press enter to dive, esc to climb out, s whenever you actually want to switch into the highlighted worktree. The "I keep accidentally exiting" problem should be gone — enter is now zoom-in everywhere.
User
the color on the conversational commit messages is helpful, look for other places/ways we can bring in color to the displays to help make them easier for people to scan/parse
Assistant· claude-opus-4-7
Good direction. Let me audit what's monochrome right now and pick the highest-leverage adds.
★ Insight ─────────────────────────────────────
The dashboard currently uses color for state (green=pass, red=fail, yellow=pending) but underuses it for content type (what kind of thing am I looking at). Sections, labels, and refs are all the same dim gray, which makes them blend together when you're scanning.
The "color language" worth establishing: green/red/yellow stay reserved for state. Cyan is currently almost unused — perfect for "metadata accents" (section labels, authors, dates). Blue is currently only used for review-pending and PR # in the table — extending it to issue refs (#123) and PR # everywhere creates a consistent "this is a reference" signal.
The PR title is currently rendered with no style at all, so it visually disappears under the dim text around it — yet it's the single most useful piece of human context in the panel. Bolding it (no color change) draws the eye without adding another hue.
─────────────────────────────────────────────────
What I'll add
High leverage (does the most for scanning):
Section labels (CHANGES/COMMITS/FILES/CI/COMMIT) → cyan instead of bold-gray. They're hard to see currently.
PR title → bold (default color, just bold) so it pops as the headline.
PR # in detail → blue (was dim) — matches the worktree table, signals "reference."
Author handles (@mvwi) → cyan — these are metadata, scannable identity.
Issue refs in body (#123) → blue — parsed via regex, matches PR # color.
Stats numbers → bolded so 5 commits and 14 files pop against the dim connective words.
Age in worktree table → green if recent (<24h), default if normal (1-6d), dim if older. Fresh worktrees pop.
Medium leverage:
8. File paths in commit detail → type-aware coloring: tests magenta, configs cyan, docs dim, code default. Helps you see "is this a real change or just test/config churn?"
Going to build all of these.
Assistant· claude-opus-4-7
Now wiring the new helpers into the renderers. Starting with the worktree table age coloring.
Assistant· claude-opus-4-7
Now updating the detail panel — PR title bold, PR # blue, author cyan, body with issue refs colored.
Assistant· claude-opus-4-7
Now the stats line — bold the numbers, dim the connector words.
Assistant· claude-opus-4-7
Updating commit detail panel renderings.
Assistant· claude-opus-4-7
Acknowledged — I'll wrap the color work and address your new message in one response. Continuing the color additions: file paths in commit detail.
Assistant· claude-opus-4-7
Now the esc-to-trunk behavior.
Assistant· claude-opus-4-7
All green. Color additions and the esc-to-trunk behavior shipped.
What landed (color)
Where
Was
Now
Section labels (CHANGES/etc.)
bold gray
bold cyan
PR title in detail panel
default
bold
PR # in detail panel
dim
blue (matches worktree table)
Author handles (@user)
dim
cyan
Issue refs in body (#123)
dim
blue, parsed via regex
Stats numbers (5, 14)
mixed
bold, connectives stay dim
Age column in worktree table
dim
green if <24h, default if days, dim otherwise
File paths in commit detail
default
magenta tests, cyan configs, dim docs, default code
What landed (esc behavior)
Three-level zoom out, all via esc:
code
commits focused → worktrees focused (cursor preserved)
worktrees focused, on feature → worktrees focused, cursor on trunk
worktrees focused, on trunk → quit
So mashing esc still reliably exits, but on the way out it parks you at the trunk row.
Rebase asks — design proposal
Three real design questions before I build this. Let me make concrete calls; tell me which to flip.
Q1: r conflict with refresh
r is currently "refresh." Three options:
option
trade-off
Move refresh to f5
Slight muscle-memory cost; r becomes the rebase key cleanly
Drop manual refresh
Auto-refresh every 15s already; loses "I'm impatient" key
Keep refresh on , use for rebase one + for all
User
drop manual refresh
how does it know which branch to rebase onto? what if there are worktrees created from different branches?
abort on conflict works
Assistant· claude-opus-4-7
Branch question — short answer
It uses your .wt.tomlbase_branch (defaulting to main), the same as wt rebase does today. So rebasing in the dashboard means "rebase this worktree onto origin/main" regardless of where the branch was originally created from.
That covers ~95% of workflows but is wrong for stacked PRs — if you created feat-b from feat-a and want to rebase feat-b onto the updated feat-a rather than onto main, the dashboard won't know that. Git doesn't track parent-branch info anywhere reliable, so detecting it would require either:
a heuristic (git merge-base against all candidate parents and pick the most recent — ambiguous and expensive)
a new state file where wt new --from X records the parent (works only for worktrees created going forward)
For now I'll use the configured base_branch and match the CLI's behavior exactly. If you hit the stacked case enough, we can add a parent_branch per-worktree override later.
OK — building r/R now with: drop refresh, r = rebase one, R = rebase all with confirmation, abort on conflict, skip dirty worktrees with a clear message.
Assistant· claude-opus-4-7
Now the key handling — drop r-as-refresh, add r/R for rebase, add confirmation interception.
Assistant· claude-opus-4-7
Adding rebase msg handling in Update and the rebase cell render.
Assistant· claude-opus-4-7
Now updating renderRow to handle rebase state alongside prune state, and adding renderRebaseCell.
Assistant· claude-opus-4-7
Now updating the footer and rendering the confirmation prompt when active.
Assistant· claude-opus-4-7
Now the cmd-layer rebase closure.
Assistant· claude-opus-4-7
Clean build. Three pieces shipped this turn.
Color additions
Visible everywhere the eye lands:
Section labels (CHANGES/COMMITS/FILES/CI/COMMIT) → bold cyan, far more visible than the previous bold-gray
PR title → bold default — the headline finally reads as the headline
PR # in detail panel → blue, matching the worktree table
Author handles → cyan accent
Issue refs in bodies (#42, #138) → blue, regex-parsed
Stats numbers (5 commits, 14 files) → bold, connectives stay dim so the numbers pop
Age column in worktree table → green if <24h, default for days, dim for weeks+ (stale rows stay all-dim regardless)
File paths in commit detail → type-aware: magenta for tests, cyan for configs, dim for docs, default for code
Esc → trunk → quit
Three-level zoom:
code
commits focused → worktrees, cursor preserved
worktrees, on a feature row → worktrees, cursor on trunk
worktrees, on trunk → quit
Rebase
key
action
r
rebase highlighted worktree (no-op on trunk)
R
rebase all non-trunk worktrees, with [y]es / [n]o prompt
Per-row visual states (same pattern as prune):
state
render
running
rebasing… (yellow)
done
✓ rebased (N) (green) — held 1.5s, then refresh
up to date
✓ up to date (green) — when 0 commits behind
dirty
✗ uncommitted changes (red)
conflict
✗ conflicts — wt rebase --continue (red)
Behavior matches the CLI's safety posture:
Skips dirty worktrees (no auto-stash from inside the TUI — explicit operations belong in your shell)
User
/compact
compact
User
is there a way we can detect the width of the terminal and ajust the output so that it wraps/fits in the avialable space?
Assistant· claude-opus-4-7
Let me check what's already in place for width handling before answering.
Assistant· claude-opus-4-7
Yes — and it's already half-wired. The TUI captures terminal width via tea.WindowSizeMsg into m.width at internal/tui/dash.go:341, but nothing currently reads it. Every row is rendered to a fixed ~82-col layout assembled from the constants at dash.go:844-853 (Branch=28, Sync=8, etc.). So on a wide terminal the divider rules are short and PR bodies wrap aggressively at column 78; on a narrow terminal the columns blow past the right edge.
★ Insight ─────────────────────────────────────
BubbleTea's WindowSizeMsg fires on startup and on every resize, so m.width stays current without polling. Lipgloss also has built-in word-wrap via Style.Width(n).Render(text) — currently renderDetail and renderCommitDetail use a hand-rolled wrapText and truncate, which would slot right into a width-aware render path.
The reason the dashboard has fixed columns today is that it was ported visually from wt list, which prints to a regular terminal and has no way to react to resizes mid-output. The TUI has no such constraint — it can be fully responsive, it just hasn't taken advantage yet.
─────────────────────────────────────────────────
Recommendation: two reasonable scopes; I'd start with #1 because it's where the visible weirdness lives.
Minimal (low risk) — clamp ruleWidth to min(computed, m.width-4); pass m.width into renderDetail/renderCommitDetail so the body/files lines wrap to the actual viewport. Columns stay fixed; dividers extend or shrink to match. Probably 30 LOC.
Responsive (more work) — also flex the Branch column to consume slack on wide terminals, and collapse Review/CI columns into a single "Status" cell below some threshold (say m.width < 100). This is where you start fighting with multi-line rows.
Tradeoff on the minimal path: at very narrow widths (<80 cols) the column header line still overflows because the column constants aren't going to fit no matter what we clamp the dividers to. We'd need either a min-width floor with a graceful "terminal too narrow — resize to ≥80" message, or scope #2 to actually shrink columns. The first is one line; the second is the real fix.
wt list (non-TUI) has the same fixed-width problem but it's a separate code path — worth fixing eventually, but unrelated.
Want me to wire up scope #1?
User
lets do it the robust way
Assistant· claude-opus-4-7
Let me create a task list and dig into the row renderer to understand the column model.
Assistant· claude-opus-4-7
Now let me read the renderRow and detail rendering to understand the exact shape.
Assistant· claude-opus-4-7
Now let me start implementing. First, mark task 1 in progress and update the column constants block.
Assistant· claude-opus-4-7
I need to fix a width-accounting bug I just introduced. The rule width should be 2 less than contentWidth since the rule is rendered after a " " prefix.
Assistant· claude-opus-4-7
Now rewrite View() to use the layout.
Assistant· claude-opus-4-7
Now update renderRow to take the layout.
Assistant· claude-opus-4-7
Now add buildStatusCell for narrow mode. I'll put it next to buildPRCells.
Assistant· claude-opus-4-7
Now wrap the PR body in renderDetail to multiple lines instead of truncating.
Assistant· claude-opus-4-7
Now build and run vet to catch any remaining issues.
Assistant· claude-opus-4-7
Clean. Let me also run the linter.
Assistant· claude-opus-4-7
Boy-scout the lint warnings before moving on.
Assistant· claude-opus-4-7
Clean lint. Mark task 4 done and move to manual testing.
Assistant· claude-opus-4-7
Let me verify the layout math at a few widths with a quick scratch program, since I can't drive a real TTY.
Assistant· claude-opus-4-7
Layout matrix looks right. Let me clean up the scratch file.
Assistant· claude-opus-4-7
Binary works. Mark testing as done (you'll be the one driving it interactively) and hand off.
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
The "tail cluster width" concept (PR+Review+CI in full mode, single Status cell in narrow) is what made the prune/rebase overlay code keep working untouched. Both async overlays already render to tailWidth() — they fill whatever the layout says the tail is, regardless of mode. If you ever add a new mode (say, "ultra-narrow" that drops Sync), you only update tailWidth() and the column header builder; the row glyph code and overlay code stay put.
Another small thing worth noting: the layout struct intentionally doesn't carry styling, only widths. The styles (dStyleBlue, dStyleYellow, etc.) stay as package-level vars, so the layout is purely about geometry. This separation makes the responsive logic easy to test in isolation if you ever add tui tests — pure-function computeLayout(items, width) → layout with no terminal state.
─────────────────────────────────────────────────
What you'll see at different widths
Full mode (≥76 cols, branch flexes from 16 up to 64):
code
WORKTREES
────────────────────────────────────────────────────────────────────────────
Name Branch Age Dirty Sync PR Review CI
▸ ● feat mvw/payment-flow 2h — ⇣2⇡1 #142 ✓ ✓✓
fix-bug mvw/null-deref 5h — ✓ #143 ◐ ◐
main main 1d 3 — — — —
Narrow mode (68–75 cols, PR/Review/CI collapsed into Status):
code
WORKTREES
──────────────────────────────────────────────────────────────────
Name Branch Age Dirty Sync Status
▸ ● feat mvw/payment-flow 2h — ⇣2⇡1 #142 ✓
fix-bug mvw/null-deref 5h — ✓ #143 ◐ rev
main main 1d 3 — —
The Status cell shows the worst signal first: ✗ ci > ✗ rev > ◐ ci > ✓ > ◐ rev.
Tiny mode (<68 cols):
User
here's a sample output. I'm wondering if there's anything we can do about the PR name not wrapping and also wondering what the ## Summary line is doing there. should that display the full pr description? ideas?
COMMITS
chore: merge staging into michael/template-adjustments 3m
fix: align weekday formatting with UTC scheduling 2h
feat: article excerpts, frequency-aware hero, linkable sections 2h
FILES M apps/platform/app/api/inngest/_functions/feed-email/digest-cron.ts +1 more
CI ✓ Secret Detection (Gitleaks) · ✓ Check Skip QA · +4 more
─────────────────────────────────────────────────────────────────────────────────────────────
↑↓ move · enter commits · s switch · r rebase · R rebase all · p prune · q quit updated 0s a
Assistant· claude-opus-4-7
Let me look at the relevant rendering and the body-cleanup pipeline.
Assistant· claude-opus-4-7
Two distinct bugs, plus a design question. Let me lay them out.
1. Title wraps mid-word. The title line is built unboundedly at internal/tui/dash.go:1186-1199 — name · branch · PR # · title — with no width check. When the total exceeds the panel width, the terminal wraps it. The branch+name are redundant with the row above (cursor is on template-adjustments and the branch is visible in the table), so the fix is both trim the redundancy and truncate the title to fit.
2. ## Summary leaks through.firstParagraph() in internal/cmd/dash.go:218 returns everything up to the first blank line. For the common GitHub PR format ## Summary\n\n<actual content>, that's literally ## Summary. Bug. Fix: strip leading markdown headers, then take the first content paragraph.
3. Bullets get mashed together. Even after fixing #2, the next paragraph likely looks like - bullet one - bullet two - bullet three because collapseWhitespace flattens newlines to spaces. If a PR body is bulleted, we should preserve line breaks.
Here's what I'd propose visually:
code
PR #2831 feat(digest): article excerpts, frequency-aware hero, linkable… @michael
- article excerpts now flow into the digest layout
- hero card swaps shape based on send frequency
- section anchors are deep-linkable from the inbox preview
CHANGES 3 commits ahead, +87 −68 across 2 files
COMMITS …
Changes from current:
Title line drops <name> · <branch> (already shown in the row); just PR #N <title> … @author. Title gets truncated with … if it would push @author off the right edge.
Body skips leading ## Heading lines, preserves newlines (no collapseWhitespace), wraps each line to width, still caps at 3 visible lines total.
For non-PR worktrees, the title line stays <name> · <branch> (no change).
On displaying the full PR description: I'd push back on that. The dashboard's value is dense scanning — showing a 30-line description shoves CHANGES/COMMITS/FILES off-screen and makes the panel feel cluttered. The 3-line preview is plenty for "what's this PR about"; if you need the full description, opens it in browser already. The exception worth considering: when commits panel is focused (so the third panel is unused), we have vertical real estate. We could raise the cap to 5-6 lines when there's room.
User
do we have a way of knowing how tall the terminal window is? so we could use the space dynamically to show pr descriptions? or should we just cap at 6 lines?
Assistant· claude-opus-4-7
Yes — m.height is set in the same WindowSizeMsg handler (internal/tui/dash.go:342) but nothing currently reads it. Same story as width was.
★ Insight ─────────────────────────────────────
The technical answer is "easy yes," but the design answer is messier. Computing remaining vertical space means subtracting the fixed parts (3 header rows + 1 column header + N item rows + 2 footer rows + the detail panel's non-body lines: title + CHANGES + COMMITS section + FILES + CI ≈ 8–12 fixed lines + commits count) — and the body is the only flex variable. The math is doable but couples the body cap to a tower of magic constants that drift when sections are added.
─────────────────────────────────────────────────
Recommendation: cap at 6 lines. It's the natural ceiling before a "preview" stops being scannable, and it sidesteps two real problems with dynamic sizing:
Visual instability — if the cursor moves to a worktree with fewer commits, the COMMITS section shrinks, the body would grow to fill the gap, and the whole panel reshuffles. Same when you enter into commits and the third panel appears — body suddenly has to shrink. That kind of layout jitter is exhausting to navigate.
Diminishing returns — PR descriptions that need >6 lines also need formatting (code blocks, links, headers) that a one-line-per-paragraph preview destroys anyway. Past the 6-line threshold, o (open in browser) is the right tool.
The one place dynamic height would be worth it: clamping body to less than 6 when the window is short (say 20 rows). But that's a single min(6, m.height-fixedOverhead) line, not a full layout solver. Want me to do that as the lower bound and keep 6 as the upper?
So the concrete proposal stays: A. ship title-trim + header-strip + newline-preserving body, cap at 6 lines (raised from 3), with an optional min clamp if m.height is tight. OK to proceed?
User
okay what about capping at 6 but scaling down if it's a short window? or do we just mak epeople make it taller
Assistant· claude-opus-4-7
Going with cap 6, scaling down on short windows. The scaling math doesn't need to be exact — just predictable. I'll use min(6, m.height - 20) with a hard floor of 0. That means 26-row terminals (and taller) hit the ceiling of 6, 22 rows gives 2, anything ≤20 rows drops the body entirely. Users will feel the transition smoothly as they resize.
Implementing now: title-trim + header-strip + newline-preserving body + height-aware cap, all together.
Assistant· claude-opus-4-7
Now the title-trim and body changes in renderDetail.
Assistant· claude-opus-4-7
Now update the body wrap to preserve newlines and use bodyMax, then plumb bodyMax in.
Assistant· claude-opus-4-7
Now plumb bodyMax through. Update the function signature and call sites.
Assistant· claude-opus-4-7
Now update the View() call site and add the bodyMax helper.
Assistant· claude-opus-4-7
Two boy-scout fixes: drop the now-unused collapseWhitespace and switch to SplitSeq.
Assistant· claude-opus-4-7
All shipped. Here's what your sample case will look like now:
PR #2831 feat(digest): article excerpts, frequency-aware hero, linkable… @michael
- article excerpts now flow into the digest layout
- hero card swaps shape based on send frequency
- section anchors are deep-linkable from the inbox preview
CHANGES 3 commits ahead, +87 −68 across 2 files
★ Insight ─────────────────────────────────────
The new title line drops the redundant name · branch · prefix for PR rows specifically — those identifiers are already visible in the row above the cursor, so repeating them was just consuming the space the actual PR title needed. Non-PR rows keep the name · branch form because there's no PR title to replace it with.
The body line cap formula (min(6, h-20)) is intentionally not derived from exact section sizes. Computing the precise remaining vertical space would have meant coupling the helper to every section's row count (commits, files, ci) — every time you'd add a section, the constant would silently rot. The "−20" reservation is generous enough that the math stays right as long as the panel never gains more than ~14 rows of fixed scaffolding, which gives plenty of room to grow.
─────────────────────────────────────────────────
Changes summary
Change
File
Why
Drop name·branch from PR title line; truncate title with … to fit
internal/tui/dash.go
Line was overflowing and wrapping mid-word
Strip leading markdown headers in firstParagraph
internal/cmd/dash.go
## Summary was bleeding through as the entire body preview
Preserve newlines in body wrap (per-line, not collapsed)
internal/tui/dash.go
Bullet lists were getting jammed into a single line
User
the CHANGES header isn't picking up commits behind, should it? should it also include stuff like dirty files, last edit time, etc?
Assistant· claude-opus-4-7
Two answers:
Behind should be there, yes — it's missing. The detail layer never fetches it. DiffStatsIn in internal/git/detail.go:59 only counts commits ahead via rev-list --count base..HEAD. But we don't need a new git call: it.Behind is already on the DashItem from the row data. One-line plumb-through into buildStatsLine. Quick fix.
Dirty / last-edit / unpushed: I'd say no. Those are already in the worktree row (Dirty column, Age column, Unpushed glyph in CI), so duplicating them in CHANGES is just noise. The mental model that's working for the rest of the panel is: the row is the summary, the panel is the depth. CHANGES specifically answers "what work lives in this branch vs base" — line counts, files touched, commits ahead/behind. Dirty files aren't part of that — they're uncommitted, by definition not in the diff. Same for last-edit-time (it's a timestamp, not a delta).
★ Insight ─────────────────────────────────────
There's a subtle distinction worth naming: d.Files and "dirty files" look similar but mean different things. d.Files is the diff between HEAD and base — committed work. Dirty files are uncommitted changes in the working tree. Two separate git concepts that both render as file lists in different contexts; conflating them in CHANGES would be misleading.
─────────────────────────────────────────────────
Proposed format (behind only when nonzero, so simple branches stay tidy):
The "2 behind" gets the yellow tint (same as the row's ⇣N glyph), so it pops as a "you'll need to rebase" signal. Want me to ship just that, or do you want to push back on the dirty/last-edit decision?
User
ok
Assistant· claude-opus-4-7
Implementing the behind addition.
Assistant· claude-opus-4-7
Clean. Three states for the CHANGES line now:
code
CHANGES 3 commits ahead, +87 −68 across 2 files
CHANGES 3 ahead, 2 behind, +87 −68 across 2 files
CHANGES 2 commits behind base
The behind number is yellow (matches the row's ⇣N glyph). When both ahead and behind are present, "commits" is dropped from "ahead" to keep the line compact — context makes the units obvious.
make install && wt dash to try.
User
should we replace prune with close? (single wt action vs. all wts)
Assistant· claude-opus-4-7
Yes — strong yes, and I'd go further than a rename. Here's my read:
The current naming is misleading.p prune on the dashboard is already a single-worktree action; the bulk-prune behavior of CLI wt prune doesn't actually exist in the TUI. So calling it "prune" trains a wrong mental model. The CLI wt close is the right semantic match: it targets one worktree, has eligibility logic, and handles the messy cases (dirty, unpushed, open PR).
But there's a more interesting opportunity hiding here. Currently p only works on merged/closed PRs — try it on a dirty WIP branch and it silently no-ops. That's annoying. If we're renaming anyway, we should also adopt wt close's safety model:
Safe to close (merged/closed PR, clean, no unpushed) → close immediately, no prompt — same async UX as today
Risky (dirty, unpushed, or open PR) → footer confirmation, exactly like R rebase all:
code
feat-x has 3 uncommitted changes, 1 unpushed commit · Close anyway? [y]es [n]o
Current worktree → refuse (can't close yourself from inside; same as CLI)
Base branch → refuse
★ Insight ─────────────────────────────────────
The reason this works in a TUI but would be awkward elsewhere: the worktree row right above the cursor already shows the risk signals (Dirty column, ⬆ unpushed glyph, PR state). So a footer prompt like "feat-x has 3 uncommitted, close anyway?" isn't surprising — it's just confirming what the row already told you. This is a place where the dashboard's tight visual coupling between summary and action pays off.
─────────────────────────────────────────────────
Tradeoff: today p is a "do no harm" key — only ever touches finished work. After the change, c can nuke anything (with a prompt). Some workflows prefer the safety-by-restriction. But honestly, the prompt does the same job, and the gain — being able to close abandoned WIPs from the dashboard without context-switching — is real.
Proposed scope:
A. Rename p → c, keep current eligibility (merged/closed only). Minimal change.
B. Rename p → c, allow any worktree, footer confirmation when risky. (Recommended.)
C. Keep both: p stays for safe bulk-style cleanup; add c for the full close-anything action.
I'd pick B. C is also fine if you want to preserve muscle memory, but two keys for two flavors of the same concept feels like clutter.
Want me to ship B?
User
b
Assistant· claude-opus-4-7
Let me look at the relevant sections so I plan the rename cleanly.
Assistant· claude-opus-4-7
Start with mechanical renames. I'll batch them.
Assistant· claude-opus-4-7
Now the remaining m.prunes references in rebase paths and the start/can functions:
Assistant· claude-opus-4-7
Replace the rebase-busy guards and the entire prune function block with the new close logic in one batch.
Assistant· claude-opus-4-7
Now replace the startPrune/canPrune block with the close logic + risk detection.
Assistant· claude-opus-4-7
Now the confirm kind, the confirm-key handler, and the prompt renderer:
Assistant· claude-opus-4-7
Now update renderConfirmPrompt to handle the new kind and update the row/footer renderers.
Assistant· claude-opus-4-7
Now the confirm prompt for the new kind, and the footer hint:
Assistant· claude-opus-4-7
Now the cmd-side callback rename.
Assistant· claude-opus-4-7
Let me check whether Unpushed is populated for non-PR worktrees — that's a critical gap for the close-risk detection.
Assistant· claude-opus-4-7
The Unpushed field is only populated when there's an open PR — that's a critical gap. A branch with no PR but unpushed commits would close silently. Let me fix gatherDashItems.
Assistant· claude-opus-4-7
Clean. Mark task done and build the binary.
Assistant· claude-opus-4-7
All clean. Here's the summary of behavior change:
★ Insight ─────────────────────────────────────
The cleanest part of this refactor was that the existing confirm machinery for R rebase all already had every primitive we needed: a confirm kind, a footer prompt renderer, a key handler that intercepts. Adding a second kind was a four-line additive change plus the model fields for "what's the confirm about." This is the value of having gone modal-ish for the rebase prompt — the second use case proves the pattern.
The risk-detection helper is intentionally pure: closeRisks(it DashItem) []string. It looks at fields already on the item — no git calls, no IO. The one thing we changed upstream is populating Unpushed for every non-base worktree (not just open-PR ones), which makes the risk detection accurate for "feature branch I never opened a PR for."
─────────────────────────────────────────────────
What changed
Before
After
Key binding
p prune
c close
Cell text while running
pruning… / ✓ pruned
closing… / ✓ closed
Eligibility
Only merged/closed PR rows
Any row except base + current worktree
Risky close UX
Silent no-op
Footer confirmation, naming each risk
Unpushed population
Only set for open PRs
Set for every non-base worktree
What the footer prompt looks like
For a worktree that's dirty + has unpushed commits + open PR:
code
Close feat-payment? · 3 uncommitted changes, 1 unpushed commit, PR #142 still open · [y]es [n]o · any other key cancels
For a worktree with just one risk:
code
Close feat-payment? · 2 unpushed commits · [y]es [n]o · any other key cancels
For a safe close (merged PR, clean, no unpushed): no prompt, just kicks off immediately like before.
Edge cases handled
Closing the base branch → silent no-op (can't remove)
Closing the current worktree → silent no-op (would tear out the dashboard's own cwd)
User
lets disable other commands like rebase while an operation like closing the wt is active
Assistant· claude-opus-4-7
Looking at the code, the gap is in startClose — it doesn't check whether a rebase is in progress on the row. startRebase already checks for closes, but the reverse isn't true. Plus the busy-check vocabulary is duplicated across four call sites; let me unify it.
Assistant· claude-opus-4-7
Let me add the helper near the other model methods and refactor the call sites.
Assistant· claude-opus-4-7
Now refactor the call sites to use it.
Assistant· claude-opus-4-7
Now startClose — this is where the missing rebase check was.
Assistant· claude-opus-4-7
And executeConfirmedClose — it also needs the unified check since time has passed between the prompt and the confirmation (a rebase could have been kicked off via... actually no, the prompt is modal, so nothing else can run. But the row could have a stale close-failed state from a prior attempt. Let me audit.)
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
A subtle point about what rowBusy covers: it returns true for any phase including done (1.5s cleanup hold) and failed (persistent until next refresh tick). That last case means a failed close will block rebase attempts until the 15s refresh tick clears the state. That's intentional — the failed-state cell holds the error message for the user to read; if rebase clobbered it, the error disappears and the user wouldn't know what went wrong.
The downside is a failed close can sit for up to 15s. If that becomes annoying, the fix is to add a tea.Tick cleanup for the failed phase too (say 5s) — same pattern as the done-phase cleanup. Easy to add later if it bites.
─────────────────────────────────────────────────
What changed
New rowBusy(path) bool method on dashModel — single source of truth for "is this row currently doing something."
startRebase, startClose, executeConfirmedClose, executeRebaseAll, countRebaseTargets all use it.
Closed the gap where c on a row mid-rebase would proceed to nuke the worktree while git was mid-operation.
Behavior matrix
Row state
r
c
R (rebase all)
Idle
✓ starts rebase
✓ starts close (or prompts)
✓ included in batch
Rebasing
no-op
no-op
skipped from batch
Closing
no-op
no-op
skipped from batch
Close done (1.5s)
no-op
no-op
skipped from batch
Close failed
no-op
no-op
skipped from batch
Rebase failed
no-op
no-op
skipped from batch
Failed states clear on the next 15s refresh tick (or when the row gets removed from the list). Built and ready — make install && wt dash.
User
i think we need a visual indication that options are disabled while another option is in progress. what about turning the disabled actions in the bottom bar gray?
Assistant· claude-opus-4-7
Good call. Let me also check what styles we already have — we already use dim gray for the whole footer, so "more gray" needs a different visual treatment.
User
[Request interrupted by user]
User
the footer is coming through white righ tnow
Assistant· claude-opus-4-7
Let me check how dim is rendered elsewhere in the codebase — there might be a profile/terminal issue.
Assistant· claude-opus-4-7
That confirms it — color "8" is "bright black" in ANSI, which on macOS Terminal and many themes renders as light gray or near-white. Let me fix both issues at once: switch dStyleDim to an explicit 256-color gray (so it actually looks dim), and add a dStyleDisabled for footer keys that can't be used.
Assistant· claude-opus-4-7
Now refactor footerKeys to do per-key styling.
Assistant· claude-opus-4-7
Now update View() to stop wrapping the footer in dStyleDim since footerKeys already pre-styles per-key.
Assistant· claude-opus-4-7
★ Insight ─────────────────────────────────────
The root cause of "footer is white" is that lipgloss's Color("8") maps to ANSI bright-black, which terminal themes are free to interpret however they want. macOS Terminal's default dark themes (Pro, Homebrew, Basic) map it to a light gray that reads as near-white. The 256-color palette range 232–255 is the standard gray ramp — 232 is near-black, 255 is near-white, monotonically. Using explicit numbers in that range gives you predictable grayscale regardless of theme.
A subtler point about the disabled-key styling: I used color 238 plus strikethrough rather than just one or the other. Either alone is ambiguous (a single dim/struck key could read as "low priority hint" instead of "you can't press this"). The combination is unambiguous — and the strikethrough survives even on themes that flatten gray colors, so the disabled signal works even in degraded color modes.
─────────────────────────────────────────────────
Changes
Style
Before
After
dStyleDim
color 8 (bright black, often near-white)
color 244 (reliable medium gray)
dStyleHeader
color 8
color 244
dStyleBranch
color 8
color 244
dStyleDisabled(new)
—
color 238 + strikethrough
Footer behavior
When cursor is on an idle non-base worktree:
code
↑↓ move · enter commits · s switch · r rebase · R rebase all · c close · q quit
When cursor is on a row that's currently closing:
code
↑↓ move · enter commits · s switch · r̶ ̶r̶e̶b̶a̶s̶e̶ · R rebase all · c̶ ̶c̶l̶o̶s̶e̶ · q quit
When cursor is on the base branch:
code
↑↓ move · enter commits · s switch · r̶ ̶r̶e̶b̶a̶s̶e̶ · R rebase all · c̶ ̶c̶l̶o̶s̶e̶ · q quit
When cursor is on the current worktree (the one wt dash was launched from):
code
↑↓ move · enter commits · s switch · r rebase · R rebase all · c̶ ̶c̶l̶o̶s̶e̶ · q quit
R rebase all only goes disabled when every row is busy or base — until then, it's still useful for the other rows.
make install && wt dash and look at the footer as you navigate up/down — keys should toggle their disabled state per row.
User
commit
/commit
and /pr and /wt-release
Assistant· claude-sonnet-4-6
Good — we're on feat/tui with all the TUI work unstaged. I'll skip .claude/settings.json, .claude/agents/, and .entire/ (not source). Let me split into 4 logical commits.
One thing to flag before tagging: we're on feat/tui with PR #1 open but not yet merged. GoReleaser builds from whatever commit is tagged, so this matters.
Latest tag is v1.18.0. Three options:
User
[Request interrupted by user for tool use]
User
think this justifies a 2.0?
Assistant· claude-opus-4-7
Honestly, no — by strict semver this is 1.19.0. Everything added is purely additive:
wt dash is a new command — doesn't change existing ones
wt prune UX changed but the flags (--yes, --dry-run) and non-TTY behavior are unchanged, so scripts keep working
-C/--directory is a new flag — opt-in
No removed commands, no renamed flags, no changed defaults
A 2.0 would imply breaking changes, which there aren't. Future-you (or anyone reading the changelog) reads "2.0" and goes looking for what broke. Coming up empty is confusing.
That said, the counter-argument is real: going from "CLI that prints" to "CLI that prints + has an interactive dashboard" is a meaningful generational shift in what the tool feels like. If you want 2.0 as a marketing signal, it's defensible — semver is a guideline, not a law, and you're the maintainer.
My recommendation: v1.19.0, with a punchy release note that calls out wt dash as the headline feature. The "biggest version number we've shipped" is the bigger signal than the actual digit. But if you want 2.0, I'd just say so in the release notes — "no breaking changes, but the dashboard feels like a new tool."
Which one?
User
1.19 works
Assistant· claude-opus-4-7
CI all green. Merging and tagging.
Assistant· claude-opus-4-7
Tag pushed. GoReleaser pipeline is running — it'll build the binaries and update the Homebrew formula.
To upgrade locally once the pipeline completes:
fish
git -C /usr/local/Homebrew/Library/Taps/mvwi/homebrew-tap pull origin main && brew reinstall wt
Recap of the release
v1.19.0 — merged via PR #1 (now closed)
4 commits on feat/tui → fast-forwarded into main
All CI green (build, lint, test on macos+ubuntu × Go 1.22 + 1.23) before merge
This is entire hooks config — Claude Code project settings that are useful to anyone cloning the repo. Worth committing.
Assistant· claude-sonnet-4-6
Done. Single commit — .claude/agents/ and .entire/ are left untracked since they're local runtime state, not project config.
User
push
Assistant· claude-opus-4-7
Already pushed. 99483ef chore: add Claude Code hooks for entire integration is on origin/main.
User
should we add those to gitignore?
Assistant· claude-opus-4-7
Yes — both are local runtime state. I'd go with the "ignore everything in .claude/ except settings.json" pattern so any new Claude-Code runtime dirs auto-ignore (todos/, cache/, etc.) without a future maintenance hit.
Assistant· claude-opus-4-7
Both runtime dirs are hidden now. Committing.
Assistant· claude-opus-4-7
Done — 8b91afe on origin/main. git status is clean now.
User
the " updated 0s ago" line in the dashboard view feels a little wierd since it just sits at 0 until the next update happens. is there a way we can make it dynamic so it counts per second?
Assistant· claude-opus-4-7
Already correct on the render side — buildStatusLine reads time.Since(m.lastRefresh) each time it's called. The fix was just making View() run every second.
★ Insight ─────────────────────────────────────
A subtle BubbleTea property: returning from Update with any non-nil model triggers a View() call. So a tick that does no work (just reschedules itself) is enough to "animate" anything time-derived — no model state change needed. This pattern works for spinners, elapsed counters, blinking cursors, etc.
The 1-second tick is essentially free here: re-rendering the dashboard at idle is ~µs of CPU, and BubbleTea's diff-based terminal writes only push the changed characters (the "0s"→"1s" delta in one cell). No flicker.
─────────────────────────────────────────────────
wt switch (no args) — fzf already excels here. Replacing it would lose ground unless you want to drop the fzf dependency, and there's no good reason to.
wt move — current flow is "pick target, confirm, done." A multi-select picker for which files to move would be a useful feature, but that's adding capability, not TUI-ifying the existing command.
wt new / wt pr / wt pull with no args — could gain interactive pickers (list open PRs, list remote branches). Reasonable, but these are feature additions dressed as TUI, not TUI-ifications. Evaluate them on the merits of the feature itself.
What I wouldn't bother with
submit, close, rename, init, open, feedback, pr <number>, pull <branch>, new <name> — all single-shot, fast, no state worth showing live. Adding TUI here is pure overhead.
The honest unifying frame
Your three picks + rebase --all share a property: they all have N rows of state that benefit from being visible simultaneously and updating over time. That's the genuine BubbleTea sweet spot. Anything outside that shape — single confirmations, one-shot creation, fire-and-forget — doesn't qualify, and trying to force it would just be ceremony.
So: prune, list, watch, rebase --all. Stop there. If you find a fifth, it'll probably be a feature addition (PR picker, file picker for move) rather than a TUI version of something existing.
Three real design questions:
Layout: bottom vs side vs toggle?
Bottom (recommended): Works at any terminal width. Always visible. Costs ~10 vertical lines.
Side: Better space efficiency on wide terminals, breaks on narrow ones (~120+ chars needed).
Toggle (press space/tab): Hidden by default, expand on demand. Adds keybinding complexity but keeps the dashboard scannable for those who don't want detail.
Diff stats vs base (+x −y across N files) ✓ cheap, useful
File-by-file changes (M src/foo.go A test/bar.go) — useful but eats vertical space
PR title + author + first paragraph of body — useful, requires extra gh call
Named CI checks + their links — already in our data, just not surfaced
Fetch strategy — I'd default to lazy+async+cache:
On cursor move, check cache. Cache hit → render instantly. Cache miss → show "loading…", fire tea.Cmd, render when result arrives.
Invalidate cache when refresh tick fires.
Race-safe: cmd result includes the path; only render if cursor is still on that path.
Cost: 2 git calls (log + diff --shortstat) plus 1 gh call when there's a PR. ~200ms per row first time, instant after.
If the recommended shape sounds right (bottom panel, commits + diff stats + PR title, lazy fetch), say go and I'll build it. If you'd swap any axis, tell me which.
Limitations to flag while you test
Vertical space — if your terminal has fewer than ~30 lines, the panel + table together overflow. No scrolling logic yet; content just gets cut from the bottom. Bigger terminal = better experience.
First-hover latency on PR rows — adds one gh pr view per detail load. Cache eliminates the cost on revisit, but the first time you land on each PR row, ~500ms–1s.
Body collapsing is naive — multi-paragraph PR descriptions get flattened to the first paragraph, then truncated to one line. If you have rich PR bodies you want more of, easy to expand to 2-3 lines.
Files line is best-effort widths — uses len() not visual width, so paths with wide unicode could overflow. Probably fine for most paths.
Try it
sh
make install && cd ~/big-repo-with-many-worktrees && wt dash
Things worth pressing on:
Move the cursor up and down rapidly — does the loading state feel smooth or janky?
Hover on a row with pending CI checks and wait 15s — do the glyphs flip in place?
Press p on a stale row while hovering on a different row — does the prune happen in the background without breaking the panel?
Are 5 commits enough, too few, or too many?
Is "Files:" useful as a one-liner, or would 5 lines of M path/file.go be better?
Tell me what to cut/expand based on what you see.
Hashes hidden in the default view (preserved internally for drill-in)
PR author right-aligned on the title line
PR body gets its own line below the title, dim
Commits without a conventional prefix render in the same column with an empty type cell, so alignment is preserved.
Focus model
key
when focus = worktrees
when focus = commits
Tab
jump to commits
back to worktrees
jk
worktree cursor
commit cursor
enter
switch worktree
git show the commit
p
prune
(no-op)
esc
quit
back to worktrees
rq
refresh / quit
refresh / quit
The footer hints change based on focus so the active keys are always visible:
code
focus = worktrees: ↑↓ move · enter switch · p prune · tab commits · r refresh · q quit
focus = commits: ↑↓ move · enter git show · esc back · tab worktrees · r refresh · q quit
When commits are focused, the COMMITS section header shows ▸ j/k navigate · enter view · esc back to the right, and the highlighted commit row gets the background-tint cursor.
Drill-in
enter on a focused commit:
TUI suspends (alt-screen torn down)
Runs git -C <worktree-path> show --stat <hash> — pages through your $PAGER (e.g., less / delta / whatever you have configured)
q returns you to the dashboard right where you left off (cursor, focus, refresh state preserved)
This means you get the full power of your git config — syntax highlighting via delta, search via less, etc. — without me having to reimplement any of it.
Edge cases handled
Tab on a worktree with no commits yet → no-op
Detail still loading when you press Tab → no-op until commits arrive
Refresh tick shrinks the commit list while you're focused on commits → cursor clamps to last valid index
Worktree change focus state: switching panes resets the commits cursor to top
Try it
sh
make install && wt dash
# tab to commits, j/k around, enter to git show, q to come back, esc to return to worktrees
Let me know how the colors feel — easy to retune the palette (e.g., make fix red instead of yellow, dim wip more aggressively, etc.) and whether the section labels help or feel cluttered.
The bottom panel only renders when you're focused on commits. Tab away → it vanishes; Tab in → it follows the cursor automatically.
Behavior
Tab into commits → third panel appears with detail for the cursor commit
No more enter in commits mode (footer hint dropped — nothing to do, the detail is right there)
Commit data is immutable so the cache never expires — every commit you've ever scrolled to in this session renders instantly on revisit.
Try it
sh
make install && wt dash
# tab, j/k, watch the bottom panel follow
A few things worth pressing on:
Vertical space: this adds 8–15 more lines below the existing detail panel. Tight on 30-line terminals; comfortable on 40+. Tell me if it overflows badly.
Body wrapping: I'm word-wrapping with lipgloss.Width — paragraph breaks preserved. Long bodies will spill to many lines. If they get out of hand we can cap at N lines with a "…" indicator.
Files truncation: long paths get truncated with "…". For commits with 50+ files, the panel grows tall. We can cap at N files with "+M more" if that becomes a problem.
No diff in the panel (yet): the third panel shows what's changed but not how. If you want a snippet of the diff, we can add an inline preview of the first chunk per file, or a key to scroll through a wrapped diff. Holding for now.
r
R
ctrl+r
No conflict, but capital R for the common action is awkward
Recommendation: move refresh to f5. Auto-refresh handles 99% of cases; rebasing is the more frequent intentional action.
Q2: Confirmation dialog
action
recommendation
reasoning
r (one)
No confirmation
Single atomic action, reversible via git reflog, conflicts surface as ✗ conflicts inline
R (all)
Single-key confirmation
Bulk + irreversible-ish; partial failure leaves N worktrees mid-rebase. Inline prompt: Rebase 5 worktrees onto main? [y/N] at the footer
Recommendation: single rebase = no prompt; rebase all = prompt.
Q3: Conflict handling
Both rebase operations are non-blocking (like prune — tea.Cmd per row, true parallelism). If a rebase hits conflicts:
The TUI aborts that rebase (git rebase --abort in the affected worktree)
The row shows ✗ conflicts — wt rebase --continue in red
Other worktrees keep rebasing
The user can drop out of the TUI and resolve manually
Alternative: leave the conflict in place, no abort. That stops the user from doing anything else in that worktree until they resolve. Probably worse.
Recommendation: abort on conflict, show the error path inline.
What I'd build
code
WORKTREES updated 3s ago
─────
wt main — — — — —
rebase-flags feat/... 2h — ✓ rebasing…
▸ sidebar feat/... 3d 3 ⇣2 #138 ✓✓◐ ◐2/4
docs-pass docs/... 1d — ✓ ✓ rebased (3 commits)
old-feat feat/... 12d — ✓ ✗ conflicts — wt rebase --continue
─────
↑↓ move · enter commits · s switch · r rebase · R rebase all · p prune · f5 refresh · q quit
Per-row state machine mirrors the prune pattern: rebasing (yellow) → done (green for 1.5s) → row updates to current state.
Are the three recommendations correct? If yes, I build it. If you want a different key arrangement, no confirmation on R, or non-aborting conflicts, say which.
Fetches the base branch before each rebase
On conflict: aborts in that worktree, leaves the message, continues with other rebases
Multiple rebases run in parallel (each in its own tea.Cmd goroutine)
Confirmation prompt
When you hit R, the footer transforms to:
code
Rebase 5 worktrees onto main? · [y]es [n]o · any other key cancels
y or enter confirms; anything else cancels. While the prompt is up, all other keys are blocked.
Footer hints reflect the new bindings
code
worktrees: ↑↓ move · enter commits · s switch · r rebase · R rebase all · p prune · q quit
commits: ↑↓ move · esc back · s switch · q quit
Try it
sh
make install && wt dash
A few worktrees that are ⇣N behind will exercise the rebase path. Try:
r on a behind worktree → watch it transition
r on a worktree with uncommitted changes → see the skip message
R from anywhere → confirmation prompt at the footer
Press n or any other key during the prompt → cancel
Press y → all eligible rebases kick off in parallel
If the "rebasing…" state lingers too long or the result animation feels off-tempo, the 1.5s hold is one constant to tune.
code
WORKTREES
terminal too narrow
need 68 cols, have 50 — resize and the dashboard returns
q quit
Resizing recovers automatically — BubbleTea sends a new WindowSizeMsg on every resize and the next render picks the appropriate mode.
Other changes that came with this
PR body wraps up to 3 lines in the detail panel (previously single-line truncate). Wide terminals get a real readable summary; narrow ones still cap so the panel doesn't blow up. The 3rd line gets an … if there was more body to show.
Branch column caps at 64 — at 200-col terminals the rows stop at ~124 cols total so you're not reading a single row across an ultrawide. Dividers and detail panels match.
Two lint fixes along the way (renderConfirmPrompt and handleConfirmKey single-case switches, plus a redundant closure in cmd/dash.go).
Try it
sh
make install && wt dash
Then:
Resize your terminal narrow until you cross the 76-col line — Review/CI should collapse into Status mid-render.
Resize further past 68 — should switch to the resize hint.
Resize back wide — should restore full layout. Branch column should grow to use slack.
Open the detail panel on a worktree with a long PR body — body should wrap to up to 3 lines.
o
not
Want me to:
A. Ship the title-trim + header-strip + newline-preserving body, cap at 3 lines (recommended).
B. Same as A, plus raise cap to ~6 lines when the commit-detail panel isn't visible.
C. Skip the body section in the panel entirely and rely on o for full description.
Cap body at min(6, h-20) instead of constant 3
internal/tui/dash.go
Use vertical real estate when available, shrink on short terminals
Drop now-unused collapseWhitespace helper
internal/tui/dash.go
Boy scout
Try it
sh
make install && wt dash
Look at:
A PR with a markdown-headed body (## Summary etc.) — should now show the bullets, not the heading
A PR with a long title — should end in … rather than overflowing
A PR with bullet points in the description — bullets should be on separate lines
Shrink the terminal vertically — body preview shrinks; below ~20 rows it disappears entirely so you keep your commit/file context
Closing during a rebase on that row → no-op (rebase busy)
Multiple parallel closes → supported, same as before
Pressing c again while the prompt is up → other-key cancels; prompt clears
Failed close (git error) → row shows ✗ <error> and persists; you can investigate
Try it
sh
make install && wt dash
Test cases worth running:
c on a merged-PR worktree → closes immediately, no prompt
c on a worktree with dirty changes → prompt names "N uncommitted changes"
c on a feature branch with unpushed commits but no PR → prompt names "N unpushed commits"
c on an open-PR worktree → prompt names "PR #N still open"
c on the base branch (e.g. main) → no-op
c on the worktree you launched wt dash from → no-op
During a prompt, press anything other than y/enter → cancels
During a prompt, press y → close starts; row shows closing…