@@ -64,25 +64,32 @@ reader notices on day one, so it is stated rather than discovered.
6464
6565## 2. One owner for "what is open"
6666
67- **`keyMode` stays exactly as it is.** Keyboard behaviour and visible identity
68- are different axes — `help`, ` status` and `queue` share `modePanel` while being
69- three different things on screen — and merging them buys nothing for input mode
70- or multiplexing.
67+ Keyboard behaviour and visible identity are **different axes** — `help`,
68+ ` status` and `queue` share `modePanel` while being three different things on
69+ screen — so they keep two types. But they are not independent: **the drawer
70+ identity is the source, and `keyMode` is derived from it.**
7171
72- What changes is smaller: **the drawer is the single owner of presentation**, and
73- one table keyed by drawer id gives its glyph and name.
72+ ```go
73+ func (d drawerID) keys() keyMode // command → modeJump, search → modeSearch, panels → modePanel
74+ ```
75+
76+ That is the whole change, and it is what makes "one owner" true rather than
77+ aspirational: today ` mode() ` derives a ` keyMode ` from ` inSearch ` /` inJump ` while
78+ the drawer tracks the same fact separately, so for one frame they can disagree.
79+ Opening a drawer becomes the only transition, the boxes keep their buffers, and
80+ nothing else reads those booleans.
81+
82+ One table keyed by drawer id gives the glyph and the name.
7483
7584| drawer | mode glyph | name | selection glyph |
7685| ---| ---| ---| ---|
7786| queue | ` 𝄚 ` | queue | ` ♭ ` |
78- | notifications | `𝄞` | notifications | `𝄞` *(see open questions)* |
87+ | notifications | ` 𝄞 ` | notifications | ` 𝄞 ` |
7988| command | ` ∴ ` | command | — |
8089| search | ` ∴ ` | search * (see open questions)* | — |
90+ | * (reserved)* | | input | |
8191| help / status / message | ` ? ` ` ! ` — | help / status | — |
8292
83- `inSearch`/`inJump` stop being consulted by anything but the box that owns them;
84- the bar and the keymap ask the drawer. Reserved for input mode: one more row.
85-
8693## 3. ` turnState ` : symbol, name, colour
8794
8895``` go
@@ -98,10 +105,16 @@ func (s turnState) style() term.Style // hup gray, error red, rest default
98105| done | `✓` | `done ✓` | turn complete, no hup |
99106| hup | `!` | `hup !` (gray) | user hangup |
100107| error | `✗` | `error ✗` (red) | hup due to error |
101- | idle | ` 𝄐 ` | ` idle 𝄐 ` | ** the catch-all** |
108+ | detached | `⠸` | `detached ⠸` | this CLI left; the turn continues |
109+ | idle | `𝄐` | `idle 𝄐` | **the catch-all**: none of the above |
110+
111+ **`detached` keeps its meaning and loses its animation.** The first draft of
112+ this plan deleted it — a spinner that never turns again, since nothing repaints
113+ after a detach. But the animation was the defect, not the fact: "I left and the
114+ turn is still running" is precisely when the follow hint applies, and `idle` is
115+ defined as the catch-all for conditions *not otherwise known*. A static glyph
116+ keeps the truth and drops the lie.
102117
103- ** ` disconnected ⠸ ` is deleted** — a spinner that never turns again, since
104- nothing repaints after a detach. It folds into ` idle ` , the declared catch-all.
105118**Hup is a state, not an error**: the spec says so, and it is why hup is gray.
106119
107120## 4. Notifications: a sink, a drawer, and nothing clever
@@ -151,27 +164,38 @@ everything else, and it inherits cost and the cache buckets from §1.
151164
152165Each step ships alone; none changes what the pager can do.
153166
154- 1 . ** ` turnState ` ** (§3) — smallest, and ` statusView ` needs it. Deletes
155- ` disconnected ` .
156- 2 . ** ` statusView ` + goldens** (§1) — the bar renders from a value.
157- 3 . ** The drawer table** (§2) — glyphs and names in one place; the bar stops
158- re-deriving what is open.
167+ 1. **`turnState`** (§3) — smallest, and `statusView` needs it.
168+ 2. **The drawer table** (§2) — glyphs, names, and `keys()`. It comes BEFORE the
169+ value that consumes it: `statusView` takes a `drawerID` and renders its
170+ glyph, so building the value first would mean re-deriving identity inside it,
171+ which is the exact defect §2 exists to remove.
172+ 3. **`statusView` + goldens** (§1) — the bar renders from a value.
1591734. **`cmdkit.AndMore(n, hint)`** — one spelling of "… 749 more" for the drawer,
160174 `form show` and the `ls` family, which have three today.
1611755. **notifications** (§4) — the only new surface.
1621766. **`^V`** (§5) — last: the only binding change.
163177
164- ## Open questions
178+ ## Decided for you — each reversible with one line
165179
166- 1 . ** Does the aria id move off the rule into the status row? ** Every worked
180+ 1. **The aria id moves off the rule and into the status row. ** Every worked
167181 example shows a bare rule and `✓ · 123abc · test`; one sketch line says the
168- rule right-justifies the id. The examples are taken as authoritative here.
169- 2 . ** ` ∴ ` for both command and search?** One glyph for two modes works if the
170- name disambiguates — but the sketch labels the SEARCH row "command", so
171- either it is a typo or search has no identity of its own.
172- 3 . ** ` 𝄞 ` is asked to be both the notifications glyph and its selection cue.**
173- Two jobs, one symbol, on one screen. Which one gives way?
174- 4 . ** How does help "always work" when ` ? ` is text?** Inside the command and
175- search boxes ` ? ` is a printable character, so the requirement cannot mean
176- that key everywhere. Proposed: ` :help ` in the box, the hint row in every
177- mode, ` ? ` everywhere else.
182+ rule right-justifies the id. The examples win. Say the word and it flips
183+ back.
184+ 2. **`𝄞` is both the notifications glyph and its selection cue.** The spec asks
185+ for a treble clef in both places and nothing says they must differ; an
186+ aesthetic objection is not an ambiguity.
187+ 3. **`cost` and the clock leave the bar** (§1), to the `!` panel.
188+
189+ ## Genuinely open
190+
191+ 1. **`∴` for both command and search?** The sketch gives search the `∴` glyph
192+ and then labels its status row "command". Either a typo, or search has no
193+ identity of its own and borrows command's.
194+ 2. **How does help "always work" when `?` is text?** In the command and search
195+ boxes `?` is a printable character, so the requirement cannot mean that key
196+ everywhere — and `:help` cannot be the universal answer either, since `:` is
197+ literal inside the SEARCH box (special-casing it would make that character
198+ unsearchable). Proposed: **Esc-then-`?`** is the universal gesture, spelled
199+ out in each box's hint row — which therefore must not be gated on verbose —
200+ with `:help` kept as the command box's shortcut. This is a keyboard decision
201+ and yours to make.
0 commit comments