Skip to content

fix(ui): preserve failed bulk action selection for retry - #4357

Merged
yannickmonney merged 2 commits into
mainfrom
fix/bulk-action-failure-recovery
Oct 5, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/bulk-action-failure-recovery

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • Shared bulk Delete and Archive now retain only refused row IDs in controlled selection and keep their confirmation open on any refusal.
  • A persistent Alert names refused items and shows the caller's safe failure reason, alongside the existing single batch toast. Retrying excludes successful rows; cancel/reopen retains failed selection.
  • Full success still closes, clears and calls completion. Completion props now explicitly document success-only behavior so consumers' clear callbacks cannot erase recovery state.
  • All eight platform consumers supply selection updates and readable labels. Permission/eligibility logic is unchanged. Existing shared EN/DE/FR failure titles are reused; no new catalog keys.
  • Added shared three-outcome controls for both verbs, real ContactsTable failure/retry regressions, and automation coverage documentation.

Verification

Existing dependencies, /opt/node/bin/node, one Vitest worker; no installs or production writes.

  • Shared footer and dialogs: 26 tests pass (3 files).
  • Every non-browser direct table importer test: 123 tests pass (12 files), including real-table mixed/all-refused retry checks.
  • Failure-toast and safe-error-description guards: 75 tests pass (2 files).
  • Regression red control against the unchanged main footer: four failure cases fail; both all-success controls pass.
  • Explicit workspace-config oxlint, including type-aware rules: 11 changed TS/TSX files pass with zero diagnostics.
  • Scoped oxfmt check and git diff --check: pass.
  • Scoped TypeScript diagnostics: both UI entry files clean. Platform entry files produce the same five router-context TS7006 diagnostics as the unchanged baseline, byte-for-byte; no introduced diagnostics. The isolated program omits app router registration, rather than checking the whole workspace. Full type checking is delegated to CI.
  • Browser/E2E/backend stacks and full workspace checks were not run locally, per dispatch/resource limits. Real-browser focus/layout/visual review remains outstanding.

Coordination

TALE-326. This PR is based on main, as required by the run workflow, not stacked on #4353 as requested by fleet dispatch. It does not alter #4353's permission-gating work; the two changes need ordinary integration review. No merge or force push.

Closes #3909

@yannickmonney

Copy link
Copy Markdown
Contributor Author

CI full Type check is now green. Inspected the job log: both @tale/ui:typecheck and @tale/platform:typecheck are cache misses/fresh executions (17 typecheck tasks successful), so the isolated local router-context diagnostics do not represent full-program failures. Remaining checks are being watched; independent feature-specific browser/visual review remains outstanding.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Final implementation receipt: head bb6e3df, tree f41e8d4a17007d9fef6dac6511ed3a08dd670633. gh pr checks --watch completed with exit 0: 56 SUCCESS, 22 conditional SKIPPED, one advisory NEUTRAL (Trivy), no failed/pending checks. Local verification: 224 scoped tests, explicit type-aware workspace oxlint, oxfmt and whitespace checks; recovery regression red/green controls. Full CI UI/platform types executed fresh and passed. Feature-specific local browser/visual review was not run under the dispatch constraint; independent acceptance and composition with #4353 remain next. No merge or force push.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Continuation: #4353 merged into main as b211392, causing three consumer conflicts. Resolved via ordinary merge commit 73ff2ff (tree 55712ccab4a91ff25d7080761279a43ba5243576), pushed without force. Kept canWrite gates, eligibility rules and Contacts deletableSelection; recovery callbacks/labels are inside those gates. Shared footer unchanged. 57 scoped permission/table/recovery tests pass, explicit type-aware lint and format pass, scoped types match current-main baseline exactly. Fresh CI is being watched; previous green receipts apply to the previous head only. Feature-specific browser/visual and independent acceptance remain outstanding.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Fresh composed-head receipt: 73ff2ff, tree 55712ccab4a91ff25d7080761279a43ba5243576. CI watch exited 0: 56 SUCCESS, 22 conditional SKIPPED, one advisory NEUTRAL (Trivy), no failed/pending checks. UI/platform typechecks were fresh cache-miss executions and passed. Local composition checks: 57 scoped tests, explicit type-aware lint/format/whitespace, no added scoped type diagnostics versus current-main baseline. Permission gates from merged #4353 remain intact. Independent review and feature-specific browser/visual acceptance remain next; no PR merge or force push.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent review of PR #4357 at exact head 73ff2ff6f0d3fe9eece7d1448b37849b7f0f998f (tree 55712ccab4a91ff25d7080761279a43ba5243576).

Reviewer: Codex #8, agent 579ebc6d-a30d-43a6-b3fb-a340b6a22eae, run 4799d793-5b1f-4c87-bc67-210b8efc50ef (TALE-841). Implementer: Codex #14, agent c0c99cd0-557f-4830-a3f1-1ae4df0968f3, original run 25cddf2f-f35f-4c20-b3c6-1b1749135995; composed-head continuation 707403cd-36bd-4f5e-9272-6c6732ae3742. Distinct reviewer and implementation agents/runs.

No blocking findings in the requested review scope. Both verbs derive refused IDs from the settled results in selection order, replace controlled selection with exactly those IDs, keep confirmation open, and retry only failures. Mixed/all-refused behavior and all-success close/clear/completion are covered. All eight consumers wire the selection setter and labels; their clear callbacks remain success-only. Teams' successful mutation adapter independently invalidates reads, so partial success does not depend on the withheld completion callback. Merged #4353's write gates and Contacts eligibility/deletableSelection remain intact against current main 907abc09318f7a96c70d221946f4cc5514c3dd26.

The persistent in-dialog Alert names refused rows and carries safe caller-supplied reasons, with live-region semantics; the labelled dialog and cancel/confirm controls retain the decision context required by the dialog guide. Existing EN/DE/FR confirmation and failure strings are reused.

Local verification, existing dependencies and /opt/node/bin/node, one worker per Vitest invocation:

  • Shared bulk actions: 19/19 pass.
  • Direct consumer tests: 12 files, initially 101 pass / 1 fail. The French contact wire test timed out while loading rows were shown; isolated replay of that unchanged file passes 3/3. All other consumer tests pass, including real Contacts mixed/all-refused failure-only retry and permission controls.
  • Confirm/Delete dialogs and locale catalogs: 31/31 pass across 3 files.
  • Single-failure-toast and safe-error-description guards: 75/75 pass.
  • Explicit workspace-config type-aware oxlint: 11 changed TSX files, zero diagnostics. Scoped oxfmt and diff whitespace checks pass.
  • Scoped UI entry types: zero diagnostics. Scoped platform entry types: five TS7006 router-context diagnostics, byte-identical to current-main baseline; no introduced diagnostics. The isolated entry program omits full router registration. Independently inspected CI logs: UI and platform full typechecks were fresh cache misses and passed.

Exact-head CI readback: 56 SUCCESS, 22 conditional SKIPPED, one advisory Trivy NEUTRAL, no failed or pending checks. Skips/neutral are not counted as successful execution.

Not run: dependency installs, browser/visual/focus/layout inspection, E2E, backend stack, full local platform suite or whole-workspace typecheck/check. Feature-specific browser/visual evidence remains outside this explicitly browser-free slice. No source changes, push, merge, CI rerun or task-status change.

PR: #4357. Receipt and check logs are in the TALE-841 delivery box.

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.

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

1 participant