Skip to content

feat(atlas): reserve the add and correct view segments in the SEO route resolver - #1028

Merged
Ardnived merged 1 commit into
mainfrom
claude/feat-147-reserve-add-correct
Oct 24, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/feat-147-reserve-add-correct

Conversation

@Ardnived

@Ardnived Ardnived commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • GET /api/atlas/seo now treats add and correct as widget view segments, not region slugs.
  • Without this, a deep link or reload of the widget's new panels 404s the SEO head metadata.

Change outline

Reserved route segments (src/endpoints/atlas/seo/atlasRoute.ts)

RESERVED_SEGMENTS gains add and correct, matching the widget's RESERVED_SLUGS on sydevs/SahajAtlasWeb#147. The docblock names both views with an example each:

  • /add, /<region…>/add (add-a-class panel) → the region beside it, or the root when bare.
  • /<region…>/<eventId>/correct (suggest-a-correction panel) → that event.

The endpoint docblock in src/endpoints/atlas/seo/index.ts adds /add to the list of bare view routes that answer as the root.

Specs

  • tests/unit/atlas-seo-route.spec.ts: /gb/london/add, /gb/london/1204/correct, /gb/london/CORRECT drop the view segment; bare /add and /correct resolve to the root.
  • tests/int/atlas-seo.int.spec.ts: /add answers with the same document as /.

Regions' slug validation refuses no reserved words today, so nothing changed there. Generated types are 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). Server-side host: WeMeditateWeb lib/atlas-route.ts, sydevs/WeMeditateWeb#197. Merge this PR first (producer), then WeMeditateWeb.

Test results

  • Lean gate (.claude/skills/pr-prep/check.sh): ✓ lint, format, both typechecks, unit 224 files / 2891 tests
  • Targeted specs: tests/unit/atlas-seo-route.spec.ts 42 passed; tests/int/atlas-seo.int.spec.ts 54 passed
  • Red check: with add/correct removed from the set, 5 unit cases and the /add int case fail
  • Build: N/A (CI/Railway)

Part of sydevs/SahajAtlasWeb#147

🤖 Generated with Claude Code

…te resolver

The 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 deep link or
reload of such a URL is read as a region slug and GET /api/atlas/seo 404s.

Part of sydevs/SahajAtlasWeb#147

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@railway-app

railway-app Bot commented Oct 24, 2026

Copy link
Copy Markdown

This PR was not deployed automatically as @Ardnived does not have access to the Railway project.

In order to get automatic PR deploys, please add @Ardnived to your workspace on Railway.

@Ardnived
Ardnived marked this pull request as ready for review October 24, 2026 17:16
@Ardnived
Ardnived merged commit 6d62111 into main Oct 24, 2026
13 checks passed
@Ardnived
Ardnived deleted the claude/feat-147-reserve-add-correct branch October 24, 2026 17:16
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 24, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor

I could not request a reviewer here, so this is the step left for you.

  • request a reviewer — GitHub said: Review cannot be requested from pull request author. - https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request

🤖 sydevs dispatcher

sydevs-bot pushed a commit that referenced this pull request Oct 25, 2026
Clean merge, no conflicts — the first on this branch that needed no
numbers argument. Main's three commits since the last merge (#959, #1027,
#1028) touch the atlas SEO resolver, the submission intake and
escapeRegExp's home, none of which this branch reads.

src/plugins/access is untouched on main this time, so there was no
semantic call to make. tests/PERF.md's counts stand: main added one int
spec and edited two unit specs without adding a unit file, and
perf-figures-pinned counts files, not cases.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tj9vmW1FyGMJBwBFWybcWq
sydevs-bot pushed a commit that referenced this pull request Oct 25, 2026
The lane is 2902 cases on the merged tree, not 2898: main's #1028 added six
to atlas-seo-route and this branch's rename dropped the `clients` case from
locale-scoped-writes, which had nothing left to pin once that collection
stopped carrying a top-level `locale`.

The file count is unchanged at 225, so perf-figures-pinned stayed green and
nothing forced this — PERF.md declares itself the single writer of every
tier figure, and a figure four cases out is the drift that rule exists to
stop. Recorded as a fourteenth session row rather than replacing one, with
the gate's own 53.56 s; every earlier timing stays the session it names.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tj9vmW1FyGMJBwBFWybcWq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants