Skip to content

Add the Events cluster Specs - #718

Open
richardhjtan wants to merge 2 commits into
mainfrom
gold-specs-step2-events
Open

Add the Events cluster Specs#718
richardhjtan wants to merge 2 commits into
mainfrom
gold-specs-step2-events

Conversation

@richardhjtan

Copy link
Copy Markdown
Collaborator

First step-2 cluster. Moves Events from the matrix layer into cards/events as Specs, so the blocks are found by Spec search:

  • event, booking, location, capacity-field, rsvp-status-field, confirm-booking, check-in-booking with their seven Specs. Booking holders are the CRM contacts already in cards/crm; RSVP Status and the lifecycle fields build on the catalog Status field; Location reads fields/geo-point; Capacity takes its hues from components/state-pill.
  • Example instances: two Events, two Locations and nine Bookings. Bookings that pointed at the matrix realm's Match cards now point at the two Events. All adoptsFrom and link refs are relative.
  • booking.gts: the isolated component is hoisted to a module-level class so its @tracked state type-checks, the Confirm and Check in handlers return void, and the lazy command imports carry a typed expect-error because the catalog type-check wants an extension the realm loader does not use.

Lint and type-check clean on the contents mirror; render verification on staging after merge, as with the other batches.

🤖 Generated with Claude Code

Moves Event, Booking, Location, Capacity, RSVP Status, Confirm Booking and
Check In Booking into cards/events as Specs with their example instances.
Bookings link the two Event instances and the CRM contacts already in the
catalog; Location reads the catalog's geo-point field and Capacity the State
Pill hue helpers. Booking's isolated component is a module-level class so its
tracked state type-checks, and its action handlers return void.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Staging Submissions Preview

This PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/

Changed folders:

  • cards/

Updated at 2026-09-11 10:20:11 UTC for commit 5f46834. Shared realm: only this PR's changed files are pushed; files touched by multiple PRs reflect whichever pushed last, and deleted files are not removed.

@richardhjtan richardhjtan left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Reviewed as a move: what the modules and instances lost between the source realm and here, plus how the seven Specs land in the surface this cluster exists to appear in. I did not render anything.

The code is sound; the example set isn't. Two blank Bookings, two instances whose filenames no longer describe their contents, and check-in timestamps nine months ahead of their event.

  1. Two all-null Bookings came across with the move — thread on Booking/76353cf8-…json.
  2. Location/northgate-fulfillment-centre.json holds a training ground, costing the Location Spec its non-event example — thread there.
  3. Check-in and reference dates contradict their events — thread on Booking/bk-20260802-00101.json.
  4. Event/northbridge-v-riverton.json holds an awards night — thread there.
  5. Seven Specs ship with no cardDescription, and cardTitle diverges from the CRM cluster's convention — thread on Spec/event.json.
  6. The Booking docblock now documents the isolated component — thread in booking.gts.
  7. Confirm is gated behind check-in eligibility — thread in booking.gts.

Adjacent, not asked of this PR: get places() is written out three times in booking.gts, and Segment.ring in capacity-field.gts is assigned and never read — both inherited from the source module.

"data": {
"type": "card",
"attributes": {
"reference": null,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] This booking and ad4c7635-3cf8-4a5d-b06c-dec6756b058f.json are blank — every attribute null, no holder, and this one has no event link either. They came across with the move and now sit in the catalog beside the seven authored examples, rendering as Untitled Booking wherever Bookings are listed or searched. Delete both, or make them the two states the set is missing (a Waitlisted unpaid claim, a Refunded one). Blocking: the example set is the deliverable here.

"data": {
"type": "card",
"attributes": {
"name": "Northbridge Training Ground",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] The card in northgate-fulfillment-centre.json is a football training ground, so both Location examples are now Northbridge sports venues. The Spec's readMe rests its case on one Location serving “an event's venue and an order's pickup point” — with the fulfilment centre gone nothing demonstrates the second half, and linkedExamples.1 points here. Restore the warehouse content or rename the file. Regression from the move; blocking for the Location Spec.

"data": {
"type": "card",
"attributes": {
"title": "End of Season Awards Night",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Filename says a fixture between two clubs, content is an awards dinner — and this is the Event Spec's linked example, so it is what a Spec reader lands on first. Rename the file to match the content, or restore the match. Regression from the move, non-blocking.

"code": "GBP"
}
},
"checkedInAt": "2026-08-14T06:40:24.114Z",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Checked in 2026-08-14 here and 2026-08-02 in bk-20260802-00144, against an event that starts 2027-05-22 — attendance recorded nine months before the doors open. bk-20261101-00602 fails the other way: a 2026-11-01 reference against an event that ended 2026-08-27. checkedInAt is the fact the Check In command exists to write, and the reason the Booking Spec picks a not-yet-checked-in example, so the demonstration set is contradicting the block it demonstrates. Repointing the bookings onto the two Events left their dates behind — re-date one side or the other. Blocking.

"data": {
"type": "card",
"attributes": {
"cardTitle": "Event card",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] All seven Specs leave cardDescription empty. Spec's own embedded and fitted pass it straight through as the secondary line (@secondary={{@model.cardDescription}} in packages/base/spec.gts), so every hit for this cluster in Spec search shows a title over a blank line — the surface this change exists to populate. fields/status/Spec and cards/crm/Spec/pipeline-stage.json both fill it. Separately, cardTitle here appends the kind (“Event card”, “Capacity field”) where the CRM cluster leaves cardTitle unset and pipeline-stage uses the bare name — worth settling before the next cluster copies whichever it happens to see. Non-blocking.

Comment thread cards/events/booking.gts
Comment on lines +57 to +69
/**
* A claim on places at an Event — who is coming, how many places, where the
* money stands, and whether they actually showed up. Four facts, four
* fields, deliberately not collapsed: `rsvp` is intent, `paymentStatus` is
* money, `checkedInAt` is what happened, `quantity` is how much of the
* capacity this claim consumes.
*
* `checkedInAt` is an event fact written once by the Check In Booking
* command (which is also what makes a ticket one-time-use); anything
* derived — attendance rates, no-show lists — is computed from it, never
* stored. Seat-level assignment (section, row, seat) is a seating-plan
* concern for the consumer's extending card.
*/

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Hoisting the isolated component left this docblock — the Booking block's own four-facts documentation — attached to BookingIsolated; export class Booking below has none. It now reads as documentation of a component, and anything regenerating the Spec readMe from the module will take it that way. Move it back onto the card class. Non-blocking.

Comment thread cards/events/booking.gts
Comment on lines +179 to +181
{{#if this.canCheckIn}}
<div class='actions'>
{{#if this.canConfirm}}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Confirm sits inside {{#if this.canCheckIn}}, so it inherits check-in's gate: canConfirm's own rsvp !== 'Declined' clause can never decide anything, and a Declined booking has no route back to Going from the card — though the RSVP graph allows Declined → Going and ConfirmBookingCommand will perform it. Deliberate? If so, drop the dead clause; if not, lift Confirm out to its own {{#if this.canConfirm}}. Non-blocking.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to 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.

1 participant