Skip to content

feat(desktop): show toast with release notes link when app updates to a new version#2454

Open
shoaib050326 wants to merge 2 commits intopingdotgg:mainfrom
shoaib050326:feat/release-notes-toast-2309
Open

feat(desktop): show toast with release notes link when app updates to a new version#2454
shoaib050326 wants to merge 2 commits intopingdotgg:mainfrom
shoaib050326:feat/release-notes-toast-2309

Conversation

@shoaib050326
Copy link
Copy Markdown

@shoaib050326 shoaib050326 commented May 2, 2026

Summary

When the desktop app is updated to a new version, a toast now appears on the
next launch announcing the new version with a button linking to the GitHub
release notes.

This addresses the lack of in-app feedback after an update — users previously
had no indication that something changed or where to find release notes.

Changes

  • Added shouldShowNewVersionToast, acknowledgeCurrentVersion,
    readLastAcknowledgedVersion, and getNewVersionReleaseNotesUrl to
    desktopUpdate.logic.ts — pure functions that compare the running version
    against a localStorage-persisted acknowledged version.
  • Created NewVersionToastCoordinator.tsx — a coordinator component that
    subscribes to useDesktopUpdateState() and triggers the toast when the
    version changes.
  • Mounted the coordinator in __root.tsx inside the ToastProvider.

Behavior

Scenario Result
First launch (no prior version stored) No toast; current version persisted
Version matches acknowledged version No toast
Version differs from acknowledged version Toast: "Updated to vX.Y.Z" + "View release notes" button
Click "View release notes" Opens https://github.com/pingdotgg/t3code/releases/tag/vX.Y.Z
Browser mode (no desktop bridge) No-op (update state is null)
Updates disabled No-op

Risk

Low. All new code is client-side only, uses localStorage for persistence
(gracefully handles unavailable storage), and follows the exact coordinator
pattern used by SlowRpcAckToastCoordinator. The toast is informational only
— no blocking, no side effects.

Rollback

Revert the four touched files.

Closes #2309


Note

Low Risk
Low risk: adds an informational client-side toast driven by desktop update state and localStorage, with guarded access/fallbacks and no server-side or auth changes.

Overview
Shows an “Updated to vX.Y.Z” persistent toast after the desktop app launches on a new version, with an action to open GitHub release notes (via desktopBridge.openExternal when available, otherwise window.open).

Introduces desktopUpdate.logic helpers to track the last acknowledged version in localStorage and decide when the toast should appear, adds coverage for this logic, and mounts the new NewVersionToastCoordinator in the authenticated root route.

Reviewed by Cursor Bugbot for commit 84b0444. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Show a toast with release notes link when the desktop app updates to a new version

  • Adds NewVersionToastCoordinator, a client-side component mounted in the authenticated root that watches desktop update state and shows a persistent success toast when a new version is detected.
  • The toast includes an action button that opens the GitHub release notes URL for the new version via desktopBridge.openExternal or window.open.
  • Adds utilities in desktopUpdate.logic.ts to construct the release notes URL, check whether the toast should be shown, and persist the acknowledged version to localStorage to prevent repeat toasts.
  • The toast only appears when updates are enabled, a current version exists, and the version differs from the last acknowledged version stored in localStorage.

Macroscope summarized 84b0444.

… a new version

When the desktop app restarts with a new version, a toast now appears
announcing the version with a link to GitHub release notes.

- Add shouldShowNewVersionToast / acknowledgeCurrentVersion logic with
  localStorage-based version tracking.
- Add NewVersionToastCoordinator component following the existing
  coordinator pattern.
- Mount coordinator in __root.tsx alongside other toast coordinators.
- Add 9 tests covering first-launch, version-match, and version-change
  scenarios.

Closes pingdotgg#2309
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6b95ff67-98fa-45a2-9f2f-bf46672e4bc2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 2, 2026
Copy link
Copy Markdown
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 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6cca87f. Configure here.

Comment thread apps/web/src/components/desktopUpdate.logic.ts
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 2, 2026

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (toast notifications on app updates) with a new globally-mounted component and localStorage-based state tracking. New features with user-facing behavior warrant human review even when well-scoped.

You can customize Macroscope's approvability policy. Learn more.

… side effect)

Move first-launch version seeding from the predicate to the coordinator
component, restoring command-query separation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Provide Release notes via Toast when new version is released in Desktop App

1 participant