Repository navigation
fix(thread): the list's end holds the typing / working line's slot - #5168
Merged
Merged
Conversation
Composes the production ThreadMessagesList parked at the newest message (anchored on it, and following the latest), shows and hides the line, and checks the list ends where the line starts. Red on main: the line floats over the list's end. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…mposer
The line ("Niko is typing…", "1 agent working here") floated over the end of
the message list, on a solid band of the list's end fade. The list made room
for it with a taller last row once the typing state arrived; when the
conversation was opened on a message, the reading anchor keeper saw a row
change height without a scroll and put the anchor back, leaving the newest
message's last line under the band.
The line is now a layout sibling under the list viewport, so the list ends
where the line starts and its geometry needs no knowledge of it. Removed with
it: the extra list-end height, the solid band of the end fade, the jump
pills' bottom padding and select-to-here's bottom occlusion. Still hidden
while Generate image captures the list.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…instead The row made the whole list move by a line whenever the typing / working line came or went. Back to main's floating line; the regression test now checks that the newest message is clear of the line and does not move when the line shows or hides, and that the initial bottom anchor holds on its first attempt with the line already showing. Red on main's code; the fix follows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The line above the composer ("Niko is typing…", "1 agent working here")
covered the last line of the newest message on entering a conversation
(Android 1.27.0). The list's last spacer row was 16dp and grew to 46dp only
while the line showed, after first layout, while every scroll owner parked
the newest message with a constant 16dp trailing padding; the row changing
height also moved the messages and gave the reading anchor keeper something
to put back.
The spacer row is now always the full end (16dp + the line's 30dp slot),
and the scroll owners' trailing padding reads the same constant,
ThreadBottomSpacerAndAnchorTrailingHeight: the initial-anchor check, the
focused-tail fit and the RenderedBottom anchor. The line still floats over
that slot on the end fade's solid band while it shows. The jump pills sit
above the slot whether or not the line shows, so they do not move either.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… taller end The six assistant.panel.* captures host the real message list: its rows sit 30dp higher now that the list's end always holds the typing line's slot. Recorded by CI (test.yml record_screenshots=true, run 44777727374). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… composer The list's taller end is for the typing / working line, so it belongs only to conversations that can show the line. One condition, RaftThreadScreenPayload.agentTypingLineCanShow (showComposer, joined, not archived), now decides both the line itself and its slot; the timeline slice carries it and the list resolves the end's height once (threadBottomSpacerAndAnchorTrailingHeight) for the spacer row and the scroll owners. A channel previewed without joining or an archived one keeps the plain 16dp end and no longer shows the line. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
Author
|
New failure in post-merge full tests: workflow Newly failing:
It could be any of PR 5160, PR 5162, PR 5164, PR 5165, PR 5167, PR 5168, PR 5169, PR 5170 and 14 more. Please fix. See logs: |
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.
Problem
Android 1.27.0: on entering a channel, the line above the composer ("1 个 Agent 正在这里工作") covered the last line of the newest message.
The line floats over the end of the message list, on a solid 24dp band of the list's end fade. The list's last spacer row was 16dp and grew to 46dp only while the line showed, which is after first layout (the typing / working state arrives late). Every scroll owner parked the newest message with a constant 16dp trailing padding (the initial-anchor check, the focused-tail fit, the RenderedBottom anchor), so the spacer and the anchors disagreed by 30dp whenever the line showed. The row changing height also moved the messages and gave
ThreadReadingAnchorKeeper(#5067, new in 1.27) a height change to put back.Fix
The list's end holds the line's slot in every conversation that can show the line, whether or not it shows.
threadBottomSpacerAndAnchorTrailingHeight(typingLineSlot)is 16dp + the 30dpThreadAgentTypingListEndHeightwith the slot, 16dp without. The list resolves it once and uses that one value for its last row. The conditionalagentTyping != nullterm is gone, so the row never changes height with agent activity: nothing moves when the line comes or goes, and the keeper has nothing to undo.typingLineSlotisRaftThreadScreenPayload.agentTypingLineCanShow():showComposer && joined && !channelArchived, carried on the timeline slice asagentTypingLineSlot. It reads the conversation's own flags only, not access resolution or write authority, which are false for a moment on every open and would change the end right after first layout.rememberThreadAgentTyping. It wasshowComposeralone, which no production code sets to false. So a channel previewed without joining and an archived channel no longer show the line; otherwise the line would float over a 16dp end there.initialBottomAnchorTrailingPaddingPxis derived from it and feeds the initial-anchor check, both focused-tail fits and, through the fit's trailing span, the RenderedBottom anchor. With the slot, the newest message at rest ends 46dp above the list's edge in every path, 22dp above the line's top.main.Per consumer of the old conditional height:
selectToHereBottomOcclusionPx: unchanged, still follows the line being visible. It only decides which rows count as visible and moves nothing; without the line, a row scrolled into the bottom 24dp really is visible.threadShareCaptureSlice), so the spacer row is never in the image and the taller end adds no blank band.Accepted cost: about 30dp more blank between the newest message and the composer when no agent is typing or working, and the pills 24dp higher then. Conversations without a composer keep the plain 16dp end.
The condition can change for one open conversation: joining a previewed channel (16dp to 46dp) and a channel learned to be archived from the canonical load (46dp to 16dp). The newest message then moves by 30dp once, in the same moment the footer under the list changes (join footer to composer, composer to archived banner).
The first version of this PR made the line a layout row under the list. That is reverted (
d4c90d15): a row moves the whole list by a line whenever the line comes or goes.Tests
ThreadAgentTypingLineLayoutUiTest(Robolectric, the productionThreadMessagesList, bottom-up):result=anchoredwith noresult=retry;result=anchoredwith no retry on the plain end, and after joining the newest message ends exactly 30dp further from the list's edge.main's code (headd4c90d15, run 44769616521, the first four cases): both toggle cases fail on "the newest message moved when the line showed", and the initial-anchor case fails on "the initial anchor retried". The focused-entry case with the line already showing passed onmain's code, and the anchored toggle case failed on the move, not on the overlap, so this harness does not reproduce the reported overlap itself.ThreadAgentTypingTest: the condition, its copy on the timeline slice, and the two heights (46dp, 16dp).ThreadChannelOpenSettleTesttakes its padding row from the production function.assistant.panel.*goldens re-recorded by CI (test.ymlrecord_screenshots=true, run 44777727374): the panel hosts the real list, whose rows sit 30dp higher.Not covered: no device, iOS or desktop run; no real IME; share capture is not exercised by a test.
🤖 Generated with Claude Code