54 lines
3.1 KiB
Markdown
54 lines
3.1 KiB
Markdown
# The in-game sunset — move the chair, watch it again
|
|
|
|
Status: built on `feature/chair-sunset`. ROADMAP Phase 1: *the in-game sunset — move the chair, watch
|
|
it again — as comfort and rehearsal; it tells the player when the real one is tonight.* CLAUDE.md §1,
|
|
§7 (*silence is a feature: sunset … has moments with no buttons at all*). Review:
|
|
[`feature-chair-sunset.md`](../reviews/feature-chair-sunset.md).
|
|
|
|
## 1. Why and what, in the player's terms
|
|
|
|
Under tonight's sunset line there is **Move the chair**. The garden turns into a quiet scene: the chair
|
|
on the hillside, the sky going from day to amber to coral to dusk, the sun sinking behind the western
|
|
horizon. **Half a minute, and nothing to press.** Then one line says when the real one is tonight, and
|
|
two quiet choices: *Watch it again*, *Back to the rose*.
|
|
|
|
It is a rehearsal, never a replacement: it counts for nothing, logs nothing, and its last words point
|
|
at the real sky.
|
|
|
|
## 2. Technical architecture
|
|
|
|
```mermaid
|
|
flowchart LR
|
|
shell["Shell.svelte<br/>Move the chair"] --> scene["ChairSunset.svelte<br/>dialog: sky + sun in CSS,<br/>garden-sunset and chair stand-ins"]
|
|
scene -->|"after 30 s"| line["SunsetLine<br/>tonight's real sunset"]
|
|
line --> engine["engine nextInvitation"]
|
|
```
|
|
|
|
| # | Decision | Why |
|
|
|:--|:--|:--|
|
|
| C1 | The sky and the sun are **drawn in code** (CSS gradients and one disc) behind the garden layer, which is transparent above its horizon. | STYLE.md S5: the sky is never painted, so the same layer serves the real-time sky later. |
|
|
| C2 | **No visible button for 30 s.** Escape, or a tap anywhere, comes back early; a screen-reader-only line says so. | Silence (CLAUDE.md §7) without a trap: a keyboard or screen-reader user is never stuck. |
|
|
| C3 | It is a modal dialog; focus goes into it and returns to *Move the chair*. | Accessibility is not a phase. |
|
|
| C4 | **Nothing is logged.** No event kind, no count. | Rehearsal, not achievement; the real sunset's event (`sunset`, CLAUDE.md §6.2) belongs to the real one. |
|
|
| C5 | With reduced motion, the scene shows dusk at once, still, for the same half minute. | Global `prefers-reduced-motion` rule in `tokens.css`. |
|
|
|
|
## 3. Risk analysis
|
|
|
|
| Risk | Answer |
|
|
|:--|:--|
|
|
| **Dependence**: the screen sunset replaces the real one. | Its last line is the real sunset's time; nothing rewards watching it. |
|
|
| **A trap**: a full-screen scene with no buttons. | C2, C3; tested by keyboard. |
|
|
| **Motion** for people sensitive to it. | C5. |
|
|
| Privacy, reachability | None: nothing is stored or sent. |
|
|
|
|
## 4. Verification matrix
|
|
|
|
| Case | Kind | Where |
|
|
|:--|:--|:--|
|
|
| Move the chair opens a labelled dialog with no button in it; after 30 s, the real sunset's line, *Watch it again*, *Back to the rose* | unit | `ui/test/chair-sunset.test.ts` |
|
|
| Escape and a tap come back early; focus returns to *Move the chair* | unit | same |
|
|
| Watch it again starts it over | unit | same |
|
|
| With no town and no guess, the line asks for a town | unit | same |
|
|
| Built app: watch it with the clock driven; axe during and after | e2e | `e2e/shell.spec.ts` |
|
|
| Offline: watch an in-game sunset with the server gone (CLAUDE.md §3) | offline | `e2e/offline.spec.ts` |
|