Skip to content

feat(ui): add layout primitives and SSR smoke - #5

Merged
kattsushi merged 1 commit into
feat/ui-packagefrom
feat/ui-package-custom-verification
May 21, 2026
Merged

kattsushi merged 1 commit into
feat/ui-packagefrom
feat/ui-package-custom-verification

Conversation

@kattsushi

Copy link
Copy Markdown
Owner

Part of tracker #2. Targets feat/ui-package.

PR Type

  • Bug fix
  • New feature
  • Documentation only
  • Code refactoring
  • Maintenance/tooling
  • Breaking change

Summary

  • Adds custom SSR-safe layout primitives for @os-copilot/ui.
  • Adds mobile-first Storybook stories for the new primitives.
  • Adds SSR/SPA smoke coverage and extends public import/export smoke coverage.

Chain Context

master
└── 📍 tracker #2: feat/ui-package
    ├── ✅ PR #3: scaffold package + shadcn routing
    ├── ✅ PR #4: Zaidan baseline + Storybook/CSS
    └── 🔎 PR #5: layout primitives + SSR/SPA verification

Scope

Included:

  • Center
  • Stack
  • Grid
  • Float
  • GridPattern
  • SSR/SPA smoke fixture/tests
  • import/export smoke coverage for root + source-routed imports

Deferred intentionally:

  • data-table / data-table-filters because they need a TanStack Table dependency/API decision.
  • toast because it needs a Sonner dependency/API decision.
  • copy-id-button because clipboard behavior and async feedback deserve separate review.
  • marquee because motion/reduced-motion behavior deserves separate review.
  • automated visual regression tooling because no Playwright/Chromatic dependency decision exists yet.

Changes

File Change
packages/ui/src/components/ui/{center,stack,grid,float,grid-pattern}.tsx Adds custom layout/decorative primitives.
packages/ui/src/stories/ui/* Adds Storybook examples for each new primitive.
packages/ui/src/index.ts Exports new primitives from the root package API.
packages/ui/src/testing/tree-shaking-smoke.test.ts Extends public import smoke coverage.
packages/ui/src/testing/ssr-*.tsx Adds SSR and SPA smoke coverage.

Test Plan

  • pnpm exec dprint check packages/ui/src packages/ui/vitest.config.ts
  • pnpm exec oxlint packages/ui/src
  • pnpm nx test ui --run
  • pnpm nx typecheck ui
  • pnpm nx build ui
  • pnpm nx build-storybook ui
  • Fresh reviewer audit completed with no blockers.

Notes

  • @os-copilot/ui/components/ui/* wildcard exports cover the new primitives. This PR does not add ergonomic subpaths like @os-copilot/ui/center; only button and chart currently have explicit ergonomic subpaths.
  • Kobalte overlay SSR string rendering can hit getNextContextId cannot be used under non-hydrating context, so true SSR smoke coverage focuses on layout/decorative/Button while overlays remain covered by SPA smoke.
  • Vitest/jsdom logs Window.scrollTo() method as not implemented during tests; tests pass.

Contributor Checklist

  • Linked tracker PR feat(ui): track UI package chain #2
  • Added exactly one type:* label
  • Ran shellcheck on modified scripts (not applicable: no shell scripts changed)
  • Skills tested in at least one agent
  • Docs updated if behavior changed
  • Conventional commit format
  • No Co-Authored-By trailers

@kattsushi kattsushi added the type:feature New feature label May 21, 2026
@kattsushi kattsushi mentioned this pull request May 21, 2026
16 of 21 tasks
@kattsushi
kattsushi merged commit d5faca3 into feat/ui-package May 21, 2026
kattsushi added a commit that referenced this pull request May 22, 2026
* chore(ui): open package feature chain

* feat(ui): scaffold package and shadcn routing (#3)

* feat(ui): add Zaidan Storybook baseline

Merge PR 2 into the UI package tracker branch.

* feat(ui): add layout primitives and SSR smoke (#5)

* feat(ui): add component subpath exports (#6)

* feat(ui): add component subpath exports

* style(ui): format subpath smoke test

* feat(ui): add interaction utilities (#7)

* feat(ui): add interaction utilities

* fix(ui): use Zaidan Sonner toast

* feat(ui): add data table components (#8)

* fix(ui): preserve data filter input focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant