fix(sidebar): classify review cancellation from the thrown error - #1511
Conversation
An abort that races an ordinary failure, such as a later authorization denial, no longer shows as unknown. Explicit tool cancellations now throw AbortError, and native CANCELLED errors keep the unknown classification.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughReview tools now throw named cancellation errors when their signals are already aborted. The sidebar publisher classifies cancellation from the thrown error and sets its snapshot state accordingly. ChangesReview cancellation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Explicit review cancellations are reported as unknown while ordinary failures remain unavailable. No material merge-blocking issue was identified, so the change is mergeable subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change corrects how an existing review session displays cancellation versus failure. No new permission or execution route was found, but some integration coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Linked issue
Follow-up to #1306 / #1510 (CodeRabbit finding on #1510).
PR type
type:bug)Summary
unknownwheneversignal.abortedwas true, so an abort that raced an ordinary failure (e.g. a denied destructive-operation confirmation) was mislabeled.AbortError, or a nativeNativeReviewCliErrorwith codecancelled, maps tounknown; everything else staysunavailable.gentle_review,gentle_review_capture, andgentle_review_capture_groupnow throwAbortError, following the existing convention inlib/native-review-cli.ts.Verification
unknowninstead ofunavailable), then GREEN.node --experimental-strip-types --test tests/review-sidebar-state.test.ts tests/shell-bar.test.ts: 59/59 passed.node --experimental-strip-types --test tests/gentle-ai.test.ts tests/native-review-cli.test.ts tests/native-review-consent.test.ts tests/review-authority.test.ts: 146/146 passed.node scripts/check-types.mjs: 188 baseline diagnostics, no regressions.node scripts/build-runtime-modules.mjs --check: generated modules match sources.Summary by CodeRabbit