Repository navigation
fix(pi): stop titlebar spinner timer when extension ctx turns stale - #14664
coding-susemi wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe titlebar animation interval now wraps frame rendering and title updates in error handling. When a stale extension context causes an error, the code clears the interval and resets its timer reference. The error no longer propagates as an uncaught process error. Normal frame rendering and title updates remain unchanged. Merge Risk: ⚪ Minimal · up to The change stops the titlebar animation timer when a session reload invalidates its context, preventing the stale-context exception from terminating the pi process. It is a localized fix with no actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
|
Closing this stale PR: it came from an older local setup that I no longer maintain. Thanks for the project! |
Summary
Fixes the pi process crash caused by the
orca-titlebar-spinnerextension when a session reload happens while the 80ms titlebar animation timer is running. See #14658.Root cause
The extension's
startAnimationstarts asetInterval(80 ms) whose callback callspi.getSessionName()on every tick. When a session reload happens, the pi runtime invalidates the extension context — any later call on the stale context throwsstale extension generation after reload. If a timer tick lands after the invalidation, the exception escapes from the timer callback as anuncaughtExceptionand terminates the entire pi process.Fix
Wrap the interval callback body in try/catch. When the context turns stale, the catch block stops the timer instead of letting the exception crash the process.
Verification
tsc --noEmitpasses on the modifiedtitlebar-extension-source.ts.