Add referral programme and promo-code client - #942
Closed
JonnyLuca wants to merge 55 commits into
Closed
Conversation
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 26, 2026 23:45
225ff69 to
ff3321f
Compare
Author
|
Fixes RealUnitCH/intern#3 Branch rebased onto current
Draft against |
Author
|
Fixes RealUnitCH/intern#3 Android now reads Play Install Referrer once per install ( |
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 27, 2026 08:48
c6fff15 to
7d140ce
Compare
JonnyLuca
marked this pull request as ready for review
August 27, 2026 20:21
JonnyLuca
marked this pull request as draft
August 27, 2026 20:22
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 27, 2026 23:46
dbd4729 to
a4436d0
Compare
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
22 times, most recently
from
August 28, 2026 15:54
a7a32e3 to
f8cc804
Compare
EN: Resolve the promo/action text with a symmetric DE/EN field precedence so both languages pick the same field family; add a generation guard to the eligibility reload so a stale response cannot overwrite a newer decision; reset the terms acceptance on a language reload and only adopt the API terms version when its text is actually shown; compare every rendered per-invite field (not just the id) plus the share-price label in the overview state. DE: Aktions-/Promo-Text mit symmetrischer DE/EN-Feldpraezedenz aufloesen; Generations-Guard im Eligibility-Reload gegen veraltete Antworten; Terms- Zustimmung beim Sprach-Reload zuruecksetzen und die API-Terms-Version nur uebernehmen, wenn ihr Text tatsaechlich angezeigt wird; im Overview-State jedes gerenderte Invite-Feld (nicht nur die id) plus Aktienkurs-Label vergleichen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U4wDi8T8yUes9MfXPzqHcU
EN: Give the KYC invite/promo step the sticky ScrollableActionsLayout and add it to the responsive-surface catalog with a matrix test; move the pure format_frozen_chf helper out of the UI layer into packages/io so services no longer import screens; use the text theme instead of a hardcoded TextStyle; relocate the no-integration-test annotation onto the platform method; and delete the unused referral payout merger and its test. DE: Dem KYC-Invite/Promo-Schritt das sticky ScrollableActionsLayout geben und in den Responsive-Surface-Katalog mit Matrix-Test aufnehmen; den puren format_frozen_chf-Helfer aus der UI-Schicht nach packages/io verschieben; Theme statt hartkodiertem TextStyle; die no-integration-test-Annotation an die Plattform-Methode; ungenutzten Payout-Merger samt Test loeschen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U4wDi8T8yUes9MfXPzqHcU
Author
|
Superseded by #966, which carries the identical feature plus the review finalisation on a branch with clean, signed, tool-neutral commits (git-konventionen). Closing this one so the replacement is the single open PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / Zusammenfassung
EN. RealUnit referral programme and promo-code client (Offerte 24.08.2026 + mail Dani 17:42). The DFX API is the decision authority; this app is a rendering layer for eligibility, terms, invites, overview, frozen-CHF prizes, KYC invite/promo, and App Links.
DE. RealUnit-Empfehlungsprogramm und Promo-Code in der App (Offerte 24.08.2026 + Mail Dani 17:42). Die DFX-API entscheidet; die App rendert Kachel, Teilnahmebedingungen, Einladungen, Übersicht, Prämien mit eingefrorenem Frankenwert, KYC-Schritt Invite/Promo und App Links.
Scope, measurements, blockers
Scope
GET /v1/realunit/referral/summaryeligible(KYC-verified, ≥ 70 REALU, not an employee). Subtitle Erhalte 20 REALU pro Weiterempfehlung.GET /v1/realunit/referral/terms(version,markdown,markdownEn), with bundled assets only as an outage fallback; create-invite only after checkbox Ich habe die Teilnahmebedingungen gelesen und akzeptiert. Acceptance posts the exact rendered version so a newer server version reopens the gate.https://realunit.app/invite/{code}.getPayoutsdrops Pending. History watch includesreferralPayout(type 5).#spec-referral.integration_test/: entry card, terms checkbox gate, named invite, copy/share, overview (open/credited, sum, Aktienkurs), history prize, registration invite+promo, deeplinks/invite/*/promo/*, errors (invalid, not eligible, limit).golden-regenerate.yaml.swiftpm/caches are ignored and not committed.The app targets the live
DFXswiss/backendcontract. Public lookup usesGET /v1/realunit/referral/code/:codewithinviterName/inviteeName; invite creation sends the exactguestName-only request (terms acceptance is versioned separately) and create/list responses consume server-generatedcopyText/copyTextEnplusinviterName, pinned against backend draft #5290. SummaryopenCountis contract-tested against the same visible Open/Credited invite projection;sharePriceandsharePriceLabel: Aktienkursdrive the running “Insgesamt erhalten” valuation while payout history keeps frozen CHF values. Live terms consumeversion,markdown, andmarkdownEn1:1 from backend #5290, select the app language, take precedence over the bundled outage fallback, and pass the renderedversionthrough page → cubit →POST /terms/accept. The separate stand-in repository is not a ship path.Measured 2026-08-30 (native host checkout; signed current PR head
7ce9d355)flutter test --coverage --exclude-tags=golden --concurrency=4referral|promo|inviteunderlib/**pixel_jonny/emulator-5554swiftpm/cache filesThe macOS files run as isolated
flutter test <file> -d macosinvocations because Flutter’s combined desktop run lost the debug log connection after 3 passes even though every bundle built. Every integration file and assertion is green in isolated runs. The 66 local pixel differences (including 3 referral surfaces) are host-render differences: the authoritative CI workflow succeeded on this exact head without changing a baseline. No PNG was committed or regenerated locally.Golden runs (
golden-regenerate.yamlon RealUnitCH/app)7ce9d355; all CI baselines matched, no bot commit neededd2fa474→ bot commit566ff5e(ancestor of this head)300dd5a8457ee8e454c93e(no bot commit)3c273a7dPost-merge / operator actions
inviterName/inviteeNameresponse; merge/deploy remains human-owned./invite/*are HTTP 200.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.PRIZE_WALLET_KEYfor settled 20 REALU transfers.Related: RealUnitCH/intern#3 (do not auto-close).