Skip to content

fix(web): unbreak dev server in nested worktrees and SSR#4

Merged
kranthie merged 2 commits into
mainfrom
claude/inspiring-roentgen-1ae5e5
Apr 18, 2026
Merged

fix(web): unbreak dev server in nested worktrees and SSR#4
kranthie merged 2 commits into
mainfrom
claude/inspiring-roentgen-1ae5e5

Conversation

@kranthie
Copy link
Copy Markdown
Owner

Summary

Three fixes so pnpm --filter @utils-live/web dev works when the repo is checked out under .claude/worktrees/*:

  • next.config.js — pin turbopack.root so Turbopack doesn't walk up into a parent pnpm-workspace.yaml. Fixes Module not found: Can't resolve '@utils-live/tools' in dev.
  • app/layout.tsx — root layout is now pass-through. <html>/<body> live in app/[locale]/layout.tsx so lang can be per-locale; rendering them in both layouts caused React's nested-tag warning in dev.
  • components/effects/code-rain.tsx — import useIsMobile/usePrefersReducedMotion from @/hooks/use-media-query directly. The @/hooks barrel pulls in use-worker.ts whose top-level comlink import references self and crashes during SSR.

Also adds .claude/launch.json (Claude Code preview-server config, describes the web and turbo-dev launches) and gitignores .claude/settings.local.json (per-user allowlist, shouldn't be shared).

Test plan

  • pnpm --filter @utils-live/web typecheck — clean
  • pnpm --filter @utils-live/web lint — no errors (4 pre-existing warnings unrelated to this change)
  • pnpm --filter @utils-live/web build — 784 pages generated, output: "export" clean, exactly one <html> tag per generated page
  • pnpm --filter @utils-live/web dev — homepage renders at /en with hero/CodeRain/search/chips/JSON-formatter demo, zero console errors, zero server errors

🤖 Generated with Claude Code

- next.config.js: pin `turbopack.root` to the workspace root so
  Turbopack doesn't walk up into a parent `pnpm-workspace.yaml`
  when the repo is checked out under `.claude/worktrees/*`. This
  fixes `@utils-live/tools` resolution failures in dev.
- app/layout.tsx: make the root layout a pass-through. `<html>` /
  `<body>` are owned by `app/[locale]/layout.tsx` so `lang` is
  per-locale; rendering them at the root too caused React's
  nested-tag warning in Turbopack dev.
- components/effects/code-rain.tsx: import from the specific
  `@/hooks/use-media-query` module instead of the `@/hooks` barrel.
  The barrel pulls in `use-worker.ts`, whose top-level `comlink`
  import references `self` and crashes during SSR.

Also adds `.claude/launch.json` (preview-server config) and gitignores
`.claude/settings.local.json` (per-user allowlist).

Production static export verified: 784 pages generated, exactly one
`<html>` per page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 18, 2026

Deploying utils-live with  Cloudflare Pages  Cloudflare Pages

Latest commit: e284f7d
Status: ✅  Deploy successful!
Preview URL: https://144c39ee.utils-live.pages.dev
Branch Preview URL: https://claude-inspiring-roentgen-1a.utils-live.pages.dev

View logs

- next 16.2.1 → 16.2.3: GHSA-q4gf-8mx6-v5v3 (DoS via Server Components,
  patched in 16.2.3)
- lodash-es override >=4.17.21 → >=4.18.0: GHSA-r5fr-rjxr-66jc
  (code injection via `_.template` import names; vulnerable range extends
  through 4.17.23, so the prior floor left transitive deps — mermaid →
  lodash-es — on a vulnerable version)

Pre-existing on main; surfaced by the audit running on this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kranthie kranthie merged commit 9fb7e90 into main Apr 18, 2026
6 checks passed
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