Skip to content

fix(view): break ui.view.react ↔ workspace.view.react cycle#2

Open
mkotelnikov wants to merge 2 commits into
mainfrom
fix/view-cycle
Open

fix(view): break ui.view.react ↔ workspace.view.react cycle#2
mkotelnikov wants to merge 2 commits into
mainfrom
fix/view-cycle

Conversation

@mkotelnikov

Copy link
Copy Markdown
Contributor

Problem

ui.view.react and workspace.view.react form a circular package dependency: ui.view.react imports DirectoryPickerEmptyState from workspace.view.react, while workspace.view.react imports from ui.view.react (5 files). pnpm tolerates it (warns); turbo refuses to build it, breaking any fresh turbo build.

Fix

DirectoryPickerEmptyState was workspace.view.react's only public export and isn't used by its own code (only an init.ts comment). It only needs ui.view.react hooks + ui.view.shadcn + workspace.browser — not workspace.view.react. Relocated it into ui.view.react (which renders it via <App/>), making the edge one-directional (workspace.view.react → ui.view.react).

  • moved directory-picker-empty-state.tsxui.view.react/src/internal/
  • ui.view.react: export it; drop the workspace.view.react dep; add ui.view.shadcn + lucide-react (used by the component)
  • app.tsx: import it locally

Verified

Full turbo build of both apps + the whole dependency graph: 30/30 tasks, exit 0 (was blocked by the cycle before).

🤖 Generated with Claude Code

mkotelnikov and others added 2 commits July 10, 2026 13:25
ui.view.react imported DirectoryPickerEmptyState from workspace.view.react, while
workspace.view.react imports from ui.view.react — a circular package dependency
that turbo refuses to build. DirectoryPickerEmptyState was workspace.view.react's
only public export and isn't used by its own code; it only needs ui.view.react
hooks + workspace.browser. Relocate it into ui.view.react (which renders it),
making the edge one-directional (workspace.view.react -> ui.view.react).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mime.view.{image,markdown,pdf,video} import @statewalker/shared-slots in their
init but never declared it — a phantom dependency that resolves in the umbrella's
hoisted node_modules but breaks a fresh isolated install (e.g. the apps-umbrella
parent). Declare it explicitly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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