Repository navigation
fix: match the floating comment scrollbar to its sent thread - #4686
Merged
Merged
Conversation
The editor used the platform default scrollbar while its sent transcript used a thin, pale thumb. Share the existing treatment across both floating surfaces without reserving a gutter. Refs #4288
max-sixty
added a commit
that referenced
this pull request
Oct 30, 2026
…ate capture as a Generator #4686 launched stills' browser with ignore_default_args, which the test's headless_shell stand-in refused, so all three stills tests failed on main. ty (#4647) asks a @contextmanager to return Generator.
max-sixty
added a commit
that referenced
this pull request
Oct 30, 2026
…ev stills (#4713) `leaf-dev stills` now says which rule is behind each computed-style difference it reports. Under the grouped differences in `styles.txt`, it takes each group's first element and lists the declarations that match it in only one arm, or in a different order, each labelled with its sheet, `@layer`, `@scope` and selector. The declarations come from Chrome's DevTools protocol (`CSS.getMatchedStylesForNode`). Two of the sessions surveyed for #4648 wrote this lookup by hand to find a cause. ## What it shows Replayed against #4637's base (`leaf-dev stills ae2e3f3 --state on-me`, about 2 minutes), it names both causes that session found by hand: ``` html + theme.css @layer lf-base :where(:root) { color: revert; } + theme.css @layer lf-base :where(:root) { font-family: revert; } …lf-options#ar-3ds-choice > form.lf-another.lf-ui + theme.css @layer lf-base lf-options:has(> lf-option > strong) > .lf-another { font: inherit; } ``` It also names a later commit's `:nth-child(1 of :not(.lf-ui, [data-lf-gen])) { margin-block-start: 0 }` behind a paragraph's margin change. Where an element's declarations match on both arms, such as the hidden-widget noise, it says `none: it inherits the difference or reads it from a custom property`. A separate probe read an element inside lf-diff's shadow tree on pr-walkthrough, which is where the `.lf-ui` reorder regression appeared. ## Design - **Declarations, not a winner.** Naming the declaration that wins would take part of the cascade. Shorthands such as `font: var(...)` leave their longhands blank in the protocol, and on top of that it would need logical properties, `!important` across layers, and shadow-tree ordering. Listing what changed, in the protocol's order, avoids all of that, and the reader infers the winner. A declaration that moved shows as a `-` line and a `+` line with the same text. - **Labels stable across arms.** The labels use a sheet's file name, or `constructed`, `<style>` or `user-agent`. Never a URL, since an inline sheet's URL is its document's and includes the arm's port. - **Both arms stay open.** `capture` is now a context manager, so the comparison can read both tabs after `style_changes` has found which elements differ. ## Also here `main`'s stills tests have failed since #4686, which launches the browser with `ignore_default_args`; the test's stand-in for `headless_shell` now accepts launch options. `capture` is annotated as a `Generator`, as ty (#4647) asks. > _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.
The floating comment editor now shares its sent transcript’s thin, pale scrollbar, without reserving a scrollbar gutter. This changes the overflowing draft in both light and dark mode; short drafts and the sent transcript retain their existing treatment.
Added scrolling-draft states to
leaf-dev stillsand stopped that command from hiding native scrollbars at launch. The previous captures concealed the reported defect even when the editor overflowed.Validation: a browser probe’s
scrollbarWidth == 'thin'assertion failed before the change (auto) and passes afterward, withscrollbarGutter == 'auto'. All 697 runtime tests pass, Ruff passes, and the light/dark before-and-after captures were inspected. Reproduce the captures withuv run leaf-dev stills HEAD^ --state triage-composer-scrolling --state triage-composer-scrolling-dark.Screenshot delivery is blocked: publishing the captured pairs to
max-sixty/leaf-assetsreturned HTTP 403, “Permission … denied to leaf-agent.” The bot needs write access there to attach durable visual evidence; no screenshots were committed to this repository.This is a partial repair. The height limit comes from the screenshot’s capture reading region; choosing whether comments may grow outside that boundary remains open. The current gallery reproduction did not reproduce the previously measured horizontal overflow after Send (transcript client and scroll widths both 306 px).
Refs #4288 — automated triage