Back to Plate

sync shadcn registry directory route

docs/plans/2026-06-02-sync-shadcn-registry-directory-route.md

53.0.811.6 KB
Original Source

sync shadcn registry directory route

Objective: Implement the accepted sync-shadcn registry directory route slice: add a Plate-owned /r/registries.json endpoint, record the slice in sync-shadcn artifacts/status without advancing the full baseline, and verify with focused checks plus Browser/API proof.

Flow mode: accepted implementation slice.

Goal plan: docs/plans/2026-06-02-sync-shadcn-registry-directory-route.md

Primary template: docs/plans/templates/sync-shadcn.md

Applied packs:

  • browser: apps/www route surface changed

Sync source:

  • upstream repo: shadcn-ui/ui
  • upstream clone: ../shadcn
  • upstream app: ../shadcn/apps/v4
  • Plate docs app: apps/www
  • durable state: docs/sync/shadcn/status.json
  • durable policy: docs/sync/shadcn/decisions.md
  • run artifacts: docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/

Completion threshold: Complete when /r/registries.json serves a static JSON array with exactly one Plate-owned @plate entry, sync-shadcn plan/inventory/summary/status record the accepted route slice, focused route tests pass, focused Biome passes, pnpm --filter www typecheck passes, Browser/API proof confirms the endpoint, and node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-02-sync-shadcn-registry-directory-route.md passes.

Verification surface:

  • Upstream focused route shape: ../shadcn/apps/v4/app/r/registries.json/route.ts.
  • Plate source audit: apps/www/src/lib/plate-registry-config.ts and apps/www/src/app/r/registries.json/route.ts.
  • Focused route tests.
  • Focused Biome.
  • pnpm --filter www typecheck.
  • Curl and Browser endpoint proof.
  • Status JSON parse and partial sync semantics.

Constraints:

  • Do not run build:registry.
  • Do not copy upstream external registry directory content.
  • Do not change package/lockfile.
  • Do not advance lastSyncedCommit.
  • Keep Plate registry metadata source-owned.

Boundaries: Allowed edits: apps/www/src/lib/plate-registry-config.ts, apps/www/src/app/r/registries.json/route.ts, apps/www/src/app/r/registries.json/route.test.ts, docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/plan.md, docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/inventory.md, docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/classification-summary.json, docs/sync/shadcn/status.json, and this goal plan.

Output budget strategy: Use focused source reads and endpoint proof only. No patch artifacts.

Blocked condition: No blocker.

Sync state:

  • base commit: 4a4dc8eb0fc793d8e9225e780183ad605f15d2c2
  • target commit: cd54e0927f3853a777f700a0bbf34507cf697b9c
  • range kind: accepted partial sync
  • run directory: docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09
  • planning status: accepted route slice implemented
  • implementation status: done
  • baseline status: lastSyncedCommit unchanged

Current verdict:

  • verdict: accepted partial sync implemented
  • confidence: high
  • recommended next owner: sync-shadcn for remaining package/registry contract audit
  • reason: upstream route contract is useful, but upstream external registry directory data is shadcn product content; Plate serves only @plate.

Completion rule: Close after status parse and autogoal check pass.

Start Gates:

GateAppliesEvidence
autogoal loaded and active goal checked/createdyesActive goal created for registry directory route slice.
sync-shadcn skill/rule readyesAccepted implementation slice follows existing latest run plan.
Output budget strategy recorded before broad upstream commandsyesFocused route/directory source only.
docs/sync/shadcn/status.json readyesExisting baseline/partial syncs inspected.
Prior migration plans/solution notes checkedyesLatest sync run plan used.
Base and target refs resolved to exact SHAsyesBase 4a4dc8eb0fc793d8e9225e780183ad605f15d2c2; target cd54e0927f3853a777f700a0bbf34507cf697b9c.
Planning-only vs implementation mode decidedyesUser accepted route slice with "ok go".
User-review boundary recordedyesNon-route slices remain review-gated in the run plan.

Work Checklist:

  • Objective, threshold, verification surface, constraints, boundaries, and blocked condition are filled from the active goal.
  • Upstream range recorded with exact base SHA and target SHA.
  • Upstream route source inspected.
  • Plate registry constants inspected.
  • Plate-owned registry directory metadata added.
  • /r/registries.json route added.
  • Route test added.
  • Inventory decisions updated from needs-question to smart-merge for route and directory concept rows.
  • Decision counts reconcile to the upstream TSV row count.
  • Status JSON records a partial sync and keeps baseline unchanged.
  • Focused tests pass.
  • Focused Biome passes.
  • pnpm --filter www typecheck passes.
  • Curl endpoint proof passes.
  • Browser endpoint proof passes.
  • Final handoff shape is filled before closeout.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesProve route output, sync artifacts, tests, Biome, typecheck, Browser/APIAll passed.
Upstream range artifacts existyesVerify existing run artifacts remain presentExisting latest run artifacts remain present.
Inventory completenessyesReconcile decision counts with upstream row countUpdated counts total 790.
Decision accountingyesVerify route and directory rows are no longer questionsneeds-question is 0; smart-merge is 33.
Status JSON parse and semanticsyesParse status and verify synced baseline unchangedFinal parse command verifies JSON and baseline semantics.
Source-backed Plate mappingyesRecord upstream route/directory rows and Plate owner pathsapps/v4/app/r/registries.json/route.ts -> apps/www/src/app/r/registries.json/route.ts; apps/v4/registry/directory.json -> apps/www/src/lib/plate-registry-config.ts.
Visual comparison screenshotsnoJSON endpoint has no visual surfaceN/A.
Accepted implementation verificationyesRun focused checks for touched Plate surfaceTests, Biome, typecheck, curl, and Browser passed.
Browser surface changedyesCapture Browser proof on endpoint routeBrowser proof on http://localhost:3003/r/registries.json: one @plate entry, no console warnings/errors.
Package manifests, lockfile, or install graph changednoNo package/lock touchedN/A.
CI-controlled generated outputyesVerify generated registry output was not manually editedNo generated registry output touched.
Baseline advancementyesKeep synced baseline unchangedlastSyncedCommit unchanged; partial sync updated.
User review boundaryyesKeep remaining non-route slices review-gatedPlan still recommends package/registry contract audit and docs concept review.
Output budget disciplineyesBroad output artifacted/cappedFocused reads and proof only.
Goal plan completeyesRun completion checkernode .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-02-sync-shadcn-registry-directory-route.md passed.

Phase / pass table:

PhaseStatusEvidenceNext
Intake and baseline readdonelatest plan/status readcomplete
Upstream route evidencedoneupstream route/directory source inspectedcomplete
Implementationdoneroute, constants, and test addedcomplete
Artifact and status updatedoneplan/inventory/summary/status updatedcomplete
Verification and baseline decisiondonetests, Biome, typecheck, curl, Browser passedcomplete
Closeoutdonefinal response after checkercomplete

Decision counts:

DecisionCountNotes
adopt-upstream1shadcn package bump audit remains review-gated.
smart-merge33Includes Button source rows plus registry route/directory concept rows.
plate-fork14Plate-owned docs/home/sidebar surfaces.
exclude-upstream616Rhea/create/theme/home cards/generated adds/shadcn release content.
delete-plate-residue0No deletion slice.
no-op126Generated/upstream-only style output not manually synced.
needs-question0Registry route question accepted as Plate-owned metadata.

Recommended merge slices:

OrderSliceClassFilesWhyVerification
1shadcn 4.10.0 package/registry contract auditadopt-upstreamapps/www/package.json, lockfile, registry schema/import consumers if neededRemaining low-risk technical slice.Future accepted run.
2GitHub registry docs/concept reviewplate-fork / selective smart-mergePlate registry docs only if acceptedUpstream prose should not be copied directly.Future accepted run.

Questions:

  • N/A. The /r/registries.json route decision is accepted as Plate-owned metadata only.

Findings:

  • Upstream route shape is tiny and static.
  • Upstream directory content is a large external registry product directory, so Plate should not copy it.
  • Plate already had canonical @plate namespace and URL constants.

Decisions and tradeoffs:

  • Serve one Plate entry from source constants.
  • Keep https://platejs.org production URLs in the directory even in development.
  • Do not create public/r/registries.json; the route owns the endpoint.

Error attempts:

Error / failed attemptCountNext different moveResolution
Direct ESLint and www lint:fix are unusable in this checkout2Use repo-standard focused Biome plus typecheckBiome passed; www lint:fix failed across unrelated existing TS parsing, not this route.

Verification evidence:

  • pnpm --filter www exec bun test src/app/r/registries.json/route.test.ts src/lib/plate-init.test.ts passed: 4 tests, 14 assertions.
  • pnpm exec biome check apps/www/src/lib/plate-registry-config.ts apps/www/src/app/r/registries.json/route.ts apps/www/src/app/r/registries.json/route.test.ts --write passed with no fixes.
  • pnpm --filter www typecheck passed, including docs source parity and registry source checks.
  • Curl proof on http://localhost:3003/r/registries.json returned exactly one @plate entry with homepage https://platejs.org and URL https://platejs.org/r/{name}.json.
  • Browser proof on http://localhost:3003/r/registries.json returned the same one-entry JSON and no console warnings/errors.

Final handoff:

  • Range: 4a4dc8e..cd54e09
  • Plan artifact: docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/plan.md
  • Inventory artifact: docs/sync/shadcn/runs/2026-06-02-4a4dc8e-to-cd54e09/inventory.md
  • Decision counts: updated, total 790
  • Accepted partial sync: /r/registries.json Plate-owned directory route
  • Recommended next slice: [email protected] package/registry contract audit
  • Review request: remaining slices still need review before implementation
  • Question: none for this run
  • Status JSON: partial sync updated, baseline unchanged
  • Verification: tests/Biome/typecheck/curl/Browser/check-complete
  • Baseline: unchanged

Timeline:

  • 2026-06-02 Accepted route decision and implemented Plate-owned /r/registries.json.

Reboot status:

QuestionAnswer
Where am I?Registry directory route implemented and verified.
Where am I going?Closeout.
What is the goal?Add and verify Plate-owned /r/registries.json without advancing the full shadcn baseline.

Open risks: None for the route slice; larger non-route shadcn slices remain review-gated.