Repository navigation
feat(sidebar): fold covered projects into the project that covers them - #8
Open
na0s-fleet-agents[bot] wants to merge 2 commits into
Open
na0s-fleet-agents[bot] wants to merge 2 commits into
na0s-fleet-agents[bot] wants to merge 2 commits into
Conversation
A project whose folder is a repository another project covers now shows in that project's sidebar group: the same folder on the same machine, or the same repository on any connected machine. Saved project filters follow it. Covered folders carry their repository identity on project shells for this. In the default sidebar, threads showing a status lead; below them each multi-repository project gathers its threads and its folded projects' threads under its name. Settings > General > Gather multi-repo projects turns the gathering off. A worktree turn's changed-files card names each repository's own project after its folder row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he project menu The sidebar's project menu lists each folded project right under the project that covers it, indented as far as the sidebar indents gathered threads (one shared --sidebar-gathered-indent). Picking it scopes the sidebar to that project's own threads, so a filter saved for it stays on it instead of following it into the covering project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A project can now cover several repositories (pingdotgg#35925), but the sidebar still treats every project on its own. If a repository the project covers also has a project of its own, that project's threads sit apart from the project that covers it. In a busy sidebar the threads that need an answer are mixed in with each project's quiet ones. A worktree turn's changed-files card groups files by repository, but does not say which of those repositories has its own project.
Change
Folding. A project whose folder is a repository another project covers shows in that project's sidebar group. It matches the same folder on the same machine, or the same repository on any connected machine. Its threads read
api · shop: the repository's folder name, then the covering project. The sidebar's project menu lists each folded project right under its covering project, with its own icon and name, indented as far as the sidebar indents gathered threads. Both indents come from one CSS variable,--sidebar-gathered-indent. Picking the folded project scopes the sidebar to its own threads, so a filter saved for it stays on it and shows checked under the covering project. A covered project's own settings, its entry in the command palette and the draft project picker are unchanged; they already list it. Folding follows a chain of covering projects to its end. Two projects that cover each other stay apart, and so does a project set to Keep separate. Nothing folds into an archived project.Cross-machine folding needs each covered folder's repository identity, which clients did not get.
ProjectTrackedFoldergets an optionalrepositoryIdentity. The server fills it in on project shells from the existing enrichment cache, which now has an identity-only lookup so covered folders don't trigger favicon scans. A folder whose identity resolves later is pushed in the same enrichment refresh as project roots. The field is never stored, andProjectAddedFoldersdrops it on input. The client reducer keeps a folder's known identity through later deltas, the same way it keeps a project's.Gathered, status-first sidebar. In the default sidebar, threads showing a status (Working, Input, Done, Woke and the rest) come first. Below them, each project that covers repositories gathers its own threads and its folded projects' threads under its name row. They are indented 12px beside a line that ends at the last thread. A thread joins its group once it no longer shows a status. Settings → General → Gather multi-repo projects is on by default. Turning it off gives the current active list, with folding still applied to grouping and filters. The boring (group-by-project) sidebar puts folded threads in the covering project's folder and doesn't gather.
Turn labels. In a turn that changed several repositories, a repository row whose repository has its own project shows that project's icon and name after the folder name. It matches the same way as folding: the project in that folder first, then one for the same repository elsewhere.
User docs:
docs/user/thread-sidebar.md(new "Projects with several repositories" section) anddocs/user/multi-repo-projects.md.Scope
This is a feature and UI change built on pingdotgg#35925, not a bug fix. It ports the sidebar and turn-label parts of my fork PR #1 onto the upstream model. That covers the projects a project covers, meaning discovered folders plus
trackedFolders. It leaves out the fork's umbrella settings and its checkpoint and worktree code. No maintainer has asked for it.Surfaces:
repo · projectlabel. Its project filter does not fold, because folding there would also drop folded projects from the mobile new-thread project picker. Its turn summary has no per-repository rows to label.repositoryIdentityfield above.Verification
All images are the web client in e2e's Chromium at 1280×800 with the light theme. Each scenario run starts from a fresh synthetic T3 home and a
shopplain folder holdingapiandwebrepositories, plus a separatefleetrepository. Agents use the dev replay provider. Each scenario was proven withvp run scenarios:prove … --base origin/main --head HEAD. Each fails on base1368854828and passes on head: the project menu and sidebar scenarios on35b525995f, the turn scenario on63e43fe832, whose code the second commit doesn't touch. The sidebar images below come from the63e43fe832run; the second commit moves the 12px indent into a shared variable without changing it.1368854828(main)apirowSidebar, setting on (the default)
shopis a plain folder that coversapiandweb.apialso has its own project.Sidebar after opening a Done thread
Sidebar, setting off
Project menu
The menu lists
apiright undershop, indented. In the running app, both api's icon in the menu and Fix product route's card icon in the sidebar sit 12px right of shop's icon. The scenario measures both offsets and checks they match.Worktree turn across two repositories
apihas a project titled "API service".webhas none.The replay agent never writes files. The worktree scenario makes the edits itself while the turn waits on a question. The "Could not rename the worktree branch" notice appears because no text-generation model is configured in the scenario.
Tests
vp run check:changed origin/main --concurrency 1on35b525995f: format, lint, knip, typecheck (39 packages), 29 test files and React Compiler coverage all pass.node scripts/i18n-check.ts: the catalogs match the source in web, mobile and desktop. The four new web strings are translated in all nine locales.projectGrouping.test.tscovers folding by folder and by repository across machines, folder matches only on the covering project's machine, the opt-in, Keep separate, archived covering projects, chains and cycles, and which project a covered folder maps to. A property test generates random projects, covered folders, machines and identities. It checks that folding keeps every project in exactly one group, every group key exactly once, and never folds into an archived group or a project that covers nothing.shellReducer.test.ts: a refresh carries tracked-folder identities, an unchanged refresh keeps the same snapshot, and a later delta keeps the identities.ProjectEnrichmentService.test.ts: tracked-folder identities fill in once resolved, a non-repository folder stays plain, and no favicon lookup runs.ShellStream.test.ts: a refresh carries a project whose tracked folder resolved.Sidebar.logic.test.tscovers gathering order and the status predicate.environmentGrouping.test.tschecks that a folded project keeps its own key, folder name and threads under the covering group.Sidebar.browser.test.tsxrenders the sidebar with the setting on and off, checking order, the name row and theapi · shoplabel. A second test opens the project menu and checks that api is listed right under shop. It measures how far api's icon sits right of shop's icon in the menu, and how far a gathered card's icon sits right of the shop name row's icon in the sidebar, and asserts the two are equal (both 12px). It then picks api and checks the sidebar shows only api's threads and api is checked.MessagesTimeline.browser.test.tsxchecks the project label on a repository row, and that a row with no project gets none.Not verified
Made with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code