Skip to content

feat(issues): Attach videos to issue comments - #131742

Open
nithinrgaddam wants to merge 6 commits into
getsentry:masterfrom
nithinrgaddam:issue-comment-video-attachments-frontend
Open

nithinrgaddam wants to merge 6 commits into
getsentry:masterfrom
nithinrgaddam:issue-comment-video-attachments-frontend

Conversation

@nithinrgaddam

Copy link
Copy Markdown

This is the UI for attaching videos to issue comments. It depends on #131741 (backend endpoints, option and feature flag), so it should land after that one.

  • Attach button: the comment composer gets an "Attach video" button next to Comment. The chosen video goes to the issue's comment-attachments endpoint, and a markdown link to it is added to the comment text.
  • Inline player: in note bodies, links to those uploads render as an inline <video> player, with the link kept underneath. Other links render as before. This is done with a Link override in NoteBody, so the shared markdown sanitizer is unchanged.
  • Feature flag: the button only shows when the org has the issue-comment-attachments feature.
  • Errors: size and type limits are enforced by the backend, and its error message (for example the 413 "too large" detail) is shown in a toast.

Tests in activitySection/index.spec.tsx cover the inline player, uploading and linking a video, the upload error toast, and the button being hidden without the feature.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Add an attach button to the issue comment composer. The chosen video is
uploaded to the issue's comment-attachments endpoint and a link to it is
added to the comment text. Note bodies render links to those uploads as
an inline video player, with the link kept below it.

The button only shows for organizations with the
issue-comment-attachments feature. Size and type limits are enforced by
the backend and its error is shown in a toast.
@nithinrgaddam
nithinrgaddam requested review from a team as code owners November 19, 2026 00:58
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 19, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 2 potential issues.

Fix All in Cursor

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

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c8f87b3. Configure here.

Limit the org and issue segments of a comment video link to slugs and
IDs, so a hand-written link with dot segments renders as a plain link
instead of a player requesting another API route.
The browser fetches the player's video and the file link itself, so they
skip the API client: resolve their URLs with resolveHostname so they go
to the region like event attachment viewers do. Render the file name as
an external link that opens the video in a new tab, instead of a router
link that navigated to an in-app 404.
The default API client sends Content-Type: application/json on every
request, so the server read the video's multipart body as JSON and the
upload failed. Use a client without it, as the relocation upload does,
so the browser sets multipart/form-data with its boundary.
The test environment's Response has no static json().

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant