feat(reliability): timeout, retry button, reduced-motion dots#33
Merged
PAMulligan merged 1 commit intoMay 8, 2026
Merged
Conversation
- Add per-attempt request timeout via AbortController (default 30s, configurable via requestTimeoutMs / request-timeout-ms / 0 to disable); surfaces a retryable ChatApiError with code TIMEOUT. - Expose retry() and canRetry from useChat. retry() re-sends the existing message array without duplicating the user turn. canRetry is false for validation/config errors and true for timeouts, network failures, rate limits, and 5xx responses. - Render an inline Retry button next to the error pill, hidden while loading. - Switch typing-indicator dots to motion-safe:animate-bounce and add an aria-label so screen readers and reduced-motion users get the right UX. - New i18n keys: errorTimeout, errorRetry, typingIndicator. - Surface requestTimeoutMs through ChatWidget, window.ClaudiusConfig, and the <claudius-chat> web component. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying chat-widget with
|
| Latest commit: |
4c9a2b4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a1b50d74.chat-widget-ejc.pages.dev |
| Branch Preview URL: | https://12-typing-indicator-retry-ti.chat-widget-ejc.pages.dev |
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
AbortController(default 30s, configurable viarequestTimeoutMs; pass0to disable). Aborts surface as a retryableChatApiErrorwithcode: "TIMEOUT".useChatnow exposesretry()+canRetry.retry()re-sends the same message array without duplicating the user turn.canRetryisfalsefor validation/config errors andtruefor timeouts, network failures, rate limits, and 5xx.motion-safe:animate-bounceand given anaria-labelso reduced-motion / SR users get a sane experience.errorTimeout,errorRetry,typingIndicator.requestTimeoutMsexposed onChatWidget,window.ClaudiusConfig, and<claudius-chat request-timeout-ms>.Test plan
pnpm test(167/167 passing) — covers timeout abort, TIMEOUT retryability, retry-without-duplication, validation-error non-retry, and the Retry button render/click/hide statespnpm exec tsc --noEmitcleanprefers-reduced-motion: reducein OS settings and confirm typing dots stay static while still being visible🤖 Generated with Claude Code