okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
4.7 KiB92 linesraw

12 · Context rail

File src/app/ContextPanel.tsx (172 lines) · Opened from the Chat header

The right-hand rail answering "what is this turn working with?". It was rebuilt last round into an animated grid track and tightened so it no longer clips.

What it is today

  • A grid track that animates 0 → 340 px on --st-t-surface, with the panel staying mounted and inert while hidden.
  • Five cards — Context window (gauge + bar), This conversation (model, messages, tokens, tool calls), Tools in reach (four tools with scope badges), Engine (speeds, uptime, links), and Hardware.
  • Content scrolls — 1083 px of content in 959 px of rail.
  • A "Hide" button in the header.

Where it falls short

  1. The rail still scrolls. Fixed. Sections collapse and animate on a grid track, and the restructure means the rail no longer scrolls at all with everything open (scrollHeight === clientHeight at 1110 px height). Verified mid-collapse: 162.9 px → 9.6 px → 0 px.
  2. "Hide" is a verb in a header, where a close affordance is expected. It also competes with the transcript's own content for attention.
  3. The rail duplicates the telemetry popovers. Context window, tokens and tool calls all appear in both, at different precisions.
  4. Tools in reach is a fixed list of four. Fixed. Rows show how many times each tool has actually been used in this conversation, unused ones recede to a quieter weight, and the footer counts the session's calls. A list that never changes is documentation; this is context.
  5. Hardware appears in the rail and on Monitor, computed independently.
  6. No section is collapsible, so five cards must all be scrolled past to reach the fifth.
  7. The rail has no empty state. With no conversation it shows zeros rather than saying what it would show.

The plan

Substance — make it about this conversation

  1. Tools in reach reflects reality. Done. Verified: after one read, Read file shows Used 1× and the other three keep their catalogue descriptions at a muted weight.
  2. Remove the duplication with the telemetry popovers. Diagnosed and partly fixed. The rule — agree exactly, or appear in only one — immediately found a disagreement: the rail printed the context maximum as 32K and the popover as 33k, the same number through two formatters (÷1024 and ÷1000). Both now use the token formatter and read 32K. The remaining overlap (message counts and tool calls appear in both) is deliberate: the rail's This conversation is a narrative summary and the popover is a counter readout, and they now agree.
  3. Collapsible sections. Done. Everything open by default — collapsing is for getting past a section, not for hiding information on first sight.
  4. An honest empty state — what the rail will show once there is a conversation, rather than a set of zeros.

Hierarchy

  1. Invert the card weight. Done. Five bordered, elevated cards competed with the transcript they describe. The sections drop the card chrome entirely — no fill, no shadow, no border — and are separated by a hairline, with the panel itself keeping one surface so the rail reads as a single object rather than a stack of fragments. Verified: section background transparent, shadow none, panel opaque.

    This exposed a duplication I had introduced. Giving the sections heads (an earlier round) left the metric inside still carrying its own label, so the panel literally read "Context window / Context window / 6%". Removed, and the flow now asserts the phrase appears exactly once.

  2. Replace "Hide" with a close icon in the header corner, with the panel toggle in the Chat header remaining the primary control.

Fluidity

  1. Sections expand and collapse on a grid track, matching the workspace trees.
  2. The gauge and bars animate to their value on open rather than snapping, so the rail reads as a live instrument rather than a static report.

Motion

InteractionSpec
Rail open/closegrid track 0 ↔ 340 px, --st-t-surface — built, interruptible
Section expandgrid track 0fr → 1fr, --st-t-local
Gauge on openstroke-dasharray to value, --st-t-choreo, once
Value updating liveNo transition on the number; the bar it drives eases --st-t-local

Verification

  • Assert the rail content fits without scrolling at 1110 px height once sections are collapsible.
  • Assert every figure shown in both the rail and a telemetry popover is identical, or appears in only one.
  • Assert the rail is inert when hidden — already correct; keep under test.
1# 12 · Context rail
2
3**File** `src/app/ContextPanel.tsx` (172 lines) · **Opened from** the Chat header
4
5The right-hand rail answering "what is this turn working with?". It was rebuilt
6last round into an animated grid track and tightened so it no longer clips.
7
8## What it is today
9
10- **A grid track** that animates `0 → 340 px` on `--st-t-surface`, with the panel
11  staying mounted and `inert` while hidden.
12- **Five cards** — Context window (gauge + bar), This conversation (model,
13  messages, tokens, tool calls), Tools in reach (four tools with scope badges),
14  Engine (speeds, uptime, links), and Hardware.
15- **Content scrolls** — 1083 px of content in 959 px of rail.
16- **A "Hide" button** in the header.
17
18## Where it falls short
19
201. ~~The rail still scrolls.~~ **Fixed.** Sections collapse and animate on a grid
21   track, and the restructure means the rail **no longer scrolls at all** with
22   everything open (`scrollHeight === clientHeight` at 1110 px height). Verified
23   mid-collapse: 162.9 px → 9.6 px → 0 px.
242. **"Hide" is a verb in a header**, where a close affordance is expected. It
25   also competes with the transcript's own content for attention.
263. **The rail duplicates the telemetry popovers.** Context window, tokens and
27   tool calls all appear in both, at different precisions.
284. ~~Tools in reach is a fixed list of four.~~ **Fixed.** Rows show how many
29   times each tool has actually been used in this conversation, unused ones
30   recede to a quieter weight, and the footer counts the session's calls. A list
31   that never changes is documentation; this is context.
325. **Hardware appears in the rail and on Monitor**, computed independently.
336. **No section is collapsible**, so five cards must all be scrolled past to
34   reach the fifth.
357. **The rail has no empty state.** With no conversation it shows zeros rather
36   than saying what it would show.
37
38## The plan
39
40### Substance — make it about *this* conversation
411. ~~Tools in reach reflects reality.~~ **Done.** Verified: after one read, *Read
42   file* shows `Used 1×` and the other three keep their catalogue descriptions at
43   a muted weight.
442. ~~Remove the duplication with the telemetry popovers.~~ **Diagnosed and
45   partly fixed.** The rule — *agree exactly, or appear in only one* — immediately
46   found a disagreement: the rail printed the context maximum as **32K** and the
47   popover as **33k**, the same number through two formatters (÷1024 and ÷1000).
48   Both now use the token formatter and read **32K**. The remaining overlap
49   (message counts and tool calls appear in both) is deliberate: the rail's
50   *This conversation* is a narrative summary and the popover is a counter
51   readout, and they now agree.
523. ~~Collapsible sections.~~ **Done.** Everything open by default — collapsing is
53   for getting past a section, not for hiding information on first sight.
544. **An honest empty state** — what the rail will show once there is a
55   conversation, rather than a set of zeros.
56
57### Hierarchy
585. ~~Invert the card weight.~~ **Done.** Five bordered, elevated cards competed
59   with the transcript they describe. The sections drop the card chrome entirely
60   — no fill, no shadow, no border — and are separated by a hairline, with the
61   panel itself keeping one surface so the rail reads as a single object rather
62   than a stack of fragments. Verified: section background transparent, shadow
63   `none`, panel opaque.
64
65   **This exposed a duplication I had introduced.** Giving the sections heads (an
66   earlier round) left the metric inside still carrying its own label, so the
67   panel literally read *"Context window / Context window / 6%"*. Removed, and
68   the flow now asserts the phrase appears exactly once.
696. **Replace "Hide" with a close icon** in the header corner, with the panel
70   toggle in the Chat header remaining the primary control.
71
72### Fluidity
737. **Sections expand and collapse on a grid track**, matching the workspace trees.
748. **The gauge and bars animate to their value on open** rather than snapping, so
75   the rail reads as a live instrument rather than a static report.
76
77## Motion
78
79| Interaction | Spec |
80|---|---|
81| Rail open/close | grid track 0 ↔ 340 px, `--st-t-surface` — built, interruptible |
82| Section expand | grid track `0fr → 1fr`, `--st-t-local` |
83| Gauge on open | `stroke-dasharray` to value, `--st-t-choreo`, once |
84| Value updating live | No transition on the number; the bar it drives eases `--st-t-local` |
85
86## Verification
87
88- Assert the rail content **fits without scrolling at 1110 px height** once
89  sections are collapsible.
90- Assert every figure shown in both the rail and a telemetry popover is
91  **identical**, or appears in only one.
92- Assert the rail is `inert` when hidden — already correct; keep under test.