Isolate command palette renders#2753
Draft
cursor[bot] wants to merge 3 commits into
Draft
Conversation
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
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.
What Changed
AppSidebarLayout/Outlet) is no longer rendered underCommandDialog.Root.Why
react-doctor plus a manual hot-path pass identified
CommandPaletteas a high-blast-radius render risk: the dialog root previously wrapped the entire sidebar and routed chat UI. Isolating the dialog/controller keeps palette open/close state changes out of the app shell subtree while preserving the composer handle context.UI Changes
Behavior should be unchanged. React Scan before/after recordings were captured for the same interaction: open command palette, type
settings, close, reopen, close./workspace/react-scan-recordings/before-command-palette.webm/workspace/react-scan-recordings/after-command-palette.webm/workspace/react-scan-recordings/before-frame.pngand/workspace/react-scan-recordings/after-frame.pngChecklist
Validation:
bun fmtbun lint(passes with existing warnings, 0 errors)bun typecheckbunx react-doctor@latest . --verbose(73/100, 253 existing findings across 88 files)Note
Isolate command palette renders into dedicated controller and dialog components
CommandPaletteController,CommandPaletteDialog) and hooks (useCommandPaletteShortcut,useCloseCommandPaletteOnUnmount).usePrefetchBrowsePathsand add-project intent handling intouseOpenAddProjectIntentto reduce the size ofOpenCommandPaletteDialog.CommandDialogTriggerwith a directSidebarMenuButtonthat callsuseCommandPaletteStoreto open the palette.Macroscope summarized 7dbf310.