Commit graph

6 commits

Author SHA1 Message Date
Till
2616c4f440 fix(dark-mode): WebView folgt System statt eigener localStorage-Toggle
Symptom: in TestFlight-Build wirkte Account-Tab dunkel, aber
Lesen + Erkunden hell (oder umgekehrt, je nachdem was im Web-
localStorage stand). Inkonsistent, weil:
- AccountView (SwiftUI) nutzt ZitareTheme.dynamic() — folgt System
- WebView las localStorage['zitare-mode'], das nur über den
  Theme-Toggle-Button im Web-Header gesetzt wurde — den wir aber
  nativ ausgeblendet haben → kein User-Steuerpfad

Fix: neuer User-Script `syncDarkMode` injiziert at document.start:
- liest prefers-color-scheme via matchMedia
- schreibt localStorage['zitare-mode'] = 'dark' / removes
- togglet die `.dark`-Class auf <html>
- bleibt aktiv via matchMedia-change-Listener für Live-Switches

Reihenfolge in WebView-Config: syncDarkMode VOR hideWebHeader,
damit das Theme richtig ist bevor Header-CSS rendert.

Build 3 für nächsten TestFlight-Upload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 21:45:25 +02:00
Till
f65b949dec build: CFBundleVersion 2 für nächsten TestFlight-Upload 2026-05-14 21:39:18 +02:00
Till
7b4cb13afe fix(icon): TestFlight-Validation grün — Icon + CFBundleIconName
Apple Validator hatte drei Fehler geworfen:
  - Missing 120x120 (iPhone) und 152x152 (iPad)
  - Missing Info.plist key CFBundleIconName

Root-Cause: AppIcon.appiconset hatte keinen filename gesetzt → keine
PNG-Variants im Bundle. Plus: bei GENERATE_INFOPLIST_FILE=NO injiziert
Xcode CFBundleIconName nicht automatisch, das muss explizit in die
plist.

Fixes:
- scripts/make-appicon.swift erzeugt 1024×1024-PNG-Platzhalter in
  paper-Theme-Farben (Sienna-Background, dunkles Z, zwei
  Anführungszeichen-Akzente) analog cards-native
- Sources/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
  verlinkt AppIcon-1024.png für light / dark / tinted (3 Appearances)
- project.yml setzt CFBundleIconName: AppIcon im Info.plist-Root

Archive-Verifikation:
  $ /usr/libexec/PlistBuddy -c "Print :CFBundleIconName" Info.plist
  → AppIcon
  $ ls ZitareNative.app | grep AppIcon
  → AppIcon, AppIcon60x60@2x.png (=120×120), AppIcon76x76@2x~ipad.png
    (=152×152)

Platzhalter — vor produktivem App-Store-Launch durch designtes Icon
ersetzen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 21:00:24 +02:00
Till
03e2f041e5 ζ-1 Polish: robuster Header-Selektor + zitare.mana.how als 2. UL-Domain
- WebShellScripts.hideWebHeader: drei Selektor-Strategien gestapelt
  (data-app-nav-Marker / strukturell via :has(a.brand) / positionell
  via :first-of-type), damit Klassen-Renames in zitare-web das Hide
  nicht still brechen
- project.yml entitlements: applinks:zitare.mana.how als zweite
  Universal-Link-Domain, solange zitare.com-DNS-Zone fehlt. Beide
  Hosts liefern dasselbe AASA-File. Nach Cloudflare-Cut kann der
  Eintrag bleiben — schadet nicht
- Live-E2E verifiziert: simctl openurl https://zitare.mana.how/q/...
  → App empfängt Deep-Link, WebShell lädt die Quote-Page, native
  TabBar bleibt, Web-Header bleibt versteckt

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 20:51:03 +02:00
Till
c89d48c6f6 ζ-2 native: SwiftData-Snapshot-Cache + DailyQuoteWidget
- SnapshotModels.swift: CachedQuote (slug-unique, themes/regions
  als CSV), SnapshotMeta (singleton mit lastSyncedAt + totalCount),
  SnapshotContainer.make() mit App-Group-Store-URL (Fallback auf
  App-Container für Dev ohne Apple-Dev-Portal-Setup)
- SnapshotSync (actor) mit injectable Loader für Tests: refresh /
  refreshIfStale / tryRefresh (fail-soft). Re-konsolidiert beim Pull
  (Update + Insert + Delete entzogene Slugs). 24h-Staleness-Default.
- DailyQuoteWidget: Hash-of-Day-Picker aus SwiftData, drei Sizes,
  Mitternacht-Refresh-Policy, Placeholder bei leerem Store. Widget-
  Target zieht SnapshotModels.swift mit (project.yml).
- ZitareNativeApp triggert SnapshotSync.tryRefresh() bei Launch +
  WidgetCenter.reloadAllTimelines() danach.
- AppConfig.snapshotURL = webBaseURL/index-min.json (Web-Endpoint
  noch nicht live, fail-soft).
- DeepLinkRouter Substring-Guard fix (`/t` statt `/t/` im
  Prefix-Array, sonst greift hasPrefix("/t//") nicht).
- 22 Tests grün (6 AppConfig + 11 DeepLinkRouter + 3 SnapshotSync +
  1 UI + 1 Widget-Compile-Smoke), swiftlint 0 violations in 22 Files

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 13:16:05 +02:00
Till
0bd59ed148 ζ-0 Setup: Repo-Skelett, iOS-Build grün, Healthz live
- project.yml mit Bundle ev.mana.zitare + Widget + ShareExt-Targets
- ManaSwiftCore (ManaCore + ManaTokens) + ManaSwiftUI (ManaAuthUI)
  als Package-Dependencies via path:
- Pure SwiftUI für Native-Surfaces, WKWebView nur für Lese-Tabs
  (Hybrid-Sonderfall vs cards/memoro/manaspur, dokumentiert im
  Playbook ZITARE_NATIVE_GREENFIELD.md)
- Theme: paper-Variant aus @mana/themes
- ZitareAPI.healthCheck via direct URLSession (öffentlicher
  Endpoint, kein AuthenticatedTransport-Gate)
- 6/6 AppConfigTests + 1/1 UI-Smoke grün auf iPhone 16e Simulator
- Live: zitare-api.mana.how/healthz → HTTP/2 200

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:15:22 +02:00