Skip to content

comment box limited height? #4288

Closed
Closed

Description

@max-sixty
Image

this was on top of an lf-shot image:

  • why didn't it extend upwards? what are reasons we can cap the height so low?
  • the scrollbar looks bad, much worse than when the message sent (but we want to avoid reserving space for a scrollbar
Leaf layer
commit: c75336be6084
dirty: false
installed: 2026-10-25T18:38:31-07:00
revision: 1

separately:

  • we then had horizontal scroll after sending, which I think should never happen

Activity

  1. leaf-agent commented on Oct 26, 2026

    @leaf-agent
    Collaborator

    I reproduced the small editor on the current checkout using the feature gallery’s lf-shot, and found horizontal overflow in the card after sending. I haven’t made a fix: the height constraint needs to be traced to the particular containing region before changing the shared placement rule.

    There are two separate mechanisms here:

    • The floating editor receives a height budget from comment placement. That budget can be the visible reading region rather than the whole window; the frame also reserves the future card’s header and reply rows. In my lf-shot reproduction the frame’s budget was 267 px, leaving a 149 px editor for 702 px of text. A passage-based control grew to a 702 px editor, so this is not a universal small height cap. The region boundary keeps a comment within its reading surface; allowing growth outside it would let the comment cover neighboring content or panes.
    • The editor styles use overflow-y: auto without the thin scrollbar styling the sent transcript has. That explains the styling difference in the screenshot by code inspection. Matching the styles would not require reserving a permanent scrollbar gutter.
    Reproduction and remaining boundary

    Checked at dbdd5ea4b: open the feature gallery, select Page & layout, scroll to #bg-shot, Alt-click the shot, and enter repeated multiline text (Two houses, both alike in dignity, in fair, ve). The short editor persisted after waiting for presentation. Its own width was 292 px with no horizontal overflow. After Enter, the card’s transcript reported clientWidth=294, scrollWidth=300; that establishes 6 px of overflow, but I have not established which descendant causes it or verified the same native horizontal scrollbar as in the report.

    The next investigation needs to identify which region supplies that 267 px budget and whether it is the correct region for the captured image target. lf-shot registers nested image reading regions, while containingReadingRegionFor is supposed to select the body that actually contains the target. Changing that selection or bypassing its boundary without that evidence could alter comment placement in other panes. The horizontal overflow also needs its originating descendant identified rather than simply clipping the transcript.

  2. leaf-agent commented on Oct 29, 2026

    @leaf-agent
    Collaborator

    #4686 fixes the scrollbar styling: the floating editor now shares the sent thread’s thin, pale thumb, without reserving a gutter. The browser assertion failed before the fix and passes afterward; all 697 runtime tests pass. Review and CI are handed to the queued review and landing workflows.

    The height investigation now identifies the boundary: in the gallery reproduction, lf-region:bg-shot:capture is the screenshot’s 305 px image stage. The shared placement rule confines the comment frame to that region, leaving 289 px for the frame and 179 px for its editor. It cannot rise into the free window above because that space is outside the screenshot region. This is the region that actually contains the clicked image, rather than a mistaken selection of an unrelated pane.

    The remaining height choice belongs to @max-sixty: retain containment within each reading surface, or let an image comment grow outside its surface into the window. Containment prevents comments covering neighboring content and panes; lifting it would require changing the shared placement/clipping rule for the draft and its sent card together. The scrollbar repair leaves that decision open.

    The current reproduction also no longer shows the earlier 6 px horizontal overflow after Send: the transcript’s client and scroll widths are both 306 px. That establishes only this gallery case, not the original page’s sent state, so I have not clipped horizontal overflow or claimed that part fixed.

    Visual verification and delivery blocker

    The new triage-composer-scrolling and triage-composer-scrolling-dark states show the overflowing draft before and after the fix. I inspected both pairs. leaf-dev stills was hiding native scrollbars through Playwright’s launch default; the PR removes that default so this defect is visible in future captures.

    Publishing the pairs to max-sixty/leaf-assets failed with HTTP 403, “Permission … denied to leaf-agent.” Durable screenshot delivery needs the bot’s write access to that asset repository. The capture command is recorded in #4686; screenshot binaries were not added to Leaf’s tracked tree.

  3. max-sixty commented on Nov 5, 2026

    @max-sixty
    OwnerAuthor

    Closing as done. All three parts are settled on main: #4686 gave the floating editor the sent thread's thin scrollbar without a gutter; comment placement now stands a comment on a screenshot in the page's flow, so it can grow into the window rather than being capped by the image stage; and the 6px horizontal overflow no longer reproduces.

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions