Skip to content

fix(event): render the venue's room in the address line - #172

Closed
Ardnived wants to merge 2 commits into
mainfrom
fix/render-address-room
Closed

Ardnived wants to merge 2 commits into
mainfrom
fix/render-address-room

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Closes #2 — the repo's oldest open issue.

What was wrong

address.room was declared in EventAddressSchema, selected by the fetcher, and read by nothing. A hall's "Community Room", edited in the CMS, appeared nowhere on any embedding site. One-token cause, dropped on every surface for every client.

The fix

whereLine in useEventDisplay is the only place a street address is composed, so one change reaches the list card, the event details, the registration view and the calendar export at once.

The order is street, room, city, matching SahajCloud's own addressOneLine (street, room, city, region, country postCode) rather than a second opinion — the widget and the SEO endpoint now describe one venue the same way instead of two ways.

Why it moved into a pure function

Extracted as composeWhereLine, mirroring composeCalendarLine directly beside it. A rule living only inside the hook is one four surfaces inherit and none of them can pin — which is how room went missing for this long with a green lane.

Its spec also covers the branch that was previously untested and is easy to break while editing this: an inactive venue gets the municipality and never the street, room included. A dormant listing must not send anybody to a door that no longer opens.

Verification

  • Lean gate green (lint · typecheck · 1345 unit tests).
  • ⚠ The spec was made to fail first. Dropping room back out of the join turns exactly the two room assertions red; the inactive and fallback cases stay green, which is what tells you the new coverage is the room and not the extraction.

Manual check worth doing: open an event whose venue has a Room set and confirm it reads 12 Mill Lane, Community Room, Toronto on the card, in the details, on the registration form and in a downloaded .ics.

🤖 Generated with Claude Code

Ardnived and others added 2 commits August 26, 2026 17:03
Closes #2

`address.room` was declared in `EventAddressSchema` and selected by the fetcher,
and read by nothing — so a hall's "Community Room", edited in the CMS, appeared
nowhere on any site. The repo's oldest open issue, and a one-token cause.

`whereLine` in `useEventDisplay` is the only place a street address is composed,
so the fix reaches the list card, the event details, the registration view and
the calendar export at once.

The order is `street, room, city`, matching SahajCloud's own `addressOneLine`
(`street, room, city, region, country postCode`) rather than a second opinion —
the widget and the SEO endpoint now describe one venue the same way.

Extracted as the pure `composeWhereLine`, mirroring `composeCalendarLine`
beside it, because a rule living only inside the hook is one four surfaces
inherit and none of them can pin. Its spec also covers the inactive-venue
branch, which must give the municipality and never the street: a dormant
listing must not send anybody to a door that no longer opens.

Verified by reintroducing the defect and watching the two room assertions fail.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
CHANGELOG covers visible behaviour, and an address gaining a line is exactly
that: a host who noticed the Room field going nowhere gets told it now works.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sahajatlas-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90b7e34
Status: ✅  Deploy successful!
Preview URL: https://0e47b35e.sahajatlas-design.pages.dev
Branch Preview URL: https://fix-render-address-room.sahajatlas-design.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90b7e34
Status: ✅  Deploy successful!
Preview URL: https://1390c99c.sahajatlas.pages.dev
Branch Preview URL: https://fix-render-address-room.sahajatlas.pages.dev

View logs

@Ardnived

Ardnived commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

This is not the right solution, closing for now. We will reraise it later

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.

Community Room not displayed on sahajayoga.ca website

1 participant