Skip to content

feat(attachments): Emit and render delivered attachment transcript items - #1506

Open
sentry-junior[bot] wants to merge 4 commits into
mainfrom
feat/attachments-delivered-transcript
Open

feat(attachments): Emit and render delivered attachment transcript items#1506
sentry-junior[bot] wants to merge 4 commits into
mainfrom
feat/attachments-delivered-transcript

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Closes #1503.

Successful sendFiles already stores conversation-owned attachments and returns attachment_refs, and the read route can serve bytes. The dashboard still had no first-class transcript surface for those files.

This change adds a host-owned attachments_delivered conversation event, projects it through the report API, and renders it in the dashboard as media (inline safe images; download cards otherwise) via the existing attachment route.

Why this shape

  • Not a fake empty assistant message
  • Not tool-output scraping / sendFiles special-casing in the UI
  • Leaves Pi/model history unchanged

Included

  • durable event schema + known event type
  • emit from successful sendFiles store path
  • report projection (payload-gated)
  • dashboard transcript reduction + render
  • tests for projection, emit, and transcript reduction

Not in this PR

  • universal non-Slack sendFiles
  • user uploads
  • model-history projection for delivered files

Requested by David Cramer.

--

View Junior Session [Sentry]

Add a host-owned attachments_delivered conversation event so successful
sendFiles stores become first-class dashboard transcript media instead of
tool-output scraping. Project the event through the report API and render
inline images or download cards via the existing attachment route.

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 13, 2026 1:52am

Request Review

…olicy

Move dashboard coverage to the owning semantic render suite, keep emit
coverage on the product SQL harness, and drop the oversized pure-projection
case that broke the file-length limit.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer marked this pull request as ready for review August 13, 2026 01:23
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 13, 2026
Comment thread packages/junior/src/chat/slack/tools/send-files.ts Outdated
Cache the successful Slack upload before writing attachments_delivered so
a later event-store failure cannot cause a duplicate Slack upload on retry.
Make the delivery event idempotent and re-record from the cache path.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b8e7090. Configure here.

Comment thread packages/junior/src/chat/slack/tools/send-files.ts
Cache hits must re-record attachments_delivered with the first toolCallId,
not the current one. Otherwise a later call with the same bytes can mint a
second transcript delivery that was never sent to Slack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show delivered attachments in the transcript

0 participants