Skip to content

Update Modal - #173

Merged
MaryWylde merged 2 commits into
mainfrom
dev
Aug 8, 2026
Merged

Update Modal #173
MaryWylde merged 2 commits into
mainfrom
dev

Conversation

@MaryWylde

Copy link
Copy Markdown
Contributor

No description provided.

MaryWylde and others added 2 commits August 7, 2026 21:27
sessionStorage is per-tab, so closing the tab brought the modal back;
localStorage keeps it dismissed until a new update is published in the CMS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(uxcore): make new-update modal dismissal stick
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Claude finished @MaryWylde's task in 1m 30s —— View job


Claude's Review

Todo list

  • Gather context (read diff, read changed file)
  • Understand the request
  • Review correctness, React best practices, SSR safety
  • Review TypeScript quality
  • Check project conventions (AGENTS.md)
  • Check accessibility/security/styling
  • Post final review summary

Summary

This PR switches the "new update" modal's dismissal storage from sessionStorage to localStorage in src/uxcore/components/NewUpdateModal/NewUpdateModalContainer.tsx (lines 29, 55), with the code comment updated to match ("until site data is cleared" instead of "for the rest of the session").

This is a correct, minimal fix. The prior commit's message (fix(uxcore): persist new-update modal dismissal across tabs and restarts) already stated the intent to persist dismissal across tabs and browser restarts, but sessionStorage doesn't actually do that — it's scoped per-tab and cleared on browser close. localStorage is the right primitive to achieve that stated goal.

Checked against review criteria:

  • SSR/hydration safety: both localStorage accesses happen inside useEffect (line 29) and a click handler (handleClose, line 55) — never at module top level or render time, so no hydration risk.
  • Error handling: getItem on line 29 is inside the surrounding try/catch (line 20–43); setItem on line 55 has its own try/catch for private-mode storage failures — both paths are safe if storage is unavailable.
  • TypeScript: no any, types unchanged and still precise.
  • Conventions: no import/order, barrel, or styling issues — diff only touches two lines of logic plus the comment. localStorage is already an established pattern elsewhere in this codebase (e.g. useGlobals.ts, AuthContext.tsx), so this is consistent.

No issues found — LGTM.

@MaryWylde
MaryWylde merged commit a740efd into main Aug 8, 2026
3 checks passed
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