Repository navigation
Experiment: sidebar Inbox (agent tabs grouped by what they need from you) - #421
Draft
frenchie4111 wants to merge 7 commits into
Draft
frenchie4111 wants to merge 7 commits into
frenchie4111 wants to merge 7 commits into
Conversation
Adds a Projects | Inbox toggle at the top of the sidebar. The Inbox view lists one row per agent tab in urgency order: needs approval, asked you something, done-unread, PR events, then working and seen/idle folded. - New `inbox` slice: per-tab turn summaries (question vs finished plus one line of the last message), server-stamped read marks, status-since timestamps, and seen PR-event fingerprints. Persisted except statusSince. - InboxDeriver (main) records a turn when a tab goes to 'waiting'. Chat tabs classify their last assistant entry; terminal Claude tabs read the Stop hook's transcript tail; Codex/Cursor terminal tabs degrade to "finished". - Viewing a tab in a focused window marks it read. Cmd+J opens the top needs-you item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found in the headless sandbox: - The Projects | Inbox toggle pushed the header icons off-screen at the default 224px width; it now sits on its own row. - After a restart chat tabs sleep with no status, which dropped their unread turns into "Seen". Any settled tab with an unread turn now stays in its needs-you section. - Main-worktree rows no longer read "repo · repo"; the why-line wraps to two lines instead of truncating at one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/renderer/hooks/useHotkeyHandlers.ts
The toggle row was too loud for something you glance at. The Inbox is now one icon in the header row beside New worktree / Task list: a plain inbox when nothing needs you, an accent bell-with-dot when something does (count in the tooltip). Click toggles the view; it stays highlighted while the Inbox is showing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/renderer/components/Sidebar.tsx # src/renderer/hooks/useHotkeyHandlers.ts
…rminals - PR events: main seeds inbox.prSeen on first sight of a worktree's PR, so existing merges and red builds don't light the bell; opening a worktree by any route marks its event seen; merged/ready move to a non-blocking "PR updates" section outside needs-you. - Pruning: records for worktrees missing from the list AND from disk are dropped on listChanged (covers removals while Ness was off), including prSeen via the new inbox/worktreesForgotten. - statusSince moves to the terminals slice, stamped by the reducer from an `at` the dispatcher supplies and dropped on terminals/removed. No extra event per status flip, no shell-tab leak. - The Stop hook's transcript path is consumed once; a test covers a slow read racing a newer turn. - Ages tick every 30s; Cmd+J says so when the only item is the one you're on; the focus gate's WebContentsView gap is documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An experiment to live with for a few days, not a finished feature. It adds an Inbox icon to the sidebar header row (beside New worktree / Task list). It's a plain inbox icon when nothing needs you and an accent bell-with-dot when something does; clicking it swaps the worktree list for the Inbox and back. Projects is unchanged and stays the default. Inbox lists one row per agent tab (
repo · worktree · tab, plus a one-line "why"), in urgency order:Bash "curl -sI https://example.com"AskUserQuestion, or a turn whose last paragraph ends in a question (the question is quoted)Needs-you sections sort oldest first. Cmd+J opens the top needs-you item, skipping the tab you're already on, so repeated presses walk the list. It's rebindable and listed in the cheatsheet.
How it works
inboxslice withturns(per tab: how the last turn ended, plus one line of text),seenAt(stamped by the server, monotonic), andprSeen(per-worktree PR-event fingerprint), all persisted toconfig.json. When a tab entered its current status isterminals.statusSince, which the terminals reducer stamps from anatin the status payload. Reducers keep object identity when nothing changes, and there is one test per event.InboxDeriver(main) records a turn whenever a tab's status moves intowaiting. Dispatches are scoped to that one tab and deduped against the last status, so streaming adds nothing. Turns for closed tabs are pruned per worktree.prs.byPath. The first time main sees a worktree's PR it records the current state as already seen, so an existing backlog stays quiet. Opening the worktree by any route marks the current event seen. Marking stores a fingerprint (event kind + head SHA or review time), so a new failure on a new commit shows up again.The main open question: "asked a question" vs "just finished"
AskUserQuestionshows up as a pending approval with that tool name and goes in "Asked you something".Stophook payload includestranscript_path, andhooks.tsfiresonStopEventbefore it dispatcheswaiting. The deriver records the turn immediately, then reads the last 256 KB of the jsonl off the hot path and fills in the text.?in the final paragraph, with fenced code ignored. Rhetorical questions earlier in a reply don't count.Verified
electron-vite build,build:headless, and vitest (201 files / 2775 tests, 19 of them new) all pass.curl; unread turns survive a server restart; clicking a row opens the tab and clears it; Cmd+J goes to the approval first and then to the next item.~/.claude; covered by a unit test with a temp transcript), and PR events (the sandbox repo has no GitHub remote; covered by model tests).Easy to change after you try it
INBOX_SECTIONStable insrc/renderer/inbox-model.ts.src/shared/inbox-turn.ts(classifyTurnText).prEventForininbox-model.ts.App.tsxnext tojumpToNextInboxItem. For example, require a scroll to the bottom, or count only clicks from the Inbox.jumpToInboxinhotkeys.ts(Cmd+J).buildInboxModel.Open questions
🤖 Generated with Claude Code