Skip to content

Keep schedule in the prefetched App Shell (cacheLife stale 300s) - #8

Open
gellosparkles wants to merge 2 commits into
mainfrom
fix/schedule-cache-app-shell
Open

gellosparkles wants to merge 2 commits into
mainfrom
fix/schedule-cache-app-shell

Conversation

@gellosparkles

@gellosparkles gellosparkles commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What

Fixes the "uncached data during prerendering" warning on / in the Next.js dev overlay.

PR #6 set getSchedule() to cacheLife({ stale: 30, ... }). With cacheComponents + partialPrefetching, a stale under 5 minutes drops the cache entry out of the prefetched App Shell, so the home page lost its instant navigation. stale is now 300; revalidate stays 30, so edits made straight in Supabase still reach the server within ~30s, and /admin edits still show immediately via updateTag("events").

The /profile Date.now() warning was also fixed here originally, but #7 landed the same await connection() change in src/lib/auth.ts first, so this PR now keeps main's version and only changes src/lib/data.ts.

Testing

  • Dev server log is clean after loading /, /people, /profile
  • npm run lint, npx tsc --noEmit, npm run build pass on the branch merged with main

🤖 Generated with Claude Code

- getSchedule: raise cacheLife stale to 300s (revalidate stays 30s) so the
  schedule stays in the prefetched App Shell; stale < 5 min excluded it.
- getCurrentUser: await connection() before Supabase getClaims(), which
  reads Date.now() to check token expiry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hacksc-portal Ready Ready Preview Nov 4, 2026 4:55am UTC

PR #7 landed the same await connection() change in src/lib/auth.ts, and
the auto-merge duplicated the import and call. Keep main's version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gellosparkles gellosparkles changed the title Fix Next.js dev prerender warnings on / and /profile Keep schedule in the prefetched App Shell (cacheLife stale 300s) Nov 4, 2026
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