rebreak-monorepo/docs/internal/SESSION_2026-06-08_preview_screenshots_handoff.md
chahinebrini 63fae25531 fix(android-protection): explicit specialUse FGS type — Samsung/Android 16 crash loop
RebreakVpnService.onStartCommand crashed with SecurityException because Android 16's validateForegroundServiceType rejects the implicit 2-arg startForeground(). Now passes FOREGROUND_SERVICE_TYPE_SPECIAL_USE explicitly (Google's documented best practice) and guards the call so a failed foreground promotion stops the service cleanly instead of crashing the app. Verified vs reported Galaxy A54 / Android 16 signature (97% of crash events, 1-user crash loop).

Bundles pending working-tree work across native/marketing/locales/mac + graphify-out rebuild. gitignore: google-services.json + /screenshots/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:33:28 +02:00

7.9 KiB
Raw Permalink Blame History

Session-Handoff 2026-06-08 — Preview-Page, Screenshots, Bug-Hunt

Fortsetzung in neuer Session mit claude --dangerously-skip-permissions. Founder war zwischendurch weg (Familie). Diese Datei = vollständiger Stand zum nahtlosen Weitermachen.

ERLEDIGT in Fortsetzung 2026-06-09

  • 208k → 300k: native Locales (de/en/fr/ar, inkl. Arabisch-Edge-Cases) + Marketing (de/en). Alle JSON valide.
  • Bug #1 (Protection-Sheet/Push zu früh) GEFIXT: wahre Ursache = protectionShouldBeActive ist Account-DEFAULT (nicht „je aktiv"). Fix = lokales AsyncStorage-Flag protection:everActiveHere (gesetzt nach erfolgreichem activateUrlFilter()), gated recoveringFromBypass in lib/protection.ts. Live verifiziert am Sim (Blocker-Tab zeigt kein Sheet mehr). Siehe Memory project_protection_bypass_default_flag_fix. NEXT_RELEASE.md gepflegt.
  • Screenshots 05 + 09 frisch aufgenommen: 05-breathing = aktive 4-7-8-Animation („Halten/7", Runde 1/3) via SOS→3 Lyra-Turns→Chip (Koordinaten-Tap, Umlaut bricht Text-Match). 09-geraete = sauberer Devices-Screen (3/5). Beide in public/preview/. Neue Flows: .maestro/screens/capture-05-breathing.yaml, capture-05-09-verify.yaml.
  • Deploys (beide mit GO, beide grün): (a) Backend adguard.ts-Idempotenz-Fix → 547f861 push → GH-Actions Deploy-Staging success (Health-Check 401). (b) Marketing Prod: MARKETING_REMOTE_DIR=/var/www/marketing-prod ./scripts/deploy-marketing.shhttps://rebreak.org/preview/ HTTP 200 (frisch, last-modified 00:48). Seiten-PW rebreak-fags. Link kann an Ilona.
  • Erkenntnis: Live-Prod-nginx hat KEINE Basic-Auth (Repo rebreak.org.conf ist stale/zeigt :3015-Proxy; live = static aus /var/www/marketing-prod).

Laufender Zustand der Umgebung (WICHTIG)

  • iOS-Simulator iPhone 17 Pro gebootet, App org.rebreak.app installiert + manuell via Google eingeloggt (Account nisyb@gmx.net). ⚠️ NICHT clearState / nicht neu installieren → sonst Login (OAuth/2FA) weg.
  • Metro läuft (Port 8081). Marketing-Dev-Server läuft (Port 3020) → http://localhost:3020/preview, Passwort rebreak-fags.
  • Live-Server = 91.99.225.223 (staging.rebreak.org). SSH-Alias rebreak-server zeigt auf ALTEN 49.13.55.22 → für Live ssh root@91.99.225.223.

DONE diese Session

  • Mac-Magic-502 gefixt: verwaister AdGuard-Client gelöscht (live) + backend/server/utils/adguard.ts createAdGuardClient idempotent gemacht (bei 400 → clients/update). ⚠️ Code uncommitted + undeployed (Backend-Deploy braucht GO).
  • Johnson-Agent angelegt: .claude/agents/johnson.md (Rebreak-Magic Mac+Win, FE+BE).
  • Ilona/FAGS-Mail final: docs/marketing/ilona-vorstand-mail.md (human-style, kompakt, Gamban-Tabelle). Versendet (Typo lona→ilona gebounced, dann an ilona.fuechtenschnieder@gluecksspielsucht.de korrekt raus).
  • Marketing /preview-Seite gebaut: apps/marketing/app/pages/preview.vue + components/PreviewPhone.vue + PreviewDesktop.vue. App-Icon-Logo, Mail-Provider-Logos (simple-icons), Schutz-Sektion pro Plattform, Gamban-Vergleich, Cooldown/„kein Gefängnis". Erwartet PNGs in apps/marketing/public/preview/.
  • Marketing de-AI'd (Agent): ~45 Gedankenstriche raus, AI-Floskeln entschärft, de+en, Build grün. (Marketing nutzt {var}-Platzhalter, NICHT %{var}.)
  • rebreak-native UI-Batch (Agent): Login-Logo zurück (app/index.tsx), Splash +1,5s (components/BrandSplash.tsx, Delays 3300/2700), DiGA-Wording raus (DemographicsAccordion.tsx + DigaMissionBanner.tsx), cleanspielfrei (de) / gambling-free (en), Lyra-Avatar (RiveAvatar) statt medkit-Icon im DigaMissionBanner.
  • BrandSplash-Crash gefixt: runOnJS(onDone)() (Worklet-Crash). Splash-Delays vom Agent erhöht.
  • testIDs: header-avatar-btn (components/AppHeader.tsx), sos-send-btn (app/urge.tsx).
  • Maestro-Screenshot-Pipeline: apps/rebreak-native/.maestro/screens/marketing-tour-loggedin.yaml (single-session, tab-basiert, sheet-resilient) + capture-marketing-loggedin.sh. Maestro legt takeScreenshot in $REPO_ROOT/screenshots/ ab → Script kopiert nach public/preview/.
  • settings.json allowlist ergänzt: dig *, eas build:list/view *, maestro *, xcrun simctl *, capture-Script.

📸 Screenshot-Status

Verifiziert GUT (frisch, korrekt): 02-blocker, 03-blocked, 04-sos-lyra (= Coach/Lyra ✓), 06-mail, 07-community (Home-Feed, dialogfrei ✓), 07b-dm, 08-streak. Liegen in public/preview/. ⚠️ STALE/falsch: 05-breathing.png + 09-geraete.png (alte Läufe, mtime 14:29/14:30) — entweder echt aufnehmen oder löschen (dann greift Platzhalter).

  • 05-breathing: SOS/Atemübung lebt unter /urge — Einstieg in der UI noch unklar (SOS-Button finden).
  • 09-geraete: via Einstellungen → router.push('/devices') (app/settings.tsx:413). Settings-Einstieg finden.
  • Erkenntnis: Bottom-Tabs = Home · Chat · Coach · Blocker · Mail (NativeTabs, app/(app)/_layout.tsx). Profil via Header-Avatar (header-avatar-btn). ⚠️ Blocker-Tab triggert das „Schutz ist aus"-Sheet, das modal alle Taps blockiert → im Flow Blocker ZULETZT + „Später" wegtippen. Beim Launch „Nicht erlauben" (Screen-Time-Dialog) wegtippen.
  • Capture-Run: bash apps/rebreak-native/.maestro/screens/capture-marketing-loggedin.sh (App muss eingeloggt + am Home sein).

🐞 OFFENE BUGS (vom Founder beim Testen gefunden)

  1. ⚠️ KRITISCH (3× bestätigt): „Schutz ist aus"-Sheet + „Schutz manipuliert"-Push feuern zu früh/falsch. Root: apps/rebreak-native/lib/protection.ts:584-590phase='recoveringFromBypass', wenn backend.protectionShouldBeActive===true && !mdmManaged && kein Filter aktiv. Das ist account-global, nicht pro-Gerät → auf frischem Gerät/Sim, wo Schutz nie LOKAL aktiviert war, fälschlich „recoveringFromBypass" → Push (app/(app)/_layout.tsx enforceProtection/notifyBypassDetected ~Z.214) + ProtectionOffSheet erscheinen sofort + Sheet blockiert Navigation. FIX: recoveringFromBypass nur, wenn ein lokales „war hier schon mal aktiv"-Signal existiert (persistierter Flag nach erfolgreichem activate()), sonst inactive/setup. Sensible Kern-Schutz-Logik → mit Founder abstimmen (gewünschtes Verhalten), nicht blind hacken.
  2. 208k → 300k (SAFE, einfach anwenden — wurde beim Permission-Stop unterbrochen): Hartkodiert in apps/rebreak-native/locales/{de,en,fr,ar}.json. Keys: subtitle, domain_limit_desc, protection_subtitle_legend, protection_subtitle_pro, setup_step3_subtitle_pending, android_step1_subtitle_pending, feat_blocklist. Exakter Befehl:
    cd apps/rebreak-native/locales
    for f in de.json en.json fr.json ar.json; do
      sed -i '' -e 's/208\.000/300.000/g' -e 's/208,000/300,000/g' -e 's/208 000/300 000/g' -e 's/208k/300k/g' "$f"
    done
    
    (Dynamische Stellen via state.blocklistCount sind ok.) Danach JSON validieren.
  3. Extension-Versions-Mismatch (Build-Warnung): App-Extension 0.4.3 vs App 0.4.4 (CFBundleShortVersionString) → vor nächstem Release angleichen (zied).

⏭️ NÄCHSTE SCHRITTE (Bypass-Session)

  1. 208k→300k anwenden (safe).
  2. Protection-Sheet/Push-Bug fixen (Bug 1) — mit Founder-Input zum Verhalten.
  3. Screenshots 05-breathing (/urge), 09-geraete (Settings→Geräte) echt aufnehmen; Flow erweitern. Ggf. 07c-calls, 12-domains (custom domains), 01a/b/c-onboarding ergänzen. Stale 05/09 vorher löschen.
  4. Restliche Preview-Platzhalter (06b-mail-connect, 13-admin-approve Admin-App) später.
  5. Pending Deploys (brauchen GO): (a) Mac-Magic adguard.ts-Idempotenz-Fix → Backend push; (b) Marketing /preview deployen → Link an Ilona.

Agenten-Lernpunkt

Background-Agents (ahmed) können im Hintergrund keine Bash-Permission-Prompts bestätigt bekommen → für Bash-lastige Tasks (maestro/xcrun) hängen sie. In der --dangerously-skip-permissions-Session entfällt das Problem.