From ea79249d292d1eae1fb6d7c1d94b797ea71d7783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 20 Aug 2026 08:52:17 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs:=20the=20darkroom=20design?= =?UTF-8?q?=20language=20becomes=20the=20binding=20contract?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DESIGN.md | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 DESIGN.md diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..d2db6a5 --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,228 @@ +# edith — Design Language: The Darkroom + +This document is the binding design contract for edith's UI. It was distilled from the approved +concept mock ("Darkroom", 2026-08-20) and it outlives that mock: every existing surface is being +rebuilt to this language, and **every future feature must be designed inside it**. When a change +cannot be expressed in this language, the language gets amended here first — in the same diff — +never silently violated. + +Visual reference (playable mock, v16). + +--- + +## 1. Thesis + +**The film paints the tool. The tool itself is achromatic.** + +edith is a darkroom: a dim, stable, monochrome room whose only colors are extracted from the +footage on the bench, and whose only pure white is the lamp — the playhead and the splices. +The editor sits in this room for eight to twelve hours; everything below exists to keep that +person in their groove. + +Three laws derive everything else: + +1. **Chrome is achromatic.** No panel, button, tab, slider, or scrollbar carries a hue. Loudness + is luminance, never saturation. +2. **Film-extracted inks are the only color.** Each source contributes one ink, quantized from + its own frames (hue kept; saturation/lightness clamped into the WCAG-passing band). Inks mark + *identity* — spines, waveforms, traces, dots — never chrome. +3. **White is the lamp.** `#FFFFFF` is reserved for the playhead, its flag, and splice marks. + Nothing else may be pure white. + +## 2. Tokens + +Surfaces (dark-only; no light theme, ever): + +| Token | Value | Role | +|---|---|---| +| `canvas` | `#050607` | app ground, bench background | +| `panel` | `#0E1013` | spine, dock, ledger, plates' parent surfaces | +| `raised` | `#14171B` – `#17191D` | hover fill step, active verb fill | +| `hairline` | `#22262B` | 1px separations *within* a panel | +| seam | `rgba(0,0,0,.7)` | 1px panel-to-panel boundary | +| plate | `#050607` on `panel` | readout/notice/menu/cue body | + +Ink (text) ladder — four levels, all WCAG ≥4.5:1 on their surfaces: + +| Token | Value | Role | +|---|---|---| +| `ink1` | `#E6E9EC` | primary: values, active labels, timecode digits | +| `ink2` | `#9BA3AC` | secondary: labels, resting verbs, cue text | +| `ink3` | `#5E656D` | tertiary: chords at rest, metadata, section heads | +| `ink4` | `#3C4249` | faintest: decaying notices, dimmed-room hints | + +Film inks: extracted per source at import (quantize dominant hues → clamp S/L into the contrast +band). Reference extraction from the standing test frame: azure `#64B5D1`, magenta `#D164B5`, +green `#64D19A`, violet `#7F64D1`, teal `#64D1D1`. The wheel caps at **12 hues**; beyond 12, +hues repeat and the name plate carries identity (the dot was always the secondary cue). +Selection uses the complement-leaning second ink (magenta against azure), not a chrome accent. + +**Ink demotion rule:** extraction is ambient — it just happens. Re-inking a source is a +once-a-project act and lives behind right-click on the source's dot. Ink controls never occupy +the Sources tab, a toolbar, or any burst-use surface. + +**Safelight:** the empty room (no footage) is warm monochrome (`#0A0908` family) with amber +`#FF9D57` on exactly one glyph. When footage lands, a 900ms skippable film-leader fade hands the +room to the film's inks. The 12 legacy palettes survive only as safelight hue choices. + +Guard: the existing `no_colour_is_written_outside_the_theme` test remains the enforcement +mechanism — every value above is a theme token, never a literal at a call site. + +## 3. Type + +Two faces, fixed roles (bundled, no runtime deps): + +- **Archivo** — the room's voice: labels, verbs, section heads. Weights 400/500/700. +- **Spline Sans Mono** — everything the film says: timecode, chords, readouts, metadata, + cue text, the ledger. Mono = data; if a string is *about the footage or a key*, it is mono. + +Scale: 13px hero timecode (700, colons in `ink3`) · 10.5px labels/rows (500) · 9.5–10px chords +and metadata (500) · 9px section heads (Archivo 700, uppercase, +0.14em letter-spacing, `ink3`). +Nothing below 8px. No italics. Tabular figures wherever digits align. + +## 4. Ghost grammar — the control language + +- **Flow controls are ghosts:** borderless glyph + dim chord (`ink2` glyph, `ink3` chord). + Hover = one fill step (`raised`) + ink brighten. Active = `ink1` + fill. No borders, no boxes, + no icon assets — glyphs are hand-drawn/typographic. +- **Boxes are commitments:** the single bordered chip is reserved for commit-class actions + (Export). If a second boxed control ever appears on one surface, one of them is wrong. +- **Readouts are plates:** dark (`canvas`-on-`panel`) rectangles carrying mono text. Notices, + menus, chips, cues, and tooltips are all the same plate. +- **Every command wears its chord**, everywhere it appears — spine, menus, verbs, the `?` + overlay. Nothing lives only in a menu; nothing lives only on a key. (This kills the + shortcut-sync defect class permanently: the UI *is* the shortcut sheet.) +- **The most-read element anchors its region** — timecode leads the time band; the film leads + the room. +- Radii: 0 for lanes/clips/room chrome · 2px plates · 3px verbs/controls · 4–6px floating + (menus, sheets). No pills, no circles except source dots. +- Hover never adds hue. Focus/selection ring = 1px `ink1` (lamp-adjacent, not colored). + +## 5. The stance — layout + +Fixed geography; nothing moves, nothing occludes the picture: + +``` +┌──┬──────────────────────────────┬──────┐ +│ │ SCREEN │ │ +│sp│ (picture — top, never │ dock │ +│in│ occluded) │ Src/ │ +│e │ │ Clip │ +│ ├──────────────────────────────┤ tabs │ +│56│ TIME BAND: timecode → ghost │ │ +│px│ transport → cut readout → │ │ +│ │ contact strip → [Export] │ │ +│ ├──────────────────────────────┤ │ +│ │ BENCH (lanes V/A/S) │ │ +│ ├──────────────────────────────┤ │ +│ │ LEDGER (project · state) │ │ +└──┴──────────────────────────────┴──────┘ +``` + +- **Spine** (56px, left): every command as ghost glyph + chord, grouped by task frequency. +- **Screen**: the picture. Never covered — not by drawers, notices, drags, or menus. Two-up + OUT|IN judging renders *in* the screen at rest on a cut. +- **Time band**: timecode leads; ghost transport; cut readout (`14/37`); the **contact strip** + (whole-film motion-trace minimap, `FILM` label, viewport bracket with grip notches — click + jumps, drag pans); boxed **Export** at the end. +- **Bench**: lanes. Clip anatomy = ink spine (3px left edge) + real thumbnails/waveform in the + source's ink + name plate + splice gaps in lamp white. +- **Ledger**: project identity (`name.edith · saved`), last action, export progress, position. + State lives here, notices rise from here. +- **Dock** (right, the only side panel): Sources tab (assembly: filter, usage chips, import) and + Clip tab (verbs: Speed / Colour / Transform / EQ as ghost verbs over param rows). + +Session continuity: a room reopens exactly as left — playhead, subject cut, viewport, dock tab. + +## 6. Cut machinery — the interaction core + +The cut is the subject. Grammar (implement before any cosmetics): + +- `,` `.` — walk cuts (shift = stride 10). The cut readout is the odometer. +- `[` `]` — no-aim trim of the subject cut, frame detents, works at any zoom (even 4px clips). +- `/` — loop-trim: loop around the subject cut while trimming (the modernized Avid trim mode). +- Two-up OUT|IN on the screen when resting on a cut. +- `j k l` — shuttle; `s` — split; `↵` context-dependent commit; `esc` always retreats. +- Param rows: drag while playing; value ghosts on the frame; `r` resets; live row takes the ink. +- Colour verb: `v` holds previous shot beside current (matching is comparative). +- Subtitle cues: cue edge is a cut — the same `,` `.` `[` `]` grammar applies; text edits on the + picture where subtitles live. + +## 7. Scale — the degradation ladder + +Clips degrade **by width, one layer per threshold**, never all at once: +full anatomy (thumbnails, trace, plates, chips) → drop chips → drop labels (<48px; labels never +truncate into soup) → spine + trace only → sliver fill + splice gaps (film scale). Navigation +never depends on pixels: `,` `.` + contact strip work identically at 100 clips. Lanes compress +evenly to 5, then scroll behind the pinned ruler and track heads. + +## 8. Notices — how the room speaks + +No full-width bars, no covering the picture, ever. A notice is a plate rising above the ledger, +one at a time; severity is a **3px left spine**, not a color flood: + +- grey `#5E656D` — *told you* (self-fades) +- amber `#D1B564` — *worth a look* (carries a jump action: `go to cut ,31`) +- red `#C85050` — *needs a decision* (the decision is on the plate: `relink ↵ / later esc`) + +Every failure names its remedy, and the wound stays visible where it lives (dark clips in the +lane). **A refusal string is a claim:** shipping "cannot be decoded" requires a test proving the +capability is genuinely absent — otherwise it is a bug, not a message. A verb the state refuses +(in menus) greys out with its reason on hover; it never disappears. + +## 9. Menus and the keys overlay + +- **Right-click = verbs of the thing under the cursor** (clip menu: clip verbs; lane head: lane + verbs; source dot: ink acts). Plate styling, chords on every row, destructive verbs below a + rule line. Never a junk drawer. +- **`?` held** dims the room one fill step and surfaces chords *in place* beside their controls; + release restores. No modal cheat-sheet; learning stays geographic. The film keeps playing. + +## 10. The joy layer + +Game-feel, not gamification. All specs ≤150ms, ease-out, tied to real actions, honor +`prefers-reduced-motion`; all sound behind one toggle, −30dB, and **always silent while the +film's own audio plays**. + +- Split: 80ms white splice flash + dry mechanical tick. +- Trim nudge: 60ms detent per frame (rotary-encoder feel); held key = ratchet. +- Cut jump: 2-frame snap flash on arrival. +- Drop: 80ms magnetic settle + 1-frame squash. Never a teleport. +- JKL: optional pitch cue per speed step; blade leans 1px at 4×. +- Export: breathing ribbon on the boxed chip; film-leader countdown on open. + +**Never-list:** no badges, streaks, confetti, or celebration copy; nothing moves during playback +except the blade; no sound over film audio; no animation as decoration (every motion reports a +state change). + +## 11. Adding a feature — the checklist + +Before any new surface merges, it answers: + +1. **Frequency row:** which editor task, done how many times per hour, justifies its pixels? + Burst-use surfaces (screen, bench, time band) are the most expensive land. +2. **Grammar fit:** flow → ghost; commitment → the box (is it really commit-class?); + readout → plate; identity → ink; alarm → notice spine. +3. **Chord:** it has one, wears it everywhere it appears, and joins the `?` overlay. +4. **Scale:** define its degradation ladder step-by-width before merge. +5. **Achromatic check:** zero new hues in chrome; film inks only for identity; white only if it + is literally the lamp. +6. **Occlusion check:** the picture stays visible; nothing floats over the screen. +7. **States:** empty (safelight-composed, never bare), refusing (reason named), failing + (notice plate with remedy). +8. **Feel:** one ≤150ms motion spec from §10's vocabulary, or a stated reason for none. +9. **Continuity:** its state survives room close/reopen. + +If a feature fails the checklist, either the feature changes or this document does — explicitly. + +## 12. Implementation order + +1. Token substrate in `crates/app/src/ui/theme.rs` (extend the 34-role system; keep the + `no_colour_is_written_outside_the_theme` guard green). +2. The stance behind a flag (spine / screen / time band / bench / ledger / dock skeleton). +3. Cut machinery (`,` `.` `[` `]` `/`, two-up, readout) — before cosmetics. +4. Dock (Sources assembly + Clip verbs). +5. Ink extraction + grading pipeline; source dots; selection ink. +6. Traces + contact strip. +7. Notices, session continuity, safelight empty room, `?` overlay. +8. Joy layer last — it polishes verbs that already work.