Repository navigation
feat(issues): Attach videos to issue comments - #131742
Open
nithinrgaddam wants to merge 6 commits into
Open
nithinrgaddam wants to merge 6 commits into
nithinrgaddam wants to merge 6 commits into
Conversation
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.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.
comment-attachmentsendpoint, and a markdown link to it is added to the comment text.<video>player, with the link kept underneath. Other links render as before. This is done with aLinkoverride inNoteBody, so the shared markdown sanitizer is unchanged.issue-comment-attachmentsfeature.Tests in
activitySection/index.spec.tsxcover 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.