docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.md
Objective:
Implement the accepted sync-shadcn /editors BlockViewer toolbar slice:
adopt shadcn /blocks toolbar order and density, keep Plate install/source and
Pro behavior, keep Open in v0 excluded, update partial sync tracking without
advancing lastSyncedCommit, and verify with focused checks plus browser proof.
Goal plan: docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.md
Template: docs/plans/templates/task.md
Primary template: docs/plans/templates/task.md
Applied packs:
Task source:
docs/sync/shadcn/runs/2026-05-29-4a4dc8e-to-efdec3c-editors-blocks-style/plan.mdCompletion threshold:
apps/www/src/components/block-viewer.tsx uses upstream-style toolbar order:
device controls, open-new-tab, refresh, then command/pro action.Open in v0 remains absent and no v0 import/action is introduced.docs/sync/shadcn/status.json no longer lists toolbar cleanup as deferred
for /editors; lastSyncedCommit remains unchanged.pnpm --filter www typecheck, and desktop/mobile browser
proof pass.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.md passes.Verification surface:
pnpm --filter www exec eslint src/components/block-viewer.tsx --fixpnpm --filter www typecheckhttp://localhost:3002/editors at
1175x1239 and 390x844node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.mdConstraints:
Boundaries:
docs/sync/shadcn/runs/2026-05-29-4a4dc8e-to-efdec3c-editors-blocks-style/plan.mdapps/www/src/components/block-viewer.tsx, sync run
plan, sync status JSON, and this goal plan.http://localhost:3002/editors.Output budget strategy:
Blocked condition:
Task state:
Current verdict:
Completion rule:
update_goal(status: complete) while any required checklist item
remains unchecked. If an item does not apply, check it and add N/A: <reason>.update_goal(status: complete) until every completion threshold
above is satisfied, final handoff evidence is recorded, and
node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.md passes.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Loaded sync-shadcn, autogoal, task, and shadcn-parity; read upstream and Plate BlockViewer. |
| Active goal checked or created | yes | Active goal created for accepted toolbar slice. |
| Source of truth read before edits | yes | Read accepted sync plan and toolbar slice. |
| Tracker comments and attachments read | no | N/A: no tracker. |
| Video transcript evidence required | no | N/A: no video. |
docs/solutions checked for non-trivial existing-code work | no | N/A: fresh accepted sync plan is the source of truth. |
| TDD decision before behavior change or bug fix | no | N/A: visual toolbar sync verified by browser proof. |
| Branch decision for code-changing task | yes | N/A: no branch/PR requested; edited current checkout. |
| Release artifact decision | no | N/A: docs app component only; no package release. |
| Browser tool decision for browser surface | yes | Used Playwright on local dev route because no direct Browser tool was callable. |
| PR expectation decision | no | N/A: no PR requested. |
| Tracker sync expectation decision | no | N/A: no tracker. |
| Output budget strategy recorded | yes | Targeted reads, compact command/browser output, screenshots saved in sync run. |
| Docs pack selected | yes | Applied because sync status/run plan changed. |
docs-creator loaded | no | N/A: sync bookkeeping, not user-facing docs prose. |
| Docs lane selected | yes | Supporting sync artifact update. |
| Target docs and nearest sibling docs read | yes | Read sync run plan and status JSON. |
| Docs style doctrine read | no | N/A: no user-facing docs content changed. |
| Documented source owner identified | yes | Source owner is docs/sync/shadcn/**. |
| Browser pack selected | yes | Applied because visible /editors toolbar changed. |
| Browser route / app surface identified | yes | http://localhost:3002/editors. |
| Browser tool decision recorded | yes | Playwright proof with desktop/mobile screenshots. |
| Console/network caveat policy recorded | yes | Known Potion iframe X-Frame/sandbox warnings recorded; no page errors or failed requests. |
Work Checklist:
<video-transcripts> XML, or marked N/A with reason..agents/**, .claude/**,
.codex/**, skills, hooks, commands, prompts, or user-action tooling.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run named checks and browser proof | Focused eslint, typecheck, status JSON parse, browser proof, and screenshots completed. |
| Bug reproduced before fix | no | Record failing test/repro or N/A with reason | N/A: visual sync slice. |
| Targeted behavior verification | yes | Run focused proof | Browser asserted device/open/refresh before command, refresh reload, no v0, no overflow. |
| TypeScript or typed config changed | yes | Run typecheck | pnpm --filter www typecheck passed. |
| Package exports or file layout changed | no | Run pnpm brl or record N/A | N/A: no package exports/file layout. |
| Package manifests, lockfile, or install graph changed | no | Run install checks or record N/A | N/A: no manifest or lockfile change. |
| Agent rules or skills changed | no | Run sync or record N/A | N/A: no agent rules/skills changed. |
| Workspace authority proof | yes | Run proof in owning workspace | Commands ran from /Users/zbeyens/git/plate; browser proof hit apps/www route. |
| Browser surface changed | yes | Capture browser proof | Desktop/mobile screenshots saved in sync run. |
| Browser final proof | yes | Attach screenshot or caveat | Screenshots saved; known Potion iframe warnings only. |
| CI-controlled template output changed | no | Restore output or record N/A | N/A. |
| Package behavior or public API changed | no | Add changeset or record N/A | N/A. |
| Registry-only component work changed | no | Update changelog or record N/A | N/A. |
| Docs or content changed | yes | Verify sync docs/status | Status JSON parses; run plan updated with implementation result. |
| High-risk mini gate | yes | Record failure mode and proof | Risk: adding v0 or breaking iframe refresh; browser proof asserts no v0 and refresh reloads content. |
| Agent-native review for agent/tooling changes | no | Run review or record N/A | N/A: no agent/tooling changes. |
| Local install corruption suspected | no | Retry reinstall or record N/A | N/A: checks passed. |
| Autoreview for non-trivial implementation changes | no | Run review or record N/A | N/A: narrow visual component sync with targeted checks/browser proof. |
| PR create or update | no | Run check before PR work or record N/A | N/A: no PR requested. |
| Task-style PR body verified | no | Verify PR body or record N/A | N/A: no PR. |
| PR proof image hosting | no | Host images or record N/A | N/A: no PR. |
| Tracker sync-back | no | Post tracker sync or record N/A | N/A: no tracker. |
| Final handoff contract | yes | Fill final handoff fields | Filled below. |
| Final lint | yes | Run scoped equivalent | pnpm --filter www exec eslint src/components/block-viewer.tsx --fix passed. |
| Output budget discipline | yes | Verify scoped output | Targeted command output and saved screenshots only. |
| Goal plan complete | yes | Run node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-29-sync-shadcn-editors-blockviewer-toolbar.md | To run after this fill. |
| Docs source-backed claim audit | yes | Verify docs claims | Claims backed by source, sync plan, status JSON, and browser proof. |
| Docs links / routes / previews | yes | Verify route/anchors/previews | /editors route and iframe refresh verified. |
| Docs MDX/content parser | no | Run content parser or record N/A | N/A: no MDX content changed. |
| Plugin page specifics | no | Apply plugin page rules or record N/A | N/A. |
| Browser interaction proof | yes | Exercise route/interaction | Clicked Refresh Preview and waited for iframe content. |
| Browser console/network check | yes | Record console/network state | No page errors or failed requests; known iframe warnings recorded. |
| Browser final proof artifact | yes | Record screenshot/trace/route proof | plate-editors-toolbar-desktop-after.png and plate-editors-toolbar-mobile-after.png. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | Read accepted sync plan plus upstream/Plate BlockViewer. | implementation |
| Implementation | complete | Patched BlockViewer; updated sync status and run plan. | verification |
| Verification | complete | Focused eslint, typecheck, JSON parse, browser desktop/mobile proof. | closeout |
| PR / tracker sync | N/A | No PR or tracker requested. | final response |
| Closeout | complete | Plan filled; final response ready after completion check. | final response |
Findings:
Decisions and tradeoffs:
Get the code behavior.Implementation notes:
iframeKey state to remount preview iframes on refresh./blocks without v0.view so toolbar state tracks view changes.files.Review fixes:
Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
Browser proof with networkidle | 1 | Use domcontentloaded plus iframe content wait | Passed |
| Desktop screenshot captured blank iframe after immediate refresh | 1 | Wait for iframe heading after refresh before screenshot | Passed |
| Strict text match inside iframe found two elements | 1 | Target iframe h1 specifically | Passed |
Verification evidence:
pnpm --filter www exec eslint src/components/block-viewer.tsx --fix passed.pnpm --filter www typecheck passed.node -e 'JSON.parse(require("fs").readFileSync("docs/sync/shadcn/status.json","utf8")); console.log("status json ok")' passed.http://localhost:3002/editors at desktop: device/open/refresh controls visible before command pill, command text is Plate install command, refresh reloads iframe content, Open in v0 absent, no horizontal overflow.http://localhost:3002/editors at mobile: no Open in v0, no horizontal overflow.docs/sync/shadcn/runs/2026-05-29-4a4dc8e-to-efdec3c-editors-blocks-style/screenshots/plate-editors-toolbar-desktop-after.png
and
docs/sync/shadcn/runs/2026-05-29-4a4dc8e-to-efdec3c-editors-blocks-style/screenshots/plate-editors-toolbar-mobile-after.png.Reboot status:
Open risks:
Final handoff contract:
/editors BlockViewer toolbar now follows shadcn /blocks order without v0.BlockViewer toolbar owns this behavior.Task-style PR body contract:
<!-- auto-release:start --> block. If a changeset is
part of the diff and repo policy expects auto release, include that block.๐ Fixes #123 or ๐ Fixes โ N/A, then
an emoji confidence line like ๐ข 95-100% confidence.| Phase | ๐งช Tests | ๐ Browser |.Reproduced and Verified rows. Mark passing proof with ๐ข, repro or
failing proof with ๐ด, and non-applicable cells with โ N/A.**โ
Outcome**, **โ ๏ธ Caveat**,
**๐๏ธ Design**, and **๐งช Verified**.Summary / Verification PR body, an
adaptive prose body from a git helper skill, plain ## Outcome sections, or
an unrelated generated badge footer unless the caller or repo template
explicitly asks for it.gh pr view --json body output or a concise source-backed summary
of that output.Final handoff / sync:
Timeline:
Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout complete after implementation and verification |
| Where am I going? | Final response |
| What is the goal? | Ship shadcn /blocks toolbar parity for Plate /editors without v0 |
| What have I learned? | Toolbar owner is BlockViewer; refresh needed iframe remount state |
| What have I done? | Patched toolbar, updated sync status/run plan, verified in browser |
Open risks: