Repository navigation
feat(frontend): implement optimistic state rollback on network failur… - #1683
Merged
Conversation
…e in Webhook Logs Table - Optimistically mark selected rows as "Retrying…" when a bulk retry is sent - On network failure or non-2xx response, restore the exact prior row state and selection, highlight affected rows, and show an inline alert with "Try again" / "Dismiss" actions - Roll back individual rows the server skipped; keep queued rows locked - Announce progress and failures via an aria-live status region - Add tests covering pending, network/server failure, partial skip and retry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Thosine-01 is attempting to deploy a commit to the Emmanuel's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Closes #1514
Adds optimistic updates with full rollback to bulk retry in the Webhook Logs table. Rows show a "Retrying…" state as soon as the user clicks. If the request fails, the table goes back exactly to its previous state and the user gets clear feedback and a way to try again.
What changed
Optimistic update
aria-busyRollback on failure (network error or non-2xx response)
role="alert"banner explains what happened and offers Try again, which re-sends the same logs, and DismissTypeErrorfromfetch) shows a clear "Network error" message. Other failures show the server's error message.Partial success
queued_log_idschange to Retry queued and stay locked until the next refreshAccessibility
aria-live="polite"region announces when a retry starts, succeeds or failsmotion-safe:animate-spin, so it doesn't spin for users with reduced motion enabledResponsive
sm:upFiles
frontend/src/components/WebhookLogs.tsx: optimistic state, rollback logic, alert UI, live regionfrontend/src/components/WebhookLogs.test.tsx: 6 new tests. Thereact-hot-toastmock is now callable, because the "logs skipped" path callstoast()directly.Testing
npx vitest run src/components/WebhookLogs.test.tsx: 10/10 passing. Type check and lint are clean.New test coverage:
Manual testing
To reproduce a network failure: load
/webhook-logs, select a failed delivery, stop the backend, then click Retry Selected.Screenshots
🤖 Generated with Claude Code