docs/plans/2026-05-27-slate-v2-emotion-shadcn-hard-cut.md
Objective:
Hard cut Emotion from /Users/zbeyens/git/plate-2/.tmp/slate-v2 and migrate
the example/site styling surface to the existing shadcn default-style stack.
Completion requires no live @emotion/emotion/css(/cx( references outside
ignored generated build output, no @emotion/css dependency in the manifest or
lockfile, affected examples using stable class names and the site stylesheet,
green focused and full local verification, and this plan passing the autogoal
completion checker.
Flow mode: one-shot execution
Goal plan: docs/plans/2026-05-27-slate-v2-emotion-shadcn-hard-cut.md
Primary template: docs/plans/templates/task.md
Applied packs:
Task source:
.tmp/slate-v2 Emotion hard cut to shadcn default styleCompletion threshold:
rg -n '@emotion|emotion|css\(|cx\(' . --glob '!site/.next/**' --glob '!site/out/**'
has zero matches from /Users/zbeyens/git/plate-2/.tmp/slate-v2.package.json and bun.lock no longer contain @emotion/css.site/public/index.css.bun check passes from /Users/zbeyens/git/plate-2/.tmp/slate-v2.css-* classes.Verification surface:
bun installbun lint:fixbun lintbun typecheck:sitebun typecheck:rootbun checkrg -n '@emotion|emotion|css\(|cx\(' . --glob '!site/.next/**' --glob '!site/out/**'http://localhost:3100/examples/*/tmp/slate-v2-shadcn-search.pngConstraints:
.tmp/slate-v2.Boundaries:
.tmp/slate-v2 source..tmp/slate-v2/site/**, .tmp/slate-v2/package.json,
.tmp/slate-v2/bun.lock, and adjacent root-check fixes required to keep
verification honest..tmp/slate-v2/site examples app.Blocked condition: Stop if local commands cannot run after repo-prescribed retry, browser tooling cannot access the site and no local browser proof is possible, or source proves a design decision is required that the local shadcn/default-style patterns cannot answer.
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Used autogoal, hard-cut, task, Browser skill, and attempted autoreview closeout |
| Active goal checked or created | yes | get_goal returned no goal; create_goal created this objective |
| Source of truth read before edits | yes | User prompt, .tmp/slate-v2/package.json, shadcn wiring, and Emotion audit read |
| Tracker comments and attachments read | N/A | No tracker item supplied |
| Video transcript evidence required | N/A | No video supplied |
docs/solutions checked | yes | Searched docs/solutions for slate-v2/example/shadcn/emotion context |
| TDD decision | N/A | Styling-library migration; no new behavior contract needed before edit |
| Branch decision | N/A | No PR/commit requested; no proactive branch hygiene performed |
| Release artifact decision | yes | Private root/site example dependency cleanup; no published package changeset |
| Browser tool decision | yes | Tried approved in-app Browser first; it blocked local URL with ERR_BLOCKED_BY_CLIENT; used local Chromium smoke as fallback proof |
| PR expectation decision | N/A | User requested implementation only |
| Tracker sync expectation decision | N/A | No tracker issue supplied |
| Package/API pack selected | yes | Root manifest and lockfile changed |
| Public surface or package boundary identified | yes | Private root dependency graph and site examples only |
| Barrel/export impact decision | N/A | No package exports or barrels changed |
Work Checklist:
.tmp/slate-v2.bun check..agents, .claude,
.codex, hook, prompt, or command source changed.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run source audit, dependency refresh, checks, and browser proof | All threshold rows below passed |
| Bug reproduced before fix | N/A | Record reason | Migration, not a bug repro |
| Targeted behavior verification | yes | Browser-smoke representative migrated routes | Pagination, markdown-preview, search-highlighting, and comment-mode mounted expected migrated selectors; search produced 3 highlights |
| TypeScript or typed config changed | yes | Run relevant typecheck | bun typecheck:site, bun typecheck:root, and full bun check passed |
| Package manifests, lockfile, or install graph changed | yes | Run install and checks | bun install removed one package; bun check passed |
| Workspace authority proof | yes | Run proof in owning checkout | All commands ran from /Users/zbeyens/git/plate-2/.tmp/slate-v2 |
| Browser surface changed | yes | Exercise route/interaction | Local Chromium smoke passed; Browser-client blocked local URLs with ERR_BLOCKED_BY_CLIENT |
| Browser console/network check | yes | Record console state | Final browser smoke reported errors: [] |
| Browser final proof artifact | yes | Record screenshot path | /tmp/slate-v2-shadcn-search.png |
| Package behavior or public API changed | N/A | Add changeset or reason | No published package behavior/API/types/config/runtime delta |
| Registry-only component work changed | N/A | Update registry changelog or reason | No registry work |
| Docs or content changed | N/A | Verify or reason | No intentional docs/content edit for this task |
| High-risk mini gate | yes | Record failure mode and proof plan | Risk: styling drift from moving runtime styles to stylesheet; proof: source audit, typecheck, lint, browser smoke, and screenshot |
| Agent-native review | N/A | Record reason | No agent/tooling files changed |
| Local install corruption suspected | N/A | Record reason | No install-corruption signature |
| Autoreview | N/A | Record blocker/alternate review | Helper ran >3 minutes with no output; killed PID 69249; manual review found and fixed native CSS nesting risk |
| PR create or update | N/A | Record reason | No PR requested |
| Final lint | yes | Run bun lint:fix and bun lint | Both passed after cleanup |
| Public API / package boundary proof | yes | Source-audit impact | Root private dependency only; no package exports/barrels changed |
| Release artifact classification | yes | Record classification | No artifact: private root/site example cleanup |
| Package typecheck/build/test | yes | Run owning checks | bun check passed |
| Barrel/export generation | N/A | Record reason | No package exports or exported file layout changed |
| Goal plan complete | yes | Run autogoal checker | To run after final plan update |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | Skills, package manifest, shadcn wiring, and Emotion audit read | Done |
| Implementation | complete | Emotion imports removed; class names and stylesheet rules added; dependency removed | Done |
| Verification | complete | Source audit, bun check, and browser smoke passed | Done |
| Review | complete | Autoreview helper blocked; manual review cleanup applied and reverified | Done |
| Closeout | complete | Final goal-plan checker remains as mechanical closeout | Done |
Findings:
site/components.json,
site/styles/shadcn.css, site/components/ui/button.tsx, and
site/pages/_app.tsx.@emotion/css imports across examples under
site/examples/ts/** plus root package.json and bun.lock..d.mts and removed one dead unused helper so
bun check could prove the checkout.net::ERR_BLOCKED_BY_CLIENT; local Chromium proof against the same running
app succeeded.Timeline:
bun install; lockfile removed @emotion/css.bun typecheck:site passed.bun lint:fix initially exposed CSS selector ordering;
fixed and reran successfully.ERR_BLOCKED_BY_CLIENT; local Chromium smoke succeeded.bun check passed after root declaration/lint cleanup.bun check and browser smoke passed.Decisions and tradeoffs:
Review fixes:
scripts/integration-local-async.d.mts and removed the unused
pickupPath helper so root typecheck/lint could pass.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
bun serve on 3100 failed with EADDRINUSE | 1 | Use already-running checkout server on 3100 | Browser smoke used http://localhost:3100 |
Browser-client local URL blocked with ERR_BLOCKED_BY_CLIENT | 2 | Use local Chromium smoke against same server | Smoke passed with zero console errors |
First declaration filename .mjs.d.ts not resolved by TS | 1 | Use ESM declaration filename .d.mts | bun typecheck:root passed |
| Autoreview helper produced no output for >3 minutes | 1 | Terminate helper and do manual source review | Manual review cleanup applied and reverified |
Verification evidence:
bun install from .tmp/slate-v2 -> pass, saved lockfile, one
package removed.rg -n '@emotion|emotion|css\(|cx\(' . --glob '!site/.next/**' --glob '!site/out/**'
from .tmp/slate-v2 -> zero matches.rg -n '"@emotion/css"|@emotion|emotion' package.json bun.lock site/examples/ts site/public/index.css scripts --glob '!site/.next/**' --glob '!site/out/**'
from .tmp/slate-v2 -> zero matches.bun typecheck:site from .tmp/slate-v2 -> pass.bun typecheck:root from .tmp/slate-v2 -> pass.bun lint:fix from .tmp/slate-v2 -> pass.bun lint from .tmp/slate-v2 -> pass.bun check from .tmp/slate-v2 -> pass: lint, package/site/root
typecheck, 1258 Bun tests, 35 slate-layout tests, and 457 slate-react Vitest
tests..tmp/slate-v2 against
http://localhost:3100 -> pass: pagination, markdown-preview,
search-highlighting, and comment-mode selectors present; css-* class count
0 on every checked route; search interaction produced 3 highlights; console
errors []./tmp/slate-v2-shadcn-search.png.Final handoff contract:
bun check, and browser smoke passed.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout complete |
| Where am I going? | Final response after checker and goal completion |
| What is the goal? | Hard cut Emotion from .tmp/slate-v2 and migrate site examples to shadcn/default-style CSS |
| What have I learned? | Emotion was limited to example styling plus root dependency graph; shadcn was already wired |
| What have I done? | Removed dependency/imports/runtime classes, moved styles to stylesheet, fixed fast-check blockers, verified with source audit, bun check, and browser smoke |
Open risks: