Skip to content

feat: add optional verified flag with badge and verification task - #134

Merged
yakew7 merged 1 commit into
StudentSuite:mainfrom
aryansk:feat/verified-flag
Aug 14, 2026
Merged

feat: add optional verified flag with badge and verification task#134
yakew7 merged 1 commit into
StudentSuite:mainfrom
aryansk:feat/verified-flag

Conversation

@aryansk

Copy link
Copy Markdown
Contributor

Problem

Closes#126. Every place is shown with equal confidence whether it was checked last week or added a year ago, and the only contribution type is adding a new place — re-checking an existing one is a much smaller ask that nothing records.

Changes

  • Schema: optional verified object (by + on) on the place record. Existing records are untouched and still validate.
  • Validation (scripts/validate-places.mjs): npm run validate now fails on a malformed verified block — missing/empty by, a non-ISO or impossible on (e.g. 2026-02-31), or extra keys.
  • Type: Verified interface and Place.verified?.
  • UI: a shared VerifiedBadge shows a subtle success pill ("Verified · Jun 2026") in the pin popup and the results list; unverified places render exactly as before.
  • Contribution: new .github/ISSUE_TEMPLATE/verify-place.yml (labels: verification) for the low-barrier "verify a place" task.
  • Docs: data/CONTRIBUTING.md documents the field, the expiry window (12 months; 6 months for exam centres), and updates the old "do not add verified date to the JSON" rule (this field is the exception, Add a verified flag to places and a verification contributor task #126).

Verification

  • npm run validate passes unchanged; with a valid verified block; and fails with clear messages for missing by, 2026-02-31, and an extra key (each verified by editing a temp record, then reverted).
  • 40 unit tests pass (2 new: badge shown for verified, absent for unverified).
  • tsc --noEmit, eslint, and next build all clean.

Adds an optional verified object (by/on) to the place schema, enforced by npm run validate (missing by, impossible dates, and extra keys all fail). Verified places show a subtle success badge in the pin popup and results list via a shared VerifiedBadge; unverified places are unchanged. Adds a verify-place issue template for the low-barrier contribution type and documents the 12-month (6-month for exam centres) expiry window in data/CONTRIBUTING.md.
ClosesStudentSuite#126
@vercel

vercelBot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@AryanSingh is attempting to deploy a commit to the studentsuite Team on Vercel.

A member of the Team first needs to authorize it.

@yakew7
yakew7 marked this pull request as ready for review August 14, 2026 15:14
@yakew7
yakew7 merged commit dd2c055 into StudentSuite:mainAug 14, 2026
3 of 4 checks passed
Sign up for freeto 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.

Add a verified flag to places and a verification contributor task

3 participants

@aryansk@yakew7@AryanSingh