Replace toolbar branch button with repo · branch · worktree title#320
Merged
Conversation
- Replace the toolbar rename-branch popover with a custom title block: repo avatar (or folder glyph) + branch line (.callout/.semibold) over a "repo · worktree" caption whose worktree segment mirrors the sidebar's main/pinned/default tint via a shared `WorktreeAccent` enum. - Hoist `WorktreeAccent` and `SidebarItemModel.sidebarDisplayName` onto the domain model so both sidebar and toolbar consume one source of truth. - Model the toolbar title as a `WorktreeToolbarTitleContent.git(GitPayload) | .folder(name)` sum type and place the item with `.navigation` placement + `.sharedBackgroundVisibility(.hidden)` (placeholder too) so the slot stays stable across worktree switches. - Wire the GitHub owner avatar through `GitClientDependency` and share the resolver between toolbar and settings sidebar; size avatar 22pt rounded with a system-color shadow, pad the SF Symbol fallback to ~18pt to match toolbar imagery. - Remove the now-unreachable rename-branch chain: `requestRenameBranch` action + handler, `gitClient.renameBranch`, `GitClient.renameBranch`, the `branchRename` operation, and the two orphan tests. - Add focused unit tests for `sidebarDisplayName`, `accent`, and `makeToolbarTitleContent` covering folder, sole-default, sibling, and customTitle-override paths.
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
.callout/.semibold) over arepo · worktreecaption whose worktree segment mirrors the sidebar tint (.main→ yellow,.pinned→ orange,.default→ tertiary).WorktreeAccent+SidebarItemModel.sidebarDisplayNameonto the domain model so sidebar and toolbar consume the same source of truth.WorktreeToolbarTitleContent.git(GitPayload) | .folder(name)sum type and pin the toolbar item with.navigationplacement +.sharedBackgroundVisibility(.hidden)(placeholder too) so the slot stays stable across worktree switches.GitClientDependencyand share the resolver between the toolbar and the settings sidebar.requestRenameBranchaction + handler,gitClient.renameBranch,GitClient.renameBranch, thebranchRenameoperation, and the two orphan tests.sidebarDisplayName,accent, andmakeToolbarTitleContentcovering folder, sole-default, sibling, and customTitle-override paths.Test plan
make build-appis green..callout/.semibold; the caption showsrepo · worktree(worktree segment hidden for sole-default and when it matches the branch's last component underworktreeRowHideSubtitleOnMatch).Closes #319