Repository navigation
Give a workspace the window, with working density as a style - #1697
Merged
Merged
Conversation
A workspace now fills the window: no wide-page cap, 12px gutters, and a header row the size of its content. Its grid of panes is one frame split at hairlines, so the Layout says how panes meet and the page only where they stand; the examples, fixtures and samples drop their own gaps. Type is no longer the Layout's. `density-working`, in the kernel theme, restates the type ladder, spacing scale and flow margins for any block that takes the class, and sets `--lf-density: working`, which `lf-options` reads with a style query to draw a titled option as a row. No widget or Layout names the other. The workspace title is the theme's h1, and the workspace examples, the authoring template and the docs sample take the class. Tests: the root-workspace test now asserts the workspace is wider than the wide page's frame instead of equal to it, and holds the header to one row without fixing the title's size. The test that a pane beside the standing rail pins its rows is deleted: a workspace now fills the window, so no rail stands beside one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1614 moved the full-height Ask rule onto the scope root, `:scope:is(lf-ask)`, under `@container style(--lf-full-height: 1)`. `--lf-full-height` inherits, so that query holds for every Ask anywhere in a workspace, and every Ask held in a pane became a flex column: alert-review's Asks lost their margin collapsing, and the options track's floats stopped applying, putting the canary Ask's options 200px below its chart instead of beside it. Only the Ask that is main's child is the workspace's body, so the rule names it as `:scope:is(main > lf-ask)`; inside the scope, `:is()` reads the ancestor outside it. The document-flow test now also holds an Ask in a workspace pane to block flow; it fails with the broad selector. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The three tests main marked for bb629cf's nested full-height Ask pass once an Ask inside a workspace pane keeps block flow: alert-review's render gate, the side-list queue's pointer press, and an answered card's badge seats. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
alert-review stacked all fourteen alerts in one scrolling pane, against the authoring guide's own queue form. It is now one `lf-tabs list="side"`: the list is the queue, with each alert's verdict and real/pages count as its summary, and one alert opens beside it with its decision in view. The lede moves to the footer. The render gate's advice for a workspace region that runs past its room now counts the open Asks the region holds, and where it holds more than one, names the side-list queue rather than trimming, so a page drifting back to a stacked queue hears the form it should take. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review fixes on the workspace density work: - A pane's insets are tokens (`--pane-bar-pad`, `--pane-inset`) that the zero-specificity pane rules read and `density-working` restates, so a package that restyles a pane body, as visual review's case list does, keeps its own padding under the density. - The workspace's hairlines are drawn by the panes (a 1px ring each, meeting in the grid's 1px gap) rather than by painting the grid in the rule colour, which showed as a solid band in an empty cell or in a wider gap a page set. The test harness's side-by-side grid drops its gap. - `--lf-key-badge-size` is declared again under `density-working`, since a property derived from the ladder at the root resolves there. - The workspace leaves the wide-page rule instead of being reset after it, and an option's title form and row form each sit under their own density predicate rather than one overriding the other. - The docs, the authoring reference and the playground and visual-review templates describe the uncapped workspace and take the class. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The one-row header case now also asserts that main takes density-working, which the workspace template writes. Against main it fails on both hosts; on this branch it passes on both. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 4, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The overflow advice can misclassify an existing tab queue because it counts hidden Asks.
The published-workspace test read only pane bodies, so alert-review, whose body is now a side-list queue with no pane, had none to read. It now reads each region the workspace scrolls: a pane's body, or the body itself where that is not a pane. The visual review's external-link mark is sized to its link's words, so the test holds it to the link's text size rather than to 12px, which working density's smaller links no longer reach. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A side-list queue's closed items hold open Asks too, so a region that already is the queue counted them and was told to become one. The count now takes only Asks the page shows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # README.md # leaf-assets.json
leaf-agent
previously approved these changes
Oct 4, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 4, 2026
This was referenced Oct 4, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 4, 2026
This PR finishes keeping Layout and style apart, as #1697 set out. A Layout says where boxes stand and how large they are, and the theme owns type. Two rules still crossed that line, and both move to their owners. Neither changes what a page looks like. - **The column's margin postures move to `layouts.css`.** These rules say where the column's first sidebar, a contents map and a sidenote stand beside the column: geometry keyed on `main.layout-column`, which sat in the kernel `theme.css`. They now sit in the column Layout, with the comment that explains them. The theme keeps how a sidebar and a sidenote look. - **The wide page's title size moves to the theme.** The wide Layouts set their title's size in `layouts.css`. Now they set only `--lf-wide-page: 1`, and the theme sizes the title with a style query on it, the same way widgets read `--lf-full-height`. **Checked.** - The title's computed size, weight and line height are identical to `main` on a column page and a sidebar page. - The margin, page and render-gate tests pass (568), and every example passes the render gate (27). > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 4, 2026
On a wide window, an Ask built around a figure now sets its options beside the figure, so the question, its evidence and every option fit in one window. Stacked, they outran it: alert-review's canary decision put its options under a 200px chart, below the fold. This settles the TODO entry "Fit an Ask and what it turns on into one window", which the PR removes. **The options track** (default package `theme.css`). - **Which Asks take it.** An `lf-ask` whose first child is a heading, which holds a figure (`figure`, `img`, `svg`, `table`, `lf-chart`, `lf-shot`), and whose last child is one `lf-options`. The form comes from the markup, with no attribute. - **The track.** Where the Ask is at least 50rem wide, its context floats in a column at the start, and the options stand in a track at the end, under the heading. Below that width it stacks as before. - **The Ask is the container.** The Ask is the size container its children query. It resolves the page's room (`--lf-room`) once and hands it on, so a breakout inside it still measures the shell rather than the Ask. - **Margins.** The Ask takes its heading's start margin, so the space above it collapses as the heading's did. That margin is set at zero specificity, so a frame that trims its first block's margin, such as a tab panel, trims it too. - **Bound to the Ask that qualifies.** The qualifying Ask sets a non-inheriting `--lf-ask-track: 1`, and each track rule asks its parent with a style query. An ordinary Ask held among the evidence or inside an option finds the same named container, but its children's parent never sets the marker, so they keep their own flow. Unbound, those rules also kept the feature gallery's upgrade from settling. - **Cards in a narrow group.** Titled options become rows at working density only where their group is at least 30rem wide (#1697). A row in the 16rem track broke the titles around their chips, so the track keeps cards. **alert-review.** Each alert's evidence (facts, prose and, for three alerts, a chart) moves inside its Ask, so the canary decision's options stand beside its chart in the open tab. **Authoring.** `authoring-asks.md` describes the form. `record-asks-hold-their-premise` and `record-asks-hold-their-table` gain an assertion that an Ask built around wide evidence takes `data-width="wide"`. The feature gallery adds an options-track example beside the width examples. **Tests.** `test_an_ask_framing_a_figure_sets_its_options_beside_it` sets an Ask's options beside its table at 1440px, stacks them at 700px, and keeps a nested ordinary Ask in block flow; it fails on unbound rules. The Ask and options tests pass, and every example passes the render gate locally (the gate runs nightly, not in this PR's `test` job). An ordinary two-part Ask, including one in a workspace pane, keeps block flow. `test_dragging_an_edge_preserves_user_state` errors on this branch as it does in main's last full run. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 4, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 4, 2026
The workspace-density round (#1697, #1722, #1724) settled three owners that never read each other: a Layout (`layouts.css`) places boxes, a style (the kernel `theme.css`) sets type, spacing and form under a class such as `density-working`, and widgets and chrome read only their own box and the theme's tokens. Nothing wrote that down. - `skills/leaf/assets/AGENTS.md` states the three axes and the one way they meet: the owner sets a token saying what the box is (`--lf-full-height`, `--lf-wide-page`, `--lf-resident`, `--lf-density`), and the reader keys on it with a style query. - `skills/leaf/references/packages.md` tells widget authors the same. - A Layout takes the room between boxes from the theme's spacing tokens, so `density-working` tightens a sidebar's or tiles' gaps with everything else; the contract says so. - `test_layout_style_and_widgets_never_read_each_other` fails when a Layout class is named outside `layouts.css`, a style class outside the kernel theme, or `layouts.css` sets type. Planting each violation fails it. - `TODO.md` keeps the round's last proposal, a visible active pane and a key to move between panes, under Etc with its trigger. - `content-layout.js` comments named `theme.css` as `--lf-resident`'s home; #1722 moved it to `layouts.css`. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 5, 2026
… lists (#1759) Commits kept editing these tests to add a class or ring name to a list, or to follow a product control the test had borrowed. The coined-class test alone was edited 17 times since Sep 14 and failed on main in 5 runs with "widen the exception on purpose". Each test now asserts the property the list stood for. ## Changes - **`test_a_coined_class_cannot_reach_the_chromes_rules`**: drops both hand-written class lists (~75 names). It still checks that an element wearing every class the chrome's `@scope` rules name renders exactly like its unclassed twin. The classes shared with document-level rules are now read from the stylesheets, not listed. Fault control: widening the scope root to `(.lf-chrome, main)` fails it. A private rule moved outside `@scope` still fails it: the classes chrome rules may name outside the block are declared at their owner, `chromeSharedClasses` in `runtime/stylesheets.js`, and the test refuses any other class there, and any declared class no such rule names. Fault control: moving `.lf-live` outside `@scope` fails it. - **The three `test_the_ring_reading_sees_*` tests**: each now plants its ring shape on a two-line page (`RING_PROBE_PAGE`). Before, each borrowed a product control (thread card → run heading → thread title), and every move broke it. The inset case widens the ring to 4px, because a one-pixel step into a 2px band comes down to rounding. A separate fault in `focus_rings.js` fails each one. - **The ring census, renamed `test_each_sampled_focus_ring_is_shown_whole_in_its_surface`**: drops the requirement that every declared ring name have a sample, the list every new ring had to join. It keeps the rule that every rule drawing the ring names it with `--lf-focus-ring`. It also fixes a sample that timed out on main every run since #1697: the wt-merge pane no longer scrolls at 1200×700, so that sample is now read at 1200×600. Fault control: a 6px `outline-offset` on the version row fails with the ring cut outside the menu. - **`test_every_base_corpus_tab_stop_has_a_visible_focus_indicator`**: kept, since it already states a property. It now makes one browser round trip per Tab stop instead of two (~590 stops). Fault control: removing `.lf-status-button`'s ring fails the walk. - Comments in `theme.css`, `shadow.css` and `thread-list.js` now name the ring samples instead of the old "corpus floor". ## Timing These local times were taken under heavy machine load (load average 170–310), so they only compare roughly: - the coined-class test: 16 s → 4.5 s - the ring-reading tests: 26/15/8 s → 17/3/3.5 s - the census: about the same - the Tab walk: 122 s on CI → 132 s locally > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 6, 2026
…advice test #1697 made alert-review show one alert's decision at a time, so its 6890px detail-pane overflow is gone. Rerunning page check --render on main shows the queue 106px over at 720-1920px and rust-sort's stage pane 100px over at 720px; the fixture test still asserts only gate failures. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A workspace is meant to be a screen you work in, like a terminal: the window is the workspace's, the reader operates it rather than reading down it, and they see one item at a time instead of scrolling. This makes the layer behave that way, and it keeps three things apart while doing it: the Layout, the style, and the widgets.
The three axes. The Layout (
layouts.css) says only where boxes stand and how large they are. Style (the kerneltheme.css) holds type, spacing and form as tokens under a class any block can take. Widgets and chrome read their own box's geometry and theme tokens, never which Layout holds them.What changes
layouts.css). The 1600px cap and the wide page's growing gutter are gone: there's a 12px gutter and a header row as tall as its content. At 1920×1080, alert-review's panes go from 1,472px across to 1,894px. The workspace leaves the wide-page rule altogether, and its title is the theme'sh1.layouts.css). A page's grid of panes is one frame. Each pane draws a 1px ring in place of its own border and corners, so neighbours meet at a single hairline in the grid's 1px gap. The Layout now owns how panes meet, so the examples, fixtures, test harness and authoring samples no longer write their owngap.theme.css)..density-workingrestates the type ladder, the spacing scale, the flow margins, the pane insets and the key-badge size for any block that takes the class.--lf-density: working. Pane insets are now tokens (--pane-bar-pad,--pane-inset), so the zero-specificity pane rules stay at zero specificity and a package's own pane padding still wins.class="layout-workspace density-working".lf-optionsreads--lf-densitywith a style query: at working density a titled option is one row, title then consequence, with chips at the end. Each form sits under its own predicate. On alert-review an option goes from 115px to 43px tall.examples/alert-review.htmlstacked fourteen alerts in one scrolling pane. It is now onelf-tabs list="side", the queue form the authoring guide already prescribes.--lf-full-heightinherits, and it collapsed alert-review's options to 2px. The rule now matches only an Ask that ismain's own body. This removes three xfails main carried for that bug: alert-review's render gate, the side-list queue's pointer press, and an answered card's badge seats.Tests and evals
workspace-header-is-one-rowgains atakes-working-densityassertion. Scored against main (one run per host and arm):takes-working-densityfails on main and passes on the branch on both Claude Code and Codex, and every other assertion in that case passes on both arms.queue-is-a-side-listpasses on all four arms.workspace-stacks-where-the-layout-flowsfails its judgment on Codex in both arms and passes on Claude Code in both, so it is unchanged.The catalog previews are refreshed for the uncapped workspaces.
Not in this PR: the column's margin rules (sidebar, sidenotes, contents map) are Layout geometry that still sits in the kernel
theme.css, and the wide pages' larger title is still set inlayouts.css.🤖 Generated with Claude Code