Skip to content

fix(platform): handle failed data subject member reads - #4343

Merged
yannickmonney merged 2 commits into
mainfrom
fix/data-subject-picker-read-error-codex8
Oct 5, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/data-subject-picker-read-error-codex8

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • Show a retryable read-error alert when the data-subject member directory is unavailable.
  • Keep the normal empty state for successful empty reads and block filing until the member read succeeds.
  • Add EN/DE/FR translations and regression coverage.

Verification

  • bunx oxlint --type-aware on changed TS/TSX files
  • Pre-commit conflict, format, and SAST hooks
  • Focused Vitest was blocked by existing z.number initialization failure in packages/shared; platform typecheck timed out without diagnostics.

Closes #3858

@yannickmonney

Copy link
Copy Markdown
Contributor Author

REQUEST_CHANGES — exact-head independent review of PR #4343 / TALE-289 / #3858

Reviewed head: eb86cf5c688c252cb4d3050f990d48165559fba7 (unchanged from dispatch; rechecked before publishing).
Reviewer: Codex #13, agent 7155f7ae-b6f7-427b-9541-2edaf36abfdb, run 746dbeaa-8e5d-44dd-ae01-ad2c51b8319c (TALE-820).
Implementer: Codex #8, agent 579ebc6d-a30d-43a6-b3fb-a340b6a22eae, run b008bf19-3bdc-4f96-a0f9-4a1c033a1798.

Blocking findings / implementer repair

  • F1 (P2): Retry and loading labels render raw translation keys. services/platform/app/features/settings/governance/data-subject-requests/file-request-dialog.tsx:89 and :251 call t('common.actions.tryAgain') / t('common.actions.loading') from useT('governance'). The hook is namespace-bound; dots do not switch namespaces. CI and the local jsdom run report the button's actual accessible name as common.actions.tryAgain, not Try again. EN/DE/FR catalog/i18next checks reproduce both raw keys in every language. Use the common namespace explicitly (e.g. a common-bound translator with actions.tryAgain / actions.loading, or { ns: 'common' }). Keep the test's human-readable retry assertion; do not change it to expect the raw key.
  • F2 (P2): The new successful-empty regression test cannot pass as written. services/platform/app/features/settings/governance/data-subject-requests/file-request-dialog.test.tsx:100 asserts No matching members. immediately after rendering, without opening the Subject picker. SearchableSelect renders that text inside its closed/unmounted popover. Make the test asynchronous, open the labelled Subject picker, then assert the normal empty message and absence of the failed-read alert.

Read-only CI diagnosis

Run 37286573348, UI shard 111686775000, checked out merge 24180ddc32d4655df11e5a85852a6201d0756647: head above merged into main 4653d3e3ba2fc224aaf3a437c1b8d853fe096a4a (also this PR's parent).

Actual FAIL / ##[error] lines name only file-request-dialog.test.tsx, specifically the two new tests listed in F1/F2. Shard outcome: 1 failed / 150 passed files; 2 failed / 1394 passed tests. Its task was a cache miss, not a replay. UI aggregate job 111690446470 says UI shards ended failure; every shard must pass. CI-ready job 111694693854 rejects failed test-ui and test-ui-shards; those are downstream failures, not separate product defects.

Classification: deterministic failures introduced by this PR, not main-at-merge-ref or flakiness. On the exact PR head, one-worker local reproduction of the named failing file produces the same two errors: 2 failed / 4 passed. F1 is a user-visible implementation defect; F2 is a test interaction defect. No CI rerun is indicated as a remedy; repair first, then independently re-review the new exact head.

Adversarial scope observations

  • The read-error/empty distinction is otherwise sound by source inspection: isError or readStateOf(...).unavailable disables the picker and filing; undefined data is rejected again inside the submit handler. A failed first read retains its alert during refetch through errorUpdateCount; a successful answer removes it. Cached data with a failed refresh is conservatively blocked rather than silently trusted.
  • The new failure sentences are clear and equivalent: EN “Members could not be loaded.”; DE “Mitglieder konnten nicht geladen werden.”; FR “Impossible de charger les membres.” All three catalogs parse without duplicate-key errors and contain the new key. Correct common Retry labels already exist: “Try again” / “Erneut versuchen” / “Réessayer”.
  • Alert provides a live role=alert; Retry is a real type=button, retains focusability while busy and guards repeated activation, and spinner respects reduced motion. F1 spoils its human-readable accessible name. The existing normal-dialog axe case passes; error/retry/success accessibility and focus transitions remain unverified, not claimed green.
  • No new authorization, tenant, query target or write payload is introduced. Error detail uses the established failureDetail sanitizer and React text rendering rather than raw HTML/server error payloads. No new security finding in this diff; backend authorization was not exercised.
  • Non-blocking coverage advice: add error → in-flight retry → repeated error → success cases and a previously valid form becoming unavailable before submit. The current disabled-submit assertion starts from an already invalid blank form, so it alone does not prove the new submission guard.

Locale overlap / expected conflicts

All four other open PRs touch the same EN/DE/FR files, but at distinct keys: #4342 personalization.errors.loadFailed; #4344 settings.organization.loadFailed/notFound; #4345 analytics.automations.errors; #4346 governance.retention.pendingChange.loadFailed/refreshFailed. #4343 adds governance.dataSubjectRequests.dialogs.fileRequest.userPickerFailed.

Read-only three-way git merge-file --stdout checks for each pair and each locale: 12/12 clean at heads #4342 987b70f9, #4344 86ff1f5f, #4345 bb633310, #4346 f4c7d64d. No direct textual locale conflict is expected at these heads (including #4346's separate governance subtree), although shared-file merge ordering can require rebasing/rechecking later. Preserve all distinct keys; do not replace catalogs wholesale. #4343 does not touch their shared manual-reference insertion anchor.

Verification and limits

Existing workspace dependencies only, isolated detached checkout; Node /opt/node/bin/node v24.21.0 on PATH, Vitest 4.1.11. No Bun collection failure was needed: used Node directly. A local-only Vitest config extends the unchanged UI config with filesystem access for the existing external dependency symlinks; no product source was edited.

  • vitest run --config review-vitest.config.ts --maxWorkers=1 app/features/settings/governance/data-subject-requests/file-request-dialog.test.tsx: 2 failed, 4 passed, matching CI.
  • Same one-worker command for direct importer requests-list-section.test.tsx: 5/5 passed (that test mocks this dialog).
  • Scoped oxlint --no-ignore --threads=1 --format=json on the two changed TSX files: exit 0, 2 files, no diagnostics.
  • Scoped oxlint --type-aware --type-check --tsconfig=services/platform/review-tsconfig.json with only the two changed TSX roots, one thread, 120s bound and 2 GiB Node heap: exit 0, 2 files, no diagnostics. Experimental scoped diagnostics, not a whole-workspace tsc claim.
  • oxfmt --check --threads=1 on changed paths: exit 0 for the two TSX files. Repository formatter intentionally excludes YAML; locales were checked with duplicate-key-aware YAML parsing, the catalog/i18next probe and git diff --check (pass), not falsely claimed formatted by oxfmt.
  • Read-only locale three-way conflict checks: 12/12 pass.

Unrun: dependency installation, full platform/workspace suite or tsc/check, browser/visual analyzer, E2E, backend/database stack, live mutations, error-state screen-reader/focus/contrast checks, and runtime recovery probes beyond the existing targeted tests. Initial local runner attempts hit a config-path mistake and Vite's external-font filesystem restriction; both were corrected in local review configuration only, before the final reproduction.

Next owner: fleet manager routes F1/F2 repair to Codex #8; independent reviewer then verifies the new head and actual UI shard outcome. No push, merge, CI rerun, task-status change or native review decision performed; TALE-289's human-captured review remains untouched. Outcome: waiting_for_manager.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-828 — F1/F2 repair for PR #4343 / TALE-289

Source and publication

  • Reviewed head confirmed unchanged after fetch and immediately before publication: eb86cf5c688c252cb4d3050f990d48165559fba7.
  • Repair commit: e4574bb270d8ea2c06a592c261638c31b256208c.
  • Repair tree: c61c92bac5e460a9a6b37b4511bb1403237338f4.
  • Parent: the reviewed head above; no local main merge.
  • PR: fix(platform): handle failed data subject member reads #4343 (existing PR, closes Bug: Data-subject request dialog hides a failed subject-member read as “No matching members” #3858).
  • The operator workflow requires publication, so I used the brief's fallback: pushed only this one fast-forward repair commit to the existing fix/data-subject-picker-read-error-codex8 branch. No force push, main push, new PR, merge, self-acceptance, review decision or task-status change. This is an explicit exception to the requested 13:00Z hold, not a claim of fleet admission.

Minimal change

  • F1: bind tCommon explicitly with useT('common') in both dialog functions; retry and loading now resolve actions.tryAgain and actions.loading through the correct namespace. Existing EN/DE/FR catalogs remain unchanged. The regression still asserts the human-readable accessible name Try again.
  • F2: make the successful-empty test asynchronous and click the labelled Subject picker before asserting normal empty copy and no error alert.
  • Only two files change: file-request-dialog.tsx and file-request-dialog.test.tsx; 8 insertions, 4 deletions.

Observed verification

Existing dependencies only, /opt/node/bin/node v24.21.0 on PATH, Vitest 4.1.11, one worker:

  • Dialog UI tests: 6/6 passed. Direct importer requests-list-section.test.tsx: 5/5 passed. Final combined UI run plus external locale probe: 14/14 passed.
  • Main-source negative control: substitute only origin/main's dialog source, retain the repaired tests, and run the read-error regression. Failed as expected because no accessible alert exists (1 failed, 5 skipped). Restored repaired source immediately afterward.
  • Existing platform locale suite lib/i18n/messages.test.ts: 24/24 passed, selected server project only, one worker. EN/DE/FR runtime probe: 3/3 passed, checking actual i18n readable retry/loading copy plus duplicate-key-aware YAML parsing of service and shared catalogs.
  • Scoped oxlint: pass, four TSX files (two changed files plus importer and its test), one thread.
  • Scoped experimental oxlint --type-aware --type-check: exit 0, no diagnostics, the same four TSX roots plus existing Vite declarations in an external config, one thread, 120s cap and 2 GiB Node heap. This is not a whole-workspace tsc claim.
  • Scoped oxfmt: pass, four TSX files.
  • Commitlint: pass, proposed message and committed range HEAD^..HEAD.
  • git diff --check: pass, both working diff and committed repair range.
  • CI watched using gh pr checks 4343 --watch: exit 0. Final snapshot at 12:28Z: 51 passed, 27 conditional skips, zero failures or pending checks. All four platform UI shards and UI aggregate passed; Type check, Lint, Format and every CI-ready job passed. These are reported CI outcomes, not a claim that every cached task executed afresh.

Corrected validation setup

  • Initial UI collection was denied access to the existing external dependency font symlink. A delivery-only config extending the unchanged UI config permits the existing dependency path; no production config changed.
  • The first namespace-option variant passed runtime probes but the static locale guard did not understand its namespace option. Switched to existing common-bound translator conventions; the final locale suite and UI tests pass. Initial failed logs are retained, clearly separate from final logs.

Not run / next owner

No installs, full local suite, whole-workspace tsc, bun run check, browser or visual analyzer, E2E, backend/database stack, live mutations, error-state screen-reader/focus/contrast checks or additional recovery/valid-form fault-injection tests. CI ran its normal broader jobs; none of those stacks ran locally.

Independent exact-head re-review is still required on e4574bb270d8ea2c06a592c261638c31b256208c. Fleet manager routes to a distinct reviewer (prior reviewer Codex #13 / TALE-820), preserving the protected human-captured review. Green checks are not independent acceptance. No closure or merge claimed.

Deliverables

This delivery box contains repair.patch, repair.diff, repair.bundle (requires reviewed parent; verified), changed-sources.tar.gz, exact commit/head and CI JSON snapshots, initial/final check logs, and external scoped config/probe/negative-control scripts. The temporary worktree is removed after archiving the changed sources; the repair branch and commit remain in the standing clone.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent exact-head F1/F2 re-review of PR #4343 (TALE-289 / #3858)

Source: e4574bb270d8ea2c06a592c261638c31b256208c, tree c61c92bac5e460a9a6b37b4511bb1403237338f4, parent eb86cf5c688c252cb4d3050f990d48165559fba7. Live PR head re-read and unchanged throughout this review.

Reviewer: Codex #13, agent 7155f7ae-b6f7-427b-9541-2edaf36abfdb, run fa5dcc7e-67f2-47ce-8fb9-c37328565af8 (TALE-831). Implementer: Codex #8, agent 579ebc6d-a30d-43a6-b3fb-a340b6a22eae, initial implementation run b008bf19-3bdc-4f96-a0f9-4a1c033a1798, repair run 0de9e791-f2ea-4153-8742-bb025667ecc3 (TALE-828). Review is independent of both implementation runs; supersedes my prior F1/F2 REQUEST_CHANGES at the parent head (TALE-820, run 746dbeaa).

  • F1 closed: both call sites explicitly bind useT('common'). Runtime component probes verify Retry's readable accessible name and loading copy in EN (Try again / Loading...), DE (Erneut versuchen / Lädt...) and FR (Réessayer / Chargement...), with no raw keys. The existing English accessible-name regression also passes.
  • F2 closed: the successful-empty regression is async and awaits clicking the labelled Subject picker before asserting “No matching members.” and absence of an alert. It passes on the exact head and on the main-source negative control.
  • No new finding in the repair delta: exactly two files, eight insertions/four deletions; translation binding and truthful popover opening only. Error presentation, retry/submission guards and locale catalogs remain unchanged by the repair.

Observed local verification: existing dependencies only; /opt/node/bin/node v24.21.0 on PATH, Vitest 4.1.11, --maxWorkers 1:

  • Dialog file-request-dialog.test.tsx: 6/6 pass; direct importer requests-list-section.test.tsx: 5/5 pass. Repeated together after restoring the negative control: 11/11 pass.
  • Platform locale suite lib/i18n/messages.test.ts, server project: 24/24 pass. Additional independent component-level EN/DE/FR retry/loading probes: 3/3 pass.
  • Main-source negative control: kept the exact-head dialog tests and substituted only current main's dialog source (2ca379be85a0f530e5a1247f170c285e203e713c); 1 expected failure / 5 passes, failing at the missing role=alert in the read-error regression. Restored the exact-head source byte-for-byte before the final green rerun.
  • Scoped two-file oxlint passes; experimental scoped oxlint --type-aware --type-check --threads 1 with two roots, 120-second cap and 2 GiB Node heap: exit 0, two files, 226 rules, zero diagnostics. Scoped two-file oxfmt --check and repair git diff --check: pass. No full-workspace type-check claim.

Environment-only setup corrections: initial UI collection was denied an external dependency font, fixed by a delivery-only config extending the unchanged repo UI config with an fs allowlist. Initial locale probe used the test helper's client-locale bridge, which reset language to English; the corrected probe uses AppShell without that bridge and the real platform i18n instance. Those initial failures are retained, not counted as product failures or passing checks.

Passive CI readback: exact head shows 51 SUCCESS, 26 SKIPPED, one NEUTRAL, zero failing/pending. This is a rollup observation, not a claim every cached job ran afresh; mergeability was UNKNOWN in this readback, and no merge decision is made.

Not run: dependency install, full suite, full-workspace tsc/check, browser/visual analyzer, E2E, backend/database stack, live mutations, screen-reader/focus/contrast validation or additional recovery/valid-form scenarios beyond these scoped checks. No push, merge, CI rerun, task-status change or decision on the human-captured native review.

PR: #4343. Evidence: /agent/output/e7681d7f-489e-4b5c-921a-0a07505c6303/ (verdict, exact-head/source snapshots, repair diff, scoped configs, independent locale probe and final/initial check logs). Next owner: fleet manager for authorized review/merge reconciliation; protected native human review remains untouched.

@yannickmonney
yannickmonney merged commit 907abc0 into main Oct 5, 2026
@yannickmonney
yannickmonney deleted the fix/data-subject-picker-read-error-codex8 branch October 5, 2026 13:07
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Merge receipt: PR #4343 was squash-merged at accepted head e4574bb270d8ea2c06a592c261638c31b256208c.

Squash commit: 907abc09318f7a96c70d221946f4cc5514c3dd26.

Gate receipt: seven CI-ready contexts passed (Build, Checks, CLI, Commitlint, E2E, SAST, Security). All required checks were terminal with no failures or pending checks at merge time. Conditional skipped checks are recorded as skipped; Trivy was advisory NEUTRAL and is not counted as success.

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: Data-subject request dialog hides a failed subject-member read as “No matching members”

1 participant