Skip to content

Bug: failed bulk Delete and Archive discard the failed-row selection #3909

Closed

Description

@yannickmonney

Shared bulk failures discard the failed-row selection and retry context

Candidate: bulk-actions-discard-refused-selection-20260929 · P2 · one shared root for Delete and Archive.

Verified source: 9ea59724df24d62729a9360f3902d964dab39b3e. Local, owned component replay only; no production or real record deletion. Product source remained unchanged.

Reproduction

  1. Start the retained browser fixture and open http://127.0.0.1:3088/. Leave Action = Delete and Outcome = Mixed.
  2. Select Selected Alpha and Selected Bravo; leave Unselected Charlie unchecked.
  3. Click Delete selected, then Delete. The closed transport succeeds for Alpha and refuses Bravo.
  4. Observe the remaining table, selection and confirmation. Repeat with Archive / All refused.

Expected: preserve the failed rows' selection or an equivalent persistent recovery context, identify which operations failed, and let the user retry those failures without reconstructing their selection. Successful rows should not be retried. A completely successful operation should close and clear as it does today.

Actual: the accurate failure toast appears, but the confirmation closes and every selection clears. In the mixed case Alpha is removed; refused Bravo and unrelated Charlie remain equally unchecked. The bulk footer disappears. In the all-refusal case both selected records remain and still lose selection. The completion callback runs once in every case. The callback may intentionally mean "settled"; the defect is the unconditional loss of recovery context, not a claim that its name promises success.

Evidence and controls

  • bulk-recovery.probe.test.tsx uses the actual DataTable, production selection column, BulkDeleteBar/BulkArchiveBar, ConfirmDialog/DeleteDialog and Toaster. Only the external operation and row collection are synthetic in-memory state (bulk-fixture.tsx).
  • Six tests passed: success, all-refusal and mixed outcomes for both verbs. probes.log; final UI run probes-with-roles.log passed 14/14 including separate role controls.
  • Each case retains JSON and HTML (delete-mixed.json, delete-refusal.json, archive-mixed.json, archive-refusal.json, and both success controls).
  • Real Chrome through CUA reproduced mixed Delete and all-refusal Archive. Before/after screenshots: browser-delete-mixed-before.png, browser-delete-mixed-after.png, browser-archive-refusal-before.png, browser-archive-refusal-after.png. Full post-action AX files accompany them.
  • Real Chrome all-success Delete control removes Alpha and Bravo, leaves Charlie unchecked, closes the confirmation, clears selection, and shows Deleted 2 items (browser-delete-success-after.png, .ax.txt). Archive success is covered by the component control.

Root and contract

packages/ui/src/components/data-table/data-table-bulk-actions.tsx:53-78 and :140-166 count Promise.allSettled rejections, but run close / clear / completion unconditionally after the toast. They never retain the rejected IDs. Actual consumer controlled selection is cleared by the passed callback (for example ProductsTable at services/platform/app/features/products/components/products-table.tsx:117-121,168-173). Projects consumes the archive variant; the same root should not be counted per consumer or verb.

The shared dialog guide says: "On failure, keep the decision context and explain the problem" (services/ui-docs/content/components/dialog.md:31). ConfirmDialog itself leaves closing to the caller, so this behavior is in the bulk footer.

Deduplication

Current all-state GitHub searches bulk, read-only, selection failure, and bulk permission, plus findings.json (101 at final recheck), baseline-102.json (102) and latest issues-live-batch11.json (1,072), found no equivalent shared recovery report. Saved results and review are in github-*.json, local-dedup-summary.json and live-relevant-issues.json.

Replay

From /Users/yannick/Documents/git/tale:

bunx vitest --run --config /Users/yannick/.codex/notes/tale-1000-additional/bulk-recovery-next/vitest.config.ts --reporter=verbose --silent=false
bunx vite --config /Users/yannick/.codex/notes/tale-1000-additional/bulk-recovery-next/browser/vite.config.ts

The browser fixture blocks fetch and uses no application API. This proves the production component response to known outcomes, not an observed outage or live backend refusal.

Activity

  1. yannickmonney commented on Sep 29, 2026

    @yannickmonney
    ContributorAuthor

    Current-main revalidation at b7f8ca02ec249c004652b1ee52e112d9cdfa53ea: the reported defect still reproduces.

    The actual shared Delete/Archive success, mixed and all-refusal controls still discard failed-row selection. Current main adds refusal descriptions but retains unconditional close/clear.

    The parent reran the local evidence against an isolated detached current-main checkout with current workspace source. Query/mutation boundaries remain controlled; no real cancellation, deletion, assignment, production test or provider action occurred. The original pinned-source evidence is retained. This revalidation does not add a finding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions