Repository navigation
fix(cli): remove UI store cycles - #811
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe CLI UI separates runtime configuration and DuckDB initialization, adds typed room-store hooks, and updates components to use local imperative store APIs where needed. Madge dependency-cycle checks are refined for TypeScript and TSX sources. ChangesCLI runtime and room-store decoupling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
23-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winUse the pinned Madge binary.
check-circular-depsrunsnpx madge, butmadgeisn’t declared in the workspace dependencies or lockfile, so this can fall back to a registry fetch. Switch topnpm exec madgeand addmadgeas a locked devDependency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` at line 23, Update the check-circular-deps script to invoke Madge through pnpm exec instead of npx, and add Madge as a pinned workspace devDependency with the lockfile updated accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@package.json`:
- Line 23: Update the check-circular-deps script to invoke Madge through pnpm
exec instead of npx, and add Madge as a pinned workspace devDependency with the
lockfile updated accordingly.
What changed
RoomStateProviderseam instead of importing the concrete singleton storeuseRoomStoreApiwhere callbacks needgetStateWhy
store.tsimported artifact and layout registries whose renderers importedstore.tsback. Those cycles caused top-level reads ofexperimentalEnabledto hit the JavaScript temporal dead zone during module initialization.The new dependency direction keeps
room.tsxas the composition root and lets UI renderers consume the store through the provider already mounted byRoomShell.Validation
pnpm buildpnpm --filter sqlrooms-cli-app lintpnpm --filter sqlrooms-cli-app test(33 tests)pnpm --filter sqlrooms-cli-app buildpnpm check-circular-deps(1,062 files; package entry points and CLI app)knip, workspace typecheck, circular dependency check, and full workspace testspnpm dev cliandpnpm dev cli --experimental; both rendered with zero JavaScript exceptionsSummary by CodeRabbit