chore(banner): announce September 1 community call with auto-expiry - #154
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Points the announcement banner at the September community call (luma.com/mw1phg5t) on Tuesday, September 1, 2026. Adds an EXPIRES_AT guard so the banner stops rendering from local midnight on September 2, 2026 without needing a follow-up commit. Bumps BANNER_ID so visitors who dismissed the July banner see this one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
59e4c1b to
d6d7b45
Compare
📝 WalkthroughWalkthroughThe announcement banner is retargeted from the July community call to the September 1, 2026 event, with a new banner ID, expiration cutoff, displayed date, description, and RSVP link. ChangesAnnouncement banner
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/AnnouncementBanner.js`:
- Around line 12-16: Update the useEffect in AnnouncementBanner to keep
monitoring EXPIRES_AT after mount: retain the initial expiry check, schedule a
bounded timer or interval that calls setDismissed(true) once expiry is reached,
and clean up the timer on unmount. Preserve the existing localStorage dismissal
initialization for unexpired banners.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aa9d7d37-37ce-4982-a0b9-c1dd7964180e
📒 Files selected for processing (1)
components/AnnouncementBanner.js
| useEffect(() => { | ||
| if (Date.now() >= EXPIRES_AT) return; | ||
| const stored = localStorage.getItem(`banner-dismissed-${BANNER_ID}`); | ||
| if (!stored) setDismissed(false); | ||
| }, []); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Keep the expiry guard active after mount.
The effect checks EXPIRES_AT only once. A visitor who loads the page before local midnight and leaves it open will still see the banner after September 2, contrary to the auto-expiry requirement. Re-check at expiry with a bounded timer/interval and clean it up on unmount, calling setDismissed(true) when expired.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@components/AnnouncementBanner.js` around lines 12 - 16, Update the useEffect
in AnnouncementBanner to keep monitoring EXPIRES_AT after mount: retain the
initial expiry check, schedule a bounded timer or interval that calls
setDismissed(true) once expiry is reached, and clean up the timer on unmount.
Preserve the existing localStorage dismissal initialization for unexpired
banners.
Updates the site-wide announcement banner for the next community call.
Changes
https://luma.com/mw1phg5tEXPIRES_ATconstant; the mount effect bails out once the visitor's clock passes local midnight on September 2, 2026, so the banner retires itself with no follow-up commitBANNER_IDbumped toseptember-1-2026-community-callso anyone who dismissed a previous banner still sees this oneNote on the expiry cutoff
new Date('2026-09-02T00:00:00')parses as local time, so the banner disappears at each visitor's own midnight — someone in UTC+13 loses it ~13 hours before someone in UTC-7. That seemed right for a "disappears on September 2nd" banner. Happy to pin it to a single UTC instant instead if a global cutoff is preferred.Testing
Not run locally — the change is a constant swap plus one guard clause in an existing mount effect. Worth a glance at the Vercel preview to confirm the longer date string ("Tuesday, September 1, 2026" vs "July 7, 2026") still sits well in the banner chip at narrow widths.
🤖 Generated with Claude Code
Summary by CodeRabbit