Repository navigation
fix: add themed error and 404 pages, scope JSON-LD Event properties, enforce the verification window - #279
Merged
AnayDhawan merged 1 commit intoOct 21, 2026
Conversation
Contributor
|
@propcgamer20-png is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
…enforce the verification window
propcgamer20-png
force-pushed
the
fix/error-pages-jsonld-verification-expiry
branch
from
October 21, 2026 13:32
0c1f969 to
4b45b18
Compare
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.
Summary
Three bug fixes, one PR:
src/app/not-found.tsx(a themed 404 with links back to the map, competitions and home; it covers unknown routes and thenotFound()calls for an unknown city or competition) andsrc/app/error.tsx(a themed error screen with a "Try again" button that callsreset(), the digest as a reference if there is one, and a link home; the error message itself is not shown to visitors). The three/docs/awesome-*pages now catch a failedfetchAwesomeList()and show a newAwesomeListUnavailablemessage with a link to the list on GitHub instead of crashing.competitionJsonLd()now writeseventAttendanceMode,startDateandendDateonly when the node's@typeisEvent, so a scholarship (EducationalOccupationalProgram) no longer carries Event-only properties.data/CONTRIBUTING.mdare now enforced in two places that share one module (scripts/lib/verification-window.mjs, with a typed wrapper insrc/lib/verification.ts):VerifiedBadgestops rendering once the verification has passed its window, andscripts/check-data-freshness.mjsreports an error for any record whoseverified.onis past its window, the same way it already does forvalid_till. Averified.onthat isn't a real date is also reported. Nothing in the current data is stale.Closes #255, closes #256, closes #251.
Things to know
results-list.test.tsxused a fixed verification date and the real clock, so it would have started failing a year from now. It now runs on a fixed date.check-data-freshness.mjsalready fails today on the 12 records whose cycle or last date has passed (the freshness issue Data freshness check failed #276), so the new check does not change the current pass or fail state.How I checked
npm run typecheck,npm run lint,npm run format:check,npm run test:unit(505 pass) andnpm run buildpass. With the production build running, an unknown route and/competitions/not-a-real-competitionboth return 404 with the new page, and/docs/awesome-study-resourcesreturns 200.New tests: the window lengths per type, expiry on and after the boundary day, month-end clamping (31 August plus six months, and 29 February), an unreadable date counting as expired, the badge hidden for an old library and an old exam centre, the freshness script (6 and 12 month windows, type from the file name, bad date), JSON-LD for scholarships and for every category, the two new pages, and the three awesome-list pages with a failing fetch.