Repository navigation
Conversation
perf(mainweb): prefetch the remaining portal page reads on the server
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Visit the preview URL for this PR (updated for commit 79d4dfb): https://hacklytics2027--pr-585-jqkqjzoj.web.app (expires Sat, 14 Nov 2026 17:39:27 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c48ba34db61581e25fe2978355160b5eefe0e83f |
[Medium impact] The change reaches initial data loading across several portal workflows. Fix the delayed rejection handler for Findings
|
| const all = c.hackathon.listAll(); | ||
| const entries: Prefetch[] = [ | ||
| ["hackathon.listAll", undefined, all], | ||
| ["hackathon.listBans", undefined, c.hackathon.listBans()], |
There was a problem hiding this comment.
Query errors escape the fallback
listBans() starts before await all, but nothing catches its rejection until reads() returns. If the bans query fails while listAll() is still waiting on the database, the server gets an unhandled rejection instead of skipping the failed prefetch. This can disrupt the admin page or its server worker. Attach a rejection handler immediately, or start listBans() after the wait, so database errors keep the intended client-side fallback.
Server prefetch for the remaining portal pages (#584).
Note
Low Risk
Mostly routing and data-loading structure with no API or permission changes; hackathon list prefetch scales with edition count and could add server work on large lists.
Overview
Completes server-side tRPC prefetch for the admin portal routes that were still client-only: analytics, initiatives, projects, resumes, staff, and subteams. Each route’s UI moves into a dedicated client
*Page.tsx, whilepage.tsxbecomes a thin server wrapper aroundPrefetchedPageso the first queries hydrate into React Query before paint.Hackathon admin prefetch is broadened: the list page now awaits
listAlland prefetchesgetEventsfor every card; the edition dashboard prefetcheswaveStatusandregistrationOpenEmailStatusbased on hackathon status aftergetByIdresolves.Event check-in UI is extracted into
CheckInPage.tsx(behavior unchanged; supports the same prefetch/split pattern as other portal routes).Reviewed by Cursor Bugbot for commit 79d4dfb. Bugbot is set up for automated code reviews on this repo. Configure here.