Skip to content

Save as Case on close retries a failed case save - #202

Merged
tebriz91 merged 2 commits into
mainfrom
macbook-air/issue-189
Oct 28, 2026
Merged

tebriz91 merged 2 commits into
mainfrom
macbook-air/issue-189

Conversation

@tebriz91

@tebriz91 tebriz91 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #189 (ROADMAP 0.3.0 item 6).

save_case_and_close called create_case, which returns early when the tab already has a case link, so a tab whose case save had failed stayed open with no explanation. Now, when the tab's case is marked failed, CaseCoordinator::retry_and_close marks the tab to close after the save and pumps the waiting (latest) revision. If the retry fails again, the existing failure path releases the close and shows the error.

Tests: coordinator unit test, plus a workspace test that blocks the store, repairs it, chooses Save as Case and checks the tab closes and the case is written.

Codex review (gpt-6.1-sol, high)

  1. An unrelated case's write failure can stall the requested retry (another case writing when Save as Case is chosen, and that write fails). Not fixed: write_failed deliberately doesn't restart the queue, since a persistent failure would otherwise loop. The tab stays open with the failure notice, as for any failed save; the next case action restarts the queue. Rare (two cases failing at once).
  2. Two tabs of the same failed case both choosing Save as Case keep only the last close. Not fixed: close_after holds one tab per case, as before this PR. The first tab stays open and can be closed again. Rare; worth a list only if it shows up.
  3. A case that saved while the close prompt was open made Save as Case do nothing. Fixed: save_and_close closes the tab at once when nothing waits for that case; unit test added.

🤖 Generated with Claude Code

tebriz91 and others added 2 commits October 28, 2026 09:19
A tab whose case save failed already has a case link, so create_case
returned early and nothing closed the tab. Retry the waiting revision
and close the tab once it is written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt was open

Codex review of #202: the case can recover between the prompt and the
answer; with nothing waiting, close the tab at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tebriz91
tebriz91 marked this pull request as ready for review October 28, 2026 02:23
@tebriz91
tebriz91 merged commit 15049a9 into main Oct 28, 2026
5 checks passed
@tebriz91
tebriz91 deleted the macbook-air/issue-189 branch October 28, 2026 02:33
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.

Save as Case can't finish closing a tab whose case save failed

1 participant