Skip to content

Mark elevator-opening-system as client#307

Merged
wass08 merged 1 commit into
mainfrom
fix/elevator-opening-use-client
May 13, 2026
Merged

Mark elevator-opening-system as client#307
wass08 merged 1 commit into
mainfrom
fix/elevator-opening-use-client

Conversation

@wass08
Copy link
Copy Markdown
Collaborator

@wass08 wass08 commented May 13, 2026

Summary

  • packages/core/src/systems/elevator/elevator-opening-system.tsx imports useEffect/useRef from React, which Next.js RSC builds treat as client-only. Adding "use client" lets consumers that build with Next (e.g. private-editor's community app) compile the package.
  • Other core systems use useFrame from @react-three/fiber and slip past RSC checks; this is the only .tsx system that needs the directive today.

Found while building private-editor against the just-merged elevator submodule bump:

./editor/packages/core/dist/systems/elevator/elevator-opening-system.js
You're importing a module that depends on useEffect into a React Server Component module.

Test plan

  • bun run build on a Next consumer (private-editor community) no longer fails on this file
  • Editor app standalone still runs fine (the directive is a no-op outside Next)

🤖 Generated with Claude Code

The file imports useEffect/useRef from React, which Next.js RSC builds
flag as client-only. Other core systems (e.g. elevator-runtime-system)
use useFrame from @react-three/fiber and slip through, but this one
needs the directive explicitly.

Fixes Turbopack build failure in private-editor community app:
"You're importing a module that depends on useEffect into a React
Server Component module."

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

mintlify Bot commented May 13, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
pascal 🔴 Failed May 13, 2026, 8:49 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@wass08 wass08 merged commit c50a4df into main May 13, 2026
1 of 2 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