fix: render mobile image caption (alt text) on desktop clients#41094
fix: render mobile image caption (alt text) on desktop clients#41094bhavik17-ctrl wants to merge 1 commit into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
BHAVIK DATTATRAY SANGALE seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (2)📚 Learning: 2026-03-27T14:52:56.865ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (1)
WalkthroughIn ChangesImageAttachment description/altText render fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/meteor/client/components/message/content/attachments/file/ImageAttachment.tsx">
<violation number="1" location="apps/meteor/client/components/message/content/attachments/file/ImageAttachment.tsx:32">
P1: The `altText` branch incorrectly suppresses `description`. When an attachment has both `image_alt` and `description` but no `descriptionMd`, the new `descriptionMd || altText` condition evaluates to true and renders `altText`, skipping the existing `description` entirely. `altText` and `description` are independent fields and can coexist, so this is a semantic regression.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| return ( | ||
| <> | ||
| {descriptionMd ? <MessageContentBody md={descriptionMd} /> : <MarkdownText parseEmoji content={description} />} | ||
| {(descriptionMd || altText) ? ( |
There was a problem hiding this comment.
P1: The altText branch incorrectly suppresses description. When an attachment has both image_alt and description but no descriptionMd, the new descriptionMd || altText condition evaluates to true and renders altText, skipping the existing description entirely. altText and description are independent fields and can coexist, so this is a semantic regression.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/meteor/client/components/message/content/attachments/file/ImageAttachment.tsx, line 32:
<comment>The `altText` branch incorrectly suppresses `description`. When an attachment has both `image_alt` and `description` but no `descriptionMd`, the new `descriptionMd || altText` condition evaluates to true and renders `altText`, skipping the existing `description` entirely. `altText` and `description` are independent fields and can coexist, so this is a semantic regression.</comment>
<file context>
@@ -29,7 +29,11 @@ const ImageAttachment = ({
return (
<>
- {descriptionMd ? <MessageContentBody md={descriptionMd} /> : <MarkdownText parseEmoji content={description} />}
+ {(descriptionMd || altText) ? (
+ <MessageContentBody md={descriptionMd || altText} />
+ ) : (
</file context>
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit