Repository navigation
Description
Summary
The release-readiness review (.claude/reports/RELEASE_READINESS.md §4, Appendix B + D) found the internal docs have drifted from the code they describe — the architecture doc still documents a client that was removed, and CLAUDE.md's overview table names the wrong build-tool major — plus two tiny code-hygiene items with no other home: a silently duplicated drawer-width constant, and a residual gap in the Link atom's scheme guard. This ticket batches them: docs refreshed to match reality, the constant linked to its CSS twin, the Link guard completed and pinned by a test.
Proposed changes
1. .claude/docs/architecture.md — remove the axios ghost. Three spots still describe the replaced axios client (verified today):
- line 30:
React Query → axios client (src/config/api) - line 58:
| Data | src/config/api/ | axios client, zod-validated fetchers, mutations | - line 77: "Every axios request carries
Authorization: clients API-Key <apiKey>…"
The data layer moved to @payloadcms/sdk (PayloadSDK<Config> in src/config/api/client.ts, with applyRequestContext on a custom fetch — see .claude/rules/data-layer.md, which documents the replacement including the axios→SDK swap in PR #41). Rewrite those sections to describe the SDK client; sweep the rest of the doc for further drift while there.
2. CLAUDE.md — fix the overview table. Verified drifted rows:
- line 29: "Vite 5 (
vite.config.ts)" —package.jsondeclares"vite": "^8.1.4"(the v8 upgrade was issue chore(build): upgrade vite to v8 and align the coupled toolchain #45) - line 33: "TanStack Query +
axios(src/config/api/)" — axios is gone (same replacement as above)
Scan the remaining table rows and nearby prose for other drift in the same pass — the readiness report calls the table out generically (§4: "Minor drift: architecture.md still describes the replaced axios client; CLAUDE.md says 'Vite 5' (actual: 8)").
3. .claude/skills/draft-ticket/conventions.md — same ghost. The api scope row still reads "api — data layer, axios client, fetchers (src/config/api/)" (verified). Also note the map scope row points at src/components/mapbox/ (actual: src/components/organisms/Mapbox/) and the ui row says "NextUI/Tailwind" (NextUI was removed per .claude/rules/components.md) — fix these sibling drifts in the same file.
4. Link LEFT_DRAWER_PX to --sy-drawer-w. src/hooks/use-map-controller.tsx:62-66 hard-codes LEFT_DRAWER_PX = 352 with a comment "(matches --sy-drawer-w in the Drawer atom)" — but the CSS side (w-[var(--sy-drawer-w,22rem)] in src/components/atoms/Drawer/Drawer.tsx:65,69 and src/views/DrawerStack/DrawerStack.tsx:135) carries no reciprocal comment, so a host overriding the --sy-drawer-w variable (or anyone editing the 22rem default) silently desyncs map camera padding (readiness report §5 "Minor", Appendix C). Either derive one from the other (e.g. a single shared constant feeding both, or reading the resolved CSS var), or — the minimum bar — a paired comment on BOTH sides naming the other location, so neither can move alone. No behavior change at the default width.
5. Complete the Link atom's scheme guard + co-located test. The readiness report (§3.2 residual, Appendix B) flagged that the atom had no scheme allowlist of its own; the feat/classify-errors branch has since added a refusal branch (src/components/atoms/Link/Link.tsx:95-99 — a non-external, non-site-relative href renders a <span> + reportInternalError). The residual gap today is line 85:
const external = isExternal || target === '_blank' || /^https?:|^mailto:|^tel:/.test(href)isExternal / target="_blank" short-circuit the scheme test — a javascript: href passed alongside either flag classifies as external and renders verbatim on the plain <a> (lines 101-114), executing in the HOST page's realm on click. Unreachable today (every caller passes a route, an https:/mailto:/tel: URL, or something through safePath), but the atom is the last gate before a data-driven string becomes an <a href> — derive the external rendering from the scheme itself, and route a flag-carrying-but-unsafe href into the existing refusal branch. Add a co-located Link.test.tsx (node lane, renderToStaticMarkup per .claude/rules/tests.md) pinning: javascript: href refused under every flag combination (bare, isExternal, target="_blank"), the three allowed schemes render an <a> with the safe rel, and a site-relative href routes internally.
6. Explicit non-goal: do NOT touch src/config/responsive.ts — its dead-breakpoint cleanup moved into the container-responsiveness ticket, which rewrites that file.
Acceptance criteria
-
grep -in axios .claude/docs/architecture.mdreturns zero hits; the doc describes the@payloadcms/sdkclient consistently with.claude/rules/data-layer.md - CLAUDE.md overview table matches
package.json: Vite 8, no axios in the Data row; any other drifted rows found in the scan are fixed in the same commit -
.claude/skills/draft-ticket/conventions.mdscope list no longer references axios, NextUI, or the pre-reorgsrc/components/mapbox/path -
LEFT_DRAWER_PXand the--sy-drawer-w22rem default are linked — one derived from the other, or paired comments on BOTH sides naming each other; map padding at the default drawer width is unchanged - The Link atom refuses a
javascript:href on every path, including withisExternaland/ortarget="_blank";https:/mailto:/tel:and site-relative hrefs render exactly as before - Co-located
src/components/atoms/Link/Link.test.tsxexists in the node unit lane and covers the refused + allowed cases above -
src/config/responsive.tsis untouched -
pnpm lint && pnpm typecheck && pnpm test:runpass - Write an implementation report to
.claude/reports/<issue-number>-<short-slug>.md— in the MAIN checkout at /Users/devindra/Documents/Projects/SahajAtlasWeb even when implementing from a worktree (the folder is gitignored) — covering what changed, what was deliberately NOT changed, and which readiness-report findings are resolved.
Files affected
.claude/docs/architecture.mdCLAUDE.md.claude/skills/draft-ticket/conventions.mdsrc/hooks/use-map-controller.tsx(comment/const linkage only)src/components/atoms/Drawer/Drawer.tsx(reciprocal comment only, if the paired-comment route is taken)src/components/atoms/Link/Link.tsx+src/components/atoms/Link/Link.test.tsx(new)
Parallel implementation: this ticket OWNS the files listed above; sibling release-hardening tickets run concurrently — avoid edits outside owned files except strictly additive ones. In particular src/config/responsive.ts belongs to the container-responsiveness ticket, and .github/workflows/* / tests/smoke/* belong to the CI-hardening ticket.
References
.claude/reports/RELEASE_READINESS.md§3.2 (Link residual), §4 (docs drift), §5 (LEFT_DRAWER_PX), Appendix B + C + D (local, gitignored — main checkout only).claude/rules/data-layer.md— the SDK client the docs should describe (axios replaced in PR refactor(api): migrate data layer from axios+qs to @payloadcms/sdk #41)src/config/api/client.ts— the actual sharedPayloadSDKclient- Issue chore(build): upgrade vite to v8 and align the coupled toolchain #45 — the Vite 8 upgrade CLAUDE.md's table missed
.claude/rules/tests.md— node-lanerenderToStaticMarkuptest conventions
Metadata
Metadata
Assignees
Labels
Type
Fields
Hold Until
Activity
docs(claude): refresh stale internal docs and small hygiene batch (#111)
chore(claude): finish the accent removal and stale-doc sweep (#133)
chore(claude): widen the security-review trigger paths (#139)