Repository navigation
Check retained drawing scroll within its sent viewport - #2284
Merged
Merged
Conversation
The sent card can wrap fewer lines than the draft after the shared response styles. Keep the user scroll offset when available and accept the browser native clamp when the new text viewport is shorter.
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.
The sent drawing card can wrap fewer lines than its draft editor at phone width. In the nightly main CI run, the editor's 1227px scroll offset exceeded the sent text's 921px maximum, so the browser correctly clamped it. The existing check required the impossible absolute offset.
The check now verifies that sending keeps the draft's scroll offset where the sent text can hold it and otherwise lands at the sent text's scroll limit. It continues to check that the drawing reference remains outside the text viewport and visible after resizing. All four desktop/phone and short/scrolled variants pass locally (
uv run pytest -q -n 2 tests/test_render_drawing.py::test_sent_drawing_keeps_its_reference_outside_the_retained_text_viewport). This reflects the shared response layout in PR #2252 while keeping the user's reading position under native scroll behavior.