Repository navigation
Conversation
📝 WalkthroughWalkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The change stops titlebar spinner updates after stale-context paint failures, avoiding repeated failed title updates. The running-spinner failure path is covered, while the initial-failure path needs a focused test before this behavior is fully protected against regression. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the change, motivation, testing, limitations, linked issue, and AI use. However, it does not follow the required template and omits the required Visual Proof section, ELI5, explicit What Changed and Why sections, checklist items, platform-impact notes, and the required Linked Issue format. Resolution Update the description to use the repository template. Add the missing sections and checklist details. Include visual proof or write N/A with a reason if there is no visual or interaction change. Use an explicit issue reference such as "Fixes
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/pi/titlebar-extension-source.test.ts (1)
104-147: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd tests for title-update failures and shutdown timer cleanup.
The stale-context tests only make
pi.getSessionName()throw. They do not execute either new catch path for a throwingctx.ui.setTitle().Add an interval test that makes
setTitlethrow. Assert that no error escapes andvi.getTimerCount()becomes zero.Add a
session_shutdowntest afteragent_startwith a stalegetSessionName. Assert that shutdown clears the active timer. This verifies both failure types required by this change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0aa92592-780e-4f00-b70a-ec5eff4c217b
📥 Commits
Reviewing files that changed from the base of the PR and between 8c3a119 and 95e69f3a1bf94a0ee2fbefefd07bf8f07c10559c.
📒 Files selected for processing (2)
src/main/pi/titlebar-extension-source.test.tssrc/main/pi/titlebar-extension-source.ts
|
Community PR: please Approve and run workflows on head |
paintTitle already returned false on replaced session ctx, but renderFrame ignored that and left the interval armed. Fail the frame closed and stop the timer without stopAnimation so marker reassert stays. Co-authored-by: Cursor <[email protected]>
95e69f3 to
75ae60f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/pi/titlebar-extension-source.test.ts (1)
555-581: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for an initial frame failure.
This test covers failure after the 80 ms interval starts. Add a companion case where
getSessionName()throws beforeagent_startcompletes. Assert that no interval exists and no title is emitted. This covers the early return atsrc/main/pi/titlebar-extension-source.ts:225.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 845f4331-0fcb-455f-99cb-4c26c681c1b9
📒 Files selected for processing (2)
src/main/pi/titlebar-extension-source.test.tssrc/main/pi/titlebar-extension-source.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
|
Closing as superseded by current This PR's remaining delta was: on a stale Current main already does that, and more tightly:
Rebase would only fight the later lifetime/ |
Summary
Stop Pi's 80 ms titlebar animation when painting fails after a session/context replacement. The current title painter already catches stale-context errors, but its caller ignored the failure and kept waking the animation timer.
The frame now reports whether painting succeeded; a failed first frame does not start the interval, and a later failed frame clears it. This clears the spinner timer only, preserving the separate dialog-marker timer and existing idle-compaction bounds. Related: #14400.
Testing and review
At
75ae60fdc13311fdb888376cd920d86fbc0249b4, independent verification passed 68 tests across 3 titlebar test files, the Node TypeScript check (--composite false), changed-file lint/format and diff whitespace. The regression makes session-name lookup become stale after animation starts and verifies no remaining interval or subsequent title writes.Independent Cursor review passed for this exact SHA (spec-compliance PASS; quality APPROVED). Full repository tests, packaging and live Pi/SSH/Windows/Linux smoke were not run. CLI/Web checks were not repeated for this generated main-process extension source.
AI disclosure
Cursor implemented the remaining timer fix; Codex independently checked the original scope, source and verification results.