Repository navigation
feat(map): reserve the add and correct atlas view segments - #197
Merged
Merged
Conversation
The atlas widget's add-a-class (`/add`, `/<region…>/add`) and suggest-a-correction (`/<region…>/<eventId>/correct`) panels are new routed views (sydevs/SahajAtlasWeb#147). Without them in RESERVED_SEGMENTS, a server-rendered /map deep link to either panel reads the view word as a region slug and renders a not-found page with no SEO head. Part of sydevs/SahajAtlasWeb#147 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying wemeditate-design with
|
| Latest commit: |
2df802c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://92029784.wm-design.pages.dev |
| Branch Preview URL: | https://claude-feat-147-reserve-add.wm-design.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | 2df802c | Commit Preview URL Branch Preview URL |
Oct 24 2026, 05:14 PM |
Contributor
|
I could not request a reviewer here, so this is the step left for you.
🤖 sydevs dispatcher |
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.
Summary
/map/*now treatsaddandcorrectas atlas view segments, not region slugs.Change outline
Reserved route segments (
lib/atlas-route.ts)RESERVED_SEGMENTSgainsaddandcorrect, matching the widget'sRESERVED_SLUGSon sydevs/SahajAtlasWeb#147 and SahajCloud's resolver. The docblock names both views with an example each:/map/add→ the atlas root;/map/<region…>/add(add-a-class panel) → that region./map/<region…>/<eventId>/correct(suggest-a-correction panel) → that event.Before this,
parseAtlasRoute('/add')readaddas a region slug, sogetAtlasSeoasked upstream for a region that does not exist, got a 404, and the page rendered withseo: null(no server-rendered content, no canonical or page metadata). It never 500s or 404s —pages/map/+data.tsdegrades by design.Specs (
lib/atlas-route.test.ts)/gb/london/add,/gb/london/1204/correct,/gb/london/CORRECTdrop the view segment; bare/addand/correctresolve to the root.matchMapRoutepasses/map/nl/amsterdam/addand/map/nl/amsterdam/1204/correctthrough unchanged.Contract impact
This is the atlas URL contract: the reserved-word set must match in three places. Widget: sydevs/SahajAtlasWeb#147 (branch
claude/feat-147-submit-a-class). Endpoint: sydevs/SahajCloud#1028, the producer — merge it first, then this PR. Until SahajCloud#1028 deploys,/map/<region>/1204/correctstill asks upstream with the spelling it was given and SahajCloud would readcorrectas a slug; bare/map/addalready works because the root is collapsed to/before the call.Test results
.claude/skills/pr-prep/check.sh): ✓ lint (0 errors), types, vitest 88 files / 890 testslib/atlas-route.test.ts56 passedadd/correctremoved from the set, 5 cases failPart of sydevs/SahajAtlasWeb#147
🤖 Generated with Claude Code