Skip to content

01a0aa09 - Add a RealUnit Dilisense name-check action to compliance - #1502

Merged
TaprootFreak merged 24 commits into
DFXswiss:developfrom
TaprootFreakAI:feat/01a0aa09-realunit-dilisense-name-check
Sep 22, 2026
Merged

TaprootFreak merged 24 commits into
DFXswiss:developfrom
TaprootFreakAI:feat/01a0aa09-realunit-dilisense-name-check

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Adds last Dilisense date and result, a per-row Screen button, and Screen all to the RealUnit compliance customer list. Results are shown as No match, Match with Birthday, or Match without Birthday — a list hit is not a sanction.

DE:
Ergänzt die RealUnit-Compliance-Kundenliste um letztes Dilisense-Datum und Ergebnis, Screen pro Zeile und Screen all. Ergebnisse heissen No match, Match with Birthday oder Match without Birthday — ein Listentreffer ist keine Sanktion.

Details

The list calls the new RealUnit compliance name-check endpoints. Staff confirm before each screening because Dilisense quota costs money. Screen-all polls batch progress every two seconds. Rows without a name cannot be screened.

A Dilisense list hit only means the name is on the list. The UI maps the current API wire values accordingly (NotSanctioned → No match, MatchWithoutBirthday → Match without Birthday, Sanctioned → Match with Birthday).

Playwright baselines (*-chromium-darwin.png):

  • realunit-compliance-01-search
  • realunit-compliance-02-dossier
  • realunit-compliance-03-screen-confirm
  • realunit-compliance-04-screen-all-confirm
  • realunit-compliance-05-batch-running

The visual spec uses a synthetic Admin JWT and mocked staff/compliance GETs. Confirm and poll are guarded against double-submit and a poll error fails the running batch. Depends on the matching API change.

The customer list shows the last Dilisense date and result. Staff can
screen one named shareholder or all of them. Screen-all runs as a
backend batch and the UI polls progress.
The compliance visual spec now takes five screenshots: the list with
Dilisense columns, the dossier, the per-row confirm dialog, Screen all
confirm, and a running batch. Auth is a synthetic Admin JWT so the
baselines do not need a live API.
A Dilisense list hit only means the name is on the list. The RealUnit
compliance UI now says No match, Match with Birthday, or Match without
Birthday.
Block double-submit while confirming, fail the batch when polling errors,
and cover the remaining screen branches.
Assign a complete failed batch DTO instead of spreading a possibly
undefined previous value, which broke build:dev.
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

dfx pr guard

EN: Thanks for your contribution! This repository follows A38. A38 pass: author local-CI report accepted for this head.

DE: Danke für deinen Beitrag! In diesem Repository gilt A38. A38 pass: Autor-Local-CI-Report für diesen Head akzeptiert.

Details

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 9 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "b2d49f38b9e5bb795800f77730d15baa9b6b4913",
  "private": false,
  "recorded_at": "2026-09-16T15:16:45Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 8.779394541983493,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

Ignore mount batch results after unmount, refuse confirm while a batch
is running, and keep a failed poll error on screen.
Disable Screen until the first batch GET returns, and treat a failed
batch the same on mount, start, and poll.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 14 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "a6144071586bcdcd6794fe43f98ffa7d7b10c5a7",
  "private": false,
  "recorded_at": "2026-09-16T16:31:19Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 13.831228416995145,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

A poll or mount GET failure shows the error but does not invent a
terminal batch status, so Screen stays locked while the server may
still be running.
Unmatched /v1 traffic is declared in the test architecture. The
full-stack compliance list must show Screen all without ErrorHint.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 7 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "f058bc134199d9c21325764d99bbdbec01d631a2",
  "private": false,
  "recorded_at": "2026-09-16T18:09:19Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 6.627818499924615,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

The backend now emits Idle/Running/Completed/Failed. The screen, unit
tests, and visual fixtures follow that contract.
settleBatch compared lowercase failed after the API status became PascalCase,
so a Failed batch never set the error hint.
loadCustomers now uses a generation counter so an in-flight search cannot
overwrite the list after a later reload (for example when a batch finishes).
startNameCheckBatch now shares the poll generation guard. Overlapping
list loads ignore a late reject, and the visual fixture comment matches
the Dilisense summary fields.
startPolling increments the poll generation, which skipped done() in
finally and left the confirm dialog locked. Call done() first.
A terminal Failed hint must not linger after Screen all starts a new
Running batch. Poll GET errors are unchanged because they do not go
through settleBatch.
The search input stays enabled during a load; Enter must not start a
second request until the in-flight one finishes.
Effect cleanup bumps the list-load generation so an in-flight row
POST cannot reload or setError on an unmounted screen.
loadCustomers bumps the list generation in the same tick as the
screenCustomer then-handler, so a generation-guarded finally skipped
done() and left the confirm dialog open after a successful row screen.
Row-screen and Screen-all catch paths now have the same unmount generation
guard coverage as the GET/poll errors. The confirm handler no longer special-
cases a Running batch that the locked buttons cannot open a dialog for.
A Search during an in-flight row screen bumped the list generation and
skipped done(), leaving Confirm stuck. finally always closes the dialog;
list reload and setError stay generation-guarded. Confirm start clears
the previous ErrorHint so a retry does not keep a stale quota message.
settleBatch read previousStatus from the render that created the poll
loop, so after Failed→Running every later non-Failed tick cleared a
Search error. Confirm start already clears; Failed still sets the hint.
Search bumped the list generation during screenCustomer and dropped both
the post-success reload and the error hint. The Search control now follows
isConfirming; the dialog still always closes in finally.
The Search button was already disabled; Enter on the input is now
asserted not to start a second list load until the screen finishes.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 8 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "9659c251c299a5655cfcbff7aef960d96a68837c",
  "private": false,
  "recorded_at": "2026-09-17T20:33:13Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 7.921762167010456,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

EN:
Required CI is green and no merge conflicts exist; this pull request is ready for review.

DE:
Die Required CI ist grün und es gibt keine Merge-Konflikte; dieser Pull Request ist bereit zum Review.

Details
{
  "base": "d93eb60881cdf1359c131ed61dd286981aef55c8",
  "head": "9659c251c299a5655cfcbff7aef960d96a68837c",
  "phase": "applied",
  "pr": 1502,
  "reasons": [],
  "repo": "DFXswiss/app",
  "state": "ready"
}

@github-actions
github-actions Bot marked this pull request as ready for review September 17, 2026 20:34
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

dfx pr guard

EN: Thanks for your contribution! This repository follows A38. A38 pass: author local-CI report accepted for this head.

DE: Danke für deinen Beitrag! In diesem Repository gilt A38. A38 pass: Autor-Local-CI-Report für diesen Head akzeptiert.

Details

@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 17, 2026 20:34
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

EN:
Required CI is green and no merge conflicts exist; this pull request is ready for review.

DE:
Die Required CI ist grün und es gibt keine Merge-Konflikte; dieser Pull Request ist bereit zum Review.

Details
{
  "base": "d93eb60881cdf1359c131ed61dd286981aef55c8",
  "head": "9659c251c299a5655cfcbff7aef960d96a68837c",
  "phase": "applied",
  "pr": 1502,
  "reasons": [],
  "repo": "DFXswiss/app",
  "state": "ready"
}

@github-actions
github-actions Bot marked this pull request as ready for review September 17, 2026 20:35
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft September 18, 2026 21:37
The backend list and POST result now send NoMatch / MatchWithBirthday /
MatchWithoutBirthday instead of NotSanctioned / Sanctioned. Labels stay
No match and Match with/without Birthday.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 10 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "4e2b863b2ddfe5e6400db398c30dfecc8728e9c6",
  "private": false,
  "recorded_at": "2026-09-18T22:11:36Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 9.384021708974615,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

EN:
Required CI is green and no merge conflicts exist; this pull request is ready for review.

DE:
Die Required CI ist grün und es gibt keine Merge-Konflikte; dieser Pull Request ist bereit zum Review.

Details
{
  "base": "d93eb60881cdf1359c131ed61dd286981aef55c8",
  "head": "4e2b863b2ddfe5e6400db398c30dfecc8728e9c6",
  "phase": "applied",
  "pr": 1502,
  "reasons": [],
  "repo": "DFXswiss/app",
  "state": "ready"
}

@github-actions
github-actions Bot marked this pull request as ready for review September 18, 2026 22:14
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 6 review passes.
Adds a RealUnit compliance action to run Dilisense name checks per customer or in batch, showing matches with or without birthday instead of calling them sanctions.

DE:
Bereit nach 6 Review-Durchläufen.
Ergänzt in RealUnit-Compliance eine Aktion für Dilisense-Namensprüfungen einzeln oder als Batch und zeigt Treffer mit oder ohne Geburtstag, nicht als Sanktion.

Details

Head 4e2b863b2ddfe5e6400db398c30dfecc8728e9c6. Grok and Codex quality+logic: STATUS complete, 0 counted findings.

Wire: NoMatch / MatchWithoutBirthday / MatchWithBirthday. Labels: No match / Match with Birthday [(Open)] / Match without Birthday.

Rejected, not counted: e2e-stack networkidle; poll-error persistence; visual goldens; SDK wrapper; Ignored/Match remap.

Inline comments: 0. Stays draft (A38 guard owns Ready).

@TaprootFreak
TaprootFreak merged commit 83beaf9 into DFXswiss:develop Sep 22, 2026
10 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.

2 participants