refactor(web): migrate loft → @e2a/ui + wire build (CI/Docker/jest)#334
Open
jiashuoz wants to merge 3 commits into
Open
refactor(web): migrate loft → @e2a/ui + wire build (CI/Docker/jest)#334jiashuoz wants to merge 3 commits into
jiashuoz wants to merge 3 commits into
Conversation
Migrate the dashboard and marketing pages off local loft/ imports onto the @e2a/ui package for the four extracted leaf components (Chip, Dot, Eyebrow, InkConsole) — 15 files, consolidated to one @e2a/ui import each. Add @e2a/ui as a dependency and load its stylesheet in the root layout (before globals.css, which stays authoritative for tokens). PageShell, Topbar, and Sidebar remain on loft/ until they're extracted, so loft/ is not removed in this pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
web consumes @e2a/ui via a file: dep and its Docker image copies the built output, so dist/ must exist on a clean checkout — un-gitignore and commit it (sourcemaps dropped to keep the tracked artifact small). A new CI job rebuilds dist/ and fails on drift, same idiom as the OpenAPI/SDK freshness gates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Docker: build the web image from the repo root so the sibling @e2a/ui workspace (file:../design-system) is in context; add web/Dockerfile.dockerignore to trim it. Pin Turbopack's root to web/'s parent so it resolves @e2a/ui, which lives outside web/ (next.config.ts) — verified by a local image build that serves the migrated UI. - jest: resolve the ESM-only @e2a/ui to its TS source and pin react to web's single copy (avoids a duplicate-React null-hook crash). - tokens: define --success-strong in globals.css (:root + .dark) so globals stays authoritative; @e2a/ui's success Chip uses it. - build-image: rebuild the web image when design-system/ changes too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Follow-up to #333. Migrates
web/to consume the@e2a/uipackage for the extracted leaf components, and does the build-wiring that #333 deliberately deferred (an adversarial review had flagged it NO-GO). The deferred migration commit came from branchweb-migration-deferred.Commits
refactor(web)— 15 files move from localloft/*imports to@e2a/ui(Chip,Dot,Eyebrow,InkConsole), consolidated to one import each; adds the@e2a/uidep + loads its stylesheet.PageShell/Topbar/Sidebarstay onloft/(not extracted yet).build(design-system)— commit@e2a/ui'sdist/(web consumes it viafile:and the Docker image copies it) + a CI freshness gate that rebuilds it and fails on drift (same idiom as the OpenAPI/SDK freshness checks).build(web)— make web build@e2a/uiin CI and Docker.The build-wiring fixes (the review's blockers)
dist/is committed + freshness-gated, so clean checkouts (CI, jest) resolve@e2a/ui.@e2a/uiworkspace is in context), with aweb/Dockerfile.dockerignoreto trim it. Turbopack's root is pinned toweb/'s parent so it resolves@e2a/ui(which lives outsideweb/).@e2a/uito its TS source, withreactpinned to web's single copy (this caught a real duplicate-React null-hook crash).--success-strongadded toglobals.css(:root+.dark) so globals stays the token authority.Chiptext color now uses--success-strong(was--success). Intentional: it's the consistent choice — every other tone already uses its-strongpair.Verification (clean-environment, not just local smoke)
docker build -f web/Dockerfile .succeeds and the container serves the migrated UI (loft-eyebrowpresent in the served HTML; Caddy returns 200).npm run lintclean (1 pre-existing warning); localnext buildcompiles.@e2a/uidist/rebuilds byte-for-byte (freshness gate green).Scope
loft/is not removed yet —PageShell/Topbar/Sidebarneed extraction first (the Tailwind/layout work), which is a later PR.🤖 Generated with Claude Code