Skip to content

fix: test side comment growth against its window boundary - #4618

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-4568
Oct 28, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-4568

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

The side-comment growth tests still used the floating panel's top as the margin's bottom boundary after #4555 allowed surfaces beside the panel to reach the window foot. This left the fixtures short of the actual growth boundary: the six-line draft stopped at 879px against an expected 834px, and the animation test grew downward while expecting its top to rise.

Position the low passage relative to the window foot and read the available room across the composer's columns with shownWindow({across}). Both tests retain their growth, scrolling, and animation assertions. This changes only the tests and preserves #4555's placement behavior.

Both focused tests reproduce their reported failures before correction and pass afterward at normal speed. git diff --check passes.

Closes #4568
Closes #4569

The margin composer can use the room beside the floating panel after #4555. Position the passage relative to that window foot so six lines actually exercise upward clamping, and check the room across the composer columns. Preserve the growth and internal scrolling assertions.

Closes #4568
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

#4569 has the same stale whole-width boundary as #4568 and belongs with this repair. I reproduced its exact diagnostic on main at 073cd51b2283bbe7d3f58f8beb8527278f8e9890: Shift+Enter leaves top 677 while foot moves 751 → 772. The preparation loop stops at the panel-wide boundary before the margin box actually reaches its own bottom constraint; this is completed downward growth, not unfinished upward placement.

Changing only the foot reading in test_a_side_comment_s_words_and_send_ride_its_edges_as_it_grows to the following makes that test pass, preserving its held-animation samples, edge offsets, and changed-top assertions:

    foot = page.evaluate(
        """async () => {
          const {left, right} = document.querySelector('.lf-fab-bar')
            .getBoundingClientRect();
          return (await window.__lfWidgetApi())
            .shownWindow({gap: 8, across: {left, right}}).bottom;
        }"""
    )

The focused node fails before this correction and passes afterward at normal speed and with --cpu-throttle 6. This preserves #4555's extra room beside the panel. The active review of this PR owns the remaining repair; please include this second affected test and close #4569 with it.

@leaf-agent
leaf-agent merged commit bd481d0 into main Oct 28, 2026
5 of 6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4568 branch October 28, 2026 17:32
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Merged after confirming that both corrected growth tests pass locally and in the terminal CI run. CI's remaining failure was a shift-watch teardown error in the independent pending-margin-reply smoke test: its copy button moved by (485, 14)px. This PR changes only the two growth tests and cannot change that smoke test's runtime path. The intermittent failure is tracked in #4628; no rerun of the CI suite was requested. Landing follows the repository's policy allowing a CI repair with unrelated terminal failures.

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.

Side comment growth leaves its top unchanged after Shift+Enter Side comment remains below the window foot after growing

1 participant