fix(app): keep session status timeout off the project reload toast - #1560
Conversation
A timed-out session status snapshot rethrew into the slow-bootstrap error path, firing the project-level reloadFailed toast on every bootstrap pass (app launch and after each assistant turn) on machines where the snapshot takes longer than the 5s timeout (#1550). The timeout already records a diagnostic event, degrades session_status_state to error, and recovers on the next SSE status event or bootstrap pass, so it is now best-effort like the external-result hydrate: swallowed after recording instead of escalated. Real fetch failures still surface the toast.
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/context/global-sync/bootstrap.test.ts, packages/app/src/context/global-sync/bootstrap.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughSession-status hydration timeouts now remain best-effort during bootstrap. The code records diagnostics and hydration errors without propagating timeout failures or showing project reload-failure toasts. Tests verify bootstrap completion and no toast emission. ChangesSession hydration timeout handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change prevents session-status timeouts from triggering an incorrect project reload toast while preserving error state and recovery behavior; it is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 |
Prepare the urgent PawWork 2026.8.3 stable release from the current dev baseline after #1560, #1563, and the P0 message-order rollover fix #1562. Change boundary: - bump the desktop package version from 2026.8.2 to 2026.8.3 - update only the matching Bun lockfile workspace entry Verification: - version contract failed on 2026.8.2 and passed on 2026.8.3 - release metadata and workflow contracts: 21 passed, 0 failed - release TypeScript check passed - frozen install passed in the dedicated release worktree without additional lockfile changes - all required PR checks passed, including macOS smoke, E2E, CodeQL, dependency review, and the full Windows matrix Review follow-ups: - no unresolved review threads - no separate issue; this is version-only release preparation for already-merged fixes Residual risk: - all macOS and Windows release targets must build this squash commit so the single-source publisher can pin one verified commit - the optional dev-dep-audit still reports the default branch's existing advisories; this PR changes no dependency
Summary
In
bootstrapDirectory, a timed-outsession.statussnapshot no longer rethrows into the slow-bootstrap error path. The timeout is already recorded as anincident.session_status_hydration_timeoutdiagnostic and degradessession_status_statetoerror; after that it is now swallowed (best-effort, matching the external-result hydrate pattern in the same file) instead of escalating intoslowErrs. Real fetch failures still throw and surface the toast.The extended bootstrap test also pins that the bootstrap pass finishes (
statusreachescomplete) despite the timeout - previously the project stayed unfinished on slow machines.Why
Fixes #1550. The
session.statusfetch is wrapped in a 5-second timeout (SESSION_STATUS_TIMEOUT_MS). On machines where the full status snapshot takes longer, the timeout error landed inslowErrsand fired the project-level "Failed to reload {project}" toast on every bootstrap pass - once at app launch and again after every assistant turn (or interrupt), exactly the spam reported on Windows 11 in v2026.8.1. The data itself recovers on the next SSE status event or bootstrap pass, so the toast was neither actionable nor accurate.Supersedes #1556 (closed): that PR only raised the
bun testper-test timeout, which does not affect the shipped app.Related Issue
Fixes #1550
Human Review Status
Approved by @Astro-Han
Review Focus
SessionStatusHydrationTimeoutError(timedOutflag); every other status fetch failure still escalates to the reload toast.slowErrsstays empty andstatusreachescompletewhilesession_status_stateremainserroruntil SSE recovery - confirm that combination is the intended degraded state.Risk Notes
session_status_state: error. I judge that the right trade: the toast was not actionable and the state self-heals.bootstrapDirectoryseam with the realshowToasthost spied, which is where the spam originated.How To Verify
Screenshots or Recordings
Not applicable: no visible UI or copy change; the change removes a spurious error toast from a timeout path.
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.