Skip to content

Add invite and promo landing pages - #27

Closed
JonnyLuca wants to merge 24 commits into
RealUnitCH:developfrom
JonnyLuca:01a03535-referral-promo
Closed

Add invite and promo landing pages#27
JonnyLuca wants to merge 24 commits into
RealUnitCH:developfrom
JonnyLuca:01a03535-referral-promo

Conversation

@JonnyLuca

@JonnyLuca JonnyLuca commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary / Zusammenfassung

EN. Invite and promo landing pages on realunit.app (Offerte Entwurf 3, point 3): public lookup, store badges, copy, Universal Links / App Links, Play Install Referrer. Language × device × state visuals are covered; no further permutations.

DE. Einladungs- und Promo-Landings auf realunit.app (Offerte Entwurf 3, Ziff. 3): öffentlicher Lookup, Store-Badges, Kopieren, Universal Links / App Links, Play Install Referrer. Sprache × Gerät × Zustand visuell abgedeckt; keine weiteren Permutationen.

Scope, measurements, blockers

Scope

  • /invite/{code} personal greeting from public lookup; /promo/{code} campaign text (promo Aktionstext 1:1).
  • Public lookup GET /v1/realunit/referral/code/:code consumes backend inviterName / inviteeName (CORS on realunit.app). NestJS unmounted Cannot GET is unavailable, not invalid.
  • Universal Links / App Links: AASA + Digital Asset Links as HTTP 200 on apex and www (no 301 on .well-known/). Extra AASA alias /apple-app-site-association as HTTP 200 (www included).
  • GitHub release APK SHA-256 7F:8B:14:54:E2:91:E9:DB:56:21:69:0A:64:23:7C:34:80:78:C6:5B:B4:86:31:CA:02:9D:14:20:E6:3C:7B:40 (O=DFX AG, CN=Konstantin Ullrich).
  • Store badges, copy code/link, iOS re-tap hint, Android Play Install Referrer (attached during lookup).
  • Playwright tests/site.spec.mjs + tests/behavior.spec.mjs + tests/visual.spec.mjs. Visual matrix in tests/pages.mjs (invite/promo × ok/loading/invalid/unavailable/spent/missing-code/fallback × DE/EN × desktop/tablet/iOS/Android as applicable). Baselines via e2e:docker:update only.

Measured 2026-08-30 (clean checkout of current PR head 4d79bc0)

Check Result
npm run check on native host Prettier OK; html-validate OK; check-site 6 HTML / 54 refs; vitest 144/144; 100% lines/statements/branches/functions
npm run e2e:docker:update (approved baseline refresh) 234 passed, 282 project-inapplicable skipped, 0 failed in 1.1m; exactly 33 changed baselines visually reviewed
Native WebKit launch (webkit-2311) blocked: inspector-pipe timeout after 60s, reproduced after forced 77.2-MiB browser reinstall and with both Xcode and CLT developer dirs
npm run e2e:docker after refresh 234 passed, 282 project-inapplicable skipped, 0 failed in 1.1m; check-visual 112/112 view × project baselines present
Repository hygiene clean checkout; no package or lockfile changes

Open blockers

  • WebKit: Playwright launch on this Mac times out (see above); native app iPhone/macOS E2E is green in app #942.
  • Backend rollout: draft DFXswiss/backend#5290 implements and tests the matching lookup route and fields; live deployment remains human-owned.
  • Human: merge this PR so production realunit.app AASA, assetlinks and /invite/* stop 404ing.
  • Human: Play App Signing fingerprint if it differs from the GitHub APK.

Related: RealUnitCH/intern#3 (do not auto-close).

@JonnyLuca

Copy link
Copy Markdown
Contributor Author

Fixes RealUnitCH/intern#3

Store badges and Play Store install referrer added on /invite and /promo.

@JonnyLuca
JonnyLuca marked this pull request as ready for review August 27, 2026 20:21
@JonnyLuca
JonnyLuca marked this pull request as draft August 27, 2026 20:36
@JonnyLuca
JonnyLuca force-pushed the 01a03535-referral-promo branch 25 times, most recently from 5d539ce to ed37087 Compare August 29, 2026 05:09
@JonnyLuca
JonnyLuca force-pushed the 01a03535-referral-promo branch from 4d79bc0 to 7b307aa Compare September 4, 2026 12:06
JonnyLuca and others added 2 commits September 4, 2026 20:09
EN: Escape reflected referral codes at the crawler HTML text sinks and use a
function replacer so a \$ in the code is never a backreference; treat a
plain-text "Cannot GET" 404 as unavailable (read the body as text, not JSON);
render the promo action text verbatim (do not trim the displayed value); drop
the Android debug-keystore fingerprint from the production Digital Asset Links;
widen the English visual matrix to tablet and mobile with regenerated baselines.

DE: Reflektierte Referral-Codes an den Crawler-HTML-Textstellen escapen und per
Funktions-Replacer einsetzen (ein \$ im Code ist nie mehr eine Backreference);
einen Klartext-404 "Cannot GET" als unavailable behandeln (Body als Text statt
JSON lesen); Promo-Aktionstext 1:1 anzeigen (Anzeige nicht trimmen); den
Android-Debug-Keystore-Fingerprint aus den Prod-assetlinks entfernen; die
englische Visual-Matrix auf Tablet und Mobile erweitern (Baselines neu erzeugt).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4wDi8T8yUes9MfXPzqHcU
EN: Extend the loading/invalid/unavailable English invite and promo views to
tablet-chromium and mobile-safari (completing the language x device x state
matrix) and add the regenerated baselines.

DE: Die englischen loading/invalid/unavailable-Views fuer Invite und Promo auf
tablet-chromium und mobile-safari erweitern (Matrix Sprache x Geraet x Zustand
vollstaendig) und die neu erzeugten Baselines ergaenzen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4wDi8T8yUes9MfXPzqHcU
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 4, 2026 20:30
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Ready after 3 review passes.
Harden the invite/promo landing pages: escape reflected referral codes, map plain-text 404s to unavailable, render the promo text verbatim, drop the debug keystore, and complete the English visual matrix.

DE:
Bereit nach 3 Review-Durchläufen.
Die Invite-/Promo-Landingpages härten: reflektierte Referral-Codes escapen, Klartext-404 als unavailable behandeln, Promo-Text 1:1 anzeigen, Debug-Keystore entfernen und die englische Visual-Matrix vervollständigen.

Details

Two independent review lanes (cross-model), run to zero findings over 3 passes:

  • Pass 1 (5 findings): reflected HTML injection in the crawler rewrite (raw code in og:title/twitter/<title>) — fixed by escaping the text sinks and a function replacer (no $ backreference), while URL hrefs stay percent-encoded; a plain-text "Cannot GET" 404 mapped to invalid instead of unavailable — fixed by reading the body as text; the promo action text was trimmed — now rendered verbatim; the production Digital Asset Links carried an Android debug-keystore fingerprint — removed; the English visual matrix was asymmetric to the German one.
  • Pass 2 (1 finding): 6 of the 14 English visual views were still desktop-only — widened to tablet + mobile with regenerated baselines.
  • Pass 3: 0 findings.

Tests: vitest 147/147 with 100% coverage on all four metrics; the docker Playwright visual gate reports 140/140 view×project baselines and all visual tests pass. CI at the final head: Quality green, Visual regression green. Mergeable: MERGEABLE; no open review threads.

@JonnyLuca

Copy link
Copy Markdown
Contributor Author

Superseded by #30, identical content on a branch with clean, signed, tool-neutral commits (git-konventionen). Closing so the replacement is the single open PR.

@JonnyLuca JonnyLuca closed this Sep 4, 2026
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