bug(data-weaver): resolve production build failures caused by circular module dependencies - #452
Open
nick-nlb wants to merge 2 commits into
Open
bug(data-weaver): resolve production build failures caused by circular module dependencies#452nick-nlb wants to merge 2 commits into
nick-nlb wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors card components by replacing namespace component references with direct imports, and extracts card configuration constants and the snapToGrid utility into dedicated, reusable files with unit tests. Feedback on these changes includes utilizing the satisfies operator with as const on the card size configurations to preserve exact literal types, and adding a defensive guard clause in snapToGrid to prevent division-by-zero errors if a non-positive grid size is provided.
…n constraints to card configurations
nick-nlb
marked this pull request as ready for review
August 27, 2026 18:20
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.
Overview
This PR resolves production build failures caused by circular dependencies.
Description
Recent additions to the application introduced circular dependencies that caused build-time failures in
Next.js. These were not picked up in development mode (pnpm dev) the way dev mode imports at run time masked the cycles in the import dependency graph.The changes in this PR resolve those build-time issues and add unit tests for the refactored code.
Follow-ups
The following tasks will be follow-ups to this PR (and have been added to the tracker):
README.mdto document required verification steps before PR submission and merging.Tests performed
snapToGridutility (snap_to_grid.test.ts).nvm use && pnpm lint.nvm use && pnpm test(46 tests passing).nvm use && pnpm build.Testing
To test this PR (and demonstrate the original issue), perform the following:
mainpnpm buildpnpm previewhttp://localhost:3000pnpm buildpnpm previewhttp://localhost:3000