Skip to content

Hide patch notes after 30 days from release date#1707

Open
KevinWu098 wants to merge 4 commits intomainfrom
kwu/patch-notes-30-day-expiry-cbf4
Open

Hide patch notes after 30 days from release date#1707
KevinWu098 wants to merge 4 commits intomainfrom
kwu/patch-notes-30-day-expiry-cbf4

Conversation

@KevinWu098
Copy link
Copy Markdown
Member

@KevinWu098 KevinWu098 commented May 6, 2026

Summary

Patch notes are tied to LATEST_PATCH_NOTES_UPDATE (YYYYMMDD). After more than 30 calendar days since that date, shouldShowPatchNotes() no longer opens the modal on load. The Patch Notes menu button always remains so users can open the dialog manually.

Tests

  • Vitest fake timers pin "now" where shouldShowPatchNotes() is asserted.
  • Restored localStorage helper imports (fixes setLocalStoragePatchNotesKey is not defined in CI).
  • Close/backdrop tests use waitFor until the dialog unmounts (MUI keeps the root during exit transition).
Open in Web Open in Cursor 

- Gate shouldShowPatchNotes on calendar age vs LATEST_PATCH_NOTES_UPDATE
- Hide Patch Notes header button when stale
- Add vitest coverage with fake timers; fix dialog close assertions

Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
…howPatchNotes

Real 'now' after 30 days from LATEST_PATCH_NOTES_UPDATE made the
'displays when outdated' case fail in CI; use fake timers during fresh
window and add button visibility test for same window.

Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
@cursor cursor Bot temporarily deployed to staging-1707 May 6, 2026 04:24 Inactive
Revert hiding PatchNotesButton after 30 days; stale check applies only
to shouldShowPatchNotes. arePatchNotesStale is store-internal.

Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
@cursor cursor Bot temporarily deployed to staging-1707 May 6, 2026 04:27 Inactive
Fix ReferenceError from missing setLocalStoragePatchNotesKey import.
MUI Dialog leaves the root mounted during exit transition; use
waitFor until the dialog test id is gone.

Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
@cursor cursor Bot deployed to staging-1707 May 6, 2026 04:33 Active
@KevinWu098 KevinWu098 marked this pull request as ready for review May 6, 2026 04:44
@KevinWu098 KevinWu098 requested a review from calebwongg May 6, 2026 04:45
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

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