Back to Plate

sync shadcn code command yarn tab

docs/plans/2026-05-30-sync-shadcn-code-command-yarn-tab.md

53.0.810.5 KB
Original Source

sync shadcn code command yarn tab

Objective: Apply the dashboard payload mdx/code-command-yarn-tab: pending -> synced by adding shadcn-equivalent yarn support to Plate command code blocks, verifying the app, updating docs/sync/shadcn/deltas.json, and regenerating the dashboard.

Flow mode: one-shot execution. The user explicitly accepted this dashboard row through $sync-shadcn apply.

Goal plan: docs/plans/2026-05-30-sync-shadcn-code-command-yarn-tab.md

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

Completion threshold: Complete when Plate command code blocks produce and render yarn alongside pnpm, npm, and bun; focused app verification passes; the dashboard row is marked synced; and pnpm sync-shadcn dashboard regenerates the dashboard.

Verification surface:

  • Source audit: apps/www/src/lib/rehype-npm-command.ts, apps/www/src/components/code-block-command.tsx, apps/www/src/components/typography.tsx, apps/www/src/components/copy-button.tsx, apps/www/src/types/unist.ts, apps/www/src/hooks/use-config.ts, apps/www/src/components/codeblock.tsx, apps/www/src/components/block-viewer.tsx, and apps/www/src/app/(app)/_components/installation-code.tsx.
  • Upstream reference: ../shadcn/apps/v4/components/code-block-command.tsx and ../shadcn/apps/v4/lib/highlight-code.ts.
  • Commands: pnpm --filter www typecheck, pnpm lint:fix, pnpm sync-shadcn dashboard, node --check .agents/rules/sync-shadcn/scripts/build-dashboard.mjs, and JSON parse for deltas.json plus dashboard.json.

Constraints:

  • Do not run build:registry.
  • Do not advance lastSyncedCommit; this is one dashboard item, not full-range accounting.
  • Do not mutate rows not listed in the copied dashboard payload.
  • Keep Plate command prop names and copy analytics.
  • Keep screenshots absent for this source-only row.

Boundaries:

  • Edited Plate command block and copy-command sources only where yarn support is required.
  • Edited docs/sync/shadcn/deltas.json only for mdx/code-command-yarn-tab.
  • Regenerated docs/sync/shadcn/dashboard.html and docs/sync/shadcn/dashboard.json.
  • Fixed two lint blockers surfaced by pnpm lint:fix: duplicate defaults and delete in the dashboard builder, plus a hot regex in command menu.

Output budget strategy: Used focused file reads and capped command output. No broad upstream patch files were written.

Blocked condition: Blocked only if www typecheck, lint, dashboard generation, JSON parse, or source audit failed after the focused repair.

Sync state:

  • base commit: 4a4dc8eb0fc793d8e9225e780183ad605f15d2c2 from docs/sync/shadcn/status.json.
  • planned commit: efdec3ca4523e5edd8a714f633002a7addc203a1 from docs/sync/shadcn/status.json.
  • latest inspected upstream app commit: e2fa0101e3f0e28a5e360b93f41d1685911dd9ff.
  • range kind: dashboard-row implementation.
  • run directory: N/A; apply mode must not write new run artifacts.
  • implementation status: done.
  • baseline status: unchanged.

Current verdict:

  • verdict: synced.
  • confidence: high.
  • recommended next owner: sync-shadcn dashboard.
  • reason: yarn is implemented at generation, rendering, persistence, and copy surfaces.

Start Gates:

GateAppliesEvidence
autogoal loaded and active goal checked/createdyescreate_goal created active row-sync goal
sync-shadcn skill/rule readyesuser supplied sync-shadcn skill; apply semantics followed
Output budget strategy recorded before broad upstream commandsyesno broad upstream commands used
docs/sync/shadcn/status.json readyesbaseline 4a4dc8e, planned efdec3c, partial sync count 7
docs/sync/shadcn/decisions.md readyesconfirms Plate command/docs policy and no baseline advancement
Prior migration plans/solution notes checkedyesmemory and dashboard row evidence scoped this as shadcn docs parity work
../shadcn clone exists and was fetched/pulled intentionallyN/Ano fetch needed for accepted dashboard-row apply; local upstream files inspected
Base and target refs resolved to exact SHAsN/Arow apply does not recompute range; status SHAs recorded above
Base ancestry or ref problem provenN/Anot a range-planning run
Planning-only vs implementation mode decidedyesimplementation mode from $sync-shadcn apply pending -> synced
User-review boundary recordedyesuser explicitly accepted the row

Work Checklist:

  • Objective, threshold, verification surface, constraints, boundaries, and blocked condition are filled from the active goal.
  • Upstream range recorded with exact base SHA, target SHA, commit dates, and target subject; N/A for recomputed range because this is dashboard-row apply mode.
  • Run directory created under docs/sync/shadcn/runs/; N/A because apply mode must not write new run artifacts.
  • Complete upstream inventories saved; N/A because this is not range planning.
  • Focused diffs inspected on demand and summarized; no .patch files were written.
  • Visual screenshots captured; N/A because the row is source-only command behavior.
  • Every changed upstream apps/v4 row classified; N/A because existing dashboard row supplied the classification.
  • Decision counts reconcile to upstream TSV; N/A for dashboard-row apply.
  • Added, modified, and deleted groups summarized; N/A for dashboard-row apply.
  • Recommended merge slice accepted by user through copied dashboard row.
  • Settled exclusions and Plate forks preserved.
  • No user question remained for this row.
  • docs/sync/shadcn/status.json update semantics recorded: unchanged.
  • Workspace authority recorded for each verification command or artifact.
  • Output budget discipline followed.
  • Final handoff shape filled before closeout.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesProve yarn generation/render/copy support and synced dashboard statesource audit, rg, typecheck, lint, dashboard generation
Upstream range artifacts existN/AApply mode must not create range artifactsno run artifact needed
Inventory completenessN/AExisting dashboard row is the mutation unitrow mdx/code-command-yarn-tab updated only
Decision accountingyesMark accepted row synced after implementationdeltas.json row state is synced
Status JSON parse and semanticsyesKeep baseline unchangedstatus read; no status write
Source-backed Plate mappingyesRecord local source evidencefiles listed above include __yarnCommand__ and yarn config
Visual comparison screenshotsN/ASource-only MDX command rowno screenshots needed
Planning-only no implementation editsN/AAccepted implementation modeuser applied pending -> synced
Accepted implementation verificationyesRun focused verificationpnpm --filter www typecheck, pnpm lint:fix
Browser surface changedN/ASource behavior only; no browser proof required by rowsource and typecheck proof
Package manifests, lockfile, or install graph changedN/ANo package files changedno install needed
Agent rules or skills changedN/ANo .mdc or generated skill editeddashboard script only
CI-controlled generated outputyesAvoid registry/template outputno build:registry; only dashboard regenerated
Baseline advancementyesDo not advance baselinestatus.json unchanged
User review boundaryyesAccepted dashboard row implemented$sync-shadcn apply payload
Output budget disciplineyesKeep evidence cappedno broad patch artifacts
Goal plan completeyesRun autogoal checkcommand recorded below

Phase / pass table:

PhaseStatusEvidenceNext
Intake and baseline readdonestatus and decisions readcomplete
Upstream row evidencedoneupstream CodeBlockCommand and highlight-code inspectedcomplete
Implementationdoneyarn props, tabs, config, copy helpers addedcomplete
Dashboard statedonedeltas.json row synced and dashboard regeneratedcomplete
Verificationdonetypecheck, lint, dashboard, JSON parse, source auditcomplete
Closeoutdonefinal handoff readycomplete

Decision counts:

DecisionCountNotes
synced1mdx/code-command-yarn-tab
no-op0no extra rows touched

Recommended merge slices:

OrderSliceClassFilesWhyVerification
1Add yarn support to command code blockssyncedcommand transform, MDX pre, command UI, copy helpersmatch upstream command-manager coveragepnpm --filter www typecheck; pnpm lint:fix; dashboard regeneration

Questions:

  • None.

Findings:

  • Plate already had command tabs and copy helpers; they only lacked yarn at the prop-generation and UI surfaces.
  • pnpm lint:fix exposed existing lint blockers in dashboard builder and command menu; fixed them so verification is green.

Decisions and tradeoffs:

  • Used upstream package-manager coverage while preserving Plate prop names: __yarnCommand__ instead of upstream __yarn__.
  • Kept the row as synced because behavior is equivalent even though Plate's local names differ.

Error attempts:

Error / failed attemptCountNext different moveResolution
pnpm lint:fix failed on duplicate object keys, delete, and hot regex1Patch lint blockers directlypassed on rerun

Verification evidence:

  • pnpm --filter www typecheck: passed.
  • pnpm lint:fix: passed after focused lint repairs.
  • pnpm sync-shadcn dashboard: passed and regenerated dashboard artifacts.
  • node --check .agents/rules/sync-shadcn/scripts/build-dashboard.mjs: passed.
  • JSON parse for docs/sync/shadcn/deltas.json and docs/sync/shadcn/dashboard.json: passed.
  • rg source audit found __yarnCommand__ in transform, command UI, MDX pre, copy helpers, installation snippets, block viewer, type definitions, and dashboard JSON.

Reboot status: No reboot needed. The task finished in the current thread with source, dashboard, and verification evidence.

Open risks: None for the accepted row. This does not settle the other pending MDX rows.

Final handoff:

  • Row: mdx/code-command-yarn-tab.
  • State: synced.
  • Baseline: unchanged.