Repository navigation
fix(web): clear a draft's save-failure alert once a save lands - #104
Merged
Merged
Conversation
The ordinary save chain's messages (failed save, refused departure, held workflow act) stayed on screen after a later save reached the server. A successful save now clears the message the chain set, and only while it is still the one shown. Playwright keeps a trace for every failing test, so an intermittent failure carries its own evidence. Refs #83 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primary Issue
Refs #83. Not "Closes": the intermittent failure itself is not reproduced, so its root cause isn't established. Details below.
Problem And Outcome
Investigating #83 turned up a real defect. When an ordinary save failed, the draft showed "The draft did not save. Stay on this draft and save again before leaving." A later save that reached the server left that alert on screen next to Saved;
received()only ever set the message.After this PR, a successful save clears the message the save chain set, but only while that message is still the one shown, so an unrelated problem is never dismissed by a save. Playwright also keeps a trace for every failing test, so the next occurrence of #83 carries its own evidence.
Changes
drafts/[id]/+page.svelte:showSaveProblem(), which records the message it set;savedresult, that message is cleared if it is still displayed;e2e/draft-recovery.spec.ts: after the retry saves, no alert remains.playwright.config.ts:trace: 'retain-on-failure'.CHANGELOG.md: Unreleased → Fixed.Correction rung: 2. The e2e assertion guards the stale-alert class on the save path.
#83 investigation
The intermittent failure is a timeout: "My sessions" did not render within 5 s of clicking Home after the retry saved. The failure snapshot is consistent with a slow, in-flight SPA navigation:
navigating.tois set;Both recorded failures overlapped heavy concurrent work on the host: once another Playwright session, once a full
cargo buildin another checkout. I could not reproduce it here:--repeat-each=30 --workers=2: 30/30 passed;draft-recovery.spec.tswith--repeat-each=2 --workers=2while a coldcargo build -p consolebook-serverran alongside: 94/94 passed.#83 stays open until a retained trace shows where the departure waits.
Verification
Expected: 0, Received: 1atdraft-recovery.spec.ts:2392), and the failure trace was retained undertest-results/.717a0ea(scripts/proof.py, euid 0 with DAC capabilities dropped): passed..proof/20261014T214644Z-717a0ea49135/receipt.json, sha256d8ee41b8136b57e37f4919b6ebd5e80bdbb341a592b4fc91ee4c3c53b75ddd69.cargo testwithNo space left on device(host disk, not code). The rerun above is after freeing space.🤖 Generated with Claude Code
https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts