Skip to content

Agent: share the composer's layout numbers with its transition - #1578

Closed
AnthonyRonning wants to merge 1 commit into
codex-gpuibump-motion-hoverfrom
codex-gpuibump-motion-heights
Closed

AnthonyRonning wants to merge 1 commit into
codex-gpuibump-motion-hoverfrom
codex-gpuibump-motion-heights

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Sixth PR of the stack: three small pieces of the rework that change no behaviour.

Composer layout numbers

The composer's expand transition works out its start and end heights from three numbers the layout also uses:

  • the share of the column the expanded composer takes (0.7),
  • the expand button's size (1.5 rem), which the text row is never shorter than,
  • the empty state's vertical padding while the composer fills its pane (1.5 rem a side).

Each was written twice: once in the layout (.h(relative(0.7)), .size_6(), .py_6()) and once in the transition's arithmetic (* 0.7, rem * 1.5, rem * 3.). A layout change would have left the transition landing a few pixels off, with nothing to catch it. They are now EXPANDED_SHARE, EXPAND_BUTTON_REMS and EMPTY_PANE_PADDING_REMS in chat/composer.rs, read by both sides.

No real sleeps in the motion tests

cached_child_hover_animates_reverses_and_goes_idle waited on real time with thread::sleep. It now advances the pinned clock like the others, and the per-element test clock field it needed is removed. The motion tests no longer depend on how busy the machine is.

The effort slider is a named exception

docs/motion.md and CLAUDE.md said to animate only through ui/motion.rs, which was not true of the effort slider. It is dragged by hand and has springs tuned for that, including an overshoot as the thumb lands. The docs now say so: its tunings stay beside it, outside the tokens, on purpose.

Validation

On macOS, at this head: cargo test -p maple-agent-app --locked with -D warnings: 1,485 passed, 0 failed, 3 ignored, and the repository pre-commit hook passed.

Still open in the rework

  • One shared clip-and-measure element for the places that animate a height (unfolding content, rows arriving, the slot under the transcript).
  • Moving the transcript's and composer's animation state out of render and into the handlers that cause it.

Both change code Matt tuned by eye, so they wait until the builds from this stack have been tried.

🤖 Generated with Claude Code

The composer's expand transition works out its start and end heights
from three numbers the layout also uses: the share of the column the
expanded composer takes, the expand button's size, and the empty state's
padding. Each was written twice, once in the layout and once in the
arithmetic, so changing the layout would have left the transition
landing a few pixels off with nothing to catch it. They are now named
constants in chat/composer.rs that both sides read.

Also:
- The last motion test that slept on real time
  (cached_child_hover_animates_reverses_and_goes_idle) now advances the
  pinned clock, and the per-element test clock it needed is gone.
- docs/motion.md and CLAUDE.md name the effort slider as the one control
  with physics of its own, tuned beside it and deliberately outside the
  tokens.

Co-Authored-By: Claude <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added the ci:package Build unsigned packages on this PR label Nov 11, 2026
@AnthonyRonning
AnthonyRonning removed this pull request from stack #1574 November 12, 2026 03:37
@AnthonyRonning

Copy link
Copy Markdown
Contributor Author

Folded into #1575. The rework of the motion layer (springs and timing, the hover call, the shared composer numbers and the send fixes) is one PR now instead of four. This commit is unchanged and is on that branch.

@AnthonyRonning
AnthonyRonning deleted the codex-gpuibump-motion-heights branch November 14, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant