Skip to content

fix(repositories): honor customized repository titles everywhere - #809

Open
sasha-id wants to merge 4 commits into
supabitapp:mainfrom
sasha-id:sash/settings-renamed-repo-titles
Open

fix(repositories): honor customized repository titles everywhere#809
sasha-id wants to merge 4 commits into
supabitapp:mainfrom
sasha-id:sash/settings-renamed-repo-titles

Conversation

@sasha-id

@sasha-id sasha-id commented Aug 20, 2026

Copy link
Copy Markdown

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/repo and ~/playground/repo) stayed indistinguishable.

The customized title is now honored everywhere a repository is named:

  • Settings sidebar (repository summaries)
  • New Worktree prompt
  • deeplink / CLI destructive-action confirmation
  • window title
  • menu bar notification list
  • 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 (non-git) repositories, same as computeSidebarStructure — 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). Since AppFeature.core runs before the scoped RepositoriesFeature applies the save, the re-send passes the new title explicitly as an override.

Type of change

  • Bug fix (the linked issue is a bug report)
  • Feature (the linked issue is a feature request marked ready)
  • Documentation
  • Other (please describe)

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 check passes (format + lint)
  • make test passes
  • I built and ran the app to confirm the change works

AI tool disclosure (optional)

  • Model(s): Claude Fable 5
  • Harness / tools: Claude Code

Checklist

  • This pull request is linked to an issue with Closes # above.
  • For a feature, the linked issue is labeled ready.
  • I am the author of this work and accountable for it; no commit is authored or co-authored by an AI agent.
  • I have read the Contributing guide and the Code of Conduct.

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.
@github-actions github-actions Bot added the invalid Does not meet the contribution policy; closed automatically after a few days if left inactive. label Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Thanks, this now meets the contribution policy. I've cleared the invalid label.

@sasha-id

Copy link
Copy Markdown
Author

Closing to match the contribution flow — will reopen once #808 is triaged and marked ready.

@sasha-id sasha-id closed this Aug 20, 2026
…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.
@sasha-id sasha-id reopened this Aug 20, 2026
@sasha-id sasha-id changed the title fix(settings): show customized repository titles in the settings sidebar fix(repositories): honor customized repository titles everywhere Aug 20, 2026
@sasha-id

Copy link
Copy Markdown
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 SidebarState.customTitle(for:) helper. The invalid label is left over from the previous #808 linkage — I can't remove labels, could you drop it when you get a chance?

@github-actions github-actions Bot removed the invalid Does not meet the contribution policy; closed automatically after a few days if left inactive. label Aug 20, 2026
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
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.

Honour the customized repository title everywhere

1 participant