Skip to content

Fold a section with no gist at Skim, and tell authors what Skim is for - #5588

Merged
max-sixty merged 10 commits into
mainfrom
fix/issue-5539
Nov 15, 2026
Merged

max-sixty merged 10 commits into
mainfrom
fix/issue-5539

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Skim kept every heading, and the detail package told authors to open every section with a gist, so Skim was always one heading plus one paragraph per section, and leaving a section's gist out left its heading standing over nothing. Now a heading stays at Skim only when a lede or gist follows it before the next heading of its rank or above, so a section with no gist folds away whole, heading included. This holds in <section> markup, in flat markup and for a heading inside a <header>, since the dial reads forward in document order from the heading.

Each gap in what Skim shows takes one ⋯, whatever structure holds the folded blocks: a gist-less section joins the folded rest of the section before it, so nested sections fold as flat ones do. Pressing the ⋯ unfolds the whole gap. Pointing at a ⋯ whose gap holds a heading, by pointer, Tab or a held finger, shows a preview of "Show the rest" with the outermost folded headings listed below it, so a skimmer can see which sections lie behind it before pressing. The folded sections are named only there, not on the page, since Skim shows only the passages the author chose. The dial no longer listens for lf-reveal, which nothing has dispatched since #4500 moved travel to beforematch.

The detail author instructions, the lf-dial x-instructions and the .gist description now say what Skim is for: the page's argument and anything the reader must act on, reading in order. They list what the author weighs to get there: who reads the page, gists that make sense on their own and read as one account, early material often carrying more weight, an owed lf-ask that must not be missed, and sections that can contribute nothing. The one-gist-per-section rule is gone. The Skim button's tooltip, the package table in packages.md and two catalogue blurbs no longer describe Skim as one gist per section. The detail example's Timeline no longer has a gist, so at Skim it folds behind the ⋯ after the decision, whose preview names it.

Using it

A scratch incident report with an lf-dial and five sections (Impact, Cause, How we found it, Fix, Follow-ups), where only "How we found it" has no gist, switched to Skim by every route Leaf gives: a pointer click on Skim, Tab from the page's start (one press lands on the dial) then ←, the go-to key g and the hint over Skim, and a tap at phone width (390×844). On main (merge base dd48de4) and on this branch alike, every route reached the same Skim state.

main this branch
"How we found it" at Skim its heading over a lone ⋯ folded whole
Marks under Cause's gist one ⋯ one ⋯, holding the rest of Cause and "How we found it"
What that ⋯ previews "Show the rest" "Show the rest", then "How we found it"

At Skim the page now reads: title, lede, then the Impact, Cause, Fix and Follow-ups gists under their headings, with the open decision in the Fix gist. Pressing the ⋯ under Cause shows Cause's rest and "How we found it" together and puts focus on the first paragraph shown. The detail example draws 4 marks at Skim where main draws 5, its last previewing "Timeline".

Scoring the instruction change

No case under evals/ covered lf-dial, so this adds skim-carries-the-argument: an author turns a postmortem into a page with lf-dial for a payments lead who skims it and owes a choice between two fixes. The postmortem holds three kinds of material she doesn't need on a quick pass: background on how the gateway pool works, which the instructions don't name, and a minute-by-minute timeline and the investigation's method, which they do. One judge reads the h1, lede and gists in order and asks whether they give the failure, its cost, the cause and the decision; the other fails a page that gives any of those three a gist.

Claude Code, 4 runs per arm (leaf-dev eval run skim-carries-the-argument --harness claude-code --base --repeat 4). Every run used lf-dial and read its arm's detail author instructions.

Judge main (dd48de4) this branch
Skim reads as one account with the decision (skim-reads-coherently) 4 of 4 4 of 4
No gist for the background, timeline or investigation (skim-folds-what-it-skips) 0 of 4 2 of 4

On main every author gave the timeline and the investigation a gist, as "Open each section with its gist" says. On this branch no author gave the investigation a gist, and the two failures each gave the timeline one saying how long finding the host took. No author on either arm gave the background a gist: four merged it into the cause's body, three put it in a closed details, and one gave it its own section with no gist, which folds at Skim. So the background doesn't separate the arms, and the instructions' named example, the timeline, is where this branch still falls short. Every author on both arms marked the decision's lf-ask .gist. An earlier run of the case without the background scored main 0 of 4 and this branch 4 of 4 on the skipping judge.

When the request said "a detail dial" without naming lf-dial, 5 of 8 authors (4 on main, 1 here) built their own dial from radio buttons and CSS and never opened the package list in references/packages.md, so the case names lf-dial.

Verification

  • tests/browser/widgets/test_dial.py (5 tests) passes. test_a_section_without_a_gist_folds_whole covers a nested section with no gist, a top-level one, a flat h2/h3 run and a heading inside a header; it asserts one ⋯ per gap, what the Cause gap's ⋯ previews and that pressing it shows both folded sections. It fails on main, where the gist-less headings stay visible.
  • pnpm run check:browser passes, and dev/tests/test_evals.py -k catalog builds the new case.
  • The ⋯ preview was checked in Chromium by pointer, Tab and a held finger, and in Firefox by the reviewer. Not checked: WebKit, and the test_page_holds_still journey, whose dial pages read only the detail example's Cause section.

Closes #5539

…uthors

Skim kept every heading, and the detail instructions asked for one gist per
section, so Skim was a fixed cut: every heading with its first paragraph. A
heading now stands at Skim only when a lede or gist follows it before the next
heading of its rank or above, so a section the author gave no gist folds whole,
heading included, behind its ⋯. Containers are entered only when they hold the
lede or a gist, so a gist-less `section` folds as one block.

The author instructions and the `lf-dial` and `.gist` registry entries now state
what Skim is for (the page's argument and what the reader must act on, read in
order) and what an author weighs, in place of the one-gist-per-section rule.

Behavior changed: a heading with no gist under it is hidden at Skim. The new
test in tests/browser/widgets/test_dial.py covers sectioned and flat markup.

Closes #5539

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At Skim the dial now hides a heading that sits inside a plain wrapper, even when a gist follows it. heads() only looks at the heading's own later siblings, so in <section><header><h2>Cause</h2><p>By the on-call team</p></header><p class="gist">…</p> the h2 has nothing after it inside header. #holds() also no longer goes into header, because it now looks only for SUMMARY. The whole header folds, and the gist ends up with no heading over it. On the base, #holds() matched KEPT, which included headings, so the h2 stayed. I checked this with a scratch browser test: it passes on 4ee133aac and fails at this head. <header> around a section's heading is ordinary authored HTML, so this regression reaches pages beyond the incident example.

Fix: walk forward in document order from the heading, inside the dial's scope, and stop at the first heading of the same or higher rank. Then have #holds() also go into a wrapper whose heading heads something. I'll push that with a case for it in test_a_section_without_a_gist_folds_whole.

heads() read only the heading's own later siblings, and #holds() no
longer descended into a wrapper holding just a heading, so in
<section><header><h2>…</h2>…</header><p class=gist>…</p></section>
the whole header folded and the gist showed with no heading, where
the base kept it. heads() now reads forward in document order within
the dial's scope until the next heading of its rank or above, and
#holds() descends into a wrapper whose heading stands. The gist-less
test covers a header-wrapped heading.
With a section folding whole at Skim, a gist-less section after one whose
rest folded drew two ⋯ marks, one at the end of the section before and one
for the folded section, stacked under one gist. The same content written as
flat headings drew one. The dial now groups folded blocks into runs in
document order across the structure it descends into, so each gap in what
Skim shows takes one ⋯, and pressing it unfolds the section's rest and the
folded section together. A run no longer records its container; a run with
nothing kept before it keeps the reader's place by the dial's document.

The ⋯ of a gap that holds a heading now previews the outermost headings it
folds under its "Show the rest" (`lfPreview`), so a skimmer can tell which
sections lie behind it by pointer, Tab or a held finger before pressing.
Writing the names on the page was rejected: Skim shows only the passages the
author chose, and the preview is where a control says what pressing it opens.

`test_a_section_without_a_gist_folds_whole` now asserts three ⋯ for its
three gaps, the names the Cause gap previews, and that pressing it shows
both folded sections. It fails on the previous dial (four marks) and passes
here with the rest of `tests/browser/widgets/test_dial.py`;
`pnpm run check:browser` passes.
…er doesn't need

`skim-carries-the-argument` asks an author to turn a postmortem into a page
with `lf-dial` for a lead who skims it and owes a decision. One judge reads
the h1, lede and gists in order and asks whether they give the failure, its
cost, the cause and the decision; another asks whether the minute-by-minute
timeline and the investigation's method were left without a gist.

On Claude Code, 4 runs per arm, every run using `lf-dial` and reading its
arm's detail author instructions: main (0e538e2) passed the coherence judge
4 of 4 and the skipping judge 0 of 4, giving the timeline and the
investigation a gist every time; this branch passed both 4 of 4. Asked for
"a detail dial" without its name, 5 of 8 authors built their own from radio
buttons and CSS and never read the detail package, so the request names
`lf-dial`.
@max-sixty max-sixty changed the title feat: Fold a section with no gist at Skim, and state Skim's goal to authors Fold a section with no gist at Skim, and tell authors what Skim is for Nov 15, 2026
…reveal listener

The detail example gave every section a gist, Timeline included, though the
author instructions now name a timeline the argument has summarized as a
section to leave without one; so the shipped example never showed a section
folding. Its Timeline paragraph is no longer a gist: at Skim the section
folds behind the ⋯ after the decision, whose preview names "Timeline", and
the page draws 4 marks where main draws 5 (`leaf-dev probe detail --base`).

The dial listened for `lf-reveal` on each folded block, which nothing has
dispatched since #4500 moved travel to `beforematch`; the listener and its
mention in the header are gone.

The `lf-dial` x-instructions now say a page long enough that a reader
might want "only a quick pass", as the author instructions do, and the
author instructions fold the rule for which headings stay at Skim into the
bullet about sections that contribute nothing.
`skim-carries-the-argument` only offered a timeline and the investigation's
method as material a skimming lead doesn't need, which is the example the new
author instructions give, so passing it could mean copying the example. The
postmortem now opens with background on how the EU gateway pool works, and
the skipping judge also fails a gist that summarizes it.

On Claude Code, 4 runs per arm, every author using `lf-dial` and reading its
arm's instructions: main (dd48de4) passed the coherence judge 4 of 4 and
the skipping judge 0 of 4, giving the timeline and the investigation a gist
every time; this branch passed 4 of 4 and 2 of 4. Both failures gave the
timeline a gist saying how long finding the host took. No author on either
arm gave the background a gist: four merged it into the cause's body, three
put it in a closed `details`, one gave it its own section with no gist.
@max-sixty
max-sixty merged commit 1d2cb7c into main Nov 15, 2026
4 of 5 checks passed
@max-sixty
max-sixty deleted the fix/issue-5539 branch November 15, 2026 20:11
max-sixty added a commit that referenced this pull request Nov 20, 2026
…og (#6543)

The detail dial's Skim folded every block the author hadn't marked
`.gist`, so charts, diagrams and screenshots vanished from a quick pass,
though a skimmer often reads a page by its pictures. Skim now keeps
every picture with its caption, and a heading stands over a section
whose only skim content is a picture. A picture is what Leaf already
reads as one for comments (`visualTags`, now exported through
`widget-api.js`): `svg`, `img`, `figure` or a widget declaring `visual`.
On top of that the dial skips HTML's decoration (`aria-hidden`,
`alt=""`) and pictures a widget draws as its own content (`content`
`data`/`empty`). Skim stopped taking each section's first paragraph in
#5588; gists are unchanged here.

| Skim before | Skim after |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/max-sixty/4e43e8d4745c01d0ef3db6f0ab67e86f/raw/22fbfff2f207e50b6d37e59bd975ad8762b066ca/skim-before.png"
width="390"> | <img
src="https://gist.githubusercontent.com/max-sixty/4e43e8d4745c01d0ef3db6f0ab67e86f/raw/22fbfff2f207e50b6d37e59bd975ad8762b066ca/skim-after.png"
width="390"> |

Worth a look: the walk now lays out in place only plain structure, and
keeps whole a line of text (words of its own, or only inline children),
a table, a `details` and a Leaf element, so an open disclosure keeps its
summary and a list item its link and caption. A line is read with the
passage reader's `phrasing` rule, which `widget-api.js` also exports;
`module-reading.md` documents both exports. Nothing inside a closed
`details` counts, since Skim shows nothing Read doesn't.

The detail package page becomes the catalog example `incident-report`,
with a latency chart, listed as "Incident report · Skim, then read"; the
Extending page's Detail card opens it. `leaf-dev site previews` refused
every capture since the panel placeholder's words moved into an inner
span; it now reads the fonts of the element's descendants too. The place
journeys build the report without its chart, the geometry they were
measured on.

Requested by max-sixty. Ran `test_dial.py`, `test_page_holds_still.py -k
dial`, `test_product_page.py`, `pnpm run check:framework` and `leaf page
check` on the example.

> _This was written by Claude Code on behalf of max-sixty_
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.

Skim: state the goal for what it shows, instead of one gist per section

2 participants