Repository navigation
Agent: stop the thread jumping when a message sends - #1582
Closed
AnthonyRonning wants to merge 1 commit into
Closed
AnthonyRonning wants to merge 1 commit into
AnthonyRonning wants to merge 1 commit into
Conversation
Recording a multi-line send against a real backend and stepping through the frames showed two jumps, and the composer's move between a new task and a conversation read as lag. - The sent message's row never took over from its bubble. The hand-off was keyed by the id the event names, but the transcript files a row under its view key, and a real host's rows have one. The row entered as a new row, faint and growing from nothing, on the frame its bubble vanished, so the thread dropped and climbed back. The hand-off now uses the view key. The tests passed because their rows carry no identity; a new test sends one that does. - Sending from a composer several rows tall dropped the thread first. The composer emptied at once while the bubble's slot opened from nothing. The slot now opens from the height the composer gave up, so the newest row holds still on the send frame and then only moves up. Clearing the field now also resets its eased height on purpose. - The composer changes place at once between a new task and a conversation. Where the user types is not something to animate. 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.
Seventh PR of the stack. It fixes what showed up when the motion was used against a real backend: two jumps when a multi-line message sends, and a composer move that read as lag.
How it was found
A multi-line send in the top-of-stack build was screen-recorded and stepped through frame by frame. Two bursts of movement stood out, each lasting a few frames.
What was wrong, and the fix
1. The sent message's row never took over from its bubble. The motion work hands the bubble off to the real row so the row appears where the bubble was. That hand-off was keyed by the id the event names. The transcript files a row under its view key (
timeline_view_key), and a real host's rows have one, so the ids never matched. The row entered as a brand-new row, faint and growing from nothing, on the same frame its bubble vanished: the thread dropped, then climbed back.The hand-off now uses the view key. The existing tests passed because their rows carry no identity, so both ids were the same string; a new test sends a row with a live identity and failed before the fix (the row started 41 px below the bubble).
2. Sending from a tall composer dropped the thread first. The composer emptied at once, giving up several rows, while the bubble's slot opened from nothing. For one frame the thread fell into the gap, then glided back up as the slot opened.
The slot now opens from the height the composer gave up. The newest row holds still on the send frame and then only moves up, by what the bubble needs beyond that. Clearing the field also resets its eased height on purpose now, so a send always empties it on that frame.
3. The composer's move between a new task and a conversation is instant. It used to glide over 200 ms on the first message, on opening a task from the empty state, and on New Task. Where the user types is not something to animate, so that glide and its state are removed.
Validation
On macOS, at this head:
cargo test -p maple-agent-app --lockedwith-D warnings, and the repository pre-commit hook. New tests:Not verified
The fixes have not been watched in a running app yet. The recording that found the bugs should be repeated on a build of this PR.
🤖 Generated with Claude Code