From fb76b5eeefa6fa975366a69457aa079c821dd07c Mon Sep 17 00:00:00 2001 From: Nexus Dev Date: Sat, 11 Apr 2026 13:32:46 +0000 Subject: [PATCH] refactor(nexus): wave 3a controller integration pass Three coordinated fixes after phases 12, 13, 14, 15 all landed in parallel on nexus/design-system-migration: 1. TopStrip.test.tsx provider stubs for phase 14 contexts. Phase 14 wired CmdKButton to a new CommandPaletteContext via the useCommandPalette() hook. TopStrip renders CmdKButton internally, so its existing tests (written in phase 8 before the context existed) throw "useCommandPalette must be used within a CommandPaletteProvider" on every case. Same issue on GlobalMicButton which now reads from VoiceContext. Fix: add module-scope vi.mock() stubs for both contexts returning minimal shapes, matching the existing CompanyContext mock pattern already in the file. No test semantics change - the TopStrip is still rendered in isolation, still verified to contain the three children (ModeBreadcrumb, CmdKButton, GlobalMicButton) and the header landmark. All 4 TopStrip tests pass again. Phase 15's report flagged this breakage explicitly and confirmed via git stash that it was pre-existing on phase 14's HEAD, not introduced by phase 15. 2. PromoteTransition mobile variant. Phase 15 deferred the mobile variant of the promote-to-project transition because PromoteTransition.tsx did not yet exist when phase 15 started (phase 12 created it mid-dispatch). The defer was correct per explicit instructions. Fix: add a CSS media query inside the existing scoped