fix(web): unbreak dev server in nested worktrees and SSR#4
Merged
Conversation
- 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>
Deploying utils-live with
|
| 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 |
- 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>
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
Three fixes so
pnpm --filter @utils-live/web devworks when the repo is checked out under.claude/worktrees/*:turbopack.rootso Turbopack doesn't walk up into a parentpnpm-workspace.yaml. FixesModule not found: Can't resolve '@utils-live/tools'in dev.<html>/<body>live inapp/[locale]/layout.tsxsolangcan be per-locale; rendering them in both layouts caused React's nested-tag warning in dev.useIsMobile/usePrefersReducedMotionfrom@/hooks/use-media-querydirectly. The@/hooksbarrel pulls inuse-worker.tswhose top-levelcomlinkimport referencesselfand crashes during SSR.Also adds
.claude/launch.json(Claude Code preview-server config, describes thewebandturbo-devlaunches) and gitignores.claude/settings.local.json(per-user allowlist, shouldn't be shared).Test plan
pnpm --filter @utils-live/web typecheck— cleanpnpm --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 pagepnpm --filter @utils-live/web dev— homepage renders at/enwith hero/CodeRain/search/chips/JSON-formatter demo, zero console errors, zero server errors🤖 Generated with Claude Code