feat(web): files sent without text show as file cards#27324

merged1
main
t3/file-attachment-cards
opened1d agobyMmaria
View on GitHubTwo-way sync enabledPR last imported 18h ago

Stacked on #27306.

A file sent without words (a PDF, a code file) showed as a bubble holding only a small name chip, the same "bubble around a label" problem image-only messages had.

Files sent without text now show as file cards: an icon tile, the name, the type and size, a click target that opens the existing preview, and the existing download button. Files sent with text keep their inline chips, since the chip's position in the sentence carries meaning. Voice notes keep their inline player.

A PDF sent alone, before (left) and after (right)

Verified in the web dev app by sending a PDF alone through the real composer (before left, after right), plus a code file with text and a voice note alone, which are unchanged. check:changed passes.

Not covered: mobile.

Reviewed with sol-loop: 1 round, gpt-6.1-sol at xhigh plus Opus 5.5 at high. Both findings fixed in c831e5f: cards keep the copied file reference, and a chip whose file isn't attached stays visible.

Opus 5.5 via Claude Code in T3 Code

Checks

1 failing · 24 successful · 14 skipped
Some checks failed

Failing1

73f9c51
Synced from GitHub

Approvability

Verdict: Approved at 73f9c51

Macroscope's review found this PR approvable — File-only messages now display as cards while reusing existing preview and download behavior. The change is confined to presentation, with text-bearing and mixed-media messages retaining their existing rendering.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for a531068.

This comment will update automatically after the next completed run.

Added 1 commit

  • feat(web): files sent without text show as file cards73f9c51
Synced from GitHub

Review in Change Stack →

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.