Repository navigation
fix(event): one meaning of "inactive", "Today" once, and no Full chip - #500
Conversation
… recurring card An inactive listing such as Stirling was tagged "One-off event". SahajCloud sends it an all-null schedule group, so the no-schedule rule (#370) missed it and its kind derived as one-off. The `inactive` flag now decides alone, so a real one-off an admin flags inactive loses its type tag too. A class meeting today said "Today" twice on its page: as a tag, and in the when line right under it. The Today chip now shows only on a list card that leads with the recurrence pattern ("Every Wednesday"). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comments now carry only the why, and the docblocks that listed EventChips' chips point at the component instead, so the rule lives in one place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A flagged listing with a stored weekly schedule had no type label, yet `isDefaultType` still called it the plain weekly class. Nothing reads one without the other today, but the pair now agree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A card for a recurring class meeting today still printed a muted "Today" under its pattern, beside the Today chip. The card now drops that line wherever the chip shows. A full class's chip says "Full", so its line keeps "Today". This is the line the proposal branches carry (e353663), plus the full-class exception. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…stem Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | f56acf0 | Nov 26 2026, 05:17 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Both rules are right, and each is one condition. Nine of the fourteen files are one-line comment or doc edits. The new EventFacts.test.tsx case renders both components together and counts the string — the right way to pin a rule spanning two of them.
What it leaves behind sits in one file. The diff grows use-event-display.ts, and that file now carries a verbatim copy of the resolver's own gate, a conjunct that cannot change an output, and a dead statusChip still returning "Today" under the rule this PR narrows. No contract surface moves, so the CHANGELOG's "no parameter, origin, CSP, storage or Permissions-Policy change" holds.
Findings
- should-fix
use-event-display.ts:147— duplicates the resolver'sevent.inactive || !schedulegate (lib/shape/event.ts:396). - should-fix
use-event-display.ts:170— thetypeLabel !== nullconjunct is a no-op; its one consumer already gates on it. - should-fix
use-event-display.ts:175—statusChipis unread and still holds the old "Today" rule. - should-fix
EventChips.stories.tsx:52— an internal condition in a Ladle description.
What was checked
Read whole on the branch: use-event-display.ts, EventChips.tsx, EventFacts.tsx, EventListItem.tsx, lib/shape/event.ts, mocks/events.ts. new-pieces.mjs answered NONE, so no streamliner ran. Traced every surface that can say "Today": both EventChips call sites, EventFacts' three variants, and Map.tsx's popover through calendarLineParts. Each says it once, and the popover is unchanged. Repo-wide greps for isDefaultType, statusChip and chip_today. No consumer side to follow: the diff touches no generated type, atlas-url-contract.json or docs/embedding.md. mockEventToday is DAILY, so the Event Chips story claim holds.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`useEventDisplay` carried a verbatim copy of `resolveEventDisplay`'s own `event.inactive || !schedule` gate, so one rule sat in two modules. The copies would have drifted silently the moment either half moved. `EventDisplay.dormant` reports which terminal branch the resolver took, so the hook reads `display` rather than the raw event, as its docblock promises. The status cannot answer this: it also covers an unflagged class with no session left, and that listing keeps its type. No behaviour change. The new spec in `event.test.ts` separates the two `inactive` statuses, and was watched failing with `dormant` widened to the dateless branch. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUq2Bv6ajH5MZwtWVK
The `typeLabel !== null` conjunct could not change an output. Its one consumer, `EventChips`, already reads `typeLabel !== null && (!compact || !isDefaultType)`, so the label check ran either way — and the name went on claiming a shape while testing a label. The paired assertion in `use-event-display.test.ts` goes with it: it pinned the conjunct, not a rendered difference. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUq2Bv6ajH5MZwtWVK
Ladle renders this docblock as the description a designer reads, and "only beside a recurrence pattern" is the component's internal condition. The samples already show the rule: Today carries a chip under Compact and none under Default. The why stays in EventChips.tsx, beside the condition it explains. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUq2Bv6ajH5MZwtWVK
Nothing in `src/` read `statusChip`: `EventChips` derives `full` and `today` itself, and only two comments still named it. Its `status === 'today'` branch returned "Today" unconditionally, so wiring it up later would have restored the duplicate "Today" this branch removes. `chip_starts` and `chip_ended` lose their last call site with it, so both go to `RETIRING_KEYS` until sydevs/SahajCloud#1283 drops them from `sy-atlas-translations`. `chip_full` and `started_on` keep theirs. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUq2Bv6ajH5MZwtWVK
|
Four findings, all adopted.
No behaviour change. Lean gate green, 2547 passed. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
…-today-tags # Conflicts: # CHANGELOG.md # src/components/molecules/EventFacts/EventFacts.test.tsx
SahajCloud sends an inactive listing a schedule group whose fields are all null, and z.coerce.date() read its null firstDate as 1970-01-01. The listing then had a schedule: `!schedule` never fired, the "once" cadence filter matched it, and its JSON-LD and og:event:start_time read 1970. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…once - `isInactive` (lib/shape/event.ts) is the one verdict: the SahajCloud flag, no schedule, or a class with no session left. The resolver's `inactive` status, `hasApproximatePlace` (the map's area) and the missing type tag all read it. `display.dormant` and the map's clock-free copy go, so a class with no session left now loses its type tag too (agreed 26 Nov). - `surfaceView` (hooks/use-event-display.ts) decides what the page, a card and the summary show: the lead line, its time and faded detail, the type chip, and the one availability chip. EventFacts, EventChips and the map-pin popover only render it, so "Today once" lives in one function. `calendarLineParts`, `composeCalendarLine`, `typeLabel`, `isDefaultType` and the raw time strings leave the hook's public shape. - One surface name for both components: 'page' | 'card' | 'summary', replacing EventFacts' default/compact/card and EventChips' default/compact. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A full class says so where you would sign up ("This event is full"), so the
card and the class page drop the chip. A full class meeting today still gets
no Today chip, since its session cannot be joined; its faded line keeps
"Today". `event.display.chip_full` loses its last call site and joins
RETIRING_KEYS under sydevs/SahajCloud#1283.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-today-tags # Conflicts: # CHANGELOG.md # src/components/molecules/EventFacts/EventFacts.test.tsx # src/components/molecules/EventFacts/EventFacts.tsx
…_ended and chip_full atlas keys (#1284) The widget renders none of them since sydevs/SahajAtlasWeb#500: the unused statusChip string was the only call site for the first two, and the Full chip, now gone, for the third. Translators were still asked to fill all three. Removes them from the schema, the ten seed files and the generated types, and adds a data migration sweeping the stored copy out of event_display on the main and every version row, since the group declares additionalProperties: false and a leftover would refuse every later save. down restores nothing: the old schema declares the keys but requires none. chip_today's and started_on's descriptions stop calling themselves status chips where none is left, and the strict-budget specs pin chip_today in chip_full's place. Closes #1283 Co-authored-by: Claude Opus 5.5 <[email protected]>
Brings in #500–#530. Resolutions: - CompactEmbedView stays deleted; its #529 label change and changelog line are moot. - DrawerStack keeps the inline arm (`canCollapse` reads `sheeted`) on main's dismiss, showResults, sheetTall and dimmed scrim, beside "Close map". - LocatorProvider wraps MapProviders, so the inline map and its filters share one locator, and the expanded map gets its own. - Registration, Share and the form take `form-column` over main's new markup. - The panel stays 384px; the EventActions story previews 336px and 272px. - Translations take main's production snapshot; the two keys #466 wires leave PENDING_KEYS. - The story harness gains `expanded`, so the sticky-Register story shows the sheet. - embed.spec picks the expanded dialog first: the panel inside now reads the same name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
isInactive.surfaceView.Change outline
Types — the schedule at the parse boundary
SahajCloud sends an inactive listing a schedule group whose fields are all null.
z.coerce.date()turned that into a 1970 schedule, so!schedulenever fired for live data.Flow — one meaning of "inactive"
Before this PR there were four meanings: the flag, the resolver's status, the map's clock-free copy, and the type-label rule. Now there is one verdict, and every reader goes through it.
Behaviour — what each surface shows, decided once
EventFacts, EventChips and the map-pin popover each used to re-derive pieces of this from
status,fulland their own variant. Now one pure function decides it, and the components only render.Preview
Test results
surfaceViewcovers every surface rule.isInactiveis checked against the resolver status.Manual verification
startDateand saysEventPostponed./gb/south-east/london/1817(Mayfair Library, weekly on Fridays) shows the card and page rules on live data.Notes for reviewer
display.dormant, which the loop had added.chip_fullis retiring. It joinsRETIRING_KEYSunder chore(translations): drop the retired event.display.chip_starts, chip_ended and chip_full atlas keys SahajCloud#1283. That issue listschip_startsandchip_ended, and needschip_fulladded.hasApproximatePlaceusedupcomingDates[0]without a clock. It now sharesnextSession, so the map and the panel agree. The one change: a class with no precomputed dates whose first session is still ahead draws at its door, not as an area.isInactive.🤖 Generated with Claude Code