fix(media): strip internal UUID suffix from outbound media filenames#96565
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 7:20 PM ET / 23:20 UTC. Summary PR surface: Source +4, Tests +10. Total +14 across 2 files. Reproducibility: yes. Mantis reproduced the before/after Telegram filename behavior on the PR base, and current main has no relevant diff in the media loader or Telegram send files, so the same source path remains present on current main. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the shared media-loader normalization with its regression test after maintainers explicitly accept the cross-channel filename behavior, and keep the linked issue paired until this PR lands or is replaced. Do we have a high-confidence way to reproduce the issue? Yes. Mantis reproduced the before/after Telegram filename behavior on the PR base, and current main has no relevant diff in the media loader or Telegram send files, so the same source path remains present on current main. Is this the best way to solve the issue? Yes. The shared loader is the best fix location because the leak originates before channel delivery and sibling callers consume the same AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3ab8d6aa609a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +10. Total +14 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the attachment filename before and after the PR.
Motion-trimmed clips: |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
1f0939a to
5e502e8
Compare
|
Landed via rebase onto main. Proof before landing:
Changelog skipped per release-owned policy. Thanks @NarahariRaghava! |




Closes #96538
What Problem This Solves
Fixes an issue where users receiving files from an agent on Telegram (and other chat channels) would see internal cache suffixes in the filename, e.g.
resume---a1b2c3d4-5678-90ab-cdef-1234567890ab.pdfinstead ofresume.pdf. The internal media-store UUID used for deduplication was leaking into the recipient-visible attachment filename.Why This Change Was Made
The shared outbound media loader (
loadWebMediaInternal) derives the recipient-facing filename from the staged file's basename, which includes an internal---<uuid>suffix for cache deduplication. The media store already exposesextractOriginalFilenameto strip this suffix, but it was not being called on the outbound path. This change applies that existing helper at the shared media boundary so all channels benefit.User Impact
Users receiving file attachments from agents on Telegram, Slack, Discord, and other chat channels will now see clean original filenames instead of filenames polluted with internal cache identifiers.
Evidence
All 74 existing tests pass plus a new regression test that verifies a staged file named with the internal UUID suffix produces a clean outbound filename.