Skip to content

fix: add response.ok checks and fix doFinishReview error recovery#344

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/frontend-error-handling
Apr 24, 2026
Merged

fix: add response.ok checks and fix doFinishReview error recovery#344
tomasz-tomczyk merged 1 commit intomainfrom
fix/frontend-error-handling

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Add response.ok validation in submitComment() for both PUT and POST paths — previously, server errors were silently swallowed and could corrupt the comment array or lose the user's draft
  • Move setUIState('waiting') inside try block in doFinishReview() — previously, a fetch failure would strand the user on the waiting overlay with no way to return to editing
  • Fix dead .mermaid-rendered CSS selector to target actual .mermaid class used by mermaid diagram rendering

Test plan

  • Add a comment, verify it saves successfully (golden path)
  • Verify mermaid diagrams still render with correct max-width constraint
  • (Manual) Simulate server error during comment save — user should see error toast, form stays open

🤖 Generated with Claude Code

- Add response.ok validation in submitComment() for both PUT and POST
  paths to prevent silent failures when server returns errors
- Move setUIState('waiting') inside try block so fetch failures don't
  strand the user on the waiting overlay with no way back
- Fix dead .mermaid-rendered CSS selector to target actual .mermaid class

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit a47bb5e into main Apr 24, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/frontend-error-handling branch April 24, 2026 08:40
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