Skip to content

feat(assets): Add image preview to assets summary details widget#109329

Merged
DominikB2014 merged 6 commits intomasterfrom
dominikbuszowiecki/browse-362-add-image-preview-support-for-asset-summary
Feb 26, 2026
Merged

feat(assets): Add image preview to assets summary details widget#109329
DominikB2014 merged 6 commits intomasterfrom
dominikbuszowiecki/browse-362-add-image-preview-support-for-asset-summary

Conversation

@DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Feb 25, 2026

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.img or by matching the description's file extension against known image extensions).

The SampleImages component was previously unusable in this context because isSettingsLoading was stuck at true — the project settings query was disabled since no projectId was passed. Fixed by adding project.id to DefaultDetailWidgetFields so the project can be resolved and the query enabled.

Adds a noVisualizationPadding prop to SampleImages that strips the ChartPanel border/padding when rendered inside a widget card. Also threads the prop down to ImageWrapper to conditionally remove its padding-top.

image

Refs BROWSE-362

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>
@DominikB2014 DominikB2014 requested a review from a team as a code owner February 25, 2026 16:57
@linear
Copy link

linear bot commented Feb 25, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 25, 2026
@DominikB2014 DominikB2014 enabled auto-merge (squash) February 25, 2026 17:00
DominikB2014 and others added 2 commits February 25, 2026 12:14
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>
Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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>
@DominikB2014 DominikB2014 enabled auto-merge (squash) February 26, 2026 15:34
@DominikB2014 DominikB2014 merged commit a200a20 into master Feb 26, 2026
57 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/browse-362-add-image-preview-support-for-asset-summary branch February 26, 2026 15:34
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants