Repository navigation
Description
Summary
Events with verificationStage: 'unverified' are published and appear in the widget indistinguishable from coordinator-verified classes. Neither the event read (src/config/api/fetch.ts:605-628) nor the geojson feed select (:75-113) requests verificationStage, so the widget cannot tell them apart. sydevs/SahajCloud#828 is about to publish hundreds of unverified listings per country and is blocked on this.
Approach
Per the reviewer (2026-09-21): the badge appears only on the event page — never on map markers or list cards — every unverified event is marked identically, and confidenceScore is not displayed.
What counts as unverified
verificationStage === 'unverified', exactly. SahajCloud's stage table (src/lib/eventVerification/stages.ts:107-170) makes unverified, verified, reminded, escalated, urgent and finished published; denied and expired are unpublished, and finished is dropped from the feed by notFinishedWhere. So unverified is the only publicly listed stage with no manager vouching for the event. The reminder-ladder stages are all managed and must not be badged.
1. Read the field (detail only)
src/config/api/fetch.ts:605-628— addverificationStage: truetogetEventDoc's select. Do not addconfidenceScore.src/types/event.ts:181— addverificationStagetoEventDocSchema, nullish and tolerant of an unrecognised value (a narrowedz.string().nullish(), or an enum with a fallback). Two reasons: a live-preview proposal for a new event carries no stage (the same reasonregionis nullish there, Event submission preview — render a user-submission proposal from postMessage #163), and SahajCloud can add a stage — a strict enum would fail the whole event read and blank the page.
2. Badge on the event page only
- Render it in
src/components/organisms/EventDetails/EventDetails.tsx:88, aboveEventChips, as anAlert(src/components/atoms/Alert,variant="flat",size="sm"). - ⚠ Not in
EventChips(src/components/molecules/EventChips/EventChips.tsx). The list card and the event header share that component, so a chip added there lands on cards too — the surface the reviewer excluded. - Copy comes from
sy-atlas-translations:event.display.unverified_title/event.display.unverified_note. That key does not exist yet — see Notes.
3. Rank unverified listings lower, without touching the existing orderings
Three lists, three answers:
- Search results under
?sort=recommended—calculateOrder(src/components/organisms/EventsList/DynamicEventsList.tsx:45-55) multiplies a distance base by relevance factors (wrong language ×2, online ×1.5, soon ×0.5). Add one more factor for unverified. It composes with the existing score instead of overriding it, which is what "subtle" asks for. A partition here would override distance and relevance both. ?sort=closest/?sort=soonest— untouched. Those are literal orderings (byDistance,byNextOccurrence), and reordering them makes the label false.- Region lists —
region.events(src/config/api/fetch.ts:488) renders in feed order, with no ranking at all today; onlyonlineEventssorts, by next occurrence (:490). A stable partition there — verified first, relative order otherwise preserved — compromises nothing, because there is nothing to compromise. - Calendar (
getCalendarEvents) is a grid by date. Unchanged.
The list ranking needs the field in the feed, which the detail read does not cover:
src/config/api/fetch.ts:75— addverificationStage: truetoFEED_SELECT.src/types/event.ts:137— add it toAgnosticFeedEventSchema, nullish as above.FeedEventSchemaandEventSlimSchemainherit it.
4. Specs
src/types/event.test.ts— the field parses on both schemas, and an unrecognised stage degrades instead of throwing.renderToStaticMarkupspecs: the badge renders inEventDetailsfor an unverified event, andEventListItemrenders none for the same event.- A
sortEventsspec: unverified ranks below an otherwise-identical verified event underrecommended, whileclosestandsoonestare byte-identical to before. - ⚠ A new assertion is not finished until it has FAILED —
docs/testing.md.
Acceptance criteria
- An event with
verificationStage: 'unverified'shows the badge on its detail page.verified,reminded,escalatedandurgentevents show none. - No map marker, popup or list card carries any unverified indicator.
-
confidenceScoreappears in no request and no UI. - Under
?sort=recommended, an unverified event ranks below an otherwise-identical verified one.?sort=closestand?sort=soonestorder exactly as they do today. - In a region list, unverified events follow verified ones, and the relative order inside each group is unchanged.
- An event whose
verificationStagethe widget does not recognise renders with no badge and no error boundary. -
pnpm lint,pnpm typecheckandpnpm test:runpass.
Verification checklist
-
pnpm test:run -
pnpm dev, then open an unverified event's page: the badge renders once, above the chips, and that event's card in the list behind it carries none. - Network tab: the
/events/geojsonrequest'sselectincludesverificationStage; the/events/<id>request's includesverificationStageand notconfidenceScore. - To get an unverified event locally:
verificationStageisreadOnlyin the admin (SahajCloudsrc/collections/Events/Events.ts:574-586), so set it through the local API withcontext: { skipVerifyHook: true }, assrc/collections/UserSubmissions/lifecycle/review.ts:189-194does. Editing the field in/admindoes not work.
Open questions
- What penalty does
recommendedapply? ×1.5, the weightonlinealready carries, is a starting point. Anything that always outranks distance is the partition the reviewer ruled out. - Ranking unverified listings among themselves by
confidenceScore: SahajCloud's field doc states the Atlas does this (src/collections/Events/Events.ts:624-645). Dropped here, on the reviewer's "all marked the same" and on feed weight. If it stays dropped, that SahajCloud comment is wrong and should be corrected. - The feed is fetched whole,
pagination: false. One enum string per feature is cheap now. Re-measure after feat(events): bulk-import events into a region from CSV SahajCloud#828 imports hundreds of listings per country. - Does the badge vary with confidence? No. Every unverified event is marked identically.
- Badge on markers and cards? No. Event page only.
Notes
Blocked by: sydevs/SahajCloud#829 — the badge copy must exist in sy-atlas-translations first, because src/config/translations.test.ts fails any t() call whose key the committed snapshot does not answer
Blocks: sydevs/SahajCloud#828.
- Split out of feat(widget): submit or correct a class, and opt into a mailing list #147 §1, which keeps the submission form and voting.
- No host-facing contract change: no new origin, attribute or CSP entry, so
docs/embedding.mdandCHANGELOG.mdstay untouched. - A
finishedevent that was never adopted reads asfinished, notunverified, so an old link to one shows no badge. Accepted: it is off the feed either way.
Related
- feat(widget): submit or correct a class, and opt into a mailing list #147, feat(events): unverified + denied verification stages for crowdsourced listings SahajCloud#624, feat(events): bulk-import events into a region from CSV SahajCloud#828, feat(translations): add unverified-listing copy to sy-atlas-translations SahajCloud#829
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Sep 21, 2026
@sydevs-bot Revise and flesh out this ticket. Note that we shouldn't need
confidenceScorein the display. All unverified events should be marked in the same manner. Additionally don't include any indicator of the unverified status on the event markers or cards, just on the event pages.Subtly de-prioritizing unverified events (like listing them lower than verified events) is a good idea, but we also don't want to compromise the existing ranking system by doing this
sydevs-bot commentedon Sep 21, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
sydevs-bot commentedon Sep 21, 2026
Badge is event-page only. It lands in
EventDetails.tsx:88as anAlert, not inEventChips— the list card and the event header share that component, so a chip there would show on cards too.confidenceScoreis out of both the reads and the UI. SahajCloud's field doc claims the Atlas ranks by it (Events.ts:624-645), so that is now an open question.Ranking splits three ways.
recommendedgets one more multiplier incalculateOrder(DynamicEventsList.tsx:45-55), composing with distance and language instead of overriding them.closestandsooneststay literal. Region lists have no ranking at all today, so a stable verified-first partition there compromises nothing.Unverified means
verificationStage === 'unverified'exactly. Every other published stage has a manager vouching for it.New blocker: sydevs/SahajCloud#829, the copy key.
translations.test.tsfails anyt()whose key the committed snapshot cannot answer.Retitled for the narrowed scope. Effort stays Moderate.
@sydevs-bot implementstarts the work.🤖 Written by the sydevs autonomous loop — see what this is
[-]feat(widget): badge unverified listings on map, cards and detail[/-][+]feat(widget): badge unverified listings on the event page[/+]sydevs-bot commentedon Sep 21, 2026
@Ardnived unblocked: every blocker is closed. Say
@sydevs-bot implementto start.🤖 sydevs dispatcher
Ardnived commentedon Sep 21, 2026
@sydevs-bot implement
Merge branch 'main' into claude/feat-216-report-form
Merge origin/main into claude/fix-223-regional-locale