Skip to content

Refresh text-field overflow when draft words shrink - #3095

Merged
leaf-agent merged 2 commits into
mainfrom
fix/ci-38880972663-overflow
Oct 16, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/ci-38880972663-overflow

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Cause

Main CI run 38880972663 failed the WebKit reply-room check: after a long draft became short, Send's room sometimes remained on every line. The field measured equal scroll and client heights, yet its CSS still had 28px of end padding.

Two transitions could leave the layout stale. The host and editor scroller can keep their box heights as the words shrink, so their resize observations miss the changed content height. After the scrolls custom state cleared, WebKit also sometimes retained the old :state(scrolls) padding rule.

Change

Observe the editor's content box, whose height follows the words, and use a data-scrolls attribute for the overflow CSS so clearing it invalidates the style. The committed kernel is rebuilt. This preserves the room after Send while the field actually scrolls and returns it to the last line when the words fit.

Verification

The WebKit long-to-short case failed repeatedly before the complete repair and passed eight consecutive diagnostic runs after it. Its original browser assertion, the paired Chromium case, and the floating-panel long-draft case pass. All 495 runtime tests and pnpm run check pass. The two floating-panel assertion failures from the same main run were repaired by #3094.

The field's host and editor scroller can keep their heights while a long draft is replaced by a short one. Their resize observations then miss the changed scroll height, leaving the scrolls state set and reserving Send's room on every line. Observe the content box, whose size follows the words, and rebuild the kernel.

Behavior protected: a reply's action room returns to its last line after a long draft becomes short.
A content resize can clear the scrolls custom state while WebKit keeps the old :state(scrolls) padding. The field then reserves Send's room on every line despite having no overflow. Use one data-scrolls attribute for the CSS selectors and toggle it only when the measured overflow changes. Rebuild the kernel.

The WebKit long-to-short reply case failed repeatedly before this change and passed eight consecutive diagnostic runs after it; its original browser assertion also passes.
@leaf-agent
leaf-agent merged commit a702948 into main Oct 16, 2026
4 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-38880972663-overflow branch October 16, 2026 12:26
max-sixty added a commit that referenced this pull request Nov 21, 2026
…ale engine claims (#6634)

After #6631, Max asked for a scan for other code made more complicated
by a mistaken assumption. Four scans checked about 78 engine claims in
the runtime, the theme and the packages against Playwright 1.65.2's
Chromium 159, Firefox 159 and WebKit 27.2, each with a minimal repro.
Nearly all still hold. This change acts on the ones that don't:

- **A wrong diagnosis.** #3095 moved the text field's overflow mark to
`data-lf-overflows` because "WebKit retains style from a removed custom
state". In fact WebKit garbage-collects `ElementInternals.states`, after
which `has()` reads a new, empty set while `:state()` still matches. The
field skips a write `has()` says is done, so `:state(more-above)` stayed
on a one-line draft in WebKit on main. The field now holds the set, and
the overflow mark is a state again. The new note records the gap.
- **Gaps engines have closed.** The `::-webkit-details-marker` rules go
(Safari 18.4 made `summary` a list item), as do two notes entries no
code rested on.
- **Corrected records.** Comments and notes that named the wrong engines
or a wrong cause are rewritten with dated evidence.
- **A guard built on a wrong reading of the spec.** A diff header hid a
folder only when its box was narrower than an ellipsis, assuming a box
with room for one draws it. A box's first character is clipped rather
than ellipsed, so Firefox showed `skconfig.py` for `skills/config.py` at
folder widths up to 17px. The guard now measures a wide letter and the
ellipsis.
- A surface grip's hint moves from a `title` to Leaf's preview, as
`browser/AGENTS.md` requires. A screen reader no longer hears it as a
description; the drag has no keyboard route either way.

Codex reviewed the branch and found that two prototypes were wrong: the
preview's workaround for Firefox's stale popover source still reproduces
once a show is held (Firefox 159 and 160.0.1), and dropping a
view-timeline guard would strand annotations in an engine without view
timelines. Both are reverted.

Tests: `test:runtime`, `pnpm run check`, pre-commit, the preview, margin
and diff path browser tests, the comment box test in Chromium and
WebKit, and three floating panel field tests.

> _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.

1 participant