Skip to content

Refresh the data each admin and submit action changes - #425

Merged
aamoghS merged 1 commit into
devfrom
fix/stale-queries
Sep 25, 2026
Merged

aamoghS merged 1 commit into
devfrom
fix/stale-queries

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from fix/stale-queries into dev.


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.getById for that id is invalidated so reopening the form does not seed from old values.

Admin judging: When Prepare Judging finishes, judge.liveProgress and judge.tableCards are 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.myApplications is invalidated so /judge stops offering apply when the user already has an application.

Submit portal: hasSubmitted now treats a draft project 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.waveStatus so 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.

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".
@github-actions
github-actions Bot requested a review from aamoghS as a code owner September 25, 2026 02:56
@aamoghS aamoghS changed the title Feature: fix/stale-queries to dev Refresh the data each admin and submit action changes Sep 25, 2026
@aamoghS
aamoghS merged commit f9333bc into dev Sep 25, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor Author

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant