Skip to content

Six TODO items: outline advice, shadow-cast rings, package install, leaf.js header, first-paint scopes, planted lint faults - #346

Merged
max-sixty merged 32 commits into
mainfrom
todo-survey
Sep 6, 2026
Merged

max-sixty merged 32 commits into
mainfrom
todo-survey

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Six items off TODO.md, run as parallel subagents from one base commit and reviewed together. They are independent of each other; the shared thread is that each was small enough to finish and close out.

version check advises a table of contents. A page with two or more headings and no outline element draws a non-blocking line. The element comes from a new x-outline registry marker on lf-toc rather than a hardcoded tag, so a layer that ships no outline widget stays quiet. Only examples/corpus.html earns the line today, because the corpus script strips each page's TOC.

The ring sweep credits a band cast as a shadow. Two rules draw the "you are here" band as a box-shadow because their boxes cannot spend an outline on it — the anchored response bar, whose focused states write outline: none so the field and its choices keep one silhouette, and the item hint the keyboard is browsing, a chip in a layer nothing can focus. The sweep asked only the outline, so it answered "no ring here" for both, credited the bar's controls to pressable (the floor rule whose outline the bar takes away), and measured neither ring's geometry. A --here-shadow token carries the band, both rules name their ring, and two new walk scopes reach them. Population 42 → 45, no clipping found.

leaf package install SOURCE copies a checked package into ~/.local/state/leaf/packages/, and one lookup resolves a bare --package name across that store and the bundled packages. The source directory's name is the name pages select, so an install refuses a name already answered rather than changing which directory it means.

leaf.js is 159 lines, from 331. Every paragraph of the narrative header was already stated in its owner module or skills/leaf/assets/CLAUDE.md, so the change is deletions plus a three-line pointer. No code moved.

Scopes validate at their first paint. keys() checked row callbacks as a module evaluated, which is the one evaluation-order path the leaf/evaluation-order rule cannot see — it reads module bodies, not the callbacks another module runs. Declaration now checks only the rows as written; what they mean waits for the register's repaint frame, which lands after every module body, and aria-keyshortcuts is written there too.

Planted faults pin the evaluation-order rule. A third entry on the eslint pre-commit mirror runs scripts/evaluation-order-faults.mjs, which feeds eslint a fixture at a real cycle path and checks the rule's verdict line by line: a module-scope read, a call, an IIFE read all refused, a bare function reference allowed. Three bug-back flips each turned it red.

One item withdrawn

e4cd887f, the thread-card tightening, is reverted here. At 390px with a coarse pointer the panel's resize grip is a 44px square laid over the list, and the tighter cards moved a thread's Send button up under its focus ring — test_coarse_pointer_resize_reach_stays_reachable_without_trapping_scroll read the ring's bottom band as covered, one pixel into the button. Confirmed against a detached checkout of the same main commit, which passes, and by putting the two spacing values back, which clears it.

The clearance was never real either way: 10px missed the button by 3px and 6px meets it by 1, because nothing reserves the grip's square and cards run under it at every scroll position. Making it real is a question about what the phone sheet owes a grip that is deliberately a local handle rather than a full-height wall, so it goes back on TODO.md with the measurement, alongside the reply box that is the actual reason a third card does not fit.

Checks

uv run pytest tests and uv run pre-commit run --all-files pass. The full --run-nightly set passed on the tree before the last few merges of main; its most recent run had three failures that reproduce identically on a detached checkout of pure main, all in the interaction gallery.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 30 commits September 5, 2026 14:16
leaf.js has been boot-only since the module-scope cutover
(e9a8239), but its ~198-line header still told the whole widget
layer/actions/threads/versions story as prose. Every paragraph in it
now duplicates, less precisely, what the owning module's own header
already states (presentation.js, anchors.js, passages.js,
projection.js, outbox.js, drafts.js, version.js, the composing/ and
keyboard/ modules, conversation/messages.js) or what
skills/leaf/assets/CLAUDE.md already states at the ownership level.
Delete rather than move: nothing in the header held information that
isn't already recorded, more currently, at its owning module.

leaf.js keeps only a short boot-module comment and a pointer to
CLAUDE.md; imports and the boot sequence are unchanged (331 -> 159
lines).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
`leaf/evaluation-order` in `eslint.config.mjs` refuses a runtime owner's module
body reading or calling another member of the owner cycle, and nothing exercised
it: the runtime it lints is supposed to pass, so the rule could stop reporting
and both eslint hooks would stay green.

`scripts/evaluation-order-faults.mjs` feeds eslint two modules over stdin at a
real cycle path and checks the verdict line by line -- a module-scope read, a
module-scope call, and a read inside an IIFE must each be refused with the rule's
own wording, while a bare reference to a cycle function must stand. It runs under
a third pre-commit entry on the pinned eslint mirror, `eslint-evaluation-order`,
which overrides the mirror's entry so eslint is pinned once and all three hooks
share one node environment.

Checked by planting three faults in the rule itself: silencing it, dropping the
allowance for an uncalled function export, and skipping IIFE bodies each failed
the harness, and each named the case it lost.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
--lf-thread-pad drops from 10px to 6px and the card's margin-bottom
from 12px to 8px, so a 24-thread panel shows meaningfully more of
each card's reply box without losing the room the quote's and
thread-action's outset focus rings need (--here-ring-room is 5px;
6px padding clears it on every edge). .lf-thread-actions' margin-top
drops from 8px to 4px for the same reason, well clear of the
platform's touch-target floor.

Measured on a 24-comment LONG_PAGE fixture at 1280x800: the third
card's visible extent grows from 57% to 78% of its height (message,
receipt and reply box now visible; only Send/Resolve is still cut).
A literal third complete card is not reachable through safe padding
alone — the card's own content (~174px) already exceeds a third of
the panel's available list height (~544px) before any spacing is
added back.

tests/test_render_conversations.py and `-k ring` in
tests/test_render_controls.py pass; the ring geometry tests
(test_the_ring_reading_*) confirm no clipped or covered focus ring.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
`leaf package install SOURCE` checks the directory with the existing package
gate and copies its contract — the four package files and four package
directories, and nothing else the author keeps there — into
~/.local/state/leaf/packages/. The store lives in the state home because a
plugin update replaces the install tree wholesale, and ~/.config/leaf is one
package rather than a directory of them.

`named_package` is the one lookup a bare `--package` value resolves through, so
an installed package and a bundled one are the same directory contract in
different places and nothing downstream asks which root answered. The install
refuses a name either root already holds, naming the standing directory and
what to do about it, which is what keeps the search order from being a
precedence anyone has to reason about.

Updates, pinning, and trust are left to later dogfooding.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
`version check` now prints one advice line where a page carries two or
more h2-h6 headings and no outline element: the default the outline
widget's own entry already states, with nothing to make an author read
it. Structural and deterministic, like `unpointable_blocks`, and
non-blocking — a compact page whose outline is visible at a glance is a
fine answer to the line.

Which element counts as the outline is the registry's word, through a
new `x-outline` marker on `lf-toc`. A layer shipping its own navigation
gets its own tag named back, and a layer shipping none draws no advice
rather than pointing at an element its pages could not declare.

Of the shipped pages only the generated `corpus.html` receives the line;
its composition strips each source page's `lf-toc`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
`keys()` ran a scope's row callbacks as it was called, so a declaration at
module scope read another owner's state before that owner had evaluated — the
one evaluation-order path the `leaf/evaluation-order` rule cannot see, since it
reads module bodies and not the callbacks another module runs.

Now every scope takes the path capability-gated ones already took: `keys()`
checks the declaration's shape, publishes it unread, and joins the set of
scopes owed a first paint. The repaint frame it schedules drains that set after
every module body has run, and that reading is where liveness is resolved, an
ambiguous scope refused and retracted, and `aria-keyshortcuts` first written.
A `paintKeys` landing before the frame reads the connected ones on its way
through, so a state change still projects synchronously.

`test_a_scope_cannot_give_one_live_key_two_meanings` asserts the refusal at
that boundary for a gated and an ungated scope alike, and pins the frame as the
first paint with a scope nobody repaints.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
Two rules draw the layer's band as a box-shadow rather than an outline: the
anchored response bar, whose focused states write `outline: none` so the field
and its choices keep one silhouette, and the item hint the keyboard is
browsing, a chip in a layer nothing can focus. The ring reading knew only the
outline, so it saw no ring on either — the bar's own controls credited
`pressable`, the name of the floor rule whose outline the bar takes away, and
neither ring's geometry was measured anywhere.

`--here-shadow` is that band, stated once beside `--here-ring` and composed
from the same width, with the ink left to the rule because the two lay down
different strengths of the accent. Naming it is what the population scan asks
for, so each carrier answers the same question: does the value name the layer's
token. The sweep reads both, measuring a shadow ring's spread the way it
measures an outline's width and offset, and credits a name only where the box
paints the band.

The corpus walk gains the two scopes that paint them, both entered through the
product's own keyboard — `s` opens the item hints, a step back and forward
lands on the lowest item the window is showing, and Enter answers it on the
anchored bar. `test_the_ring_reading_sees_and_measures_a_ring_cast_as_a_shadow`
puts the layer's three other shadows in front of the reading and then stands
the band on the window's foot. The widened sweep reports no clipping on corpus
or ship review.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfJzCJjCK91pzDfZNR6WiJ
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…anded

A scope re-declared on its element before the frame left the stale declaration
in the owed set; read at the frame, its refusal retracted the standing one. The
notes section that specified the outline advice now describes what shipped.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… the band at the foot

The walk's fixture reply carries a pasted image, so the media ring main added
is painted somewhere the corpus reaches. The long-card fixture outgrew the
tighter card spacing by six more paragraphs. spreadHints reads --here-ring-w
and clears it at the line and foot seats rather than relying on the gap and
the band both being 2px.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
# Conflicts:
#	tests/test_render_controls.py
…box once in its test

Enter on a hint now selects the target and leaves the response undecided, so
the walk presses c for the field it measures. The ask-arrival test's two
scripts each declared the box under one name and read it under the other.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Four conflicts, and main had already solved two of the same problems:

- leaf.js: main edited two header paragraphs this branch deleted. Both describe
  features their owner modules state themselves (composing/drawing.js for the `w`
  stroke, hints.js and address.js for the prefix-free labels), so the header stays
  gone and main's `drawing` composer field is kept.
- composing/targets.js: main's generated hints moved the placement pass into
  keyboard/hints.js. Take main's deletion, and re-apply this branch's band
  clearance where the pass now lives, which reaches the go-to hints too — both
  layers are `.lf-targets` and both mark a `.lf-current` chip, so both wear the
  band that a face's own rectangle does not report.
- validation/markup.py: an import union.
- test_render_controls.py: main's #320 gives the walk its media ring by seeding one
  example's thread, rather than serving the image to every one of them. Take main's,
  and drop the constant and import this branch's version needed.

test_render_widgets.py merged to exactly main's text: #315 is the same Ask-rename
fix this branch made. docs/registry.html and examples/corpus.html are regenerated.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q7ZBoNLYxFVhWgDsXH1RTx
…constants

The placement pass moved to keyboard/hints.js with the generated hints, and the
band clearance came across with it. Two things it left implicit:

A face's rectangle does not report the band the browsed chip wears, so a chip
clamped flush to the window had its band clipped. The window edges are now inset
by the band.

Every other clearance was `gap`, which cleared the band only because the gap and
`--here-ring-w` are both 2px. `clear` is the wider of the two, so the rule is
stated rather than coincidental: a barrier takes it, and the band may stand in
the gap a face keeps but not past it. Today it is still 2px, so no seat moves.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q7ZBoNLYxFVhWgDsXH1RTx
main's render-gate refactor renames what this branch's Python work reads:

- validation/markup.py: `_StructParser` is `StructParser`, on the import and on
  `missing_outline`'s own signature.
- packages.py: `PACKAGE_FILES` is `VENDORED_FILES`, which `copy_package_contract`
  now uses — this branch extracted that loop out of `validate_starter_candidate`,
  so main's edit landed on the body's old home rather than on the function.
  `KERNEL` is no longer read here and goes; `fsync_parents` and `package_store`
  are both kept.
- scripts/CLAUDE.md: main moved the reproducibility paragraph above this hunk, so
  only its rewritten "Rerun a bundle" line stays, with the Lint harness section
  after it.

`_source_advice` keeps its name, so the outline advice call is unchanged.
Regenerating the registry docs and the corpus reproduces the tracked bytes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q7ZBoNLYxFVhWgDsXH1RTx
This reverts commit e4cd887.

At 390px with a coarse pointer the panel's resize grip is a 44px square laid over
the list, and the tighter cards moved a thread's Send button up under its focus
ring: `test_coarse_pointer_resize_reach_stays_reachable_without_trapping_scroll`
read the ring's bottom band as covered, one pixel into the button. Confirmed
against a detached checkout of the same main commit, which passes, and by putting
the two spacing values back, which clears it.

The clearance was never real either way — 10px missed the button by 3px and 6px
meets it by 1 — because nothing reserves the grip's square. Making it real is a
question about what the phone sheet owes a grip that is deliberately a local
handle rather than a full-height wall, so it goes back on TODO.md with what the
measurement showed, alongside the reply box that is the actual reason a third
card does not fit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q7ZBoNLYxFVhWgDsXH1RTx
@max-sixty
max-sixty merged commit 59d0aa3 into main Sep 6, 2026
7 checks passed
@max-sixty
max-sixty deleted the todo-survey branch September 6, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants