Skip to content

Paint Command Hub's rows at their upgraded size from first paint - #1486

Merged
max-sixty merged 6 commits into
mainfrom
command-hub-first-box
Oct 1, 2026
Merged

max-sixty merged 6 commits into
mainfrom
command-hub-first-box

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

The widget quality check (#1474) found every Command Hub widget changing size between first paint and presentation. This fixes the three whose final size the authored page already settles, each by its cause rather than per widget.

Goal layout keyed on markers the upgrade wrote. lf-command.js stamped data-lf-command-goal and data-lf-command-worker, and the package theme hung a goal's layout on them: a block title, a contained float, and workers shut behind the crew chip. The markers derive from the authored tree, so the theme now selects that tree (lf-command lf-task, lf-task > lf-agent) and the markers are gone. Hiding a goal's workers is scoped to html[data-lf-live], since a reading without the runtime has no crew chip to open them. A package adding its own goal or worker widget to $command.widgets lays it out in its own theme.

Generated parts with no room held for them. Where the authored tree says a part will be drawn, the theme holds its room at the place the upgrade draws it, until it is drawn:

  • an agent's live line, now one line of the row's own type tall, which is also the height a doing clause sets, so a report fills the line instead of growing the row;
  • a worktree's shut head;
  • the chip row of a task outside a command, when it has a non-empty owner, when or tags, or subtasks: one row of chips, under the title or at the top of a task with none. Chips that wrap onto a second row are not held, since how many fit on a line is known only once they are drawn; the base layer's lf-milestone (Give the base layer's widgets their upgraded box at first paint #1484) holds its .lf-chips row the same way. Holding a wrapped row would take either a chip row that never wraps or the server drawing the row, and neither is in this change;
  • a talk goal's composer.

The composer's height lived inside one rule. It is now --lf-compose-h in shadow.css, stated at the root for a widget holding a composer's room, and on each field, so a field whose context sizes its action (lf-options' Add row) still derives its own.

lf-agent, lf-task and lf-worktree leave tests/known_widget_findings.py. lf-command and lf-command-readings stay, with the reason beside them: the readings hold a row per stopped goal and live worker and a tile for quiet ones, and the command model reads those from the log and the clock, which first paint has neither of. The command's worked example gains talk, so the check now covers the composer's held room (turning the reservation off brings back goal-feeders 27→75).

Visible change: an agent row is about 5px taller, because its live line is one line of the row's type. leaf-dev stills shows no other difference.

Also: main's red tab test. Since #1472, test_a_revision_inside_one_tab_keeps_the_tab_set_and_every_other_tab fails on main: a revision that adds a tab rebuilds the page's tab set, and the outgoing set withdrew --lf-root-headers from html before its replacement declared it again, a remove-and-restore the write watch refuses. lf-tabs.js now withdraws the header once the operation that disconnected the set is over, and only if no strip took its place.

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

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 30, 2026 16:59
The widget quality check (#1474) found every Command Hub widget changing size
between first paint and presentation. This fixes the three whose final size
the authored page already settles, each by the cause rather than the widget:

- Goal layout keyed on markers the upgrade wrote. `lf-command.js` stamped
  `data-lf-command-goal` and `data-lf-command-worker`, and the package theme hung a
  goal's layout on them (block title, contained float, workers shut behind the crew
  chip). The markers derive from the authored tree, so the theme now selects that
  tree (`lf-command lf-task`, `lf-task > lf-agent`) and the markers are gone. Hiding
  a goal's workers is scoped to `html[data-lf-live]`, since a reading without the
  runtime has no crew chip to open them.
- Generated parts with no room held for them. Where the authored tree says a part
  will be drawn, the theme holds its room at the place the upgrade draws it, until
  it is drawn: an agent's live line (now one line of the row's own type tall, which
  is also the height a `doing` clause sets, so a report fills the line instead of
  growing the row), a worktree's shut head, the chip row of a task outside a command
  (when it has an owner, `when`, tags, or subtasks), and a `talk` goal's composer.
- The composer's height lived inside one rule. It is now `--lf-compose-h`
  (shadow.css), stated at the root for a widget holding a composer's room and on
  each field, so a field whose context sizes its action still derives its own.

lf-agent, lf-task and lf-worktree leave `known_widget_findings.py`. lf-command and
lf-command-readings stay, with the reason: their readings hold a row per stopped goal
and live worker, and the command model reads those from the log and the clock, which
first paint has neither of. The command's worked example gains `talk`, so the check
now covers the composer's held room.

Visible change: an agent row is about 5px taller, because its live line is one line
of the row's type. `leaf-dev stills` shows no other difference.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 1, 2026
max-sixty and others added 2 commits September 30, 2026 17:22
…ds the set

Since #1472, a revision that adds a tab rebuilt the page's tab set and the
outgoing set withdrew `--lf-root-headers` from html before its replacement
declared it again, a remove-and-restore the write watch fails
(test_a_revision_inside_one_tab_keeps_the_tab_set_and_every_other_tab, red on
main). The outgoing set now withdraws the header once the operation that
disconnected it is over, and only if no strip took its place.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The new lf-task placeholder holds exactly one chip line, but renderChips() creates one chip for each authored owner, when, and tag, and .lf-chips wraps them. In a narrow lf-tasks tree with several of those fields, the generated row occupies two or more lines, so the task and everything after it still move when the widget upgrades. This is the first-box behavior the PR removes from known_widget_findings.py; please cover a wrapping authored row in the check and make its first box match the presented one before removing that finding.

max-sixty and others added 2 commits September 30, 2026 17:52
The placeholder now follows `renderChips`: an empty `owner`, `when` or `tags`
draws no chip, only the first `<strong>` is the title the row follows, and a
task with no title holds the row at its top, where the module prepends it.
The comment says what stays unheld: chips that wrap onto a second row, since
how many fit on a line is known only once they are drawn.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Nested under the shared selector, its :has() read as standing on html to the
check that keeps :has() off the document's roots (test_no_has_rule_stands_on_a_root).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner Author

@leaf-agent on the wrapping chip row: the held row is one line by design, and 2ae62b3 states that in the theme's comment. How many chips fit on a line depends on their drawn widths, which CSS can't know before the module draws them, so no first-paint rule can hold a wrapped row exactly. Holding it would take a chip row that never wraps (clipping or scrolling chips on a narrow window) or the server drawing the row, and each is a change to the widget's design rather than to this reservation. The base layer's lf-milestone holds its .lf-chips row the same way in #1484.

The keeps-first-box entry follows what the check measures: its worked examples now keep their first box, so the known list must drop the entry (the test fails on an entry that no longer occurs). 2ae62b3 also matches the reservation to renderChips (empty attributes, the first <strong> only, an untitled task). Please re-review the current head.

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

@max-sixty
max-sixty merged commit 963e864 into main Oct 1, 2026
5 checks passed
@max-sixty
max-sixty deleted the command-hub-first-box branch October 1, 2026 01:46
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