• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

endatix / endatix-hub / 27787060600
56%

Build:
DEFAULT BRANCH: main
Ran 18 Jun 2026 08:27PM UTC
Jobs 1
Files 725
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jun 2026 08:23PM UTC coverage: 55.694% (+0.02%) from 55.671%
27787060600

push

github

web-flow
fix: Duplicate submissions on a private form complete partial complete (#680)

## Summary

- Fix duplicate submissions (one complete + one partial) when completing
a private survey quickly after typing an answer
- Wait for in-flight partial saves before sending the complete submit,
so the FPSK cookie exists and the final request updates instead of
creating a new submission
- Refactor queue wait API for clarity: `waitWhileProcessing()` +
`waitForInFlightPartial()` instead of `waitForIdle()`

## Root cause

- `clearQueue()` drops pending partials but does not wait for an
in-flight partial HTTP request
- Complete submit could run in parallel without a cookie, causing both
requests to create new submissions

## Changes

- `submission-queue.ts` — add `waitWhileProcessing()`; simplify
resolvers to track in-flight processing only
- `use-submission-queue.hook.ts` — add `waitForInFlightPartial()`
(awaits only when `processing` is true)
- `survey-component.tsx` — `await waitForInFlightPartial()` before
`submitPublicForm` on complete
- Tests — add ordering test ensuring complete submit does not run until
the wait resolves

## Test plan

- [ ] Private single-question survey: type answer, complete immediately
→ one submission only
- [ ] Reload form after complete → answers not pre-populated from a
stale partial
- [ ] Public survey quick complete still works as before
- [ ] `vitest run
features/public-form/application/__tests__/submission-queue.test.ts
features/public-form/application/__tests__/use-submission-queue.hook.test.ts
features/public-form/ui/__tests__/survey-component.test.tsx`

## Related Issues
#679 

## Type of Change
Check all that apply.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Dependency update
- [ ] Refactoring (non-breaking change wh... (continued)

1744 of 2754 branches covered (63.33%)

Branch coverage included in aggregate %.

19 of 20 new or added lines in 4 files covered. (95.0%)

3 existing lines in 2 files now uncovered.

7045 of 13027 relevant lines covered (54.08%)

10.57 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
90.48
8.42% features/public-form/application/submission-queue/submission-queue.ts

Coverage Regressions

Lines Coverage ∆ File
2
66.67
-33.33% features/public-form/application/submission-queue/use-submission-queue.hook.ts
1
90.48
8.42% features/public-form/application/submission-queue/submission-queue.ts
Jobs
ID Job ID Ran Files Coverage
1 27787060600.1 18 Jun 2026 08:27PM UTC 725
55.69
GitHub Action Run
Source Files on build 27787060600
  • Tree
  • List 725
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27787060600
  • 10069f76 on github
  • Prev Build on main (#27755411928)
  • Next Build on main (#27832022441)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc