fix(session): repair stale paginated question blockers#962
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the session message pagination to use a new Session.messagesPage service method instead of querying MessageV2.page directly. This new method ensures that stale running external-result questions are terminalized when retrieving a page of messages. Additionally, comprehensive unit tests have been added to verify the correct handling of stale, live pending, and unready external-result questions in paginated responses. I have no feedback to provide as there are no review comments.
|
Warning Review limit reached
More reviews will be available in 41 minutes and 9 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 |
6fd1ffd to
fdc7337
Compare
Bump PawWork desktop release version to 2026.5.29. Changes since v2026.5.28: - feat(settings): move Connections to Integrations + global toast monitor (#975) - feat(ui): display cache hit rate with one decimal place (#967) - fix: stabilize session opening state (#969) - fix(session): repair stale paginated question blockers (#962) - fix(ui): refit read-file icon into 0-20 viewBox (#964) - fix: allow running tools to expand - fix: add run lifecycle diagnostics - fix: harden Electron repair fallback - refactor: remove legacy theme choices - ci: stabilize e2e Playwright install and PR triage paths Verification: diff scope matches prior release bump (#958) — only the version string in packages/desktop-electron/package.json and the workspace entry in bun.lock. All CI checks green (e2e-artifacts required a rerun due to Playwright browser install flake unrelated to this change).
Summary
Repair stale external-result question blockers when session messages are loaded through the paginated message endpoint. This is a follow-up to #947: the full-history path was repaired, but the desktop app uses
GET /session/:sessionID/message?limit=...and that route still bypassed the repair.Why
A session can be reopened after the app is shut down while a question tool is waiting for renderer input. If the in-memory
ExternalResultis gone, the persisted question part is no longer answerable. The paginated endpoint previously returned that stale part asrunning, so the UI kept showing a question card and every response failed with "session restarted".Related Issue
No standalone issue. Follow-up regression from #947.
Human Review Status
Pending
Review Focus
Please check that stale-question terminalization stays in the session API layer instead of moving side effects into the low-level
MessageV2.page()storage reader.Risk Notes
Skipped checklist items:
How To Verify
Screenshots or Recordings
Not applicable. No visible UI change.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.