Repository navigation
Inbox sidebar: session lifecycle, settled shelf, branch and pull request glyphs - #220
Merged
Merged
Conversation
… detection Visits and settlement live in sessions/lifecycle.json so a visit never rewrites a session file. ChatMetadata carries the session branch for the merge rule; GitRepository::is_branch_merged also recognises squash merges.
Unsettled sessions list across projects, newest first and static in order; what a session needs shows as emphasis: approval and failure in colour, working rows receding, unread ready rows standing out. Settled sessions wait in a collapsed shelf; project rows at the bottom start sessions and scope the inbox. Permission requests are tracked per asking session so the sidebar can flag them. Settings → General holds the inactivity and merge rules; a sweeper applies them every ten minutes.
…ilding rows A startup sweep can settle hundreds of sessions in a row; each change now updates one row and re-sorts, and the watcher refreshes the list when another process writes lifecycle.json.
A session learns its branch after a run when it has none (worktree sessions already carry theirs). The lifecycle sweep and each run read the branch's pull request through gh; rows show an open, draft, merged or closed pull request, or the bare branch, and name what the pull request waits for. A merged pull request also settles the session.
Project rows and the scope filter leave the sidebar: a filter that stays on hides exactly the cross-project attention the inbox exists for. The header's "+" opens a searchable picker (projects most recently active first, No project, Add project…) that starts a session where it is chosen. Rows keep naming their project.
…sions before the first listing The shelf opens upward with a short animation, up to half the window, and pages its rows. Inactivity settlement now runs in one batched write before the first listing, dated by the session's last activity, so a long-unused store no longer paints every session only to sweep it row by row.
The header holds the search field with its magnifier and the "+ Project" button, so adding a project no longer scrolls away at the end of a long list; typing filters, Up/Down and Enter pick, Escape closes. The trigger lost its tooltip, which used to open over the search field.
The scroll wrapper needs a definite height; with only a maximum the rows never scrolled. The list now sizes to its rows, capped at half the window. The trigger uses the primary button style so it stands out like Done.
gpui-component's Popover has no animation; the fade-and-slide the Select dropdown plays lives in a crate-private helper. The picker renders its own surface in popover style and mirrors that motion, ring and shadow rising with the cube of the fade.
The settled shelf gives way to a Projects view: every session in its project's folder, settled ones receding. Folders keep a stable order that adopts new projects at the top and changes only by drag and drop; collapsed folders mark approval, failure or unread sessions inside. The header holds the view switch and two buttons, new session (project picker) and new project. View, collapsed folders and order persist in ui-settings.json. Saving a temporary project is back on the folder header.
… header The custom themes replaced the theme colors but left the resolved tokens at gpui-component's stock values; the segmented tab bar paints its track and active pill from those, nearly black on black in dark mode. Sync the two tokens from our colors and give the track its own shade. The header grows, the view switch and buttons move up a size, icons at 16px.
…tween folders The switch reads Active | Projects, is taller and slides its pill on gpui-component's move spring; drawing it ourselves lets the active segment stand out in dark mode, so the theme token sync from the previous commit goes again. The header takes the title bar's colour. A dragged folder no longer highlights its target's header: a line above or below the target's whole block shows where it lands.
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.
Summary
The GPUI sidebar becomes an inbox instead of a project tree, after comparing it with T3-Code's sidebar.
code_assistant_core::session::lifecycle): status (what the agent does) and unread (changed since the user last looked) are separate dimensions. Visits and settlement live insessions/lifecycle.json, never in the session file.git::GitRepository::is_branch_mergedalso recognises squash merges. Inactivity settlement runs batched before the first listing, dated by the session's last activity.gh pr viewsupplies the pull request (open / draft / merged / closed, review, checks). A merged pull request settles the session.Needs approvalflagged from permission requests of any session; a settled shelf docked at the bottom that opens upward; the header's "+" is a project picker with search, keyboard navigation and the Select dropdown's enter motion.Details in
docs/session-lifecycle.md.Not covered
Test plan
cargo test --workspace(onlyweb::tests::test_web_searchfailed, a live DuckDuckGo request)cargo clippy --all-targets --all-features -- -D warnings