Skip to content

fix(web): command palette stays open under StrictMode in dev - #263

Merged
badcuban merged 1 commit into
mainfrom
fix/command-palette-strict-mode
Sep 9, 2026
Merged

fix(web): command palette stays open under StrictMode in dev#263
badcuban merged 1 commit into
mainfrom
fix/command-palette-strict-mode

Conversation

@badcuban

@badcuban badcuban commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

In dev the command palette opened and closed within the same instant, so Ctrl+K, the sidebar search, and the first-run "Choose a folder" button all appeared to do nothing. The packaged app was unaffected.

The open palette dialog reset the store from its own effect cleanup. The app mounts under React StrictMode, which runs every new effect's cleanup once right after mount, and that extra run closed the palette as soon as it opened. This has been the case since the cleanup landed on August 10.

The reset moves to the CommandPalette wrapper, which mounts once with the app shell. StrictMode's extra pass finds the palette closed there and does nothing, while the wrapper's real teardown still resets the store as before.

Adds a strictMode option to the ChatView browser harness and one regression test. The test fails on the old code and passes with the fix. Palette and folder-affordance browser tests, format, lint, and typecheck pass.

The open palette dialog reset the store from its own effect cleanup. The
app mounts under React StrictMode, which runs every new effect's cleanup
once right after mount, so in dev the palette closed the instant it
opened. Every entry point (Ctrl+K, the sidebar search, the first-run
"Choose a folder" button) has been a dead end in dev since the cleanup
landed on August 10.

The reset now lives on the CommandPalette wrapper, which mounts once with
the app shell: StrictMode's extra cleanup pass finds the palette closed
and does nothing, while the wrapper's real teardown still resets the store.

The ChatView browser harness gains a `strictMode` option and one test
that opens the palette under StrictMode; it fails on the old code.
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Sep 9, 2026 8:12pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 9, 2026
@badcuban
badcuban added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 50dd26c Sep 9, 2026
16 checks passed
@badcuban
badcuban deleted the fix/command-palette-strict-mode branch September 9, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant