diff --git a/apps/desktop/package.json b/apps/desktop/package.json index d3f836973158..b6514cc59f8a 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -69,9 +69,8 @@ "check:test:ui": "npm run test:ui", "check:test:desktop:platforms": "npm run test:desktop:platforms", "check:test:desktop:all": "npm run test:desktop:all", - "check:test:plugins": "node --test src/plugins/*/tests/*.test.mjs", "check:lint": "npm run typecheck && npm run lint", - "check": "npm run check:lint && npm run test:ui && npm run test:desktop:platforms && npm run test:desktop:all && npm run check:test:plugins", + "check": "npm run check:lint && npm run test:ui && npm run test:desktop:platforms && npm run test:desktop:all", "test:e2e": "npm run build && playwright test e2e/", "test:e2e:visual": "npm run build && WLR_BACKENDS=headless WLR_NO_HARDWARE_CURSORS=1 cage -- npx playwright test e2e/ --reporter=list", "test:e2e:update-snapshots": "npm run build && WLR_BACKENDS=headless WLR_NO_HARDWARE_CURSORS=1 cage -- npx playwright test e2e/ --reporter=list --update-snapshots", diff --git a/apps/desktop/src/app/chat/composer/index.tsx b/apps/desktop/src/app/chat/composer/index.tsx index 35e9fcfb3739..3764633db6d3 100644 --- a/apps/desktop/src/app/chat/composer/index.tsx +++ b/apps/desktop/src/app/chat/composer/index.tsx @@ -13,6 +13,7 @@ import { PR_COMMENT_URL_RE } from '@/lib/chat-runtime' import { sanitizeComposerInput } from '@/lib/composer-input-sanitize' import { DATA_IMAGE_URL_RE } from '@/lib/embedded-images' import { triggerHaptic } from '@/lib/haptics' +import { useStoresSelector } from '@/lib/use-session-slice' import { cn } from '@/lib/utils' import { interceptsTypedVoiceStop } from '@/lib/voice-stop-word' import { sessionCompacting } from '@/store/compaction' @@ -23,6 +24,7 @@ import { $hudMode } from '@/store/hud' import { sessionBlockingPrompt } from '@/store/prompts' import { toggleReview } from '@/store/review' import { $gatewayState } from '@/store/session' +import { $botChatSessionIds, $sessionStates, $sessionTiles, isBotChatSession } from '@/store/session-states' import { $threadScrolledUp } from '@/store/thread-scroll' import { $autoSpeakReplies } from '@/store/voice-prefs' import { useTheme } from '@/themes' @@ -945,6 +947,14 @@ export function ChatBar({ handleInputDrop } = useComposerDrop({ cwd, insertInlineRefs, onAttachDroppedItems, requestMainFocus }) + // A bot chat is a companion conversation, not a working session, so it has no + // repo to speak of — see the blank repoPath handed to CodingStatusRow below. + // Three stores: the scope set records the answer, and resolving this runtime + // id to the stored one it is filed under reads the other two. + const botChat = useStoresSelector([$botChatSessionIds, $sessionStates, $sessionTiles], () => + isBotChatSession(sessionId) + ) + // Branch / worktree hand-offs (CodingStatusRow). Owns the worktree open + // branch-off/convert/list/switch actions; draft travels into the new session. const { handleBranchOff, handleConvertBranch, handleListBranches, handleSwitchBranch, openInWorktree } = @@ -1316,7 +1326,10 @@ export function ChatBar({ onOpen={() => toggleReview(scope.target === 'main' ? null : (cwd ?? null), scope.target)} onOpenWorktree={openInWorktree} onSwitchBranch={handleSwitchBranch} - repoPath={cwd} + // Blank in a bot chat: the row hides itself without a repo, + // and stops probing git / GitHub for a surface that has no + // branch to show. Cheaper than a second composer. + repoPath={botChat ? undefined : cwd} />