Skip to content

feat(location)!: one place picker and one place label everywhere - #281

Merged
aleskiontherun merged 3 commits into
mainfrom
claude/web-1-one-place-picker-and-label
Sep 21, 2026
Merged

aleskiontherun merged 3 commits into
mainfrom
claude/web-1-one-place-picker-and-label

Conversation

@aleskiontherun

Copy link
Copy Markdown
Member

A dive site's location is now the same object a trip part's already was — a name, a fuller name, a centre and a box — so the app has one place shape rather than a structured object on one host and a free-text string on the other. Both pickers fill it from one mapping in lib/locations.ts: the API's composed short form becomes name and the provider's full label becomes full_name, which is stored for the export and rendered nowhere. The dive-site form's Location field carries the whole object and shows its name, so editing a site does not strip the locality a pick brought with it, and clearing it sends an explicit null. A reverse-geocoded place fills the name alone — the coordinates a dropped pin returns are the site's own, not the locality's centre. Every surface that read the member as text reads location.name; with the country inside that name, a trip's compact label shows one place and a count, and every joined list of places separates with ; rather than , .

Verified with npm run ci (lint, type-check, 7154 unit tests, build), npm run test:coverage and npm run test:e2e, all green; the new form-write and reverse-geocode tests were each checked against a deliberately broken implementation first.

🤖 Generated with Claude Code

aleskiontherun and others added 3 commits September 21, 2026 21:44
A dive site's location is the object a trip part's already was: a name, a
fuller name, a centre and a box. Both forms fill it from one mapping, and
every surface that read the member as text reads its name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The nested schema error has no renderable message, so the Location field
enforces its own width. The trip schema's fixtures spelled the old member
name, which Zod stripped, so two of them asserted nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…oining

The cap belongs to one component, which every surface that joins a trip's
places renders - so the constant stays private and the page's own call is
a presence check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added feat New user-visible behaviour breaking Changes an existing contract - listed first in the release notes labels Sep 21, 2026
@aleskiontherun
aleskiontherun merged commit dd6101f into main Sep 21, 2026
12 checks passed
@aleskiontherun
aleskiontherun deleted the claude/web-1-one-place-picker-and-label branch September 21, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Changes an existing contract - listed first in the release notes feat New user-visible behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant