ζ-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>
This commit is contained in:
Till 2026-05-14 20:51:03 +02:00
parent c89d48c6f6
commit 03e2f041e5
3 changed files with 35 additions and 5 deletions

View file

@ -66,7 +66,7 @@ in [`../mana/docs/playbooks/ZITARE_NATIVE_GREENFIELD.md`](../mana/docs/playbooks
|---|---|---|---|
| ζ-0 | Setup, leerer Build, Login | iOS-Build ✅, Tests ✅, Healthz Live ✅ | ✅ (Mac + Git-Push offen) |
| ζ-1 | WebShellView + Universal-Links | WebView rendert, UL-Routing testbar, Web-Header ausgeblendet | ✅ |
| ζ-2 | Snapshot-Sync + DailyQuoteWidget | Widget auf realem Gerät zeigt Zitat | ⏳ |
| ζ-2 | Snapshot-Sync + DailyQuoteWidget | Code + Tests grün, Endpoint im Web-Repo + Apple-Dev-Portal-App-Group fehlen für E2E | 🚧 (Code-Done) |
| ζ-3 | Submit-View nativ | Founder submittet Quote, Draft in /admin/queue | ⏳ |
| ζ-4 | Spotlight + ShareExt + App Intents | Spotlight findet, ShareExt POSTet | ⏳ |
| ζ-5 | Polish (Theme-Sync, iPad, A11y) | Eine Woche ohne Safari-Tab nutzbar | ⏳ |

View file

@ -14,10 +14,32 @@ enum WebShellScripts {
///
/// CSS wird at document.start als `<style>`-Tag injiziert vor dem
/// First Paint, kein Flicker.
/// Mehrere Selektor-Strategien stapeln, damit ein Klassen-Rename
/// oder Markup-Refactor in zitare-web das Hide nicht still bricht:
///
/// 1. `header[data-app-nav]` explizit gesetztes Attribut, falls
/// zitare-web es irgendwann markieren will (heute nicht da).
/// 2. `body header:has(a.brand)` strukturell: ein `<header>`,
/// der einen `a.brand`-Link enthält. Matched die heutige
/// SvelteKit-Komponente (Brand Zitare" links oben).
/// 3. `body > * > header:first-of-type` positionell: erster
/// `<header>` direkt unter dem Top-Level-Wrapper. Greift wenn
/// `a.brand` mal verschwindet.
///
/// `body > * > header:first-of-type` ist absichtlich konservativ
/// (matcht nur einen `<header>` pro `<body>`-Direktkind), damit
/// nicht ungewollt nested Article-Header gehidet werden.
static let hideWebHeader: WKUserScript = .init(
source: """
(function() {
var css = 'body header:has(a.brand) { display: none !important; }';
var css = [
'header[data-app-nav],',
'body header:has(a.brand),',
'body > header:first-of-type,',
'body > div > header:first-of-type {',
' display: none !important;',
'}'
].join('\\n');
var style = document.createElement('style');
style.setAttribute('data-zitare-native', 'hide-web-header');
style.textContent = css;

View file

@ -89,11 +89,19 @@ targets:
com.apple.security.files.user-selected.read-write: true
keychain-access-groups:
- $(AppIdentifierPrefix)ev.mana.zitare
# Universal-Link-Domain ist zitare.com (canonical).
# zitare.mana.how ist NICHT in den applinks, weil das
# mit anderen mana-Apps kollidieren würde.
# Universal-Link-Domains:
# - zitare.com ist die kanonische Production-Domain (steht
# auch im Manifest und im AASA-File auf zitare-com).
# - zitare.mana.how als Staging-Domain, solange die zitare.com-
# Cloudflare-Zone noch nicht aufgelöst wird (DNS-Setup
# blockiert auf separatem cloudflared-Login). Nach Cloudflare-
# Cut kann der Eintrag bleiben — schadet nicht, deckt einfach
# beide Hosts ab.
# Beide Hosts liefern identische AASA-Files (siehe nginx-app.conf
# bzw. nginx-com.conf im zitare-Repo).
com.apple.developer.associated-domains:
- applinks:zitare.com
- applinks:zitare.mana.how
com.apple.security.application-groups:
- group.ev.mana.zitare
settings: