RFC: Once UI 2.0 package architecture (foundations / core / data / nextjs) - #124
Open
lorant-one wants to merge 4 commits into
Open
RFC: Once UI 2.0 package architecture (foundations / core / data / nextjs)#124lorant-one wants to merge 4 commits into
lorant-one wants to merge 4 commits into
Conversation
…/nextjs split) Drafts the Week 3 library-split RFC from verified repo state: extracts tokens+styles into a framework-agnostic foundations package, moves charts (recharts) into an opt-in data package, makes Next.js optional via an adapter provider with DOM fallbacks, and defines a test-first sequencing plan (package-contract tests, interaction tests, CSS snapshot guard) across five shippable phases ending in the 2.0 breaking release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5EsMG3atqKPXbp6xaqwVf
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Pins the next/* import surface to the 8 known files and confines recharts to modules/data, so the coupling the 2.0 split relies on cannot silently grow. Snapshots the compiled CSS API (722 token custom properties, 1,290 utility classes, 21 theme attribute selectors) by name only — value tweaks pass, renames/removals fail CI until intentionally updated. Corrects the RFC's Next-import inventory from 7 to 8 files (Meta.tsx's type-only next import, surfaced by the new test). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5EsMG3atqKPXbp6xaqwVf
…contract checks The exports map pointed ./icons, ./types and ./interfaces at dist/<name>/index.js while the build emits dist/<name>.js, leaving all three subpaths unresolvable for every consumer (incl. bundlers) since they shipped. Points them at the real files, adds an exports-integrity test that fails on any exports path the build does not emit, and wires publint + arethetypeswrong as 'pnpm check:package' (advisory for now: the packed output is ESM-in-.js without type:module, so plain Node cannot load the package at all — documented as a 2.0 build decision in the RFC rather than patched here). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5EsMG3atqKPXbp6xaqwVf
lorant-one
force-pushed
the
claude/once-ui-2-architecture-fn89zk
branch
from
August 12, 2026 08:15
6f678bb to
cb3d7b9
Compare
…selines Adds pointer/keyboard/controlled/disabled coverage for Accordion, Checkbox and Switch (9 tests). Surfaces one a11y finding for the Week 5 audit: Switch's keydown handler sits on an inner focusable div without a role or accessible name, separate from the role=switch element. Updates AGENTS.md's do-not-regress inventory to the new 9-suite/108-test baseline and documents the advisory check:package baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5EsMG3atqKPXbp6xaqwVf
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two things ride this PR:
rfcs/2026-08-once-ui-2-architecture.md— the library-split RFC scheduled for Week 3 ofROADMAP.md, extended into a full Once UI 2.0 architecture plan per Lorant's direction (foundations split, opt-in data package, optional Next.js, test coverage as a release gate).The RFC
@once-ui-system/foundations— tokens + styles (~8,100 lines of SCSS) plus token types; no React, nosassrequirement for CSS-only consumers.@once-ui-system/core2.0 — framework-agnostic React; drops thenextpeer andrechartsdependency.@once-ui-system/data— charts/gauges, owningrechartsbehind the existing lazy loader.@once-ui-system/nextjs— the 8 Next-coupled files as adapter bindings plus today's./serverutils; core falls back to standard DOM (<a>,<img>, History API) via an adapter provider when Next is absent.blockssplit to 2.x.Phase 0 groundwork included here
next/*import surface to the 8 known files and confinesrechartstomodules/data, so the coupling the split relies on can't silently grow. (Surfaced that the count was 8, not 7 —Meta.tsxhas a type-onlynextimport.)./icons,./types,./interfacespointed atdist/<name>/index.jswhile the build emitsdist/<name>.js; all three were unresolvable for every consumer (including bundlers) since they shipped. Now fixed and guarded by a new exports-integrity test.pnpm check:package— publint + arethetypeswrong wired as an advisory script. It surfaced a significant finding now documented in the RFC (§2 "Packaging reality"): dist is ESM syntax in.jsfiles without"type": "module"and uses extensionless imports, so plain Node cannot load the package at all — it is bundler-only today. Fixing the module format is proposed as a 2.0 build decision (§6), not patched here.AGENTS.md: 9 suites / 108 tests (was 5 / 92); advisorycheck:packagebaseline documented.Full gate on this branch: build ✓, typecheck 0 errors, 108/108 tests, no new Biome diagnostics.
Next steps
Per the roadmap gate, the RFC itself is a go/no-go decision for Lorant before any split work begins. Open decisions (naming, icons, lockstep versioning, SCSS-source shipping, RSC posture) are listed in §10.