From db1e74546c52a4af68f5418d609024f474960a95 Mon Sep 17 00:00:00 2001 From: Frank Steiler Date: Fri, 31 Jul 2026 12:09:35 +0200 Subject: [PATCH 1/3] feat(reports): wizard settings step with report language selection 5-step wizard adds a new Settings step (report language en/de + relocated toggles); the exported PDF now renders fully in the selected language via getFixedT + createFormatters, while the app UI language stays untouched. Also fixes tablet stepper density. Fixes #1899 Co-Authored-By: Claude dev-team-lead (Sonnet 4.6) Co-Authored-By: Claude frontend-developer (Haiku 4.5) Co-Authored-By: Claude translator (Sonnet 4.5) Co-Authored-By: Claude qa-integration-tester (Sonnet 4.5) Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.5) --- .../agent-memory/e2e-test-engineer/MEMORY.md | 2 +- .../story-1879-report-wizard.md | 47 ++- .../ux-designer/feature-spec-history.md | 10 + .../ux-designer/token-reference.md | 1 + .../WizardStepper/WizardStepper.module.css | 16 + client/src/i18n/de/budget.json | 5 + client/src/i18n/en/budget.json | 5 + client/src/lib/formatters.test.ts | 132 ++++++++ client/src/lib/formatters.ts | 107 ++++--- client/src/lib/reportPdf/realRender.test.ts | 30 ++ .../ReportWizardPage.module.css | 35 ++- .../ReportWizardPage.test.tsx | 290 ++++++++++++++++-- .../ReportWizardPage/ReportWizardPage.tsx | 85 ++++- .../ReportWizardPage/Step4Settings.test.tsx | 151 +++++++++ .../pages/ReportWizardPage/Step4Settings.tsx | 104 +++++++ ...Options.test.tsx => Step5Actions.test.tsx} | 119 +++---- .../{Step4Options.tsx => Step5Actions.tsx} | 56 +--- e2e/pages/ReportWizardPage.ts | 93 ++++-- e2e/tests/budget/reportWizard.spec.ts | 172 +++++++++-- .../budget/reportWizardExpansion.spec.ts | 21 +- 20 files changed, 1204 insertions(+), 277 deletions(-) create mode 100644 client/src/pages/ReportWizardPage/Step4Settings.test.tsx create mode 100644 client/src/pages/ReportWizardPage/Step4Settings.tsx rename client/src/pages/ReportWizardPage/{Step4Options.test.tsx => Step5Actions.test.tsx} (70%) rename client/src/pages/ReportWizardPage/{Step4Options.tsx => Step5Actions.tsx} (63%) diff --git a/.claude/agent-memory/e2e-test-engineer/MEMORY.md b/.claude/agent-memory/e2e-test-engineer/MEMORY.md index 501de0af1..bd95e3139 100644 --- a/.claude/agent-memory/e2e-test-engineer/MEMORY.md +++ b/.claude/agent-memory/e2e-test-engineer/MEMORY.md @@ -22,7 +22,7 @@ - [bug-1829-shard3-flakes.md](bug-1829-shard3-flakes.md) — root cause + fix for the shard-3 diary flakes blocking main promotions; also proves `maxFailures` already tolerates one retry-passing test (Playwright source citation). - [story-1876-deposit-refunds.md](story-1876-deposit-refunds.md) — deposit `entryType` refunds; DataTable hidden-column read pattern (`getColumnCellText`), table+card dual-DOM visible-filter pitfall. - [story-1877-contact-fields-attachment-typing.md](story-1877-contact-fields-attachment-typing.md) — budget-source contact fields, household settings singleton (needs `mode:'serial'`, not just try/finally), document-link attachment typing; route-mock last-registered-runs-first ordering hazard; sandbox lint/tsc caveats. -- [story-1879-report-wizard.md](story-1879-report-wizard.md) — Bank Report Wizard POM/spec; Blocker bug #1886 (budgetSources envelope crash blocks all progress past step 1) + compile errors/missing i18n keys found via `tsc`; source-report E2E seeding pattern (WI budget → invoice-budget-line link). +- [story-1879-report-wizard.md](story-1879-report-wizard.md) — Bank Report Wizard POM/spec; Blocker bug #1886 (budgetSources envelope crash blocks all progress past step 1) + compile errors/missing i18n keys found via `tsc`; source-report E2E seeding pattern (WI budget → invoice-budget-line link); Story #1899 added a 5th step ("Settings" — report language + moved toggles), preview iframe only exists on step 5 now. - [story-1891-wizard-followup.md](story-1891-wizard-followup.md) — expandable invoice rows, CSP `blob:` frame-src hardened preview check (SUPERSEDED TWICE — `page.frames()` proof, then in-page blob fetch → now header+console-only, see general-e2e-patterns.md), deposit budget-source tagging; 2 filed bugs (#1892 full-exclusion display, #1893 missing deposit-default heuristic); sandbox CAN now build+boot the full container stack (see `sandbox-live-verification.md`) but browser binary download is still network-policy-blocked. - [sandbox-live-verification.md](sandbox-live-verification.md) — **dhi.io build access is sandbox-dependent, re-check each session**: this session successfully built `cornerstone:e2e` and booted the full container stack (app+OIDC+proxy all healthy), a first — but Playwright's own browser binary download (`playwright.download.prss.microsoft.com`/`cdn.playwright.dev`) is blocked by network policy, and Ubuntu's `chromium-browser` apt package is a non-functional snap stub (no snapd) — no way found yet to get an actual live browser run in this sandbox class. diff --git a/.claude/agent-memory/e2e-test-engineer/story-1879-report-wizard.md b/.claude/agent-memory/e2e-test-engineer/story-1879-report-wizard.md index dcd5a08ec..eac143cde 100644 --- a/.claude/agent-memory/e2e-test-engineer/story-1879-report-wizard.md +++ b/.claude/agent-memory/e2e-test-engineer/story-1879-report-wizard.md @@ -1,6 +1,6 @@ --- name: story-1879-report-wizard -description: Story #1879 Bank Report Wizard (/budget/reports) — POM/spec authored against a frontend implementation with a Blocker runtime crash (filed #1886); orientations.spec.ts and invoices.spec.ts:395 known-flake fixes confirmed self-healed on beta before this story. +description: Story #1879 Bank Report Wizard (/budget/reports) — POM/spec authored against a frontend implementation with a Blocker runtime crash (filed #1886); orientations.spec.ts and invoices.spec.ts:395 known-flake fixes confirmed self-healed on beta before this story. Story #1899 added a 5th step (Settings — report language + moved toggles). metadata: type: project --- @@ -168,3 +168,48 @@ with "received 6" on PR #1883 (desktop/tablet/mobile) — PR #1883 added a 6th " (Household, Areas, ...)") landed in the very next commit (`fc7f6ad2`, PR #1885) and is present at my branch's HEAD. No new regressions from this triage — see `known-flakes-and-regressions.md` for the canonical entries; this file only records the fresh confirmation. + +## Story #1899 — 5th step inserted ("Settings"), old step 4 renumbered to step 5 + +`ReportWizardPage.tsx` gained a NEW step 4 ("Settings" — `Step4Settings.tsx`): a report-language +radio group (`input[name="reportLanguage"][value="en"|"de"]`, plain/visible, literal +"English"/"Deutsch" labels NOT wrapped in `t()`) PLUS the `#attachDocuments`/`#includeCoverLetter` +toggles relocated verbatim from the old step 4 (same DOM ids). The old step 4 (preview iframe + +`Step4Options.tsx`) was renamed `Step5Actions.tsx` and pushed to step 5, content byte-identical +minus the toggle props/JSX. **Key consequence for every E2E scenario that used to do +`goNextFromStep3(); waitForPreviewReady();`**: the preview `