Skip to content

Summarize hoisted worktrees under their origin repo#456

Merged
sbertix merged 3 commits into
mainfrom
sbertix/gh-375
Jun 22, 2026
Merged

Summarize hoisted worktrees under their origin repo#456
sbertix merged 3 commits into
mainfrom
sbertix/gh-375

Conversation

@sbertix

@sbertix sbertix commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

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.

sbertix added 3 commits June 22, 2026 20:31
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.
@sbertix sbertix enabled auto-merge (squash) June 22, 2026 18:45
@tuist

tuist Bot commented Jun 22, 2026

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 2m 19s a1fde7a06

@sbertix sbertix merged commit faa679c into main Jun 22, 2026
1 check passed
@sbertix sbertix deleted the sbertix/gh-375 branch June 22, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Active worktrees should show under repo also

1 participant