test(console-ai): pin #2477 items 2+3 (already shipped by #2478, but unpinned) - #4196
Merged
Merged
Conversation
…npinned Premise check for issue #2477 items 2 and 3 found both already implemented by PR #2478 (merged 2026-07-14, ~22 min after the card was filed): - item 2: StudioChatDock DOES pass persistExpandedKey (its own DOCK_STUDIO_EXPANDED_STORAGE_KEY), so a collapse survives pillar/package switches and Studio re-entry. - item 3: the folded layout's side-by-side threshold IS xl (1280), not 2xl. Neither carried a regression pin, so reverting either shipped fix kept the whole suite green. This adds the pins and corrects the doc comments left describing pre-#2478 behaviour. No runtime behaviour change. - Extract WIDE_VIEWPORT_BREAKPOINT + useIsWideViewport into ./wideViewport (same testability motive as the existing ./centerTab extraction) and pin the 1280 boundary, the 1280-1512 laptop band, and the below-xl tab fallback. - Pin the StudioChatDock -> useChatDockState wiring: the storage helpers were tested but the call passing them was not, so deleting persistExpandedKey left chatDockReturnLocation.test.tsx fully green. - Pin cross-dock non-interference in both directions (the hazard the card names). - Fix three stale doc comments that still claimed the Studio dock was NOT persisted / that the folded layout went side-by-side at 2xl. Refs #2477
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Part of #2477 — items 2 and 3 only. Items 1 and 4 through 8 remain on the card, which stays open.
The premise expired: both items already shipped
The card was filed 2026-07-14 04:33 UTC. PR #2478 (
48d06da3b) merged 22 minutes later, at 04:55 UTC, and implemented both items:StudioChatDockalready passespersistExpandedKey: DOCK_STUDIO_EXPANDED_STORAGE_KEY('ai-chat-studio-dock-expanded'), distinct from the console dock's'ai-chat-dock-expanded'. A collapse survives pillar switches, package changes and Studio re-entry. The card's stated cause — "in-memory state (no persist key)" — is false on tip.xl:WIDE_VIEWPORT_BREAKPOINT = 1280, lowered from 2xl by that same PR.The card body was never updated, so the 2026-08-03 ruling approved work that had shipped three weeks earlier. No behaviour change is needed and none is made here.
What this PR does instead: the missing regression pins
Both fixes shipped unpinned. Measured, on tip before this PR:
persistExpandedKey: DOCK_STUDIO_EXPANDED_STORAGE_KEY— the entire item 2 fix — leftchatDockReturnLocation.test.tsxfully green (10 passed). Only the storage helpers were tested; the call that passes them touseChatDockStatewas not.StudioDesignSurface.tsx, which is far too heavy to mount just to pin a number.So either shipped fix could be reverted silently. This adds:
wideViewport.ts— extractsWIDE_VIEWPORT_BREAKPOINTanduseIsWideViewportout ofStudioDesignSurface.tsx, the same testability motive as the existingcenterTab.tsextraction. Pins the inclusive 1280 boundary, the 1280–1512 laptop band the card named, and the below-xl tab fallback.studioChatDockPersistence.test.tsx— pins theStudioChatDocktouseChatDockStatewiring: both storage keys are the Studio-scoped ones and not the console's, and the default-expanded first-visit posture. The mock defers to the real hook, so the recorded wiring cannot drift from the shipped call.StudioAiCopilot.tsxclaimed the dock was "NOT persisted (parity with the old panel's in-memory collapse)" directly above the code that persists it.ChatDock.tsxcalled the omitted-key case "the Studio dock's parity with today's non-persisted copilot collapse".StudioDesignSurface.tsxstill said "wide viewport (2xl+)" at theisWidecall site.Item 3 measurement (the card asked for numbers)
At the 1280 boundary, Interfaces pillar, block selected, chat dock expanded at its 420px default:
w-52)w-72)~364px is narrow but live, versus 0px (hidden behind the tab auto-switch) at 2xl. Collapsing the dock — a preference that now sticks, thanks to item 2 — returns the canvas to 784px, so the two items compose. This does not falsify the shipped direction, so there is nothing to stop on.
Reverse verification
Both directions were checked by taking the shipped fix out with
git checkout/ a targeted edit (nevergit stash), re-running, and restoring — the tree was byte-identical to its snapshot afterwards.1280px should be side-by-side: expected false to be true. Restored: green.persistExpandedKeyline deleted:expected undefined to be 'ai-chat-studio-dock-expanded', red. The helper suite stayed green throughout, which is the coverage hole this PR closes. Restored: green.Verification
pnpm exec vitest run packages/app-shell/— 326 files, 3048 passed, 1 skipped, 0 failedpnpm type-check— 78/78 tasks successfulpnpm lint— 45/45 tasks, 0 errorspnpm check:control-bytes— OK;check-changeset-presenceandcheck-changeset-no-major— both greenChangeset has empty frontmatter: tests, comments and an internal extraction release nothing, which is this repo's explicit "declared as releasing nothing" exemption rather than an omission.
Generated by Claude Code