Commit graph

21 commits

Author SHA1 Message Date
Till JS
7ba8684074 fix(account): Anmelden-Button + ManaAuthGate-Wiring
AccountView hatte zwar einen Status-Text aber keinen Login-Button,
und der ManaAuthGate war überhaupt nicht im App-Tree eingebaut —
Guest-Mode-User konnten sich nirgends anmelden.

- ZitareNativeApp: ManaAuthGate(auth:) instantiiert + via environment
  durchgereicht
- RootView: .manaBrand(ZitareBrand.manaBrand) +
  .manaAuthGate(authGate) { ManaLoginView(…) } für globales
  Sign-In-Sheet
- AccountView: authActionCard mit "Mit mana-Konto anmelden" /
  "Abmelden" (keepGuestMode: true)
- ZitareBrand neu (paper-Theme-Brücke zu ManaBrandConfig)
- project.yml: platformFilter: iOS für Widget+Share-Extensions
  (macOS-Build war pre-existing kaputt mit "embedded iOS content")

iOS + macOS BUILD SUCCEEDED.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 15:28:08 +02:00
Till JS
d8f3a1402c chore: ITSAppUsesNonExemptEncryption=false in Info.plist + project.yml
Überspringt die App-Verschlüsselungs-Abfrage in App Store Connect
bei jedem TestFlight-Upload. Entspricht der "Keinen der oben
genannten Algorithmen"-Wahl, weil die App nur HTTPS nutzt und
damit unter US-Export-Recht exempt ist.

In project.yml mitgepflegt, damit xcodegen den Key nicht beim
nächsten Regen wegblässt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:02:15 +02:00
Till JS
99f81fcb78 feat(auth): Cross-App-SSO via shared Keychain-Group ev.mana.session
Migriert die App auf die kanonische shared Keychain-Group
`ManaSharedKeychainGroup` aus mana-swift-core. Alle nativen
mana-e.V.-Apps (memoro, wordeck, nutriphi, herbatrium, zitare,
seepuls, viadocu, manameme, werdrobe, pageta, comicello, moodlit)
teilen damit ihren Auth-Token auf demselben Device — ein Login in
einer App, alle anderen starten direkt im .signedIn-Status.

Wichtig: für echtes Cross-App-Sharing müssen sowohl `keychainService`
als auch `keychainAccessGroup` identisch sein (Keychain-Lookup-Tupel
`(service, account, accessGroup)`) — beide jetzt auf
`ManaSharedKeychainGroup`. Bestehender App-eigener Bucket
(`ev.mana.<app>`) wird beim ersten Login mit dem neuen Token
überschrieben; User in TestFlight-Apps brauchen einen Re-Login.

Voraussetzung Apple-Dev-Portal (Tills manueller Schritt):
- Capability "Keychain Sharing" für die App ID aktivieren
- Group `ev.mana.session` hinzufügen
- Provisioning-Profile neu downloaden (Xcode auto)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 16:32:10 +02:00
Till JS
d43dc53124 feat(widget): #Preview-Macros fuer Small + Large ergaenzt
Medium-Preview existierte. Small + Large mit Placeholder-Zitat.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 23:46:24 +02:00
Till JS
c2b529506e feat(widget): Lock-Screen-Familien (inline + rectangular)
- accessoryInline: kompakte Zitat-Vorschau (max 40 Zeichen) + Autor
- accessoryRectangular: Zitat 2 Zeilen + Autor
- widgetURL zitare://heute pro Family

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 23:28:00 +02:00
Till JS
30e371b9d7 refactor(log): Log.swift auf ManaAppLog (mana-swift-core v1.7.0) + appGroup-Konsolidierung
Audit V4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 22:38:58 +02:00
Till JS
4b00c4ecdf refactor: Migration auf ManaWebShell + ManaTheme.paper aus mana-swift-* v1.6.0/v0.6.0
ManaWebShell aus mana-swift-ui v0.6.0 ersetzt den lokalen
`Sources/Features/WebShell/`-Ordner. WebShellCoordinator, WebShell-
View, WebShellScripts geloescht (~430 LOC). CookieBridge bleibt
lokal (App-spezifischer Cookie-SSO-Pfad fuer .mana.how), wandert
nach `Sources/Core/WebShell/CookieBridge.swift`.

`RootView.makeWebShellConfig()` baut Config mit Host-Whitelist
`zitare.com` + `www.zitare.com` + `*.mana.how`, ZitareTheme-Hints,
`syncDarkMode(localStorageKey: "zitare-mode")` und `hideElements`
fuer den zitare-web-Header.

ZitareTheme forwarded auf ManaTheme.paper aus mana-swift-core
v1.6.0 (~90 LOC weg, paper-Werte jetzt single-source in
`mana/packages/themes/src/variants/paper.css`).

AppConfig.userAgent als plattform-spezifischer Helper hinzu.

20/20 Unit-Tests gruen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:13:16 +02:00
Till JS
e139a382d8 fix(auth): keychainAccessGroup explizit auf TeamID.BundleID
Symptom: User wurden nach App-Update / längerer App-Pause aus-
geloggt, obwohl Refresh-Token theoretisch noch gültig war. Ursache:
mit `keychainAccessGroup: nil` landet das Token im impliziten
default-bucket; bei TestFlight-Cert-Drift oder Provisioning-
Profile-Wechsel wurde es nach Update für die neue App-Instanz
unzugänglich.

Bestehende Tokens werden via ManaCore v1.5.1 KeychainStore-
Migration-Fallback automatisch in den expliziten Bucket gespiegelt
— kein erzwungener Logout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 18:20:47 +02:00
Till JS
37840e6172 devlog: 2 Tage geschrieben (ζ-0 + ζ-1 + Launch-Flash-Fix)
Tag 1: Hybrid SwiftUI + WKWebView, ζ-0 + ζ-1 + Teile ζ-2.
Tag 2: dreilagiger weißer Flash beim App-Start gefixt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 22:22:49 +02:00
Till JS
cbc9af6bb0 fix(launch): drei Layer weißen Flash beim Start gefixt
System-Launch-Screen war default-weiß (UILaunchScreen leer), WKWebView
malt vor first paint opaque weiß, und das HTML selbst hat keinen
Background bevor das CSS-Bundle lädt. Alle drei Layer jetzt auf den
Paper-Theme-Background gesetzt — sRGB-konvertiert aus `--color-background`
in mana/packages/themes/paper.css.

- LaunchBackground.colorset mit Light + Dark Variante
- project.yml: UILaunchScreen.UIColorName: LaunchBackground
- WKWebView: isOpaque=false + clear backgrounds (iOS), drawsBackground=false (macOS)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 13:59:49 +02:00
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
bc01c0ff12 ui: Mac-Window + Konto-Header nach erstem TestFlight-Build
- WebShellView füllt Window-Höhe explizit
  (.frame(maxWidth: .infinity, maxHeight: .infinity)) — sonst hatte
  WKWebView auf Mac einen Rest-Spalt, der den Web-Footer abschnitt.
- RootView TabBar-Hintergrund: Paper-Background auf Window-Toolbar
  (macOS-only via #if os(macOS), windowToolbar-Placement existiert
  unter iOS nicht). Title-Bar passt jetzt zum Content statt System-Grau.
- AccountView Header: SF Symbol "quote.opening" durch eine einzelne,
  zentrierte Öffnungs-Anführung in Georgia-Bold ersetzt. Die SF-
  Doppelglyphe war asymmetrisch positioniert, sieht jetzt sauber aus.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 21:38:48 +02:00
Till
10644ff4ef icon: vereinfachte Anführungszeichen-Glyphe als Platzhalter
Z + zwei Akzent-Quotes lieferten ein unsauber gerendertes PNG
(Z fehlte aufgrund Font-Bounds-Mathematik bei großem Pointsize).
Reduziert auf eine zentrierte Öffnungs-Anführung („) — ikonisch
auch bei 40×40, klar erkennbar als Quotes-App.

Platzhalter — vor Launch durch Designer-Icon ersetzen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 21:02:17 +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
c0260fa55f docs: Cloudflare-TODO (DNS-CNAME + CNAME-Cleanup) + PLAN.md externe Blocker 2026-05-14 20:52:13 +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
dd10f85cca ζ-1 abgeschlossen: DeepLinkRouter + Web-Header-Hide
- DeepLinkRouter als pure-Logic-Enum aus RootView extrahiert
  (resolveToWebURL, isExplorePath, route)
- 11 DeepLinkRouterTests grün: custom-scheme, https passthrough,
  Erkunden-vs-Lesen-Routing, Substring-Guard
- WebShellScripts.hideWebHeader: WKUserScript injiziert at
  document.start CSS, das den zitare-Web-Header
  (body header:has(a.brand)) ausblendet. Native TabBar
  übernimmt globale Navigation, Content bleibt sichtbar.
- Simulator-Verifikation: Quote rendert ohne doppelte Nav-Leiste,
  17 (UI + Unit) Tests grün

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 13:06:37 +02:00
Till
75b5e7113f ζ-1: WebShellView + Universal-Link-Routing
- WebShellView (UIViewRepresentable + NSViewRepresentable) wrapt
  WKWebView, KVO-Observation für Loading/Progress/canGoBack/URL,
  Pull-to-Refresh via UIRefreshControl
- WebShellCoordinator (MainActor) hält WKNavigationDelegate +
  WKUIDelegate, externe Links via openURL aus dem Environment in
  System-Browser, Host-Whitelist auf zitare.com + .mana.how
- RootView refactored: Lesen-Tab lädt webBaseURL/, Erkunden-Tab
  /explore. Universal-Links zitare.com/q|a|c/<slug>, /search,
  /region/*, /thema/* etc. routen in den passenden Tab,
  reloadToken zwingt Re-Navigation auch bei selber URL
- AppConfig.webBaseURL = appBaseURL (zitare.mana.how) bis
  Cloudflare-Zone für zitare.com live ist; publicWebURL als
  Konstante schon eingetragen
- CookieBridge-Skeleton für mana.access auf .mana.how —
  scharfgeschaltet erst in ζ-3 nach Live-Auth-Smoke
- iPhone 16e Simulator: zitare.mana.how lädt, Carl-Spitteler-Quote
  rendert, Healthz weiter 200
- 16 Files swiftlint-grün, alle Tests grün

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:56: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