Skip to content

feat: re-parent onto template-docker v1.0.0; Track UI dependencies - #3

Merged
crazyracer98 merged 25 commits into
mainfrom
integration/templates-sdks-ui
Oct 22, 2026
Merged

crazyracer98 merged 25 commits into
mainfrom
integration/templates-sdks-ui

Conversation

@crazyracer98

Copy link
Copy Markdown
Contributor

Track UI wave PR. UI1-UI3 will be pushed to this same branch (integration/templates-sdks-ui) later, so this PR stays open until the wave is complete. Do not merge until then unless told otherwise.

What moved (UI0)

  • Re-parented onto template-docker v1.0.0: sync files (.github/template-sync-manifest.yml, template-sync-state.json at v1.0.0), Makefile, scripts/ (image-smoke.sh, image-scan.sh, skopeo.sh, runner-setup.sh, check-dockerfile-versions.sh), .devcontainer/Dockerfile + Dockerfile.dockerignore, workflows, .claude/ and docs/ replace-tier files. Replace-tier files verified byte-identical to template-docker v1.0.0 (git show v1.0.0:<path> | cmp).
  • app.Dockerfile (+ .dockerignore) -> Dockerfile; new image.mk with template-react's image values; ADR 0003 (linked from README.md).
  • Track UI dependencies in package.json / pnpm-lock.yaml: Fraunces + Instrument Sans fonts, @tanstack/react-query, motion, Storybook, Playwright, axe-core.
  • Nothing under src/ changed.

Decisions

  • nginx-unprivileged 1.30.6-alpine (Trivy clean); NODE_VERSION 24.22.0; motion 14.4.0 (minimumReleaseAge); pnpm-workspace.yaml allowBuilds: {esbuild: false}; Prettier-formatted lockfile; ADR 0003 linked from README.

Verification lane (craftainer-tc/template-react image, worktree mounted, docker socket)

  • prek run --all-files --hook-stage manual: all hooks passed (oxlint, prettier, tsc -b, vitest, template-sync-manifest, devcontainer-lock, hadolint, check-dockerfile-versions, image-scan/Trivy).
  • pnpm install --frozen-lockfile: lockfile up to date, supply-chain policies pass.
  • make build (RELEASE_ARCH=arm64): OCI tar built.
  • make release-check: unit tests 8/8 pass, image smoke answered 2xx.

After merge

The template-react devcontainer needs a rebuild (.devcontainer/Dockerfile, compose and feature versions changed). Only the user can trigger it.

Note: older open PR #2 (template-sync bootstrap v1.2.3) is unrelated and left untouched.

…cies

- sync from craftainer/template-docker v1.0.0 (replace tier verbatim, merge tier hand-merged, manifest extended)
- app.Dockerfile -> Dockerfile; devcontainer image now .devcontainer/Dockerfile; image.mk holds react's smoke values
- nginx base 1.27.4 -> 1.30.6 (image-scan)
- add storybook, playwright, axe, motion, fontsource Fraunces/Instrument Sans, TanStack Query; ADR 0003
- src/theme: MUI CSS-variable theme (light/dark, data selector), tokens, fonts, motion variants, ThemeProvider, useColorMode, contrast test
- scripts/check-design-tokens.sh + design-tokens hook with self-test
- docs/design principles, ADR 0004, manifest classification
@crazyracer98

Copy link
Copy Markdown
Contributor Author

UI1 landed (Field Ledger design system)

Merged wip/UI1 (25fa89c) plus a cleanup commit removing the unused @fontsource/roboto. Lane green: prek (manual stage), pnpm install --frozen-lockfile, pnpm build, make build, make release-check, design-token self-test.

Contents: src/theme/ (tokens, theme with colorSchemeSelector: "data" and system default mode, ThemeProvider, motion, useColorMode), scripts/check-design-tokens.sh and its hook, docs/design/, ADR 0004, manifest classification, main.tsx/App.tsx wiring. Known limit: one frame of the OS scheme can show on load (no pre-paint script).

Contrast (WCAG 2.2 AA, asserted at 4.5:1 by src/theme/contrast.test.ts):

Pair Light Dark
text.primary on paper 15.74 13.56
text.secondary on paper 7.11 7.29
text.secondary on default 6.65 7.92
primary on paper 5.68 5.80
primary contrastText on primary 5.75 6.30
secondary on paper 9.09 8.33
error on paper 7.45 6.85
warning on paper 5.92 7.88
info on paper 6.35 7.82
success on paper 5.97 8.52

Divider on paper is 1.47 (light) and 1.35 (dark); decoration only.

@crazyracer98

Copy link
Copy Markdown
Contributor Author

UI2 landed: frontend-design and ui-verify skills (ui-verify uses a W3C-WebDriver helper, shoot.mjs, instead of the Playwright MCP), .mcp.json with @mui/mcp@0.1.8, .claude/README.md. No manifest change (react-added skills survive syncs). Also: ADR 0003 note that UI1 removed @fontsource/roboto; token lint now skips *.test.ts(x) but keeps stories, with self-test fixtures. Lane green: prek, frozen install, build, token self-test. Signed-out axe findings and mobile wrap are left for UI3.

crazyracer98 and others added 10 commits October 22, 2026 06:47
- Storybook 10 with light/dark toolbar, auth and API stubs, stories for App, HeroesPage and HealthStatus
- Playwright toHaveScreenshot and axe suite in tests/visual/, run in the pinned Playwright image; arm64 baselines committed
- visual.yml CI job (arm64 runner, report artifact on failure); ADR 0005; manifest tiers
- Signed-out page: main landmark, h1, labelled spinners, no wrapping at 390px; matchMedia guard in useColorMode
- shoot.mjs fails on a null or mismatched scheme
- SKILL.md, design README and ADRs 0004/0005 name the real attribute
- dot directories are not matched by a bare directory include, so list the globs
- run.sh and visual.yml use the multi-arch index digest
- ADR 0005 documents bumping tag and digest together
- MuiDialog and MuiPopover paper: no shadow, 2px/1px text-color border
- regenerate the Add-hero dialog baselines (only these two changed)
@crazyracer98

Copy link
Copy Markdown
Contributor Author

UI3 landed (merge of wip/UI3 into the integration branch) plus four follow-ups.

UI3: Storybook 10 with stories for App, HeroesPage and HealthStatus; tests/visual/ (Playwright toHaveScreenshot plus axe, run in the pinned Playwright image, arm64 baselines); .github/workflows/visual.yml on the arm64 runner; ADR 0005; signed-out page fixes, labelled spinners, matchMedia guard.

Follow-ups, one commit each:

  • ui-verify shoot.mjs now reads html[data-dark]/html[data-light] and fails on a null or mismatched scheme (verified with a real run: scheme=light/dark on all 6 shots); SKILL.md, design README and ADRs 0004/0005 name the real attribute.
  • .storybook/*.ts(x) is type-checked through tsconfig.app.json (verified: an injected type error fails tsc -b).
  • Playwright image pinned by tag and index digest (@sha256:7852dc5a...) in run.sh and visual.yml; ADR 0005 says to bump both together.
  • Dialog and popover paper: ink rule instead of drop shadow; only the two Add-hero dialog baselines changed.

Lane green: prek (manual stage), frozen install, build, storybook build, tests/visual/run.sh twice with 64/64 and zero diffs, design-token self-test.

- run.sh forces linux/arm64; stories fail unless the render phase is finished
- serve.mjs: separator-safe traversal guard, 400 on malformed escapes
- HealthStatus reads 'Backend checking…' (baselines regenerated)
- shoot.mjs keeps the requested mode instead of parsing the file name
- .dockerignore skips tests and Storybook/Playwright output
…hase check)

- run.sh refuses non-arm64 hosts and no longer swallows a leading option
- stories wait for phase finished with one expect.poll
- .dockerignore skips .pnpm-store
- replace tier: Makefile, image scripts (smoke, scan, skopeo, runner-setup), test-image-scripts.sh, claude/plan docs
- merge tier: .dockerignore, .pre-commit-config.yaml, manifest, READMEs, docs/TEMPLATE.md
- state: v1.0.0 -> v1.2.0
@crazyracer98

Copy link
Copy Markdown
Contributor Author

Template sync v1.0.0 -> v1.2.0 (applied with template_sync.py apply; 0 conflicts, nothing removed upstream).

Syncs from v1.0.0 to v1.2.0 of craftainer/template-docker.

Files changed

  • replace: .claude/agents/plan-executor.md
  • replace: .claude/skills/plan-execution/SKILL.md
  • replace: CLAUDE.md
  • replace: Makefile
  • replace: docs/plans/README.md
  • replace: scripts/check-dockerfile-versions.sh
  • replace: scripts/develop.d/README.md
  • replace: scripts/image-scan.sh
  • replace: scripts/image-smoke.sh
  • replace: scripts/post-create.d/README.md
  • replace: scripts/runner-setup.d/README.md
  • replace: scripts/runner-setup.sh
  • replace: scripts/skopeo.sh
  • replace: scripts/test-image-scripts.sh
  • merge (clean): .claude/README.md
  • merge (clean): .dockerignore
  • merge (clean): .github/template-sync-manifest.yml
  • merge (clean): .github/workflows/README.md
  • merge (clean): .pre-commit-config.yaml
  • merge (clean): docs/TEMPLATE.md
  • merge (clean): scripts/README.md

React-owned files checked, no change needed: Dockerfile (no --chmod), image.mk (all values still valid; REPO derivation lives in the Makefile), nginx runner does not use runner-setup.sh (optional). Lane: prek manual, pnpm build, make build sbom release-assets, release-check, visual (64 passed, 0 diffs) all green.

@crazyracer98 crazyracer98 self-assigned this Oct 22, 2026
@crazyracer98
crazyracer98 merged commit c97d65b into main Oct 22, 2026
3 checks passed
@crazyracer98
crazyracer98 deleted the integration/templates-sdks-ui branch October 22, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant