Repository navigation
Agent: share the composer's layout numbers with its transition - #1578
Closed
AnthonyRonning wants to merge 1 commit into
Closed
AnthonyRonning wants to merge 1 commit into
AnthonyRonning wants to merge 1 commit into
Conversation
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>
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. |
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.
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:
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 nowEXPANDED_SHARE,EXPAND_BUTTON_REMSandEMPTY_PANE_PADDING_REMSinchat/composer.rs, read by both sides.No real sleeps in the motion tests
cached_child_hover_animates_reverses_and_goes_idlewaited on real time withthread::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.mdandCLAUDE.mdsaid to animate only throughui/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 --lockedwith-D warnings: 1,485 passed, 0 failed, 3 ignored, and the repository pre-commit hook passed.Still open in the rework
renderand 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