Skip to content

perf(renderer): unmount closed jump palette content - #13525

Merged
nwparker merged 1 commit into
mainfrom
nwparker/perf-jump-palette-mount-gating
Aug 10, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/perf-jump-palette-mount-gating

Conversation

@nwparker

@nwparker nwparker commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep only a one-selector shell mounted after Cmd+J has been used
  • mount the roughly 40-subscription palette content only while open or during its 300 ms close animation
  • retain the create-workspace lookup guard across content unmounts

ELI5

Cmd+J is a big search screen. After you opened it once, Orca kept the whole search engine running in the background even while it was closed. Every update from a remote host could make that hidden screen do more work. This change keeps only a tiny on/off listener running and wakes the full search screen only when you open it.

After first use, the closed palette still subscribed to remote runtime, worktree, repository, tab, and review state. Remote-host activity could therefore re-render it and rebuild host/filter/search projections even though no palette was visible.

This is a separate follow-up to #13517 and ports the structural fix from the now-conflicting #7617 onto current main.

Verification

  • 1,000 closed store writes: zero content renders, subscriptions, or notifications
  • content remains live through 299 ms and unmounts at 300 ms
  • reopening during the linger cancels the pending unmount
  • 53 focused Cmd+J tests pass
  • full typecheck passes
  • changed-code quality gate passes

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a893958c-461a-4af7-821d-8e860d80e147

📥 Commits

Reviewing files that changed from the base of the PR and between abd160f and bd751e5.

📒 Files selected for processing (2)
  • src/renderer/src/components/WorktreeJumpPalette.mount-gating.test.tsx
  • src/renderer/src/components/WorktreeJumpPalette.tsx

📝 Walkthrough

Walkthrough

WorktreeJumpPalette now uses a wrapper to control visibility, retain content for 300 ms after closing, and own the request guard. WorktreeJumpPaletteContent receives the wrapper state and keeps status and cache subscriptions active during the linger period. New tests verify demand-based mounting, delayed unmounting, store updates during the linger period, unsubscription after expiration, and reopening before unmount.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the summary and verification results but omits the required Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes sections. Add all required template sections, including screenshot status, test checklist results, AI review findings with cross-platform checks, security audit, and notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary performance change: unmounting closed jump palette content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant