diff --git a/src/main/persistence.test.ts b/src/main/persistence.test.ts index 9388428b8..f3a1c2fd7 100644 --- a/src/main/persistence.test.ts +++ b/src/main/persistence.test.ts @@ -2111,7 +2111,6 @@ describe('Store', () => { expect(store.getUI().worktreeCardProperties).toContain('inline-agents') expect(store.getUI().worktreeCardProperties).toContain('linear-issue') expect(store.getUI().worktreeCardProperties).toContain('ports') - expect(store.getUI().worktreeCardProperties).not.toContain('branch') expect(store.getUI()._inlineAgentsDefaultedForExperiment).toBe(true) expect(store.getUI()._inlineAgentsDefaultedForAllUsers).toBe(true) expect(store.getUI()._expandedWorktreeCardPropertiesDefaulted).toBe(true) diff --git a/src/main/runtime/rpc/methods/client-ui.test.ts b/src/main/runtime/rpc/methods/client-ui.test.ts index 6cd4892a5..7c591597c 100644 --- a/src/main/runtime/rpc/methods/client-ui.test.ts +++ b/src/main/runtime/rpc/methods/client-ui.test.ts @@ -136,7 +136,7 @@ describe('client UI RPC methods', () => { it('accepts persisted literal UI arrays and nested UI state', async () => { const updated: PersistedUIState = { ...getDefaultUIState(), - worktreeCardProperties: ['status', 'branch', 'inline-agents'], + worktreeCardProperties: ['status', 'inline-agents'], statusBarItems: ['codex'], taskResumeState: { githubMode: 'items', @@ -163,7 +163,7 @@ describe('client UI RPC methods', () => { const dispatcher = new RpcDispatcher({ runtime, methods: CLIENT_UI_METHODS }) const payload = { - worktreeCardProperties: ['status', 'branch', 'inline-agents'], + worktreeCardProperties: ['status', 'inline-agents'], statusBarItems: ['codex'], taskResumeState: { githubMode: 'items', diff --git a/src/main/runtime/rpc/methods/client-ui.ts b/src/main/runtime/rpc/methods/client-ui.ts index 6e9d57050..0098722c1 100644 --- a/src/main/runtime/rpc/methods/client-ui.ts +++ b/src/main/runtime/rpc/methods/client-ui.ts @@ -10,7 +10,6 @@ const UnknownRecordArray = z.array(UnknownRecord) const WorktreeCardProperty = z.enum([ 'status', 'unread', - 'branch', 'ci', 'issue', 'linear-issue', diff --git a/src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx b/src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx index 32f32ae86..bf27e5dcd 100644 --- a/src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx +++ b/src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx @@ -35,7 +35,6 @@ const GROUP_BY_OPTIONS = [ ] as const const PROPERTY_OPTIONS: { id: WorktreeCardProperty; label: string }[] = [ - { id: 'branch', label: 'Branch name' }, { id: 'issue', label: 'GitHub ticket' }, { id: 'linear-issue', label: 'Linear issue' }, { id: 'pr', label: 'PR/MR link' }, diff --git a/src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx b/src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx index cfe4aa382..63b37973a 100644 --- a/src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx +++ b/src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx @@ -125,41 +125,6 @@ describe('WorktreeCard quick actions', () => { expect(markup).toContain('data-workspace-board-preserve-open=""') }) - it('hides the branch name from workspace card metadata by default', () => { - const markup = renderToStaticMarkup( - - ) - - expect(markup).toContain('Visible workspace') - expect(markup).not.toContain('feature/secret-ref') - expect(markup).not.toContain('secret-ref') - }) - - it('renders the branch name when the Branch name property is enabled', () => { - worktreeCardProperties = ['status', 'unread', 'branch'] - - const markup = renderToStaticMarkup( - - ) - - expect(markup).toContain('Visible workspace') - expect(markup).toContain('feature/show-ref') - }) - it('shows delete as the top-right quick action for an inactive workspace', () => { const markup = renderToStaticMarkup( diff --git a/src/renderer/src/components/sidebar/WorktreeCard.tsx b/src/renderer/src/components/sidebar/WorktreeCard.tsx index ec70021a7..45dc3d546 100644 --- a/src/renderer/src/components/sidebar/WorktreeCard.tsx +++ b/src/renderer/src/components/sidebar/WorktreeCard.tsx @@ -254,7 +254,6 @@ const WorktreeCard = React.memo(function WorktreeCard({ const showLinearIssue = cardProps.includes('linear-issue') const showComment = cardProps.includes('comment') const showPorts = cardProps.includes('ports') - const showBranch = cardProps.includes('branch') // Skip hosted-review fetches when the corresponding card sections are hidden. // This preference is purely presentational, so background refreshes would @@ -416,7 +415,8 @@ const WorktreeCard = React.memo(function WorktreeCard({ ) // Why: deleting the active/current workspace or one with live activity is a // disruptive hover action; keep the quick action delete-only and passive. - const showDeleteQuickAction = !isCurrentWorktree && !hasActiveActivity && !worktree.isMainWorktree + const showDeleteQuickAction = + !isCurrentWorktree && !hasActiveActivity && !worktree.isMainWorktree const handleWorkspaceQuickAction = useCallback( (event: React.MouseEvent) => { event.preventDefault() @@ -624,9 +624,10 @@ const WorktreeCard = React.memo(function WorktreeCard({ )} {/* Why: weight alone carries the unread signal; color stays - at text-foreground in both states so the title remains - the card's primary scan target even when optional branch - metadata is hidden. */} + at text-foreground in both states so the title keeps + hierarchy against the muted branch row below (muting the + title as well flattened the card — same reasoning as the + repo chip comment below). */}