fix: remove maxHeight: .infinity from InlineDocumentPreview to fix vertical stretching during document writing#25643
Merged
Conversation
…ed vertical stretching The .frame(maxWidth: .infinity, maxHeight: .infinity) modifier caused the document preview card to expand to fill all available vertical space proposed by the parent chat cell during document writing/streaming. Remove the entire frame modifier: - maxHeight: .infinity was the direct cause of the stretching bug - maxWidth: .infinity was redundant (HStack already contains a Spacer()) - Both created _FlexFrameLayout, the anti-pattern PR #24589 eliminated from 5 other files but missed here Co-Authored-By: Jason Zhou <jasonczhou3@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Jasonnnz
approved these changes
Apr 15, 2026
Jasonnnz
added a commit
that referenced
this pull request
Apr 15, 2026
…ed vertical stretching (#25643) The .frame(maxWidth: .infinity, maxHeight: .infinity) modifier caused the document preview card to expand to fill all available vertical space proposed by the parent chat cell during document writing/streaming. Remove the entire frame modifier: - maxHeight: .infinity was the direct cause of the stretching bug - maxWidth: .infinity was redundant (HStack already contains a Spacer()) - Both created _FlexFrameLayout, the anti-pattern PR #24589 eliminated from 5 other files but missed here Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jason Zhou <jasonczhou3@gmail.com>
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.
Removes the
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)modifier fromInlineDocumentPreviewthat caused the document preview card to stretch vertically to fill the entire chat cell height during document writing/streaming. TheHStackalready contains aSpacer()that handles horizontal expansion, so both dimensions of the frame modifier were unnecessary — and themaxHeight: .infinityalso created the_FlexFrameLayoutanti-pattern that #24589 eliminated from 5 other files but missed here.