Repository navigation
Conversation
Owner decision 2026-11-12: a canonical Bulgarian city list, venues
reference a city id. `venue.cityKey` (P86) is filled from the typed city by
a trigger on every write, backfilled, and is a key of CITY_SPELLINGS
(src/lib/geo/cities.ts), whose names already live in the catalogues. A
guardrail holds the SQL function to the TypeScript list.
Every venue card carries cityKey and cityNames {bg, en} (the v1 API has no
request language); `?city=` takes the key; GET /api/v1/venues/facets offers
one city per key and the live sports, so the phone stops showing «Sofia»
and «София» as two cities and stops missing cities past its first page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfeuWUNfBvCav72pHsXdHa
`migration_lock.toml` sits beside them, and reading it as a folder failed the whole suite to load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DfeuWUNfBvCav72pHsXdHa
…amet/projectZ into feat/667-canonical-cities
`toVenueDetail` spreads `toVenueSummary`, so a venue's detail carries currency, clubLogoUrl, cityKey and cityNames, but the flat VenueDetail schema only named them on VenueSummary: the iOS client could not read them on the venue screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DfeuWUNfBvCav72pHsXdHa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #667. Owner decision 2026-11-12: a canonical Bulgarian city list; venues reference a city id; old rows migrated; the API returns the name in the viewer's language.
venue.cityKey(nullable, indexed), filled fromcityby aBEFORE INSERT OR UPDATE OF citytrigger throughvenue_city_key_for(), and backfilled asapp_superuser(FORCE RLS, as in P41). A city outside the list keeps a null key and its typed text. The previous image never names the column, so a rollback keeps working and its writes are still keyed.CITY_SPELLINGS(src/lib/geo/cities.ts, [Core] /venues: sport and city filters, Bulgarian city names #357), whose display names already live inmessages/*.jsonundercities.<key>. The SQL function is generated from that list; the new guardrailcity-key-sql.test.tsfails if they drift (adding a city = a migration replacing the function).VenueSummary/VenueDetailgainscityKeyandcityNames {bg, en}(the v1 API has no request language, so both go out).?city=on/venuesand/venues/neartakes the key (any spelling still works). New publicGET /api/v1/venues/facets:cities: [{value, key, names}](one per key) andsports, from the same query as the web's filters; added to the BYPASSRLS allowlist with its reason.Checked locally: tsc; eslint; guardrails + unit + rendered (9945); integration: new
venue-city-key(trigger on insert and edit, card fields,?city=sofia, facets dedupe),api-v1-public-reads,venue-filters,least-privileged-role,rls-policy-shape(43) on a private test DB.Overlaps #673 on
dto.tsand three test fixtures; whichever lands second is rebased.🤖 Generated with Claude Code
https://claude.ai/code/session_01DfeuWUNfBvCav72pHsXdHa