Skip to content

fix: remove maxHeight: .infinity from InlineDocumentPreview to fix vertical stretching during document writing#25643

Merged
Jasonnnz merged 1 commit into
mainfrom
devin/1776204175-fix-document-preview-stretch
Apr 15, 2026
Merged

fix: remove maxHeight: .infinity from InlineDocumentPreview to fix vertical stretching during document writing#25643
Jasonnnz merged 1 commit into
mainfrom
devin/1776204175-fix-document-preview-stretch

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 14, 2026

Removes the .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) modifier from InlineDocumentPreview that caused the document preview card to stretch vertically to fill the entire chat cell height during document writing/streaming. The HStack already contains a Spacer() that handles horizontal expansion, so both dimensions of the frame modifier were unnecessary — and the maxHeight: .infinity also created the _FlexFrameLayout anti-pattern that #24589 eliminated from 5 other files but missed here.



Open with Devin

…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>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@Jasonnnz
Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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 Jasonnnz merged commit a4135c1 into main Apr 15, 2026
7 checks passed
@Jasonnnz Jasonnnz deleted the devin/1776204175-fix-document-preview-stretch branch April 15, 2026 03:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant