Summarize hoisted worktrees under their origin repo#456
Merged
Conversation
When grouping lifts a repo's worktrees into the Pinned / Active highlight sections they leave the per-repo list, which made it harder to see what each repo had in flight. Derive a per-repo tally of those hoisted rows so the repo section can surface them without rendering a duplicate row. `SidebarHoistSummary` carries the pinned / active counts plus the row a click should scroll to (the repo's first pinned hoist, else its first active), keyed per repo on `SidebarStructure.hoistSummaryByRepositoryID`. It is built in the same pass that resolves the highlight repo tags, so each hoisted id is resolved once; folders are excluded since a single-row repo has no list to scan. `revealHoistedWorktreeInSidebar` scrolls the sidebar to a given hoisted row without changing the selection.
Show a muted line at the bottom of a repo section tallying how many of its
rows were hoisted, each bucket followed by the same colored dot its highlight
section header uses ("+1 pinned ● +1 active ●"). Clicking it scrolls to the
first relevant section so the row is easy to find.
The line carries no selection tag, so it stays out of selection and arrow-key
navigation and draws no selection background; it lives inside the section body
so it folds away when the section is collapsed.
Cover the per-repo counts and the pinned-first reveal target, the active-only fallback, omission for non-contributing repos and for folders, independent per-repo tallies, multi-row bucket counts, the pinned-only label, and the git-main-into-Active case where the repo section renders header plus summary only. Add a reducer test for the reveal action.
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.
Closes #375
When the Pinned / Active grouping lifts a repo's worktrees into the top highlight sections, they leave the per-repo list, making it harder to see what each repo has in flight. This adds a muted summary line at the bottom of the affected repo section tallying the hoisted rows (
+1 pinned ● +1 active ●), each bucket keyed by the same colored dot its highlight section header uses. Clicking the line scrolls the sidebar to the first relevant section (pinned-first, else active) so the row is easy to find.No duplicate rows and no per-row placeholders. Folders are excluded since a single-row repo has no list to scan. The summary is derived in the reducer (reuses the existing highlight-tag pass), participates in the sidebar-structure cache diff so it stays reactive, and the line is unselectable and folds away when the section collapses.