Refresh the data each admin and submit action changes - #425
Merged
Merged
Conversation
With a 5-minute staleTime and no refetch on focus, a query nothing invalidates stays wrong for five minutes: - Edit Hackathon seeds from hackathon.getById, which the save never invalidated. Reopening showed the old values, and a second save wrote them back over the first. - Submit: a withdrawn project stays as a draft row, and the page treated any row as a submission, so after "Withdraw" it still said "Project record exists" with the Withdraw button and "UPDATE RECORD". - Prepare Judging did not refresh judge.liveProgress or judge.tableCards, so the board kept saying "No queues yet" and the table cards it tells you to print next were missing the newly synced projects. - Approving applicants (single, batch, mass-accept email) left hackathon.waveStatus stale, so the acceptance-wave panel and its confirm dialog quoted the wrong pending count. - Applying to judge left judge.myApplications stale, so /judge still offered "Apply to Judge", which then threw "already applied".
Contributor
Author
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
Author
|
Visit the preview URL for this PR (updated for commit 3fab500): https://hacklytics2027--pr-425-ydv437vy.web.app (expires Fri, 02 Oct 2026 14:11:16 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c48ba34db61581e25fe2978355160b5eefe0e83f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated PR tracking changes from
fix/stale-queriesintodev.Note
Low Risk
Client-side query invalidation and one boolean guard on submission status; no server or auth changes.
Overview
Fixes stale client cache after mutations so UI matches what the server just wrote, without changing API behavior.
Admin hackathons: After saving an edit,
hackathon.getByIdfor that id is invalidated so reopening the form does not seed from old values.Admin judging: When Prepare Judging finishes,
judge.liveProgressandjudge.tableCardsare invalidated alongside rankings so the live board and table cards reflect the new queues before judging is opened (they do not poll until then).Judge registration: On successful apply,
judge.myApplicationsis invalidated so/judgestops offering apply when the user already has an application.Submit portal:
hasSubmittednow treats adraftproject row as not submitted, so a withdrawn submission no longer blocks the “not yet submitted” UX.Attendees tab: Single approve/reject, bulk status changes, and mass accept+email also invalidate
hackathon.waveStatusso acceptance-wave UI stays in sync when roster counts change.Reviewed by Cursor Bugbot for commit 3fab500. Bugbot is set up for automated code reviews on this repo. Configure here.