Skip to content

fix(updates): Prefetch changelog when update is active#3211

Merged
charlesvien merged 1 commit into
mainfrom
fix/prefetch-update-changelog
Jul 7, 2026
Merged

fix(updates): Prefetch changelog when update is active#3211
charlesvien merged 1 commit into
mainfrom
fix/prefetch-update-changelog

Conversation

@charlesvien

Copy link
Copy Markdown
Member

Problem

Clicking View on the update banner showed a release notes skeleton for a few seconds. The GitHub releases query was gated on the modal being open, so the fetch only started on click even though the app already knew an update was pending.

Changes

  • Added a useHasActiveUpdate() selector for the banner-visible update statuses (available, downloading, ready, installing).
  • UpdateAvailableModal and WhatsNewModal now enable their releases query as soon as an update is active instead of waiting for open, so the changelog is already in the query cache when clicked. The skeleton now only appears when the data genuinely is not in memory.

How did you test this?

  • pnpm --filter @posthog/ui typecheck
  • biome check on the updates feature
  • Vitest: UpdateBanner and releaseNotes suites (12 passed)

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit c877e6c.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "prefetch changelog when update is active" | Re-trigger Greptile

@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 7, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small additive UI change that prefetches changelog data when an update is in progress. No showstoppers — the new hook is a simple store selector and the query enable condition change is safe.

@charlesvien charlesvien enabled auto-merge (squash) July 7, 2026 01:45
@charlesvien charlesvien merged commit 7235613 into main Jul 7, 2026
24 checks passed
@charlesvien charlesvien deleted the fix/prefetch-update-changelog branch July 7, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant