Restore repository to pre-pnpm snapshot#2200
Conversation
📝 WalkthroughWalkthroughThis pull request migrates the project from pnpm to npm as the primary package manager, updating build pipelines, development scripts, configuration files, and component styling across the repository. The migration includes CI/CD workflow changes, dependency management updates, Next.js configuration adjustments, and refinements to UI component tooltip and layout styling. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ddbb56048
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (7)
components/waves/CreateDropDropModeToggle.tsx (2)
59-84: Confusing parameter naming inverts expected ternary logic.The parameter
isChatis misleading—whenisChatistrue, the function returns"drop", and vice versa. This makes the code harder to reason about. Consider renaming toisSwitchingToDropor inverting the ternaries to match the parameter name.🔧 Suggested fix - rename parameter for clarity
const getRestrictionMessage = ( restriction: ChatRestriction | SubmissionRestriction, - isChat: boolean + isSwitchingToDrop: boolean ): string => { switch (restriction) { case ChatRestriction.NOT_LOGGED_IN: case SubmissionRestriction.NOT_LOGGED_IN: - return `Please log in to ${isChat ? "drop" : "chat"}`; + return `Please log in to ${isSwitchingToDrop ? "drop" : "chat"}`; case ChatRestriction.PROXY_USER: case SubmissionRestriction.PROXY_USER: - return `Proxy users cannot ${isChat ? "drop" : "chat"}`; + return `Proxy users cannot ${isSwitchingToDrop ? "drop" : "chat"}`; case ChatRestriction.NO_PERMISSION: case SubmissionRestriction.NO_PERMISSION: - return `You don't have permission to ${isChat ? "drop" : "chat"}`; + return `You don't have permission to ${isSwitchingToDrop ? "drop" : "chat"}`; case ChatRestriction.DISABLED: return "Chat is currently disabled"; case SubmissionRestriction.NOT_STARTED: return "Drop submissions haven't started yet"; case SubmissionRestriction.ENDED: return "Drop submissions have ended"; case SubmissionRestriction.MAX_DROPS_REACHED: return "You have reached the maximum number of drops allowed"; default: - return `${isChat ? "Drop" : "Chat"} mode is unavailable`; + return `${isSwitchingToDrop ? "Drop" : "Chat"} mode is unavailable`; } };Then update the call site at line 102:
- {getRestrictionMessage(targetRestriction, !isDropMode)} + {getRestrictionMessage(targetRestriction, isDropMode)}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/waves/CreateDropDropModeToggle.tsx` around lines 59 - 84, The getRestrictionMessage function currently uses the boolean parameter isChat with inverted ternaries (true returns "drop"), which is confusing; rename the parameter to isSwitchingToDrop (or similar) and update all call sites (e.g., where getRestrictionMessage is invoked in this component) to pass the correctly named argument, or alternatively invert the ternary expressions inside getRestrictionMessage so that isChat=true yields "chat" and isChat=false yields "drop"; update the function signature and its usages accordingly to keep naming consistent with returned strings (reference: function getRestrictionMessage and its isChat parameter).
154-161: Consider addingplaceandpositionStrategyprops for consistency.Other tooltips in this PR (
StormButton.tsx,CreateDropActions.tsx) includeplace="top"andpositionStrategy="fixed". This tooltip omits them, which will use the library defaults (place="top"andpositionStrategy="absolute"). If consistent positioning behavior is desired, consider adding these props.🔧 Suggested fix for consistency
<Tooltip id="drop-mode-toggle" + place="top" + positionStrategy="fixed" style={{ backgroundColor: "#1F2937", color: "white", padding: "4px 8px", }} >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/waves/CreateDropDropModeToggle.tsx` around lines 154 - 161, The Tooltip in CreateDropDropModeToggle (id="drop-mode-toggle") is missing explicit placement and strategy props; update the Tooltip component to include place="top" and positionStrategy="fixed" so it matches other tooltips (like those in StormButton.tsx and CreateDropActions.tsx) and ensures consistent positioning behavior across the UI.components/waves/CreateDropActions.tsx (1)
142-146: Consider addingzIndexfor consistency with other tooltips.The
upload-file-tooltipandadd-gif-tooltipboth includezIndex: 9999in their styles, butadd-metadata-tooltipdoes not. If there are z-index stacking issues with other tooltips, this one may have them too.🔧 Suggested fix for consistency
style={{ backgroundColor: "#1F2937", color: "white", padding: "4px 8px", + zIndex: 9999, }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/waves/CreateDropActions.tsx` around lines 142 - 146, The add-metadata-tooltip style in CreateDropActions.tsx is missing a zIndex which other tooltips (upload-file-tooltip, add-gif-tooltip) set to 9999; to fix, add zIndex: 9999 to the inline style object for the element with id/class 'add-metadata-tooltip' (the same style block that sets backgroundColor, color, padding) so its stacking matches the other tooltips and prevents overlap issues.components/waves/StormButton.tsx (1)
23-47: Minor indentation inconsistency in JSX.The closing
</button>tag at line 47 has extra leading spaces compared to its opening tag. This doesn't affect functionality but reduces readability.🔧 Suggested fix
/> </svg> - </button> + </button>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/waves/StormButton.tsx` around lines 23 - 47, In StormButton.tsx there’s an indentation mismatch: the closing </button> is over-indented relative to its opening <button> and surrounding JSX; fix by aligning the closing </button> with the opening <button> tag (and adjust the inner SVG/children indentation to match) so the JSX block in the component (the className block and the nested <svg> / <path>) has consistent indentation and readability.package.json (1)
15-15: Use the published CLI entrypoint, not a package-internal file path.
node ./node_modules/@openapitools/openapi-generator-cli/maindepends on that package’s current folder layout. Inside npm scripts, the localopenapi-generator-clibinary is already onPATH, which is the stable interface.💡 Proposed fix
- node ./node_modules/@openapitools/openapi-generator-cli/main generate + openapi-generator-cli generate🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 15, The "generate" npm script is calling a package-internal file path (node ./node_modules/@openapitools/openapi-generator-cli/main) which relies on internal layout; update the "generate" script in package.json (the "generate" script value) to invoke the published CLI entrypoint instead by replacing that internal node invocation with the installed binary name "openapi-generator-cli generate" while keeping the same flags and follow-up commands so the rest of the pipeline (tmp_gen_outp, generated, scripts/add-ts-nocheck.sh, etc.) remains unchanged..ebextensions/npm.config (1)
1-3: Consider usingnpm ciinstead ofnpm installfor deployment.Other deployment scripts in this PR (e.g.,
scripts/staging.sh, CI workflows) usenpm cifor reproducible installs. Usingnpm installhere may lead to inconsistent dependency resolution across environments.
npm ciis preferred for CI/CD because it ensures a clean, reproducible install frompackage-lock.jsonand fails early if the lockfile is out of sync.Proposed fix
container_commands: 01_install_dependencies: - command: "npm install" + command: "npm ci"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.ebextensions/npm.config around lines 1 - 3, Replace the "npm install" step in the Elastic Beanstalk container_commands block with "npm ci" to ensure reproducible, lockfile-driven installs during deployment; update the 01_install_dependencies command under container_commands so the deployment uses npm ci (and fails early if package-lock.json is out of sync) instead of npm install.README.md (1)
109-162: Optional: Add language specifiers to fenced code blocks.Static analysis flagged that several code blocks (lines 109, 115, 148, 154, 160) lack language specifiers. Adding
bashwould improve syntax highlighting and consistency with other code blocks in this file.Example fix
-``` -npm i -``` +```bash +npm i +```Apply similarly to the other flagged blocks.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 109 - 162, Update the fenced code blocks in README.md that currently lack language specifiers by changing the blocks surrounding the commands "npm i", "npm run build", the local run "npm run dev", the production run "npm run start", and the PM2 command "pm2 start npm --name=6529seize -- run start" to use the bash language tag (i.e., start each block with ```bash) so syntax highlighting is consistent across the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 38-39: The "Verify registry signatures" step currently runs "npm
audit signatures", which only checks provenance and not vulnerabilities; add a
separate workflow step (e.g., "Vulnerability scan" or similar) that runs a real
vulnerability audit such as "pnpm audit --audit-level=high" or "npm audit
--audit-level=high" depending on your package manager, and ensure it runs before
deploy/failing the job on high-severity findings so the pipeline blocks on known
CVEs; keep the existing "npm audit signatures" step for signature verification
and add the new audit step to restore vulnerability scanning.
- Around line 30-36: Update the GitHub Actions step that currently uses
actions/setup-node@v3 to actions/setup-node@v4 and enable npm caching: change
the uses field to "actions/setup-node@v4", keep or normalize node-version (e.g.,
"22" or "22.x"), and add the cache configuration (cache: "npm" and
cache-dependency-path pointing to package-lock.json or npm-shrinkwrap.json) so
the subsequent "npm ci" step benefits from restored/posted npm cache.
In @.npmrc:
- Line 2: The .npmrc contains an unsupported setting "allow-git=none" which
should be removed or replaced; delete the "allow-git=none" entry and instead
enforce no-git dependencies via CI (use npm ci to rely on package-lock.json),
add a lint rule to prevent git specifiers (e.g., a "no-git-dependencies" rule in
ESLint or package.json lint step), or use npm overrides to nullify git-based
packages; update any project docs/CI configs referencing "allow-git" to reflect
the chosen approach.
In `@components/waves/leaderboard/drops/DefaultWaveLeaderboardDrop.tsx`:
- Around line 79-85: The parent container div that was changed to
"tw-inline-flex" is causing width collapse and preventing the
@[700px]:tw-ml-auto rule from pushing the right-side actions; revert the layout
to occupy full width by restoring the full-width utility (add "tw-w-full" to the
same div or replace "tw-inline-flex" with "tw-flex tw-w-full") so the sibling
container with @[700px]:tw-ml-auto can reliably align to the right; ensure this
change is applied to the div containing WaveLeaderboardDropRaters and
WaveLeaderboardDropFooter in DefaultWaveLeaderboardDrop (the outer div whose
className currently includes tw-inline-flex and responsive flex-row utilities).
In `@dev-setup/run-setup.sh`:
- Around line 249-252: Stop deleting the committed lockfile and switch to a
deterministic install: remove the removal of "$REPO_ROOT/package-lock.json"
(currently in the rm -rf that targets "$REPO_ROOT/node_modules"
"$REPO_ROOT/package-lock.json") so only node_modules is removed, and change the
install invocation from ( cd "$REPO_ROOT" && npm install ) to use npm ci (e.g.,
( cd "$REPO_ROOT" && npm ci )) so the script preserves package-lock.json and
performs a reproducible install.
- Around line 147-150: The install_pm2() function currently runs an unpinned
global install of PM2; change the npm install invocation inside install_pm2 to
pin a PM2 version or semver range (e.g., pm2@latest or 'pm2@>=5.0.0') so all
hosts get a consistent PM2 release—update both branches of the conditional that
call npm i -g pm2 (the Darwin branch and the sudo branch) to use the chosen
pinned package spec.
In `@next.config.ts`:
- Line 2: The top-level import of dotenv in next.config.ts makes dotenv a
required runtime dependency; move the import so it only loads inside the
existing phase-conditional block where dotenv.config() is invoked (e.g., when
checking the Next.js phase or DEV/BUILD branch) by replacing the top-level
`import dotenv from "dotenv"` with a local dynamic import/require inside that
block (or call `await import("dotenv")` / `require("dotenv")` and then call
`.config()`), ensuring dotenv remains a dev-only dependency and is not resolved
during production `next start`.
In `@scripts/dev-open.cjs`:
- Line 16: The spawn call uses a hardcoded "npm" which breaks on Windows; update
the command passed to spawn in scripts/dev-open.cjs so it uses process.platform
=== "win32" ? "npm.cmd" : "npm" (keeping the same args ["run","dev"] and stdio
settings) — locate the proc variable/const proc = spawn(...) and replace the
literal "npm" with the platform-aware expression so Windows spawns "npm.cmd"
while other platforms keep "npm".
---
Nitpick comments:
In @.ebextensions/npm.config:
- Around line 1-3: Replace the "npm install" step in the Elastic Beanstalk
container_commands block with "npm ci" to ensure reproducible, lockfile-driven
installs during deployment; update the 01_install_dependencies command under
container_commands so the deployment uses npm ci (and fails early if
package-lock.json is out of sync) instead of npm install.
In `@components/waves/CreateDropActions.tsx`:
- Around line 142-146: The add-metadata-tooltip style in CreateDropActions.tsx
is missing a zIndex which other tooltips (upload-file-tooltip, add-gif-tooltip)
set to 9999; to fix, add zIndex: 9999 to the inline style object for the element
with id/class 'add-metadata-tooltip' (the same style block that sets
backgroundColor, color, padding) so its stacking matches the other tooltips and
prevents overlap issues.
In `@components/waves/CreateDropDropModeToggle.tsx`:
- Around line 59-84: The getRestrictionMessage function currently uses the
boolean parameter isChat with inverted ternaries (true returns "drop"), which is
confusing; rename the parameter to isSwitchingToDrop (or similar) and update all
call sites (e.g., where getRestrictionMessage is invoked in this component) to
pass the correctly named argument, or alternatively invert the ternary
expressions inside getRestrictionMessage so that isChat=true yields "chat" and
isChat=false yields "drop"; update the function signature and its usages
accordingly to keep naming consistent with returned strings (reference: function
getRestrictionMessage and its isChat parameter).
- Around line 154-161: The Tooltip in CreateDropDropModeToggle
(id="drop-mode-toggle") is missing explicit placement and strategy props; update
the Tooltip component to include place="top" and positionStrategy="fixed" so it
matches other tooltips (like those in StormButton.tsx and CreateDropActions.tsx)
and ensures consistent positioning behavior across the UI.
In `@components/waves/StormButton.tsx`:
- Around line 23-47: In StormButton.tsx there’s an indentation mismatch: the
closing </button> is over-indented relative to its opening <button> and
surrounding JSX; fix by aligning the closing </button> with the opening <button>
tag (and adjust the inner SVG/children indentation to match) so the JSX block in
the component (the className block and the nested <svg> / <path>) has consistent
indentation and readability.
In `@package.json`:
- Line 15: The "generate" npm script is calling a package-internal file path
(node ./node_modules/@openapitools/openapi-generator-cli/main) which relies on
internal layout; update the "generate" script in package.json (the "generate"
script value) to invoke the published CLI entrypoint instead by replacing that
internal node invocation with the installed binary name "openapi-generator-cli
generate" while keeping the same flags and follow-up commands so the rest of the
pipeline (tmp_gen_outp, generated, scripts/add-ts-nocheck.sh, etc.) remains
unchanged.
In `@README.md`:
- Around line 109-162: Update the fenced code blocks in README.md that currently
lack language specifiers by changing the blocks surrounding the commands "npm
i", "npm run build", the local run "npm run dev", the production run "npm run
start", and the PM2 command "pm2 start npm --name=6529seize -- run start" to use
the bash language tag (i.e., start each block with ```bash) so syntax
highlighting is consistent across the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4878cf7a-07e4-4ccb-9da0-f885f0e955fc
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (30)
.ebextensions/npm.config.github/workflows/build-upload-deploy-prod.yml.gitignore.npmpackagejsonlintrc.json.npmrcProcfileREADME.mdcomponents/utils/input/profile-search/CommonProfileSearchItem.tsxcomponents/waves/CreateDropActions.tsxcomponents/waves/CreateDropContent.tsxcomponents/waves/CreateDropDropModeToggle.tsxcomponents/waves/StormButton.tsxcomponents/waves/leaderboard/drops/DefaultWaveLeaderboardDrop.tsxconfig/nextConfig.tsdev-setup/README.mddev-setup/run-reset.shdev-setup/run-setup.shknip.jsoncnext.config.tspackage.jsonplaywright.config.tspnpm-workspace.yamlscripts/dev-open.cjsscripts/ensure-pnpm.cjsscripts/quality.jsscripts/staging.shscripts/worktree/wt-add.shscripts/worktree/wt-common.shstandalone/standalone-memes-mint/README.mdstandalone/standalone-memes-mint/scripts/export-mint-page.cjs
💤 Files with no reviewable changes (8)
- .npmpackagejsonlintrc.json
- Procfile
- knip.jsonc
- components/waves/CreateDropContent.tsx
- .gitignore
- scripts/ensure-pnpm.cjs
- pnpm-workspace.yaml
- config/nextConfig.ts

Summary by CodeRabbit
New Features
Chores
Style