Skip to content

fix(changelog): support theme-aware release media - #56

Merged
D3SOX merged 2 commits into
masterfrom
changelog-theme-media
Aug 26, 2026
Merged

fix(changelog): support theme-aware release media#56
D3SOX merged 2 commits into
masterfrom
changelog-theme-media

Conversation

@D3SOX

@D3SOX D3SOX commented Aug 26, 2026

Copy link
Copy Markdown
Member

Release notes can now contain dark and light <picture> media hosted in OpenTubeX/media, but the website previously stripped each source URL, rejected GitHub release-asset downloads, and followed only the operating-system theme instead of the website selector.

This preserves and caches <source srcset> images, accepts GitHub release assets after validating their actual raster format, and connects the picture sources to the website’s resolved Light, Dark, or Auto theme. The original media queries remain as the no-JavaScript fallback.

The PR also bundles every currently open Dependabot update:

Testing

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 52 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: aa7849aa-997a-4198-96b1-7df3277ffa77

📥 Commits

Reviewing files that changed from the base of the PR and between a7708f9 and 680636d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • package.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e14c9e54-0395-471f-96ec-eb16524324b2

📥 Commits

Reviewing files that changed from the base of the PR and between abbcf42 and a7708f9.

📒 Files selected for processing (4)
  • public/signal/theme.js
  • src/lib/changelog-markdown.ts
  • src/plugins/remark-cache-changelog-images.mjs
  • tests/changelog-markdown.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changelog image pipeline now supports GitHub release assets, caches <source srcSet> variants, marks light and dark picture sources, preserves required attributes during sanitization, and switches sources when the active theme changes.

Changes

Theme-aware changelog images

Layer / File(s) Summary
Release asset download validation
src/plugins/remark-cache-changelog-images.mjs
The image cache accepts GitHub release asset redirects and validates decoded raster formats with Sharp before conversion.
Themed image markup and caching
src/plugins/remark-cache-changelog-images.mjs, src/lib/changelog-markdown.ts, tests/changelog-markdown.test.ts
The cache processes <img src> and <source srcSet> assets. It adds light/dark metadata, preserves image dimensions, and permits the new source attributes through sanitization. The integration test verifies both variants and cleanup.
Runtime theme switching
public/signal/theme.js
Theme application enables the matching changelog picture source and disables the other source.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to a7708

The change is localized to theme-aware changelog media handling and has no actionable merge-blocking risk remaining after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant ChangelogMarkdown
  participant ImageCache
  participant Sharp
  participant Sanitizer
  participant ThemeSignal
  participant Browser
  ChangelogMarkdown->>ImageCache: process img src and source srcSet
  ImageCache->>Sharp: decode and validate image bytes
  Sharp-->>ImageCache: image format and dimensions
  ImageCache->>Sanitizer: emit cached themed picture markup
  Sanitizer-->>ChangelogMarkdown: sanitized HTML
  ThemeSignal->>Browser: apply resolved theme
  Browser->>Browser: enable matching source and disable other source
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: support for theme-aware release media in changelogs.
Description check ✅ Passed The description directly explains the changelog media changes, theme handling, GitHub release assets, bundled updates, and testing performed.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changelog-theme-media

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp

macroscopeapp Bot commented Aug 26, 2026

Copy link
Copy Markdown

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a narrowly scoped changelog bug fix that restores and locally caches release-picture sources, preserves their theme metadata, and synchronizes them with the existing site theme selector. Runtime impact is limited to changelog media selection, with coverage for the rendering and caching path.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

@D3SOX

D3SOX commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@D3SOX
D3SOX merged commit 136237e into master Aug 26, 2026
3 checks passed
@D3SOX
D3SOX deleted the changelog-theme-media branch August 26, 2026 15:32
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.

1 participant