Skip to content

fix: size the contents map's first box from its toggle's face, and list lf-age's first-paint change - #7189

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-7179
Nov 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-7179

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_bundled_widgets_meet_the_widget_quality_checks has failed in the nightly journeys since #7156. The [default] case failed on lf-toc and the [browser] case on lf-age. Both cases pass with this change.

  • lf-toc (the cause test_bundled_widgets_meet_the_widget_quality_checks: lf-toc's box grows 1-2px at upgrade since #7156 #7179 tracks). Before its outline arrives, lf-toc:empty reserves the closed toggle's height. That reservation hard-coded the label face's leading as var(--lf-t-6) * 1.3 + 14px. Merge 21 theme tokens into the roles they alias or nearly copy #7156 merged --lf-font-label into --lf-font-heading, whose leading is 1.45, so the upgraded toggle (.lf-label) grew taller than its first paint: 29px → 31px in a column page and 28px → 29px in a workspace page. The empty element now takes --lf-font-heading and reserves 1lh + 14px, which is the toggle's line plus its padding. The first box and the toggle now read one token, so a later change to the face can't pull them apart again. On screen, the closed contents toggle's first-paint box is about 2px taller, the height the toggle already has once upgraded. Nothing else moves.
  • lf-age. This failure was also in scheduled run 45598918111, and no cause issue owned it. An age first paints the words its author wrote, such as "24 Nov, 02:10 UTC", until the runtime defines the element and draws the computed age, such as "1d ago". Its registry entry already tells authors that an age changes width and how to reserve its room. So this is the kind of content-derived startup change known_widget_findings.py exists to list, and it joins that list under browser.

Verification: at 32dc564a8, uv run pytest tests/journeys/test_widget_quality.py --run-nightly fails on both findings. On this branch the file's 19 tests pass. tests/browser/widgets/test_contents_and_glosses.py and the theme and font model tests also pass.

Closes #7179 — automated triage

lf-toc:empty reserved the closed toggle's height with the label face's
old 1.3 leading. #7156 merged --lf-font-label into --lf-font-heading,
whose leading is 1.45, so the upgraded toggle stood 1-2px taller than
its first paint. The empty element now takes the toggle's face and
reserves 1lh plus the toggle's padding, so the two boxes read one token.

The same test also reported lf-age, which first paints the author's
words and then the age the runtime computes. That is the content-derived
change lf-age's registry entry already tells authors to plan for, so it
joins the known findings.

Closes #7179
@max-sixty
max-sixty merged commit c38f92c into main Nov 25, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/issue-7179 branch November 25, 2026 18:27
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.

test_bundled_widgets_meet_the_widget_quality_checks: lf-toc's box grows 1-2px at upgrade since #7156

2 participants