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
3.8 KiB82 linesraw

06 · Workspace

Route #/workspace · File src/screens/Workspace.tsx (219 lines)

What the model can see. The screen that makes "local" concrete: these are your files, and this is the boundary.

What it is today

  • A file tree — treerow per node, directories expandable, sizes on files, a Select for workspace root.
  • A "What Strata may touch" card — the scope explanation.
  • Filters — a few Select controls and a search field.

Where it falls short

  1. Directories use the layers icon. The kit gained real folder and file glyphs two rounds ago and the sprite carries them; only the sidebar uses folder. This is the most visible inconsistency in the app — the file tree is the one place a folder icon is unambiguous.
  2. Files have no icon at all, only a size. A directory and a file differ by the presence of a chevron.
  3. Tree expand/collapse is instant. The workspace tree in the sidebar animates a grid track; this one, the main event, does not. The two should not behave differently.
  4. The detail panel shows metadata, not the file. Selecting a node does render a panel (Workspace.tsx:168) with kind, path, item count or size, changed time, Copy path and "Add as reference" — but never the file's contents. Reading a file the model can read is the obvious next step and the panel is already there to hold it.
  5. Modified time is shown in the detail panel but not in the tree, so scanning for what changed recently means clicking through nodes one at a time.
  6. No indication of what the model has actually read. The tool runs are in the transcript; the workspace does not reflect them, though it is the natural place to see "these three files were opened".
  7. The scope card states the rule but not the consequence — no count of files or total size in reach.

The plan

Substance — make the boundary legible

  1. Real icons: folder for directories, file for files, both already in the sprite. Distinguish common types by tint only, never by adding a second icon family.
  2. Extend the existing detail panel with contents. It already carries the header (kind, path, size, changed) and two actions; add the file body beneath as a read-only code surface, fetched on selection. Metadata without contents is a panel that answers every question except the one that was asked.
  3. "Read by the model" markers. Done. Files that appear in a tool call in the current session get a subtle marker and a count, so the boundary is not just stated but demonstrated.
  4. The scope card gains figures: 128 files · 4.2 MB in reach.

Hierarchy

  1. Tree is the hero, filters are secondary. Today the filter row and the tree have comparable weight.

Fluidity

  1. Tree rows animate open and closed using the same grid-track technique as the sidebar tree and the context rail — one technique, three places.
  2. The preview pane slides in from the right like the context rail, on the same --st-t-surface track animation, rather than appearing.
  3. Keyboard navigation: arrows to move and expand, Enter to preview. A tree without keyboard traversal is a list with extra steps.

Motion

InteractionSpec
Node expand/collapsegrid track 0fr → 1fr, --st-t-local
Preview open/closegrid track, --st-t-surface — same as the context rail
Row selectionBackground only, --st-t-micro
Icon swap on expandNone. The chevron rotates, --st-t-control; the icon does not change

Verification

  • Assert no directory renders the layers glyph — the audit can check icon names against node kind.
  • Assert selecting a file renders a preview with non-empty content.
  • Add flow workspace: expand a directory, select a file, assert the preview path matches, collapse again.
1# 06 · Workspace
2
3**Route** `#/workspace` · **File** `src/screens/Workspace.tsx` (219 lines)
4
5What the model can see. The screen that makes "local" concrete: these are your
6files, and this is the boundary.
7
8## What it is today
9
10- **A file tree** — `treerow` per node, directories expandable, sizes on files,
11  a `Select` for workspace root.
12- **A "What Strata may touch" card** — the scope explanation.
13- **Filters** — a few `Select` controls and a search field.
14
15## Where it falls short
16
171. **Directories use the `layers` icon.** The kit gained real `folder` and `file`
18   glyphs two rounds ago and the sprite carries them; only the sidebar uses
19   `folder`. This is the most visible inconsistency in the app — the file tree is
20   the one place a folder icon is unambiguous.
212. **Files have no icon at all**, only a size. A directory and a file differ by
22   the presence of a chevron.
233. **Tree expand/collapse is instant.** The workspace tree in the *sidebar*
24   animates a grid track; this one, the main event, does not. The two should not
25   behave differently.
264. **The detail panel shows metadata, not the file.** Selecting a node *does*
27   render a panel (`Workspace.tsx:168`) with kind, path, item count or size,
28   changed time, Copy path and "Add as reference" — but never the file's
29   contents. Reading a file the model can read is the obvious next step and the
30   panel is already there to hold it.
315. **Modified time is shown in the detail panel but not in the tree**, so
32   scanning for what changed recently means clicking through nodes one at a
33   time.
346. **No indication of what the model has actually read.** The tool runs are in
35   the transcript; the workspace does not reflect them, though it is the natural
36   place to see "these three files were opened".
377. **The scope card states the rule but not the consequence** — no count of files
38   or total size in reach.
39
40## The plan
41
42### Substance — make the boundary legible
431. **Real icons**: `folder` for directories, `file` for files, both already in
44   the sprite. Distinguish common types by tint only, never by adding a second
45   icon family.
462. **Extend the existing detail panel with contents.** It already carries the
47   header (kind, path, size, changed) and two actions; add the file body beneath
48   as a read-only code surface, fetched on selection. Metadata without contents
49   is a panel that answers every question except the one that was asked.
503. ~~"Read by the model" markers.~~ **Done.** Files that appear in a tool call in the
51   current session get a subtle marker and a count, so the boundary is not just
52   stated but demonstrated.
534. **The scope card gains figures**: `128 files · 4.2 MB in reach`.
54
55### Hierarchy
565. **Tree is the hero**, filters are secondary. Today the filter row and the tree
57   have comparable weight.
58
59### Fluidity
606. **Tree rows animate open and closed** using the same grid-track technique as
61   the sidebar tree and the context rail — one technique, three places.
627. **The preview pane slides in from the right** like the context rail, on the
63   same `--st-t-surface` track animation, rather than appearing.
648. **Keyboard navigation**: arrows to move and expand, Enter to preview. A tree
65   without keyboard traversal is a list with extra steps.
66
67## Motion
68
69| Interaction | Spec |
70|---|---|
71| Node expand/collapse | grid track `0fr → 1fr`, `--st-t-local` |
72| Preview open/close | grid track, `--st-t-surface` — same as the context rail |
73| Row selection | Background only, `--st-t-micro` |
74| Icon swap on expand | None. The chevron rotates, `--st-t-control`; the icon does not change |
75
76## Verification
77
78- Assert **no directory renders the `layers` glyph** — the audit can check icon
79  names against node kind.
80- Assert selecting a file renders a preview with non-empty content.
81- Add `flow workspace`: expand a directory, select a file, assert the preview
82  path matches, collapse again.