perf(renderer): consolidate Raycast UI hot paths - #621
Open
JustYannicc wants to merge 11 commits into
Open
Conversation
JustYannicc
marked this pull request as ready for review
July 5, 2026 10:22
This was referenced Jul 5, 2026
Contributor
|
Reviewed the full diff (main.ts tray caching, App.tsx, action registry, detail/form/list/grid runtimes, the hook stable-args extraction, the list virtual-row helpers + emoji-grid virtualization, and the menubar serialization cache). Focused on behavior/API preservation for the Raycast UI runtime. Net: solid, mostly a correctness-neutral-or-better perf pass; one low-severity behavioral nuance in emoji-grid scrolling. Strengths
Concerns / potential bugs
Suggestions
🟡 Approve with minor comments 🤖 Automated review by Claude Code (Opus 4.8). |
Collaborator
Author
|
Addressed the review feedback in commit What changed:
Verification:
|
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
origin/main.usePromise,useCachedPromise, anduseExec.Why
The replaced micro PRs target the same renderer/Raycast UI hot paths and were hard to review independently because several changes overlap in list rendering, action registry updates, hook signatures, and menubar title tick behavior. This PR keeps those changes together while avoiding unrelated runtime, command, search, and validation stack changes.
Compatibility impact
Raycast API shapes and exports are preserved. Selection semantics, action execution, dropdown initial
onChange, shortcut handling, menu item actions, tray title fallback behavior, file-backed icon refresh on mtime/size changes, and native menu serialization remain compatible.How tested
package-lock.json:/opt/homebrew/Cellar/node@22/22.22.3/bin/node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js ci --ignore-scripts --force; no lockfile churn committed.npm testpath with real npm:/opt/homebrew/Cellar/node@22/22.22.3/bin/node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js test(node --test 'scripts/test-*.mjs'), 38 tests total, 37 passed, 1 live Electron test skipped.npm testpath (node --test 'scripts/test-*.mjs'):scripts/test-virtual-selection-scroll-behavior.mjs,scripts/test-action-registry-listener-churn.mjs,scripts/test-list-dropdown-memoization.mjs,scripts/test-raycast-hook-signatures.mjs,scripts/test-list-renderer-memoization.mjs,scripts/test-list-emoji-render-churn.mjs,scripts/test-menubar-native-update-cache.mjs, andscripts/test-menubar-renderer-serialization-cache.mjs.test-*.mjsglob:scripts/measure-raycast-hook-signatures.mjsandscripts/measure-raycast-list-render-churn.mjs./opt/homebrew/Cellar/node@22/22.22.3/bin/node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js run build:main./opt/homebrew/Cellar/node@22/22.22.3/bin/node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js run build:renderer.git diff --check.node --checkover all added/touched.mjsscripts.Performance evidence
node scripts/measure-raycast-list-render-churn.mjs --iterations=2 --warmups=1 --selection-steps=200 --jsonproducedselectionSteps=200,listItemRenderCount=400,emojiGridItemRenderCount=400, median about0.0014ms, p95 about0.0014ms.node scripts/measure-raycast-hook-signatures.mjs --iterations=2 --warmups=1 --args=500 --jsonproduced cached stable-args speedup about14020xversus repeated directJSON.stringify, and handled cyclic args.12 -> 0and global keydown listener adds12 -> 1; its dropdown harness still covers stable-children flattening40 -> 5, but that case is intentionally scoped.JSON.stringifywork and handling cyclic args without throwing.60 -> 1andsetImagecalls59 -> 0.Stack validation
codex/consolidate-wave5-renderer-raycastwas created/reset fromSuperCmdLabs/SuperCmd:mainat9bdd3d2.src/renderer/src/raycast-api/*,src/renderer/src/App.tsx,src/main/main.ts, and focusedscripts/*harnesses.Replaces