fix(frontend): retire tool previews when approvals take over - #6597
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe change retires captured tool previews when durable tool records cover them. Tests validate approval preservation, output-error handling, and recovery from an old paused turn to a newer running turn. ChangesLive Preview Retirement
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change retires temporary tool previews when matching saved tool records take ownership, while preserving approval state and newer error output. The covered handoff and recovery behaviors present no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
🤖 The AI agent says: @coderabbitai review Please review e30b0f8 for saved-tool ownership and preservation of newer output. Independent review passed. The new regression fails before the fix; 61 combined preview, reader and commit-notification tests pass, as do TypeScript and frontend lint. Fixed-image browser verification remains pending. |
|
✅ Action performedReview finished.
|
Railway Preview Environment
Updated at 2026-09-06T02:50:49.882Z |
Context
A tool waiting for approval could remain visible as a second running tool after its saved approval row appeared. If terminal transcript adoption was deferred to protect the approval, that temporary preview could survive recovery into the next turn and leave activity dots after completion.
Changes
Hand an unchanged input preview to the saved tool with the same call ID when the bounded transcript is adopted. Keep newer tool outputs and errors, and keep text that the saved transcript does not cover. The existing approval card remains the source of the approval state.
How to review
Start with the tool ownership check in
retireCoveredSessionLivePreview, then the reducer regression and the hook recovery scenario. This PR is stacked on #6596 so one frontend image can verify both corrections.Tests
The new reducer regression fails before the correction. All 61 combined reader, preview, and commit-notification tests pass after stacking; TypeScript and all 25 frontend lint tasks pass. Independent review passed. The original defect was captured in a real OSS preview session; fixed-image desktop/mobile browser verification is pending the combined image build.
What to QA
With the shared reader enabled, pause on a tool approval, then resume or cancel it and continue with another turn. Each tool should have one visible row, and completed turns should leave no running preview or activity dots. Newer streamed text and tool errors must stay visible during saved-transcript updates.