feat(assets): Add image preview to assets summary details widget#109329
Merged
DominikB2014 merged 6 commits intomasterfrom Feb 26, 2026
Merged
Conversation
Render sample images inside the details widget on the frontend assets summary prebuilt dashboard when the span is an image type. Determines image spans by checking span.op === resource.img or by matching the description's file extension against known image extensions. Adds project.id to DefaultDetailWidgetFields so usePerformanceGeneralProjectSettings can resolve the correct project and enable the images setting query — previously the disabled query left isSettingsLoading stuck at true forever. Adds noVisualizationPadding to SampleImages to strip the ChartPanel border and padding when rendered inside a widget card, and threads it down to ImageWrapper to conditionally remove its padding-top as well. Refs BROWSE-362 Co-Authored-By: Claude <noreply@anthropic.com>
narsaynorath
approved these changes
Feb 25, 2026
edwardgou-sentry
approved these changes
Feb 25, 2026
Replace unsafe double-cast assertions with proper type annotations. Use a TestSpan type alias for Pick<SpanResponse, DefaultDetailWidgetFields> and correct project.id fixture values from string to number, matching the actual SpanNumberFields definition. Co-Authored-By: Claude <noreply@anthropic.com>
…eview-support-for-asset-summary
…eview-support-for-asset-summary
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.
static/app/views/dashboards/widgets/detailsWidget/detailsWidgetVisualization.tsx
Show resolved
Hide resolved
static/app/views/dashboards/widgets/detailsWidget/detailsWidgetVisualization.tsx
Outdated
Show resolved
Hide resolved
…eview-support-for-asset-summary
static/app/views/dashboards/widgets/detailsWidget/detailsWidgetVisualization.tsx
Outdated
Show resolved
Hide resolved
Strip query params before extracting the file extension and lowercase it so URLs like image.PNG?v=1 are correctly detected as images. Co-Authored-By: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Renders sample images inside the details widget on the frontend assets summary prebuilt dashboard when the viewed span is an image type (detected by
span.op === resource.imgor by matching the description's file extension against known image extensions).The
SampleImagescomponent was previously unusable in this context becauseisSettingsLoadingwas stuck attrue— the project settings query was disabled since noprojectIdwas passed. Fixed by addingproject.idtoDefaultDetailWidgetFieldsso the project can be resolved and the query enabled.Adds a
noVisualizationPaddingprop toSampleImagesthat strips theChartPanelborder/padding when rendered inside a widget card. Also threads the prop down toImageWrapperto conditionally remove itspadding-top.Refs BROWSE-362