Skip to content

test: credit a margin card that grows down to the window's foot and rises in one frame - #6281

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-6278
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-6278

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

A margin card beside its subject holds its top and grows down, and once it meets the window's foot the foot lifts it (thread-preview.js header, rises). An answer long enough to do both in one frame grows the card's foot down to the window's foot and lifts its head by the rest. On the release-notes shot at 1440×900 that is 256px of growth: the foot moves 234px down and the head 22px up. The shift watch credited a standing port's growth in two cases only: foot growth with the head still, or a head rise with the foot still. So it reported the reply row's move with the foot as moved without input. The card does what its contract says. The watch was missing this one combination.

appendGrowth in tests/shift_watch.js now lets a port declaring data-lf-rises rise at its head and grow at its foot in the same frame. The rise plus the foot's growth must come to no more than the append growth. The stand above the port has to match both the rise and the foot's growth. Holdings are still read net of the rise, so a control below the growth is credited growth − rise and nothing more.

Verification:

  • test_append_growth_may_grow_a_standing_port_down_then_raise_it (new, in test_render_shift_watch.py) errors on the old watch and passes on the new one. Its fault cases still report a port that grows past its growth and a control that moves further than the carry. The existing test_append_growth_may_raise_a_port_standing_on_its_foot cases pass unchanged.
  • test_a_card_grows_past_a_region_that_does_not_scroll_its_subject now gives the agent a 12-sentence answer instead of 8, so a card beside the shot grows past the window's foot. With the old watch both shot variants report the 234px move. With the new watch all three variants pass.
  • The append, rise and standing tests in test_render_shift_watch.py pass (39). So do the growth, rise, answer and foot tests in test_render_send_placement.py (15).

Once this lands, #6272 can put its screenshot back where it was, so that test covers the window's foot again.

Closes #6278 — automated triage

…ises in one frame

A margin card beside its subject holds its top and grows down; once it meets
the window's foot, the foot lifts it (thread-preview.js, `rises`). An answer
long enough to do both in one frame grew the card's foot down to the window's
foot and lifted its head by the rest. The shift watch credited a standing
port's growth only as foot growth with its head still, or as a head rise with
its foot still, so it reported the reply row's move with the foot (234px on
the release-notes shot) as moved without input.

The watch now lets a port declaring `data-lf-rises` rise at its head and grow
at its foot in the same frame, the two together no more than its append
growth. A new watch test covers that case, and still reports a port that grows
past its growth and a control moving further than the carry.
test_a_card_grows_past_a_region_that_does_not_scroll_its_subject now gives the
agent a 12-sentence answer, so a card beside the shot grows past the window's
foot and the test covers that path.

Closes #6278
@max-sixty
max-sixty merged commit 5c695e4 into main Nov 17, 2026
6 checks passed
@max-sixty
max-sixty deleted the fix/issue-6278 branch November 17, 2026 08:42
max-sixty added a commit that referenced this pull request Nov 17, 2026
…e window's foot (#6311)

Puts the card-growth test's release-notes screenshot back where
`scroll_into_view_if_needed` leaves it, so the grown card again reaches
the window's foot and rises, the case the test's docstring names.

#6272 moved the shot to the window's head to keep the card off the foot
while #6278 was open. #6281 then fixed the shift watch for a card that
grows to the foot and rises in one frame, and lengthened the answer to
reach it, but the moved shot kept the card clear, so the foot case went
untested. With this change the grown card stands in the window's plane,
its foot at the window's foot and its top above where it opened, and all
three cases pass.

Max asked to check the follow-up to #6278 and fix it where it mattered.

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

Margin card jumps into the window's plane when an answer grows it past the window's foot

2 participants