From cccba798a1ad89c7e71f6c2ad60250d03c001f7b Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Wed, 15 Jul 2026 15:50:04 +0200 Subject: [PATCH] feat(confirm): dedicated end state for confirmed_no_registration (#23) * feat(confirm): dedicated end state for confirmed_no_registration The confirm API can report that the share register accepted the email but no wallet registration matched it. That is a permanent outcome; rendering it as the retryable 'unavailable' state sent users into a retry dead-end. New 'no-registration' state with its own copy (check the app email or contact support, no retry CTA), mapped from the 2xx body status, plus visual-matrix views and unit coverage. * test(visual): baselines for the no-registration confirm state * test(confirm): functional coverage for the no-registration state Cover the mock loop and the real fetch-to-render seam: a 2xx body with status confirmed_no_registration must surface the no-registration state. --- public/confirm-aktionariat/confirm.js | 6 ++++-- public/confirm-aktionariat/index.html | 10 ++++++++++ public/js/lib/confirm-core.js | 14 +++++++++++++- test/confirm-core.test.mjs | 6 ++++++ .../confirm-no-registration-en.png | Bin 0 -> 190553 bytes .../confirm-no-registration.png | Bin 0 -> 194108 bytes .../mobile-safari/confirm-no-registration.png | Bin 0 -> 52971 bytes .../confirm-no-registration.png | Bin 0 -> 208544 bytes tests/behavior.spec.mjs | 10 +++++++++- tests/pages.mjs | 18 ++++++++++++++++-- 10 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 tests/__screenshots__/desktop-chromium/confirm-no-registration-en.png create mode 100644 tests/__screenshots__/desktop-chromium/confirm-no-registration.png create mode 100644 tests/__screenshots__/mobile-safari/confirm-no-registration.png create mode 100644 tests/__screenshots__/tablet-chromium/confirm-no-registration.png diff --git a/public/confirm-aktionariat/confirm.js b/public/confirm-aktionariat/confirm.js index 6ac52f1..d19f613 100644 --- a/public/confirm-aktionariat/confirm.js +++ b/public/confirm-aktionariat/confirm.js @@ -42,7 +42,7 @@ // confirmation email always reaches this web page; the app registers the scheme // to re-open itself after confirmation. - var STATES = ['loading', 'confirmed', 'invalid', 'unavailable']; + var STATES = ['loading', 'confirmed', 'invalid', 'no-registration', 'unavailable']; function show(state) { STATES.forEach(function (s) { document.getElementById('state-' + s).hidden = s !== state; @@ -58,6 +58,8 @@ show('confirmed'); } else if (status === 'invalid') { show('invalid'); + } else if (status === 'no-registration') { + show('no-registration'); } else { show('unavailable'); } @@ -66,7 +68,7 @@ function confirm() { show('loading'); - // Mock hook for LOCAL preview only (?mock=confirmed|invalid|unavailable). + // Mock hook for LOCAL preview only (?mock=confirmed|invalid|no-registration|unavailable). // Never honored on the real realunit.app / dev.realunit.app hosts, so a // shared prod link cannot render a spoofed confirmation screen. var mock = params.get('mock'); diff --git a/public/confirm-aktionariat/index.html b/public/confirm-aktionariat/index.html index 07da093..753d429 100644 --- a/public/confirm-aktionariat/index.html +++ b/public/confirm-aktionariat/index.html @@ -117,6 +117,16 @@

Link ungültig oder abgelaufen

Dieser Bestätigungslink ist ungültig oder bereits abgelaufen. Bitte fordern Sie in der App einen neuen an.

+ + +