perf(runtime): reduce lifecycle and media churn#575
Conversation
|
Reviewed the full diff. Five of the six consolidated changes are clean, behavior-preserving wins; the sixth (the largest file, Strengths
Concerns / potential bugs
Suggestions
🔴 Needs changes before merge — the five main-process changes are safe and worth landing, but the 🤖 Automated review by Claude Code (Opus 4.8). |
|
Addressed the maintainer feedback on the inert ExtensionView lifecycle scope. What changed:
Review-thread state checked via GraphQL: PR #575 has 0 reviewThreads, 0 reviews, and 1 top-level maintainer comment; this addresses that actionable comment. The menubar Verification:
|
|
Follow-up system attribution and amendment (2026-07-10): a full-quit A/B on the affected Mac showed WindowServer staying around 68–73% CPU and MenuBarAgent around 18–22% with SuperCmd completely absent. After relaunch and startup settlement, SuperCmd itself was 0.0–0.1% while the compositor/menu-bar load persisted. This does not support SuperCmd as the cause of the system-wide volume/menu-bar stutter. However, the standalone PR still had one avoidable SuperCmd-side path: file-backed tray icons were decoded/resized and sent through setImage on every accepted title tick. Commit e529dcb adds file identity tracking (path + mtime + size), skips unchanged native image refreshes, and still refreshes when the icon file or image inputs change. Validation: focused menubar test 8/8, full PR test command 64/64, main TypeScript check passed, and git diff check passed. |
What changed
Why
origin/mainbase so upstream can review one lifecycle/media PR instead of six overlapping branches.Compatibility impact
streamGenerateContentSSE.How tested
node --test scripts/test-script-command-runner.mjs scripts/test-menubar-native-update-cache.mjs scripts/test-ai-provider-whisper-upload.mjs scripts/test-ai-provider-gemini-prompt-streaming.mjs scripts/test-extension-lifecycle-sandbox.mjs scripts/test-whisper-file-buffer-read.mjs./node_modules/.bin/tsc -p tsconfig.main.json --noEmit --pretty false./node_modules/.bin/tsc -p tsconfig.renderer.json --noEmit --pretty false(run becauseExtensionView.tsxchanged; fails on existing non-ExtensionView.tsxrenderer errors in App, CameraExtension, LiquidGlassSurface, launcher hooks, raycast-api helpers, settings, and quicklink icons)severity=errorforsrc/main/ai-provider.ts,src/main/main.ts,src/main/menubar-native-update-cache.ts,src/main/script-command-runner.ts,src/main/whisper-transcribe-file.ts, andsrc/renderer/src/ExtensionView.tsx: no diagnostics foundgit diff --checkPerformance evidence
before=1 after=0 cleared=1).Buffer.concatcopy.readCalls=0,nodeBufferBytes=0), while buffer-backed providers still read once.Stack validation
origin/mainoncodex/consolidate-lifecycle-media-wave2.scripts/lib/ts-import.mjsstub support and script-runner assertions unrelated to this wave.Replaces