feat(desktop): release notes card and dialog in the sidebar

Merged
AV
1mo ago
+1017-2

What & why

Users don't see what changed when the app updates itself. After an update, the sidebar now shows a card for the newest release: its hero image, Superset 1.38.0, and the date. Clicking it opens a dialog with the hero image, the release title, four icon highlights, a Got it button, and ‹ older · All releases ↗ · newer › navigation.

Content comes from the changelog. A changelog entry can now carry two more frontmatter fields:

version: 1.38.0          # first desktop release that ships everything in the entry
highlights:
  - icon: git-pull-request   # one of RELEASE_HIGHLIGHT_ICONS
    title: A new pull request page
    description: Summary and Changes tabs, merge status and checks in one rail, ...

The marketing site serves every entry that has both at /changelog.json, with absolute URLs and CORS open. The desktop fetches it from NEXT_PUBLIC_MARKETING_URL. Notes can be written or fixed after a build ships, and an entry without these fields changes nothing.

When the card shows

  • On installs that have updated at least once (app-version-history has a previousVersion), not on fresh installs.
  • For the newest release at or below the running version. A canary counts as its release version.
  • Until the user closes the dialog or the card. It then stays hidden until a newer release has highlights. This is one persisted value: release-notes-card-v1, a fixed-size singleton, registered in the persisted-key registry.
  • It goes in the existing SidebarCardSlot, after the payment, setup-script, and getting-started cards and before the star and hiring nags.

Other changes

  • packages/shared/src/release-notes.ts: the zod schema for the feed. An icon name the app doesn't know falls back to sparkles, so a newer feed still renders on an older app.
  • SidebarCard gets an optional media slot and a whole-card onClick. The click uses an overlay button, so the dismiss X stays a separate button.
  • The renderer CSP connect-src now includes the marketing origin. Before this, the fetch was blocked.
  • Highlights are backfilled on the 10-11 entry (1.38.0) and the 10-04 entry (1.36.0). Each version is the first desktop-v tag that contains every PR the entry links.
  • A dev-only command, Preview: release notes card (⌘⇧K), forces the card to show regardless of version history, dismissal, or other cards. Closing the preview does not change the real dismissal. If the feed is empty or unreachable, it shows a toast.
  • 6 new strings, translated in all 16 locales.

How I tested it

Screenshots: https://app.superset.sh/page/release-notes-card-screenshots-pr-8563-mk4s3a. Shows the sidebar card, the dialog, going back to 1.36.0, the ⌘⇧K dev preview, and the dialog in the full window. Each step was done in order with real input over CDP.

In the dev app on this branch (marketing running locally on its worktree port), driven over CDP:

  • With a fresh profile, no card appears. After setting the previous version to 1.37.0 and reloading, the card shows Superset 1.38.0 · Oct 11 with the hero image.
  • Clicking the card opens the dialog with 1.38.0's four highlights. ‹ 1.36.0 switches to 1.36.0, where the left button disappears and the right one reads 1.38.0. Got it closes the dialog and dismisses the card at 1.38.0, and it stays gone after a reload.
  • ⌘⇧K → "release notes" → Enter shows the card while 1.38.0 is dismissed. Closing it leaves the saved dismissal unchanged.
  • curl /changelog.json returns both releases with access-control-allow-origin: *.
  • Not tested: the "No release notes" toast. That needs the feed down.

Automated checks:

  • bun run typecheck in apps/desktop; tsc --noEmit in apps/marketing and packages/ui.
  • bun run check:i18n.
  • Biome on all changed files.
  • Tests:
    • New selectReleaseNotes tests: shipped filter, canary, fresh install, dismissal.
    • New marketing changelog.test.ts: frontmatter is valid, icons are known, versions are plain semver, feed shape.
    • Persisted-key registry.
    • packages/i18n.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (biome on changed files; typecheck on desktop, marketing, ui)
  • "Allow edits from maintainers" is checked on fork PRs (n/a, not a fork)

Summary by cubic

Adds a release notes card to the sidebar that appears after an app update, showing the newest release's hero image, version, and date. Clicking opens a dialog with highlights, navigation across releases, and a link to the full changelog.

Content and visibility

  • Changelog entries can now carry version and highlights frontmatter; the marketing site serves them at /changelog.json with CORS, so notes can be written or fixed after a build ships.
  • The card shows only on installs that have updated at least once, for the newest release at or below the running version (a canary counts as its release version), and stays hidden after dismissal until a newer release has highlights.
  • The feed refreshes hourly and on window focus, so notes published after an update reach an app that stays open.
  • SidebarCard gains an optional media slot and whole-card click; the renderer CSP now includes the marketing origin.
  • On cards with an image, the dismiss X sits on the card's top-right corner as a solid circle so it doesn't blend into the screenshot.
  • A dev-only Preview: release notes card command forces the card to show; it uses every release in the feed, even ones not yet shipped. Unknown highlight icons fall back to sparkles, and a missing feed means no card.

Summary by CodeRabbit

  • New Features
    • The desktop sidebar now displays release notes for eligible app updates, including the version, date, highlights, and optional image.
    • Open a release to browse older or newer releases, view all highlights, and visit the full changelog. Dismissed releases stay out of the way.
    • Release notes and navigation labels are available in multiple languages.
    • Developers can preview the release-notes card from the command palette.