Skip to content

Inbox: a stale tab's 409 says Inbox, not review - #1773

Merged
backnotprop merged 1 commit into
mainfrom
fix/inbox-stale-tab-wording
Oct 8, 2026
Merged

backnotprop merged 1 commit into
mainfrom
fix/inbox-stale-tab-wording

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

What

Found in the 0.28.8 release smoke: an Inbox tab left open on an older Inbox told the person "This review was replaced by a newer Plannotator session on the same address. Reload the page to see what is open now; nothing was submitted." The Inbox holds no review, and what was refused (a pick, a Send, a setting) was saved, not submitted.

Root cause

The text did not come from ServerSessionReplacedBanner. The Inbox window never mounts that banner. Its own error lines show a refusal's error field as the server sent it (packages/inbox/api.ts, readJson). Every Inbox route answered a stale nonce with the shared serverSessionMismatchBody(), and that function always used the review wording SERVER_SESSION_MISMATCH_ERROR.

Fix

In packages/core/server-session.ts:

  • serverSessionMismatchBody(error = SERVER_SESSION_MISMATCH_ERROR) now takes an optional message.
  • A new export, INBOX_SERVER_SESSION_MISMATCH_ERROR: "This Inbox page is out of date: a newer Plannotator Inbox runs on the same address. Reload the page to see it; nothing was saved."

Every Inbox stale-tab site passes the Inbox wording: inbox.ts (seen, picks/reply/resolve, settings, restart, decisions), inbox-attachments.ts, inbox-guides.ts and inbox-sessions.ts. The code is still session_mismatch.

Plan, annotate and code review, on both Bun and the vendored Pi copy, call the function with no argument. Their bodies are byte for byte unchanged, and so is ServerSessionReplacedBanner.

Test

packages/server/inbox.test.ts, the stale-tab test: one route from each Inbox route module, plus settings, answers 409 session_mismatch with the Inbox wording and never the word "review". It fails on main, which returns the review sentence.

🤖 Generated with Claude Code

The Inbox's stale-tab refusal reused serverSessionMismatchBody(), whose
error reads "This review was replaced by a newer Plannotator session…",
and the Inbox window shows a refusal's error as it is. The body now takes
an optional message; every Inbox route passes
INBOX_SERVER_SESSION_MISMATCH_ERROR. Plan, annotate and code review (Bun
and Pi) call it without one and answer byte for byte as before.
@backnotprop
backnotprop merged commit fa22270 into main Oct 8, 2026
31 checks passed
@backnotprop
backnotprop deleted the fix/inbox-stale-tab-wording branch October 8, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant