Skip to content

fix(web): animate command palette when closing - #5169

Open
tarik02 wants to merge 4 commits into
pingdotgg:mainfrom
tarik02-org:fix/projects-search-close-transition
Open

fix(web): animate command palette when closing#5169
tarik02 wants to merge 4 commits into
pingdotgg:mainfrom
tarik02-org:fix/projects-search-close-transition

Conversation

@tarik02

@tarik02 tarik02 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Changed

Keep the command palette dialog mounted while Base UI runs its closing transition.

Why

The dialog returned null as soon as its open state changed to false, which skipped Base UI's ending transition and made the palette disappear immediately.

UI Changes

Before:

before-fix.mp4

After:

after-fix.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included a video for animation/interaction changes

Model: GPT-5
Harness: Codex


Note

Low Risk
Localized command-palette UI state and mount behavior with no auth, data, or API changes; regression risk is limited to palette open/close and mode shortcuts.

Overview
Fixes the command palette disappearing instantly on close by keeping CommandPaletteDialog mounted instead of returning null when closed. Visibility is left to the parent CommandDialog (open={state.open}), so Base UI can run its closing transition on CommandDialogPopup.

The UI reducer reduceCommandPaletteUiState is adjusted to match that lifecycle: closing via SetOpen(false) or toggling off the active mode no longer forces mode back to command; the current mode (files/content) is preserved while closed. Reopening with SetOpen(true) still opens in command mode and clears openIntent on close as before.

Reviewed by Cursor Bugbot for commit fd2bb32. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Animate command palette when closing by keeping dialog subtree mounted

  • The CommandPaletteDialog component no longer unmounts when the palette closes; the outer CommandDialog controls visibility so the subtree stays mounted and can animate out.
  • The reduceCommandPaletteUiState reducer now preserves the current mode on close instead of resetting to 'command'; mode resets to 'command' only when reopening via SetOpen(true).
  • ToggleMode on the active mode now closes the palette without resetting the mode.

Macroscope summarized fd2bb32.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2933ea0a-5b5f-4fc3-933d-6de45995133b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tarik02
tarik02 marked this pull request as ready for review August 1, 2026 05:48
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 1, 2026
Comment thread apps/web/src/components/CommandPalette.tsx
Comment thread apps/web/src/components/CommandPalette.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a16b5efe18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/CommandPalette.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

Unresolved review comments identify substantive issues: stale palette state persisting after close, and a UI flash during exit animation. These bugs should be addressed before merging.

You can customize Macroscope's approvability policy. Learn more.

@tarik02
tarik02 marked this pull request as draft August 1, 2026 06:18
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 1, 2026
@tarik02
tarik02 marked this pull request as ready for review August 1, 2026 06:41
@tarik02

tarik02 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

cursor review

@tarik02

tarik02 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60eef677a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/CommandPalette.tsx
Comment thread apps/web/src/components/CommandPalette.tsx
@tarik02

tarik02 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

cursor review

@tarik02

tarik02 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@macroscope-app review

@macroscopeapp

macroscopeapp Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Sorry, I'm unable to act on this request because you do not have permissions within this repository.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 60eef67. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant