Repository navigation
Refresh text-field overflow when draft words shrink - #3095
Merged
Merged
Conversation
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.
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_
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.
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
scrollscustom 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-scrollsattribute 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 checkpass. The two floating-panel assertion failures from the same main run were repaired by #3094.