fix(feedback): catch reCAPTCHA errors and show actionable failure UI#44
Draft
thostetler wants to merge 8 commits intomasterfrom
Draft
fix(feedback): catch reCAPTCHA errors and show actionable failure UI#44thostetler wants to merge 8 commits intomasterfrom
thostetler wants to merge 8 commits intomasterfrom
Conversation
- Add @testing-library/react@^11.0.0 for component tests - Use tsconfig.build.json to exclude test files from rollup type-check pass
- Use string[][] instead of [string[]] tuple for DeferFn-compatible fetchBibcodes signatures (TS2769) - Separate type re-exports with 'export type' for isolatedModules compliance in api/index.ts and hooks/index.ts (TS1205) - Annotate reduce accumulator types in DiffView to fix strict inference of never[] (TS2769) - Add nullish-coalescing guards for optional count fields in DiffView (TS2532) - Commit tsconfig.json additions (isolatedModules, strict, etc.) that were being modified by tooling
useRecaptcha hook now loads the reCAPTCHA script on mount instead of assuming it was loaded by legacy code. Error states use AlertModal (closable dialog) instead of inline banners for actionable errors.
- Replace details/summary with clipboard copy button for email fallback - Add key props to AlertModal to prevent stale state across status transitions - Skip reCAPTCHA when siteKey is missing for local dev - Suppress unhandled rejection from script load on mount
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.
When reCAPTCHA fails to load (e.g. blocked by an ad blocker or network issue), the correct-abstract form silently swallowed the error — the modal closed with no feedback to the user.
await execute()inside the try/catch in SubmitCorrectAbstract/FormPreview so reCAPTCHA rejections are caught like any other submission errorSubmissionStateerror variant'scodefield optional so string-only rejections (no HTTP status) are representable