Clean successor to V3 (forge: lilith/atlilith). Seeded from local Mac working tree at ~/Code/@projects/@cocottetech/. node_modules and build artifacts excluded via .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7.1 KiB
7.1 KiB
analytics-dashboard.screen
Implements brief T — the strategist's front-window. 5 stacked panels answering "how is my business doing this week." Reached from chat-home top-bar overflow → "Dashboard," or from the daily digest's "tell me more →" handoff. Web companion shows the full layout; iOS shows the same panels collapsed-by-default in a scrollable drawer. Voice register: working; hearth on good news; plain on dips.
Layout (iPhone — drawer; web shows side-by-side panels)
┌─────────────────────────────────────────────────┐
│ ◄ Chat ⚙ │ 56pt — top bar; ⚙ = panel config
├─────────────────────────────────────────────────┤
│ This week · refreshed 6 min ago │ stale-indicator + refresh
│ [ Tell me more → strategist ] │ conversational handoff
├─────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────┐ │ T1 — Revenue
│ │ Revenue · $4,210 │ │
│ │ ▁▂▄▆█▆▅ ↑ 18% vs last week │ │ sparkline + delta
│ │ 💡 OF PPV pulled $1,840 — Berlin tease │ │ insight chip (hearth)
│ │ cohort responded │ │
│ └─────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────┐ │ T2 — Funnel
│ │ Prospect funnel │ │
│ │ 47 inbound → 31 warm → 12 booked │ │
│ │ ▼ Conv rate: 25% (last wk 22%) │ │
│ │ 💡 Triage filter blocked 8 spammers │ │
│ └─────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────┐ │ T3 — Per-surface
│ │ Surfaces · top movers │ │
│ │ OF +14% X +6% Tryst flat Eros -3% │ │
│ │ [ See all 24 → ] │ │
│ └─────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────┐ │ T4 — Cohort warmth
│ │ OF cohort │ │
│ │ Tier breakdown chart │ │
│ │ ⚠ "early adopters" cooled — 12d silent │ │ plain on warning
│ └─────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────┐ │ T5 — Tour ledger
│ │ Berlin (Oct 3–7) · in planning │ │
│ │ Floor: $8k · Target: $14k · Booked: $2.1k │ │
│ │ Hotel: 2 considering · 0 booked │ │
│ └─────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────┘
Components
| Component | Notes |
|---|---|
| Top bar | Back + config cog (per-panel show/hide, refresh cadence). |
| Stale indicator | "refreshed N min ago"; tap to force-refresh (rate-limited per T-Q1). |
| Strategist handoff | Bottom-of-screen CTA opening a chat scoped to dashboard context. |
| Panel card | Each of T1–T5 is one card with: title, primary number/chart, delta vs comparison period, 1 insight chip from strategist. |
| Insight chip | Voice register matches state — hearth on good, working on neutral, plain on warning. Tappable → strategist deep-dive. |
States (per panel + whole dashboard)
- Empty (new user) — copy: "I'll have more to show after a week of data."
- Sparse (some data, low confidence) — values shown with
~prefix and lower-opacity color. - Typical (default) — full layout.
- Anomaly-highlighted — one panel pulses faint amber/rose; insight chip uses plain register.
- Cold-load — skeleton placeholders per panel.
- Degraded (strategist offline per M §M2a) — banner: "Showing last-known from 14h ago." All panels frozen with timestamps.
- Offline (M §M2c) — banner: "Offline. Cached numbers may be stale."
- Web variant — same panels side-by-side in a 2-col grid; charts higher-fidelity.
- VoiceOver — panels read top-to-bottom; each insight chip explicitly announced as "strategist note."
Interactions
- Tap insight chip → opens chat with strategist scoped to that panel's slice.
- Tap "See all" on T3 → routes to surfaces-settings.screen.md.
- Tap T5 tour leg → tour-leg-detail.screen.md.
- Long-press a panel → "Hide this panel" / "Move up" / "Pin to dashboard."
- Pull-to-refresh → force re-pull (rate-limited).
Edge cases
- Strategist crashed mid-refresh — last-known shown with stale chip; recovery banner once strategist back.
- Revenue panel at $0 (new user / vacation) — copy: "No revenue moves this week. {context}." Doesn't feel like failure.
- Tour ledger empty — placeholder: "No tour legs in flight. Tell ai-copilot 'I'm thinking about a tour' to start."
- Reduced motion — sparklines replaced by min/max/avg numerals.
Related
- Brief T — parent design.
- strategist contract — source of insights.
- Brief I — audit drawer is the "what was done" companion to this "how is it going" surface.
- tour-leg-detail.screen.md — T5 tour-card target.
Out of scope
- Custom panel ordering UI (defer; tap-and-hold reordering is a future enhancement).
- Cross-week / month / year time controls (initial scope: this-week + comparison; date picker added later).