Skip to content

fix(web): stop retries from reversing successful video changes - #3680

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
AksharP5:fix-video-retry
Nov 4, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
AksharP5:fix-video-retry

Conversation

@AksharP5

@AksharP5 AksharP5 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

When adding and removing videos together, retrying after one action reports failure can undo the action that succeeded. Clear completed submitted changes from the selection when the update finishes, so retry applies only the remaining changes.

Each submission also belongs to its dialog session. An older request still refreshes collection data, but cannot clear selections or close the dialog after it has reopened.

Closes #3679

Start with [existing-video], select it and new-video, then click Update twice. The intended result is [new-video].

First update Baseline retry Patched retry
Addition succeeds; removal fails [] [new-video]
Addition fails; removal succeeds [new-video, existing-video] [new-video]

The four regressions mount the actual dialog, React Query, virtual grid and cards in jsdom with server-action boundary fixtures. They cover both partial-failure directions and closing/reopening while the previous removal is pending, whether that request succeeds or fails. The reopened selection survives and its next update removes the intended video. The regression runs in CI’s web compatibility suite; its existing optimizer prebundles the real form/grid dependencies for consistent React peer resolution.

Validation of current head a8714f2e0d0b6890b34913ac9fbbab2ec880be9d:

  • 569 tests passed, 9 existing skips, across all 62 React compatibility test files.
  • Both new reopen cases fail on the previous published head e56d291 and pass here. The original retry regressions remain passing.
  • Scoped Biome, changed-file TypeScript diagnostics and whitespace checks pass.

The original selection correction received independent GPT-6 Astra HIGH review at e56d291c1196e0979c137b0dae7489b1f6afe555. The follow-up session guard addresses Greptile’s reopened-selection finding and was verified with the new regressions and complete compatibility suite.

No live browser or database end-to-end verification. Explicit partial failure results are covered; rejected promises and ambiguous server-side writes retain existing behavior. Remote code checks have passed, and fresh Greptile review reports 5/5 on the current head. Vercel previews require team authorization.

Reproduce:

bun run --cwd apps/web test __tests__/unit/add-videos-dialog-retry.test.ts

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the reopened-selection finding is addressed and no new actionable issues were found.

Summary

The PR keeps retries from undoing successful video changes and protects selections made after reopening the dialog.

  • Video updates retry only unfinished actions and leave reopened dialogs alone.

Reviews (2) · Last reviewed commit: "fix(web): isolate video updates between ..." · Reviewed by Greptile

@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@AksharP5 is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@AksharP5

AksharP5 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

Fixed the reopened-selection finding in a8714f2. Each submission captures its dialog session; old completions still refresh data but cannot clear the new selection or close the reopened dialog.

Both new real-component regressions fail on the previous head and pass here, covering failure and success of the old pending removal. The complete compatibility suite passes: 569 tests, nine existing skips. Scoped Biome and TypeScript checks pass.

@richiemcilroy
richiemcilroy merged commit eb0233f into CapSoftware:main Nov 4, 2026
33 of 35 checks passed
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.

Retrying a partial video update reverses completed changes

2 participants