Skip to content

feat(snapshots): Emit canvas_theme in snapshot sidecar (EME-1241)#1364

Merged
runningcode merged 2 commits into
mainfrom
no/eme-1241-wire-up-canvas-theme
Jul 21, 2026
Merged

feat(snapshots): Emit canvas_theme in snapshot sidecar (EME-1241)#1364
runningcode merged 2 commits into
mainfrom
no/eme-1241-wire-up-canvas-theme

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

Summary

Derives a top-level canvas_theme field ("light"/"dark") for each generated snapshot sidecar from the Compose @Preview uiMode night bits. Sentry Snapshots uses canvas_theme to render the correct background canvas behind the uploaded image in the web UI.

  • Placed at the top level of each image's metadata (sibling of tags/display_name/group/diff_threshold), matching the backend schema (ImageMetadata.canvas_theme: Literal["light","dark"] | None).
  • Mirrors the existing ui_mode derivation: emitted only when the night bit is explicitly set, so default previews omit the field.

Closes EME-1241 and EME-1217.

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 20, 2026

Copy link
Copy Markdown

EME-1241

EME-1217

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d15ed6c

@runningcode
runningcode marked this pull request as ready for review July 20, 2026 12:35
runningcode and others added 2 commits July 21, 2026 11:30
Derive a top-level canvas_theme field ("light"/"dark") for each generated
snapshot sidecar from the Compose @Preview uiMode night bits. Sentry
Snapshots uses canvas_theme to render the correct background canvas behind
the uploaded image in the web UI.

The value mirrors the existing ui_mode derivation: it is emitted only when
the night bit is explicitly set, so default previews omit the field.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@runningcode
runningcode force-pushed the no/eme-1241-wire-up-canvas-theme branch from c1a8e51 to d15ed6c Compare July 21, 2026 09:31
@runningcode
runningcode merged commit 933ebc6 into main Jul 21, 2026
25 checks passed
@runningcode
runningcode deleted the no/eme-1241-wire-up-canvas-theme branch July 21, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants