Skip to content

feat(workspace): merge package-manager workspace members into Nx discovery - #78

Open
gbleu wants to merge 1 commit into
frontops-dev:mainfrom
gbleu:feat/merge-workspace-members-into-nx
Open

feat(workspace): merge package-manager workspace members into Nx discovery#78
gbleu wants to merge 1 commit into
frontops-dev:mainfrom
gbleu:feat/merge-workspace-members-into-nx

Conversation

@gbleu

@gbleu gbleu commented Jul 8, 2026

Copy link
Copy Markdown

Fixes #70.

Problem

Nx-mode discovery (discover_projectsnx::get_projects) returns only the projects that have a project.json. Real Nx workspaces infer most projects from package.json scripts via the package manager's workspace globs, so the Nx project set is a superset of the project.json files. On a 250-package pnpm monorepo only 25 packages had a project.json — edits in the other 225 were attributed to no project, silently yielding an empty affected set (a false-green for CI gating).

Fix

When an Nx workspace is also an npm/yarn/pnpm/bun workspace, merge the package-manager members that Nx-mode discovery didn't already cover. Dedup is by project root and by name, and project.json wins (its Project is kept; the workspace member is only added when neither its root nor its name is already known).

Single-file change in src/workspace/mod.rs; reuses the existing workspaces::is_workspace / workspaces::get_projects generic loader.

Relationship to #77

The merged members come from the generic workspace loader, whose roots are only correct after #77 (fix(workspace): keep generic-loader project roots workspace-relative). This PR compiles and its unit tests pass independently, but for the merge to actually attribute the extra members at runtime, #77 needs to land too. Recommend merging #77 first (or both together).

Verification

  • cargo test — all workspace unit tests pass (30/30).
  • Verified end-to-end on the 250-package pnpm monorepo (Nx 22): 251 projects discovered (vs 25 project.json-only before), and edits in inferred-only packages now attribute to the correct affected set instead of an empty one.

🤖 Generated with Claude Code

…overy

Nx-mode discovery returned exclusively the projects that have a
project.json. Real Nx workspaces infer most projects from package.json
scripts via the package manager's workspace globs — on a 250-package
monorepo only 25 had a project.json, so edits in the other 225 packages
were invisible: a changed file attributed to no project silently yields
an empty affected set.

When the workspace is also an npm/yarn/pnpm/bun workspace, merge the
members that Nx-mode discovery didn't already cover (deduplicated by
project root and name; project.json wins).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@gbleu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc4c1be2-a22a-4f7a-b7c2-605c06cbc267

📥 Commits

Reviewing files that changed from the base of the PR and between 8b64617 and b1ca585.

📒 Files selected for processing (1)
  • src/workspace/mod.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📦 Preview Release Available

A preview release has been published for commit b1ca585.

Installation

npm install https://github.com/frontops-dev/domino/releases/download/pr-78-b1ca585/front-ops-domino-1.4.0.tgz

Running the preview

npx https://github.com/frontops-dev/domino/releases/download/pr-78-b1ca585/front-ops-domino-1.4.0.tgz affected

Details

@gbleu

gbleu commented Jul 8, 2026

Copy link
Copy Markdown
Author

✅ PASS with #77 (as shipped in fork.2); ⚠️ needs #77 — regresses alone

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.

NX projects detection can't discover inferred projects

1 participant