Skip to content

fix(core): Prevent duplicate feedback submissions and keep draft on error - #6769

Merged
antonis merged 1 commit into
mainfrom
fix/feedback-confirm-delivery
Sep 23, 2026
Merged

antonis merged 1 commit into
mainfrom
fix/feedback-confirm-delivery

Conversation

@antonis

@antonis antonis commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

  • Duplicate submissions: a synchronous in-flight guard prevents repeated submits — including rapid double-taps and taps after a successful submit when a custom onFormSubmitted keeps the form mounted.
  • False success when the SDK can't accept the feedback: when there is no active client, or captureFeedback throws, the form now calls onSubmitError, shows the error dialog, and keeps the draft intact so the user can retry — instead of reporting success and discarding the draft.
  • Loading state: the submit button is disabled while submitting.

💡 Motivation and Context

Fixes #6766

💚 How did you test it?

  • Added tests
  • Manual testing (example)

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(core): Prevent duplicate feedback submissions and keep draft on error by antonis in #6769
  • feat(core): Expose native breadcrumb off-switches by antonis in #6768
  • chore(readme): Remove blog posts by antonis in #6765
  • test(android): Add GradleTestKit tests for sentry.gradle.kts asset tasks by antonis in #6754
  • fix(android): Generate modules.json into build folder instead of source tree by antonis in #6753
  • fix(android): Generate sentry.options.json into build folder instead of source tree by antonis in #6751
  • feat(core): Expose native network breadcrumb options by antonis in #6764
  • chore(deps): update JavaScript SDK to v10.75.2 by github-actions in #6767
  • ci: Unify derivedData path resolution with realpath by antonis in #6761
  • fix(e2e): Fix TestFlight upload after enabling Mac Catalyst on the sample by antonis in #6762
  • chore(deps): update JavaScript SDK to v10.75.1 by github-actions in #6763
  • fix(ios): Fix Mac Catalyst linking the wrong Sentry.xcframework slice by antonis in #6758
  • chore(deps): bump the codeql-action group across 1 directory with 3 updates by dependabot in #6756
  • chore(deps): bump ruby/setup-ruby from 1.321.0 to 1.324.0 by dependabot in #6757
  • fix(core): Declare optional peer dependencies to resolve phantom imports under strict package managers by antonis in #6729
  • Add missing exports and update public API report by antonis in #6731
  • test(ios): Reenable Session Replay E2E test by antonis in #6737
  • fix(ios): Honor shutdownTimeout on iOS by antonis in #6749

🤖 This preview updates automatically when you update the PR.

Comment thread CHANGELOG.md Outdated
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Sep 23, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/core/src/js/feedback/FeedbackForm.tsx Outdated
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx Outdated
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx Outdated
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx Outdated
@sentry

sentry Bot commented Sep 23, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.27.0 (107) Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 433.76 ms 457.70 ms 23.94 ms
Size 50.56 MiB 56.50 MiB 5.94 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
37a2091+dirty 407.82 ms 441.22 ms 33.40 ms
f3215d3+dirty 411.11 ms 454.38 ms 43.27 ms
bc8f61e+dirty 442.98 ms 506.56 ms 63.58 ms
f9c1ed4+dirty 431.00 ms 466.22 ms 35.22 ms
7887847+dirty 416.61 ms 462.04 ms 45.43 ms
57e0069+dirty 413.82 ms 453.47 ms 39.65 ms
a0a3177+dirty 441.27 ms 499.86 ms 58.59 ms
09a902f+dirty 427.38 ms 473.80 ms 46.42 ms
a5d243c+dirty 424.52 ms 485.18 ms 60.66 ms
5a23c47+dirty 423.85 ms 466.47 ms 42.62 ms

App size

Revision Plain With Sentry Diff
37a2091+dirty 48.30 MiB 53.58 MiB 5.28 MiB
f3215d3+dirty 48.30 MiB 53.49 MiB 5.19 MiB
bc8f61e+dirty 49.74 MiB 55.09 MiB 5.35 MiB
f9c1ed4+dirty 49.74 MiB 54.86 MiB 5.12 MiB
7887847+dirty 49.74 MiB 54.81 MiB 5.07 MiB
57e0069+dirty 49.74 MiB 54.85 MiB 5.11 MiB
a0a3177+dirty 49.74 MiB 55.37 MiB 5.63 MiB
09a902f+dirty 49.74 MiB 54.81 MiB 5.07 MiB
a5d243c+dirty 48.30 MiB 53.54 MiB 5.23 MiB
5a23c47+dirty 49.74 MiB 54.82 MiB 5.07 MiB

@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3849.40 ms 1231.19 ms -2618.21 ms
Size 5.15 MiB 6.90 MiB 1.75 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
64630e5+dirty 3842.70 ms 1218.11 ms -2624.60 ms
b0d3373+dirty 3831.75 ms 1227.29 ms -2604.46 ms
b04af96+dirty 3818.92 ms 1219.76 ms -2599.16 ms
3d31fcf+dirty 3838.09 ms 1223.46 ms -2614.63 ms
a0a3177+dirty 3844.73 ms 1225.23 ms -2619.51 ms
af33f3b+dirty 3849.98 ms 1236.45 ms -2613.53 ms
09a902f+dirty 3835.67 ms 1217.11 ms -2618.57 ms
5a316ea+dirty 3820.11 ms 1211.28 ms -2608.83 ms
acd838e+dirty 3849.78 ms 1230.00 ms -2619.78 ms
c2e182c+dirty 3848.40 ms 1211.79 ms -2636.61 ms

App size

Revision Plain With Sentry Diff
64630e5+dirty 4.98 MiB 6.46 MiB 1.49 MiB
b0d3373+dirty 5.15 MiB 6.68 MiB 1.53 MiB
b04af96+dirty 4.98 MiB 6.54 MiB 1.56 MiB
3d31fcf+dirty 4.98 MiB 6.56 MiB 1.58 MiB
a0a3177+dirty 4.98 MiB 6.55 MiB 1.58 MiB
af33f3b+dirty 4.98 MiB 6.51 MiB 1.54 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
5a316ea+dirty 4.98 MiB 6.51 MiB 1.53 MiB
acd838e+dirty 5.15 MiB 6.70 MiB 1.55 MiB
c2e182c+dirty 4.98 MiB 6.50 MiB 1.52 MiB

@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 434.20 ms 446.62 ms 12.42 ms
Size 50.56 MiB 56.50 MiB 5.94 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
bf168a4+dirty 430.60 ms 459.31 ms 28.71 ms
0bd8916+dirty 400.15 ms 442.72 ms 42.57 ms
a2585ce+dirty 414.04 ms 456.83 ms 42.79 ms
9c84b9a+dirty 429.26 ms 448.90 ms 19.64 ms
bc0d8cf+dirty 407.66 ms 461.35 ms 53.69 ms
a736b76+dirty 405.78 ms 458.74 ms 52.96 ms
1122a96+dirty 510.16 ms 542.00 ms 31.84 ms
267d3ed+dirty 424.69 ms 483.70 ms 59.01 ms
6177334+dirty 404.80 ms 456.74 ms 51.94 ms
7887847+dirty 420.47 ms 460.55 ms 40.08 ms

App size

Revision Plain With Sentry Diff
bf168a4+dirty 49.74 MiB 55.09 MiB 5.35 MiB
0bd8916+dirty 48.30 MiB 53.57 MiB 5.26 MiB
a2585ce+dirty 49.74 MiB 55.36 MiB 5.61 MiB
9c84b9a+dirty 49.74 MiB 55.36 MiB 5.62 MiB
bc0d8cf+dirty 48.30 MiB 53.48 MiB 5.18 MiB
a736b76+dirty 48.30 MiB 53.48 MiB 5.18 MiB
1122a96+dirty 48.30 MiB 53.54 MiB 5.24 MiB
267d3ed+dirty 48.30 MiB 53.58 MiB 5.28 MiB
6177334+dirty 48.30 MiB 53.54 MiB 5.23 MiB
7887847+dirty 49.74 MiB 54.81 MiB 5.07 MiB

@antonis
antonis force-pushed the fix/feedback-confirm-delivery branch from 3e54db4 to ce521f6 Compare September 23, 2026 08:43
@antonis antonis changed the title fix(core): Confirm feedback delivery before reporting success fix(core): Prevent duplicate feedback submissions and keep draft on error Sep 23, 2026
@antonis
antonis force-pushed the fix/feedback-confirm-delivery branch 2 times, most recently from ce521f6 to f0d3cb1 Compare September 23, 2026 08:47

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f0d3cb1. Configure here.

Comment thread packages/core/src/js/feedback/FeedbackForm.tsx
@antonis
antonis force-pushed the fix/feedback-confirm-delivery branch from f0d3cb1 to fd6857a Compare September 23, 2026 09:06
@antonis
antonis marked this pull request as ready for review September 23, 2026 09:09
@antonis
antonis requested review from a team, alwx and lucas-zimerman as code owners September 23, 2026 09:09
@antonis
antonis marked this pull request as draft September 23, 2026 09:10
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx
Comment thread packages/core/src/js/feedback/FeedbackForm.tsx
Comment thread packages/core/test/feedback/FeedbackForm.test.tsx
…rror

FeedbackForm called the fire-and-forget captureFeedback and immediately reported
success, cleared the saved draft, and had no in-flight guard, so repeated taps
could submit multiple times.

The React Native client hands the envelope to the (native or JS) transport
without surfacing the delivery result, so the JS layer can't confirm the feedback
reached Sentry — success is therefore reported optimistically once the event is
captured. What this fixes:

- A synchronous in-flight guard prevents duplicate submissions (including repeated
  taps and taps after a successful submit when a custom onFormSubmitted keeps the
  form mounted).
- When feedback can't be captured (no active client, or captureFeedback throws)
  the form now reports an error via onSubmitError and keeps the draft intact so
  the user can retry, instead of falsely reporting success.
- The submit button is disabled while submitting.

Fixes #6766

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis
antonis force-pushed the fix/feedback-confirm-delivery branch from fd6857a to cd33176 Compare September 23, 2026 09:33
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3866.55 ms 1235.40 ms -2631.15 ms
Size 5.15 MiB 6.90 MiB 1.75 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3b6e9f9+dirty 3822.77 ms 1208.00 ms -2614.77 ms
4e0b819+dirty 3828.96 ms 1205.64 ms -2623.32 ms
1e5d96d+dirty 3845.93 ms 1222.51 ms -2623.42 ms
0a9e622+dirty 3825.35 ms 1219.04 ms -2606.31 ms
5ca03f9+dirty 3873.76 ms 1236.26 ms -2637.51 ms
40c9884+dirty 3826.11 ms 1217.04 ms -2609.07 ms
57e0069+dirty 3842.23 ms 1210.00 ms -2632.23 ms
7ac3378+dirty 1202.35 ms 1198.31 ms -4.04 ms
20fbd51+dirty 3832.52 ms 1206.13 ms -2626.39 ms
822d35b+dirty 3841.52 ms 1221.75 ms -2619.77 ms

App size

Revision Plain With Sentry Diff
3b6e9f9+dirty 5.15 MiB 6.68 MiB 1.53 MiB
4e0b819+dirty 4.98 MiB 6.46 MiB 1.49 MiB
1e5d96d+dirty 4.98 MiB 6.46 MiB 1.49 MiB
0a9e622+dirty 4.98 MiB 6.51 MiB 1.53 MiB
5ca03f9+dirty 4.98 MiB 6.53 MiB 1.55 MiB
40c9884+dirty 4.98 MiB 6.51 MiB 1.53 MiB
57e0069+dirty 4.98 MiB 6.50 MiB 1.52 MiB
7ac3378+dirty 3.38 MiB 4.76 MiB 1.38 MiB
20fbd51+dirty 4.98 MiB 6.46 MiB 1.49 MiB
822d35b+dirty 4.98 MiB 6.50 MiB 1.53 MiB

@antonis
antonis marked this pull request as ready for review September 23, 2026 10:05

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonis
antonis merged commit bae7081 into main Sep 23, 2026
91 of 92 checks passed
@antonis
antonis deleted the fix/feedback-confirm-delivery branch September 23, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback form reports success without confirming delivery (related to sentry-dart#4016)

2 participants