Skip to content

Hide generated paste filenames on bot comment images - #51105

Merged
brennanb2025 merged 4 commits into
mainfrom
brennanb2025/bot-image-paste-label-678
Nov 28, 2026
Merged

brennanb2025 merged 4 commits into
mainfrom
brennanb2025/bot-image-paste-label-678

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When you paste an image into a bot item comment, the image shows without a long generated filename underneath on desktop and phone. A filename supplied with the image still appears when the comment shows captions.

What Changed

The desktop and phone comment renderers use the shared native chat paste-name detector for captions and preview labels. It recognizes generated timestamp-and-UUID names and older timestamp-only PNGs. Other names that share the prefix retain their labels.

Why

A clipboard image gets an internal name when saved. The comment card was showing that name as a caption and using it in the image viewer.

Linked Issue

Maintainer-reported bot item.

Visual Proof

Before and after

Before

Generated filename below the pasted image

After

Pasted image without a filename caption

Testing

On Linux, pasted, sent, reopened, and previewed seeded images in Codex and Claude bot items. Both bots received the images. A named image kept its caption after reopening. The phone UI was not exercised.

Performance

One bounded name check per image in the existing display projection.

Risk

Level: Low. Image reading and attachment records use the existing paths. A revert restores the old display.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable.

Notes

Display handling applies to saved and new comments. Attachment transport uses the existing format.

Checklist

  • Small, focused change and self-review
  • Platform, remote, and compatibility impact considered
  • Before and after screenshots
  • CI

@brennanb2025
brennanb2025 marked this pull request as ready for review November 28, 2026 01:52
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The shared predicate now recognizes native-chat pasted-image paths using a constrained filename pattern. The mobile component assigns those images a translated “Attached image” label and no caption. The renderer component omits their alt text and displays captions only when alt text is present.

Merge Risk: Minimal · up to 21121

Generated pasted-image filenames are hidden beneath bot comment images, and user-supplied names are kept as captions. No concrete defect was found, and the change is easy to revert.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: generated paste filenames are hidden on bot comment images. The raw summary and objectives confirm that captions are hidden for native-chat pasted-image names while u…
Description check Passed The description follows the template and covers ELI5, what changed, why, visual before/after proof, testing on Linux, performance, risk level, and the upstream boundary checkbox. Gaps: the Linked Issu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: generated paste filenames are hidden on bot comment images. The raw summary and objectives confirm that captions are hidden for native-chat pasted-image names while user-supplied names remain visible. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description follows the template and covers ELI5, what changed, why, visual before/after proof, testing on Linux, performance, risk level, and the upstream boundary checkbox. Gaps: the Linked Issue section says 'Maintainer-reported bot item' without an issue link, the 'Fixes #' line is left blank, the Performance line is filled in, and the AI Disclosure section is empty. Some items are incomplete, but the description is mostly complete.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d52b1e9-1fd1-4a56-9ae9-626b66e4c2bb
Commits

Reviewing files that changed from the base of the PR and between f0ddb49 and 211211b.

Files selected for processing: 3

  • mobile/src/bots/items/MobileBotItemCommentAttachments.tsx
  • src/renderer/src/components/bots/items/BotItemCommentImages.tsx
  • src/shared/native-chat/attachments/native-chat-image-label.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@brennanb2025
brennanb2025 merged commit 9903957 into main Nov 28, 2026
91 of 92 checks passed
brennanb2025 added a commit that referenced this pull request Nov 28, 2026
* fix(bots): hide generated paste filenames on comment images

* fix(mobile): hide generated paste filenames on bot comments

* Use the existing phone chat image label

* Preserve labels for older clipboard images
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