fix(repositories): honor customized repository titles everywhere - #809
Open
sasha-id wants to merge 4 commits into
Open
fix(repositories): honor customized repository titles everywhere#809sasha-id wants to merge 4 commits into
sasha-id wants to merge 4 commits into
Conversation
Repositories renamed via Customize Appearance still appeared under their directory name in Settings, making repos whose paths end in the same component indistinguishable there. Resolve each settings summary's name through the stored sidebar section title, matching the main sidebar's rule, and re-send the summaries when a customization is saved, since that path writes the shared sidebar state without firing repositoriesChanged.
Folder (non-git) repositories keep their customized title on the synthetic folder-worktree item rather than the section title, so they still showed the directory name in settings. Resolve summaries with the same dual rule as the main sidebar and re-send them when a folder's appearance is saved through the worktree-customization path.
|
Thanks, this now meets the contribution policy. I've cleared the |
Author
|
Closing to match the contribution flow — will reopen once #808 is triaged and marked |
…rfaces Extend the customized repository title beyond the sidebar and Settings to every place a repository is named: the New Worktree prompt, the deeplink destructive-action confirmation, the window title, the menu bar notification list, and the archived worktrees detail header. A shared SidebarState.customTitle(for:) encodes the dual storage rule — the section title for git repositories, the synthetic folder-worktree item for folder repositories — so each surface resolves the same title the sidebar shows.
Author
|
Reopened and re-scoped per #808 (comment): this PR now closes #789 and extends the customized repository title to every surface that names a repository (Settings sidebar, New Worktree prompt, deeplink confirmation, window title, menu bar notifications, archived worktrees header) via a shared |
A folder repository stores its custom title and color on the synthetic folder-worktree row, a git repository stores them on the section. Reading only the section (or only the row) made the two kinds disagree across surfaces, so `customTitle(for:)` now branches on `isGitRepository`, gains a `customColor(for:)` counterpart, and a separate `customTitleForUnloadedRepository(_:)` covers failed repositories whose kind is unknown. Route the remaining raw-directory-name surfaces through a single `repositoryName(for:)` helper: blocking-script and trash-failure alerts, hotkey worktree slots, the folder delete-unavailable alert, the command palette, and detached pane windows. The menu bar's repo tag now takes its tint from the same place as its title. Claude-Session: https://claude.ai/code/session_012skLPpygYnSRUxfifyZrvk
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 #789
Summary
A repository title set via Customize Appearance only showed in the main sidebar; every other surface kept using the directory name, so repositories sharing a directory name (e.g.
~/work/repoand~/playground/repo) stayed indistinguishable.The customized title is now honored everywhere a repository is named:
A shared
SidebarState.customTitle(for:)encodes the dual storage rule — the section title for git repositories, the synthetic folder-worktree item for folder (non-git) repositories, same ascomputeSidebarStructure— so each surface resolves the same title the sidebar shows.Saving a customization writes the shared sidebar state without firing
repositoriesChanged, so the Settings summaries are re-sent on both save paths (repository customization, and worktree appearance gated to folder repos). SinceAppFeature.coreruns before the scopedRepositoriesFeatureapplies the save, the re-send passes the new title explicitly as an override.Type of change
ready)How was this tested?
New test coverage:
SidebarStateTests(dual-rule resolution, git/folder precedence),WindowTitleTests(folder fallback and synthetic-item title),MenuBarNotificationListTests(folder tag uses the synthetic-item title),AppFeatureSettingsSelectionTests(summary forwarding, both save paths),AppFeatureDeeplinkTests(confirmation names the customized title),RepositoriesFeatureTests(New Worktree prompt names the customized title).make checkpasses (format + lint)make testpassesAI tool disclosure (optional)
Checklist
Closes #above.ready.