Skip to content

feat: capture specific feedback form data to Sentry before recaptcha#45

Draft
thostetler wants to merge 1 commit intomasterfrom
feat/sentry-feedback-specific-forms
Draft

feat: capture specific feedback form data to Sentry before recaptcha#45
thostetler wants to merge 1 commit intomasterfrom
feat/sentry-feedback-specific-forms

Conversation

@thostetler
Copy link
Member

When recaptcha is blocked (ad blockers, network restrictions, timeouts),
the specific feedback forms (associated articles, missing references,
correct abstract) show an error and the user's work is lost. The general
feedback form already mirrors every submission to Sentry via
captureFeedback — this replicates that pattern for the three specific
forms so no submission data is ever lost.

  • Added shared sendFeedbackToSentry utility in src/utils/sentryFeedback.ts
    that resolves Sentry via whenSentryReady/window.Sentry and calls
    captureFeedback with sendFeedback fallback (same dual-path as navbar)
  • Each FormPreview (AssociatedReferences, MissingIncorrectRecord,
    SubmitCorrectAbstract) now calls sendFeedbackToSentry as the first
    action in handleSubmit, before recaptcha attempt
  • Fire-and-forget: fully try/catch wrapped, never blocks form flow
  • Existing recaptcha-error captureMessage blocks left as-is (they track
    recaptcha failures specifically, the new utility captures user data)

When recaptcha is blocked, specific feedback forms lose user data. The
general feedback form already mirrors submissions to Sentry — this
replicates that pattern for associated references, missing/incorrect
records, and correct abstract forms.

Adds a shared sendFeedbackToSentry utility that resolves Sentry via
whenSentryReady/window.Sentry and calls captureFeedback (with
sendFeedback fallback). Each FormPreview now fires this as the first
action in handleSubmit, before recaptcha, so data is never lost.
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