From 73e243705f508ec1bf422ca41325298f55b5b1aa Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 30 Jul 2026 22:31:00 -0700 Subject: [PATCH] fix: stabilize new worktree task source tabs (#11701) --- .../SmartWorkspaceNameField-source-boundaries.test.ts | 4 ++++ .../components/new-workspace/SmartWorkspaceNameField.tsx | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/new-workspace/SmartWorkspaceNameField-source-boundaries.test.ts b/src/renderer/src/components/new-workspace/SmartWorkspaceNameField-source-boundaries.test.ts index bfe556add..414b438ba 100644 --- a/src/renderer/src/components/new-workspace/SmartWorkspaceNameField-source-boundaries.test.ts +++ b/src/renderer/src/components/new-workspace/SmartWorkspaceNameField-source-boundaries.test.ts @@ -113,4 +113,8 @@ describe('SmartWorkspaceNameField repo-backed source boundaries', () => { expect(FIELD_SOURCE).toContain('onPointerDown={() => {') expect(FIELD_SOURCE).toContain('markSourcePopoverUserEngaged()') }) + + it('confines source-mode overflow to the source strip', () => { + expect(FIELD_SOURCE).toContain('overflow-x-auto overflow-y-hidden px-0 scrollbar-sleek') + }) }) diff --git a/src/renderer/src/components/new-workspace/SmartWorkspaceNameField.tsx b/src/renderer/src/components/new-workspace/SmartWorkspaceNameField.tsx index a0168f900..ead339690 100644 --- a/src/renderer/src/components/new-workspace/SmartWorkspaceNameField.tsx +++ b/src/renderer/src/components/new-workspace/SmartWorkspaceNameField.tsx @@ -394,11 +394,10 @@ export default function SmartWorkspaceNameField({ link: NonNullable> matchingRepo: RepoOption | null } | null>(null) - // Why: Jira status is read lazily — mounting the composer must not cost an IPC/RPC round-trip, - // so only reach for it once the user opens the source picker, picks Jira, or pastes an issue URL. + // Why: read Jira status when the composer mounts so an already-configured source is available + // before users start typing, without showing Jira for hosts where it is not configured. const jiraConnection = useJiraSourceConnection({ - enabled: - !disabled && !textOnly && (open || mode === 'jira' || isBlockingJiraUrlIntent(mode, value)), + enabled: !disabled && !textOnly && jiraSourceContext !== null, sourceContext: jiraSourceContext }) const jiraConnectionStatus = jiraConnection.status @@ -1624,7 +1623,7 @@ export default function SmartWorkspaceNameField({ { // Why: Radix Tabs roving focus re-applies tabindex=0 to the active trigger (races React commits), so forward Tab to the input. const previous = event.relatedTarget as HTMLElement | null