Skip to content

Conversation

@Oksamies
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR moves Cyberstorm Remix local development to a Docker-first workflow: adds Dockerfile.dev and entrypoint.dev.sh, introduces tools/nginx/new-localhost.conf, and updates docker-compose.remix.development.yml to add rsync sync/watch services, new volumes/secrets, and remove the remix-nginx-proxy. It updates hostname mappings in beta-switch and public assets from .temp domains to localhost/new.localhost, and replaces README setup instructions with a Docker Quick Start plus a Manual Node setup path. front-end and back-end dev endpoints and start commands are updated accordingly.

Possibly related PRs

  • thunderstore-ui PR 1530: Modifies the same apps/cyberstorm-remix/README.md development/setup instructions that this PR replaces with a Docker quick-start.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author. Add a brief description explaining the Docker development environment setup, including key changes like the new docker-compose configuration, entrypoint setup, and manual setup path.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: setting up a Docker development environment for Cyberstorm Remix, which is the core focus of all modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 12-10-docker_dev_env_setup

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 and usage tips.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.55%. Comparing base (67049ca) to head (5554b2c).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...ix/public/cyberstorm-static/scripts/beta-switch.js 0.00% 4 Missing ⚠️
packages/beta-switch/src/index.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1663   +/-   ##
=======================================
  Coverage   11.54%   11.55%           
=======================================
  Files         319      319           
  Lines       22922    22922           
  Branches      507      508    +1     
=======================================
+ Hits         2647     2649    +2     
+ Misses      20275    20273    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
tools/nginx/new-localhost.conf (1)

18-18: Consider using $host for consistency.

The Host header is hardcoded to localhost, but tools/ts-dev-proxy/nginx.conf uses $host throughout. Using $host would preserve the original Host header (new.localhost) and maintain consistency across nginx configs.

-        proxy_set_header Host localhost;
+        proxy_set_header Host $host;
docker-compose.remix.development.yml (1)

34-42: Document the volume and secret prerequisites.

The configuration relies on pre-existing resources:

  • External volume: thunderstore_nginx_conf (must be created before docker-compose up)
  • File: ./build-secrets/.npmrc (must exist before docker-compose up)
  • File: ./tools/nginx/*.conf (nginx config files)

Add a setup section to the project README or a .docker-compose-init script documenting these prerequisites to prevent startup failures for new developers.

Would you like me to generate a setup verification script or update documentation to clarify these prerequisites?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0bed199 and d908f57.

📒 Files selected for processing (9)
  • .eslintrc.json (1 hunks)
  • apps/cyberstorm-remix/README.md (3 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • packages/ts-uploader/README.md (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
  • tools/scripts/cyberstorm-dev-entrypoint.sh (1 hunks)
  • tools/ts-dev-proxy/nginx.conf (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (17)
.eslintrc.json (1)

1-3: LGTM!

Standard ESLint root configuration marker for the monorepo.

packages/ts-uploader/README.md (1)

75-84: LGTM!

Documentation correctly updated to reflect localhost-based development environment. The explanation about modern browser resolution of localhost is helpful.

packages/beta-switch/src/index.ts (1)

38-50: LGTM!

Development environment URLs correctly updated to localhost/new.localhost, consistent with the PR's migration objectives.

apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1)

25-36: LGTM!

Mirrors the TypeScript version's localhost migration, maintaining consistency across both implementations.

tools/ts-dev-proxy/nginx.conf (6)

10-10: LGTM!

Upstream correctly updated to use Docker service name cyberstorm-remix:3000.


16-16: LGTM!

Server name correctly updated to new.localhost for the development environment.


43-43: LGTM!

Host headers consistently updated to use $host throughout the configuration, ensuring proper header propagation to upstream services.

Also applies to: 49-49, 54-54, 59-59, 64-64, 69-69, 74-74, 79-79, 84-84, 89-89, 94-94, 99-99, 113-113, 118-118, 124-124, 129-129, 134-134, 139-139, 144-144, 149-149, 157-157, 165-165, 173-173, 181-181, 186-186, 191-191


197-197: LGTM!

Server name correctly updated to localhost for the legacy Django backend.


219-221: LGTM!

Backend proxy correctly updated to use Docker service name django:8000 with proper Host header propagation.


232-260: LGTM!

New auth.localhost server block properly configured with gzip and proxy settings consistent with other blocks.

apps/cyberstorm-remix/README.md (3)

7-13: LGTM!

Setup instructions clearly updated to reflect the new Docker-based workflow with localhost routing. The note about SERVER_SIDE_API_URL vs VITE_API_URL is helpful for understanding the dual configuration.


29-35: LGTM!

Environment variable examples correctly updated to use localhost-based URLs, consistent with the migration.


57-65: LGTM!

ts-proxy section appropriately updated with simplified Docker-based approach and localhost URLs.

docker-compose.remix.development.yml (4)

21-22: Verify the npmrc secret file exists and is properly configured.

The npmrc secret references ./build-secrets/.npmrc, which must exist for Compose to start. Additionally, verify the entrypoint script properly configures npm to use this secret (typically by copying it to ~/.npmrc).


19-20: Verify that the nginx service is defined in the Docker Compose stack.

The SERVER_SIDE_API_URL environment variable references http://nginx, which depends on a service named nginx being declared in the same Docker Compose stack and accessible on the thunderstore_default network. Confirm this service is properly configured.


12-15: Verify the entrypoint script exists and is executable.

The entrypoint script mounted at ./tools/scripts/cyberstorm-dev-entrypoint.sh must exist in the repository for the container to start successfully. Confirm this file is present and has executable permissions before deploying this compose configuration.


24-32: Verify external volume documentation and nginx service dependency order.

The nginx-configurator service uses an external volume thunderstore_nginx_conf that must be pre-created (not managed by docker-compose), or the service will fail at startup. Ensure setup documentation includes instructions to create this volume or provision it beforehand. Additionally, if an nginx service consumes configs from this volume, add an explicit depends_on: nginx to guarantee the configurator populates the volume before nginx starts consuming it.

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from d908f57 to 339c0c4 Compare December 10, 2025 16:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tools/nginx/new-localhost.conf (1)

11-21: Host header differs from server_name; consider aligning with $host

Right now the server_name is new.localhost but the proxied Host is forced to localhost. Unless you have upstream logic that explicitly depends on Host: localhost, it’s safer and more consistent with the other nginx configs to forward the original host.

You can keep behavior the same while aligning with ts-dev-proxy like this:

     location / {
         proxy_pass http://remix_dev;
         proxy_http_version 1.1;
-        proxy_set_header Host localhost;
+        proxy_set_header Host $host;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection $connection_upgrade;
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d908f57 and 339c0c4.

📒 Files selected for processing (9)
  • .eslintrc.json (1 hunks)
  • apps/cyberstorm-remix/README.md (3 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • packages/ts-uploader/README.md (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
  • tools/scripts/cyberstorm-dev-entrypoint.sh (1 hunks)
  • tools/ts-dev-proxy/nginx.conf (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • .eslintrc.json
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js
  • packages/ts-uploader/README.md
  • tools/scripts/cyberstorm-dev-entrypoint.sh
  • packages/beta-switch/src/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (5)
apps/cyberstorm-remix/README.md (3)

7-13: Remix + backend/nginx bootstrap flow looks coherent

The new 1–5 setup steps line up with the compose file and nginx-configurator pattern: backend comes up first, then Remix + configurator share thunderstore_nginx_conf, and you get localhost/new.localhost without hosts-file hacks. This reads cleanly and should be straightforward for devs to follow.


27-36: Env sample matches the new localhost domain model

The .env example (site/beta/auth URLs and .localhost cookie domain plus __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=.localhost) looks consistent with the nginx server blocks for localhost, new.localhost, and auth.localhost. No changes needed here.


57-65: ts-proxy section is aligned with the localhost switch

Using PUBLIC_SITE_URL/PUBLIC_API_URL pointing at http://localhost fits the updated server_name localhost block in ts-dev-proxy/nginx.conf. The steps are minimal and clear for people who want to point Nimbus at production via ts-proxy.

docker-compose.remix.development.yml (1)

4-38: Compose wiring for Remix dev + nginx-configurator looks solid

The cyberstorm-remix service setup (workspace mount, split node_modules volumes, entrypoint script, and SERVER_SIDE_API_URL=http://nginx) cleanly matches the new dev flow. The nginx-configurator loop that syncs tools/nginx/*.conf into the external thunderstore_nginx_conf volume is a simple, robust way to feed the backend nginx.

Only thing to keep in mind is that both the thunderstore_default network and thunderstore_nginx_conf volume must exist (which your README’s “run Thunderstore compose first” step already covers), so this looks good as-is.

tools/ts-dev-proxy/nginx.conf (1)

9-260: ts-dev-proxy nginx updates align well with the new Docker-based dev setup

Pointing remix_upstream at cyberstorm-remix:3000, standardizing proxy_set_header Host $host, switching the Django upstream to django:8000, and adding the dedicated auth.localhost server all fit the localhost-focused workflow and match the other config/README changes.

As long as the ts-dev-proxy stack is on the same Docker network as cyberstorm-remix and django, this configuration should behave as intended without additional tweaks.

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from 339c0c4 to 468223f Compare December 10, 2025 22:11
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
apps/cyberstorm-remix/docker-compose.dev.yml (1)

30-32: Verify external dependencies and file paths.

The docker-compose file assumes that:

  • The build-secrets/.npmrc file exists (line 32)
  • The thunderstore_default network is pre-created (line 35)
  • The thunderstore_nginx_conf volume is pre-created (line 16)

If any of these don't exist, the service will fail to start. Consider adding validation or setup instructions.

Can you confirm these resources are reliably pre-created in the dev environment? If not, I can help add initialization logic or clearer documentation.

apps/cyberstorm-remix/README.md (2)

30-32: Document localhost routing prerequisites.

The Quick Start directs developers to open http://new.localhost and http://localhost, but doesn't mention the prerequisites:

  • Adding entries to /etc/hosts (or DNS configuration)
  • Nginx configuration for routing (tools/nginx/new-localhost.conf)

Consider adding a brief note before the browser step or link to detailed setup documentation.


34-42: Add .env configuration step to Manual Setup.

Line 39 references .env.example but the Manual Setup section doesn't explain where to find it or what environment variables are required. Consider adding a link or brief description.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 339c0c4 and 468223f.

📒 Files selected for processing (28)
  • .eslintrc.json (1 hunks)
  • README.md (1 hunks)
  • apps/cyberstorm-remix/Dockerfile.dev (1 hunks)
  • apps/cyberstorm-remix/README.md (1 hunks)
  • apps/cyberstorm-remix/docker-compose.build.yml (2 hunks)
  • apps/cyberstorm-remix/docker-compose.dev.yml (1 hunks)
  • apps/cyberstorm-remix/entrypoint.dev.sh (1 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • docker-compose.remix.development.yml (0 hunks)
  • packages/beta-switch/README.md (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • packages/cyberstorm-forms/README.md (1 hunks)
  • packages/cyberstorm-theme/README.md (1 hunks)
  • packages/dapper-fake/README.md (1 hunks)
  • packages/dapper-ts/README.md (1 hunks)
  • packages/graph-system/README.md (1 hunks)
  • packages/react-dnd/README.md (1 hunks)
  • packages/thunderstore-api/README.md (1 hunks)
  • packages/ts-api-react-actions/README.md (1 hunks)
  • packages/ts-api-react-forms/README.md (1 hunks)
  • packages/ts-api-react/README.md (1 hunks)
  • packages/ts-uploader-react/README.md (1 hunks)
  • packages/ts-uploader/README.md (1 hunks)
  • packages/typed-event-emitter/README.md (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
  • tools/ts-dev-proxy/Dockerfile (0 hunks)
  • tools/ts-dev-proxy/docker-compose.yml (0 hunks)
  • tools/ts-dev-proxy/nginx.conf (0 hunks)
💤 Files with no reviewable changes (4)
  • tools/ts-dev-proxy/nginx.conf
  • docker-compose.remix.development.yml
  • tools/ts-dev-proxy/docker-compose.yml
  • tools/ts-dev-proxy/Dockerfile
✅ Files skipped from review due to trivial changes (8)
  • packages/cyberstorm-theme/README.md
  • packages/thunderstore-api/README.md
  • packages/react-dnd/README.md
  • packages/dapper-ts/README.md
  • packages/beta-switch/README.md
  • packages/ts-api-react/README.md
  • packages/graph-system/README.md
  • packages/dapper-fake/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • tools/nginx/new-localhost.conf
  • packages/beta-switch/src/index.ts
  • .eslintrc.json
  • packages/ts-uploader/README.md
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (11)
packages/cyberstorm-forms/README.md (1)

1-24: Documentation updates look good.

The namespace and feature descriptions are consistent with other package documentation changes in the PR. Ensure the package.json for cyberstorm-forms has been updated to reflect the @thunderstore namespace.

packages/typed-event-emitter/README.md (1)

1-28: Documentation updates look good.

Consistent with namespace standardization across packages. Verify the corresponding package.json reflects the @thunderstore namespace.

packages/ts-uploader-react/README.md (1)

1-9: Documentation updates align with package namespace standardization.

Verify package.json for ts-uploader-react has been updated to @thunderstore/ts-uploader-react.

packages/ts-api-react-forms/README.md (1)

1-9: Documentation updates consistent with monorepo namespace standardization.

Verify package.json reflects the @thunderstore namespace.

packages/ts-api-react-actions/README.md (1)

1-9: Documentation updates align with monorepo namespace strategy.

Verify corresponding package.json has been updated to reflect the @thunderstore namespace.

README.md (1)

1-74: Root README restructured for better navigation.

The shift from procedural setup to a high-level project overview is appropriate for a monorepo. Ensure apps/cyberstorm-remix/README.md contains comprehensive setup instructions since it's now the primary reference point for getting started.

apps/cyberstorm-remix/Dockerfile.dev (1)

1-13: No issues identified. The entrypoint.dev.sh script exists and properly handles command argument passing via exec su node -c "$*". Node 24.1.0 satisfies the package.json constraint of >=20.17.0, ensuring compatibility with project dependencies.

Likely an incorrect or invalid review comment.

apps/cyberstorm-remix/docker-compose.build.yml (1)

1-16: No breaking change: docker-compose.build.yml is not currently used in active CI/CD.

The commented build job in .github/workflows/test.yml shows the intended invocation is already from the repository root, with docker compose -f docker-compose.build.yml build. The path changes (context: ../../, ../../build-secrets/.npmrc) are correct for this invocation context. The build job is currently disabled pending secret configuration, so there is no active CI/CD to break.

apps/cyberstorm-remix/entrypoint.dev.sh (2)

20-25: Consider both node_modules locations in dependency check.

The script only checks and installs dependencies in /workspace/node_modules (line 22), but the docker-compose defines a separate mounted volume for apps/cyberstorm-remix/node_modules (nimbus_node_modules). Depending on your monorepo structure, you may need to handle both locations.

Clarify: Does yarn install at the workspace root also install app-level dependencies, or do you need a separate install in apps/cyberstorm-remix?


14-18: Verify workspace mount ownership for the node user.

The script sets node_modules ownership (line 18) and later runs yarn as the node user (line 24). However, if /workspace is owned by root, the node user may not have write permissions despite owning node_modules. Verify that the workspace mount is writable by the node user or adjust the Dockerfile.dev to handle this.

Also applies to: 24-24

apps/cyberstorm-remix/README.md (1)

5-28: Docker Quick Start is clear and well-structured.

The step-by-step flow is easy to follow and the command examples are correct. Good use of code blocks and clear progression from backend to frontend startup.

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from 468223f to 611db41 Compare December 12, 2025 12:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx (1)

22-29: Drop the extra console.log (keep console.error only).

Right now dev will print the same payload twice (log + error), which is especially noisy under StrictMode. Suggest keeping a single console.error (or switching the extra line to console.debug if you really want a “breadcrumb” without duplicating stack output).

apps/cyberstorm-remix/app/root.tsx (1)

551-563: Ads containers render, but AdsInit is disabled — likely breaks ads loading.

If the intent is “disable ads in dev”, gate both the containers and AdsInit behind an env check; otherwise, re-enable AdsInit so production still injects the Nitro script.

♻️ Duplicate comments (1)
apps/cyberstorm-remix/entrypoint.dev.sh (1)

58-59: Fix command execution: don’t use $* here (argument corruption).
This is the same issue previously flagged: $* flattens args. With su -c, a robust pattern is:

-# Execute the passed command as node
-exec su node -c "$*"
+# Execute the passed command as node (preserve argv)
+exec su node -s /bin/sh -c 'exec "$@"' sh "$@"
🧹 Nitpick comments (7)
packages/ts-uploader/README.md (1)

75-84: Clarify the optional nature of the S3 endpoint change.

The phrasing "you might need to change" is vague. Consider clarifying whether this is an expected requirement for the test environment or a workaround for specific scenarios. Also, the "Additionally" transition at line 79 doesn't clearly link the jsdom limitation to when/why developers should modify the S3 endpoint.

Consider rephrasing to make the relationship between the jsdom limitation and the S3 endpoint configuration more explicit, e.g.: "When running tests in jsdom, XMLHttpRequest to localhost:9000 may fail. In such cases, configure USERMEDIA_S3_SIGNING_ENDPOINT_URL to http://localhost:9000/ instead."

README.md (3)

22-43: Package naming inconsistency: brackets don't use @Thunderstore scope.

The packages are now scoped as @thunderstore/package-name (per the updated package READMEs), but the root README lists them in brackets without the scope (e.g., [cyberstorm], [ts-api-react]). This could confuse developers about the actual package names when installing or importing.

Consider either:

  1. Update brackets to include the @Thunderstore scope: [@thunderstore/cyberstorm]
  2. Add a note explaining that all packages are scoped under @thunderstore/

5-16: Docker setup guidance is deferred but not surfaced here.

The restructured README effectively points to cyberstorm-remix/README.md for setup, which aligns with the PR's Docker-first approach. However, the root README doesn't explicitly mention Docker as the primary development method. Since this PR is titled "docker dev env setup," consider adding a brief note in the intro or Key Projects section explicitly calling out Docker as the recommended development approach.

For example, enhance the intro to mention Docker: "This monorepo contains the frontend applications and shared libraries for thunderstore.io, optimized for Docker-based development."


52-58: Common Commands table is helpful but missing Docker-specific commands.

The table covers Yarn operations but doesn't mention Docker commands or a reference to the Docker setup guide. Since Docker is now central to development, consider adding a note or link directing developers to Docker setup instructions in the cyberstorm-remix README.

Dockerfile.dev (1)

1-6: Consider dropping iptables if it’s unused; confirm node:24-bookworm is intentional.
socat is used by the entrypoint; iptables doesn’t appear to be. Also please double-check the repo/tooling supports Node 24 as the dev baseline.

tools/nginx/new-localhost.conf (1)

1-19: Proxy headers look correct (Host preserved); optional tweak: set non-upgrade Connection to close.
Current map uses '' ''; many setups use '' close; for clarity/predictability.

apps/cyberstorm-remix/app/root.tsx (1)

302-303: Consider removing the commented debug line.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 468223f and 611db41.

📒 Files selected for processing (30)
  • Dockerfile.dev (1 hunks)
  • README.md (1 hunks)
  • apps/cyberstorm-remix/Dockerfile.development (0 hunks)
  • apps/cyberstorm-remix/README.md (1 hunks)
  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx (1 hunks)
  • apps/cyberstorm-remix/app/root.tsx (6 hunks)
  • apps/cyberstorm-remix/docker-compose.dev.yml (1 hunks)
  • apps/cyberstorm-remix/entrypoint.dev.sh (1 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • apps/cyberstorm-remix/react-router.config.ts (0 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/README.md (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • packages/cyberstorm-forms/README.md (1 hunks)
  • packages/cyberstorm-theme/README.md (1 hunks)
  • packages/dapper-fake/README.md (1 hunks)
  • packages/dapper-ts/README.md (1 hunks)
  • packages/graph-system/README.md (1 hunks)
  • packages/react-dnd/README.md (1 hunks)
  • packages/thunderstore-api/README.md (1 hunks)
  • packages/ts-api-react-actions/README.md (1 hunks)
  • packages/ts-api-react-forms/README.md (1 hunks)
  • packages/ts-api-react/README.md (1 hunks)
  • packages/ts-uploader-react/README.md (1 hunks)
  • packages/ts-uploader/README.md (1 hunks)
  • packages/typed-event-emitter/README.md (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
  • tools/ts-dev-proxy/Dockerfile (0 hunks)
  • tools/ts-dev-proxy/docker-compose.yml (0 hunks)
  • tools/ts-dev-proxy/nginx.conf (0 hunks)
💤 Files with no reviewable changes (5)
  • tools/ts-dev-proxy/Dockerfile
  • tools/ts-dev-proxy/docker-compose.yml
  • tools/ts-dev-proxy/nginx.conf
  • apps/cyberstorm-remix/Dockerfile.development
  • apps/cyberstorm-remix/react-router.config.ts
🚧 Files skipped from review as they are similar to previous changes (8)
  • packages/thunderstore-api/README.md
  • packages/cyberstorm-theme/README.md
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js
  • packages/beta-switch/README.md
  • packages/dapper-ts/README.md
  • packages/ts-api-react-forms/README.md
  • packages/typed-event-emitter/README.md
  • packages/dapper-fake/README.md
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Applies to apps/cyberstorm-remix/docs/**/*.route.{ts,tsx} : Use `RouteErrorBoundary` in route components by exporting it as `ErrorBoundary` from the route component file

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Applies to apps/cyberstorm-remix/docs/**/*.route.{ts,tsx} : `RouteErrorBoundary` catches errors in loaders and Promise rejections - ensure Suspense and Await are used in the main component to handle loader Promise rejections

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Error boundaries should handle render-time errors, while errors caused by user interaction should be handled by the component logic itself

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
🧬 Code graph analysis (1)
packages/beta-switch/src/index.ts (1)
apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1)
  • betaDev (31-36)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (13)
packages/graph-system/README.md (1)

1-11: Looks good.

Clear and concise documentation for the new package. Appropriately scoped naming and sufficient detail for users to understand the library's purpose.

packages/ts-api-react/README.md (1)

1-14: Looks good.

Clear documentation with appropriate features and scripts. The standardized @Thunderstore naming and feature descriptions are consistent with other packages in the PR.

packages/ts-api-react-actions/README.md (1)

1-14: Looks good.

Solid documentation emphasizing the action/mutation focus. The zod integration callout is helpful context for validation.

packages/cyberstorm-forms/README.md (1)

1-24: Looks good.

Excellent example showing how to integrate the package with react-hook-form. Clear feature descriptions and consistent with the standardized documentation approach.

packages/react-dnd/README.md (1)

1-13: Looks good.

Focused and clear. The emphasis on minimal dependencies is a good feature callout for a utility library.

packages/ts-uploader-react/README.md (1)

1-14: Looks good.

Clear documentation with helpful dependency callout. The cross-reference to @thunderstore/ts-uploader provides good context for users understanding the package hierarchy.

README.md (1)

60-73: Looks good.

The Contributing section is well-structured. Pre-commit hooks, Chromatic visual testing, and VS Code recommendations are all relevant. The note about Chromatic being automatic on PRs provides helpful context.

packages/beta-switch/src/index.ts (1)

38-50: Dev host updates look consistent with new.localhost routing.
Matches the expected dev endpoints (legacy → localhost, beta → new.localhost) and doesn’t impact the prod/QA branching.

apps/cyberstorm-remix/docker-compose.dev.yml (1)

20-35: Secret/volume wiring seems reasonable; please verify the external deps exist.
In particular: external volume thunderstore_nginx_conf and ../../build-secrets/.npmrc on fresh clones.

apps/cyberstorm-remix/README.md (1)

1-44: Docs match the new Docker dev flow and localhost endpoints.
Nice simplification vs the previous env-heavy setup.

docker-compose.remix.development.yml (1)

2-69: Helper-service orchestration + depends_on: condition: service_completed_successfully is a solid dev UX.
The sync/watch split and nginx-conf seeding is straightforward to reason about.

apps/cyberstorm-remix/app/root.tsx (2)

3-18: Imports look consistent with the new root-level ErrorBoundary.

Also applies to: 33-35


605-640: This suggestion is incorrect — useEffect cannot be used in ErrorBoundaries for error handling.

ErrorBoundaries only catch errors thrown during render; useEffect runs after render completes (in the effect phase). Moving the logging into useEffect would break the pattern—errors caught by the boundary must be logged/reported synchronously during render.

The current implementation (logging directly in render) is correct for an ErrorBoundary. If duplicate logging from re-renders is a concern in practice, that would need a different approach (e.g., tracking the error object identity), but useEffect is not the solution.

The type check for error.data is reasonable defensive programming and can be kept separately if needed.

Likely an incorrect or invalid review comment.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Docker development environment setup by migrating from custom .temp domains to standard .localhost domains, which are automatically resolved by modern browsers without requiring hosts file modifications. The changes streamline the developer onboarding experience and improve documentation across the monorepo.

Key Changes

  • Docker Environment Refactor: Replaces the nginx-based proxy setup (tools/ts-dev-proxy) with a simpler configuration that uses .localhost domains and rsync-based file synchronization
  • Domain Migration: Updates all development URLs from thunderstore.temp/new.thunderstore.temp to localhost/new.localhost across configuration files and code
  • Documentation Overhaul: Significantly improves README files across packages with feature descriptions, usage examples, and a clearer Quick Start guide for Docker-based development

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tools/ts-dev-proxy/* Removed old nginx proxy setup (nginx.conf, docker-compose.yml, Dockerfile)
tools/nginx/new-localhost.conf New lightweight nginx config for proxying to cyberstorm-remix service
docker-compose.remix.development.yml Complete rewrite: adds rsync-based sync services, updated environment variables, and volume management
Dockerfile.dev New unified development Dockerfile with entrypoint script
apps/cyberstorm-remix/entrypoint.dev.sh New entrypoint handling dependency installation, nginx config, and localhost-to-django mapping for SSR
apps/cyberstorm-remix/docker-compose.dev.yml New standalone docker-compose for frontend-only development
apps/cyberstorm-remix/Dockerfile.development Removed in favor of root-level Dockerfile.dev
apps/cyberstorm-remix/react-router.config.ts Removed (middleware configuration no longer needed)
apps/cyberstorm-remix/README.md Replaced detailed manual setup instructions with concise Docker Quick Start guide
apps/cyberstorm-remix/app/root.tsx Added new ErrorBoundary implementation, commented out ads initialization, added debug console.log
apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx Added duplicate console.log before console.error
packages/beta-switch/src/index.ts Updated dev environment hostnames from .temp to .localhost
apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js Updated dev environment hostnames from .temp to .localhost
packages/*/README.md Enhanced with package descriptions, features, and usage examples (10 packages updated)
packages/ts-uploader/README.md Updated documentation to reference localhost instead of thunderstore.localhost
README.md Restructured to focus on key projects and packages with improved navigation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from 611db41 to 0d2ce5d Compare December 12, 2025 18:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (10)
apps/cyberstorm-remix/README.md (1)

35-44: Manual Setup section still needs prerequisites/clarity (Node/Yarn versions + backend expectations).
This matches earlier feedback: the current text doesn’t say whether “Manual Setup” is frontend-only and what versions/tools are expected.

apps/cyberstorm-remix/entrypoint.dev.sh (2)

39-46: Make django_ip single-valued + make /etc/hosts update idempotent.
getent hosts django | awk '{print $1}' can yield multiple IPs/lines; and the fallback append can duplicate localhost mappings across restarts.

- django_ip=$(getent hosts django | awk '{print $1}')
+ django_ip="$(getent hosts django | awk 'NR==1{print $1; exit}')"
  if [ -n "$django_ip" ]; then
@@
-  } > /tmp/hosts && cat /tmp/hosts > /etc/hosts || printf "%s localhost\n" "$django_ip" >> /etc/hosts
+  } > /tmp/hosts && cat /tmp/hosts > /etc/hosts || {
+    grep -qxF "$django_ip localhost" /etc/hosts || printf "%s localhost\n" "$django_ip" >> /etc/hosts
+  }

58-59: Fix argument handling: $* should be "$@" (preserve arg boundaries).

- exec su node -c "$*"
+ exec su node -c "$@"
docker-compose.remix.development.yml (3)

12-20: Verify exclusion list is complete.

The rsync --delete flag will remove files in /workspace that don't exist in /src. While node_modules, .turbo, and .cache are excluded, verify that other generated artifacts (e.g., dist, build, .react-router) don't need exclusion.

#!/bin/bash
# Find common build output directories in the repository
fd -t d -d 3 'dist|build|.react-router|out|.next|.output' --exclude node_modules --exclude .git

41-41: Bind port to localhost only.

The port binding 3000:3000 exposes the service on all network interfaces, which poses a security risk. Bind to localhost: 127.0.0.1:3000:3000.

-      - "3000:3000"
+      - "127.0.0.1:3000:3000"

53-54: Fix YAML indentation for networks.

The networks key is mis-indented. It should align with environment as a sibling under the service definition.

     environment:
       - NODE_ENV=development
       ...
-    networks:
-        - thunderstore_default
+    networks:
+      - thunderstore_default
apps/cyberstorm-remix/app/root.tsx (3)

302-302: Remove commented debug code.

The commented console.log should be removed before merging to production.

-  // console.log(process.env.VITE_DEVELOPMENT);
-

562-562: Clarify AdsInit removal.

The AdsInit component is commented out but the component code remains (lines 644-694). If ads are disabled for development, consider using an environment check or removing the unused component.

Is this temporary for development testing, or should the entire AdsInit component be removed?


621-639: Fix grammar in error message.

Line 635 contains a grammatical error: "Server something error happens" should be more professional.

        <div className="error__flavor">
-          Beep boop. Server something error happens.
+          Beep boop. A server error occurred.
        </div>
apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx (1)

26-27: Remove duplicate console logging.

Both console.log and console.error are logging the same error. The console.log on line 26 is redundant.

    } else if (error) {
-      console.log("Error boundary caught error", error);
      console.error("Error boundary caught error", error);
    }
🧹 Nitpick comments (2)
apps/cyberstorm-remix/app/root.tsx (2)

605-606: Clean up commented exports.

The commented-out export and TODO comments should be removed if the ErrorBoundary implementation is finalized.

-// export { RouteErrorBoundary as ErrorBoundary } from "app/commonComponents/ErrorBoundary";
-// REMIX TODO: We don't have any data available in the root ErrorBoundary, so we might want to change the designs
 export function ErrorBoundary() {

607-620: LGTM - error boundary logic.

The error handling logic correctly distinguishes between production (Sentry reporting) and development (console logging). However, consider cleaning up the commented loader code (lines 608-614) if it's not needed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 611db41 and 0d2ce5d.

📒 Files selected for processing (30)
  • Dockerfile.dev (1 hunks)
  • README.md (1 hunks)
  • apps/cyberstorm-remix/Dockerfile.development (0 hunks)
  • apps/cyberstorm-remix/README.md (1 hunks)
  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx (1 hunks)
  • apps/cyberstorm-remix/app/root.tsx (6 hunks)
  • apps/cyberstorm-remix/docker-compose.dev.yml (1 hunks)
  • apps/cyberstorm-remix/entrypoint.dev.sh (1 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • apps/cyberstorm-remix/react-router.config.ts (0 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/README.md (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • packages/cyberstorm-forms/README.md (1 hunks)
  • packages/cyberstorm-theme/README.md (1 hunks)
  • packages/dapper-fake/README.md (1 hunks)
  • packages/dapper-ts/README.md (1 hunks)
  • packages/graph-system/README.md (1 hunks)
  • packages/react-dnd/README.md (1 hunks)
  • packages/thunderstore-api/README.md (1 hunks)
  • packages/ts-api-react-actions/README.md (1 hunks)
  • packages/ts-api-react-forms/README.md (1 hunks)
  • packages/ts-api-react/README.md (1 hunks)
  • packages/ts-uploader-react/README.md (1 hunks)
  • packages/ts-uploader/README.md (1 hunks)
  • packages/typed-event-emitter/README.md (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
  • tools/ts-dev-proxy/Dockerfile (0 hunks)
  • tools/ts-dev-proxy/docker-compose.yml (0 hunks)
  • tools/ts-dev-proxy/nginx.conf (0 hunks)
💤 Files with no reviewable changes (5)
  • tools/ts-dev-proxy/nginx.conf
  • tools/ts-dev-proxy/Dockerfile
  • tools/ts-dev-proxy/docker-compose.yml
  • apps/cyberstorm-remix/Dockerfile.development
  • apps/cyberstorm-remix/react-router.config.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/cyberstorm-theme/README.md
  • packages/thunderstore-api/README.md
🚧 Files skipped from review as they are similar to previous changes (12)
  • packages/ts-uploader/README.md
  • packages/graph-system/README.md
  • packages/dapper-ts/README.md
  • tools/nginx/new-localhost.conf
  • packages/beta-switch/src/index.ts
  • packages/ts-uploader-react/README.md
  • packages/dapper-fake/README.md
  • apps/cyberstorm-remix/docker-compose.dev.yml
  • packages/typed-event-emitter/README.md
  • Dockerfile.dev
  • packages/ts-api-react-forms/README.md
  • packages/ts-api-react-actions/README.md
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Applies to apps/cyberstorm-remix/docs/**/*.route.{ts,tsx} : Use `RouteErrorBoundary` in route components by exporting it as `ErrorBoundary` from the route component file

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Applies to apps/cyberstorm-remix/docs/**/*.route.{ts,tsx} : `RouteErrorBoundary` catches errors in loaders and Promise rejections - ensure Suspense and Await are used in the main component to handle loader Promise rejections

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
📚 Learning: 2025-12-09T12:41:16.448Z
Learnt from: CR
Repo: thunderstore-io/thunderstore-ui PR: 0
File: apps/cyberstorm-remix/docs/error-boundary.md:0-0
Timestamp: 2025-12-09T12:41:16.448Z
Learning: Error boundaries should handle render-time errors, while errors caused by user interaction should be handled by the component logic itself

Applied to files:

  • apps/cyberstorm-remix/app/commonComponents/ErrorBoundary/RouteErrorBoundary.tsx
  • apps/cyberstorm-remix/app/root.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (12)
apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1)

25-36: Dev hostname/tld switch to localhost / new.localhost looks consistent with the redirect logic.
Minor gotcha: if someone accesses dev via 127.0.0.1, the button will treat it as “neither legacy nor beta” and redirect to localhost/new.localhost—fine if intentional, but worth sanity-checking.

packages/react-dnd/README.md (1)

1-9: Doc refresh is clear and aligns with scoped package naming.

packages/ts-api-react/README.md (1)

1-9: Doc update reads well; feature bullets are concrete and helpful.

packages/beta-switch/README.md (1)

1-15: README now explains the DOM hooks + behavior clearly (esp. injection targets).

packages/cyberstorm-forms/README.md (1)

1-19: Nice README improvement: features + import snippet make the package easier to adopt.

README.md (1)

5-44: Restructure is a net win (quick “what is here / where do I go”).

apps/cyberstorm-remix/entrypoint.dev.sh (1)

48-55: Sanity-check port 80 forwarding doesn’t conflict with other processes in this dev container.
If anything else binds :80 (nginx, etc.), socat will fail and you’ll silently lose the SSR routing behavior.

docker-compose.remix.development.yml (4)

2-10: LGTM!

The nginx config copy service is correctly configured as a one-time setup task.


22-32: LGTM - continuous sync service.

The watch service will continuously sync changes every 5 seconds. Ensure the SYNC_INTERVAL value balances responsiveness with resource usage.


55-68: LGTM - environment configuration.

The environment variables and secrets configuration looks correct for the Vite development setup with localhost domains.


70-85: LGTM - volumes and secrets configuration.

The volume and secrets declarations are correctly configured. The external nginx conf volume and npmrc secret setup look appropriate.

apps/cyberstorm-remix/app/root.tsx (1)

5-5: LGTM - error handling imports.

The new imports for error boundary functionality are correctly added.

Also applies to: 17-17, 33-33

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from 0d2ce5d to b680ab9 Compare December 15, 2025 15:47
@Oksamies Oksamies changed the title docker dev env setup Set up Docker development environment for Cyberstorm Remix Dec 15, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
apps/cyberstorm-remix/README.md (2)

23-23: Clarify when -v flag is necessary.

The -v flag removes volumes, which will delete database data and other persisted state. Consider explaining when this nuclear option is needed versus just docker compose down and --build.


36-38: Consider clarifying backend requirement.

The section title could be more explicit that the backend still requires Docker. This would align with the past review feedback about documenting the full stack requirement.

-## Manual Setup
+## Manual Frontend Setup

-If you prefer running Node locally instead of in Docker:
+If you prefer running the **frontend** locally instead of in Docker, follow these steps. The backend should still be run via Docker as described above.
docker-compose.remix.development.yml (1)

72-74: Document npmrc secret file requirement.

The build-secrets/.npmrc file is required but may not be obvious to new developers. Ensure this is documented in setup instructions or a README, and verify the path is in .gitignore.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d2ce5d and b680ab9.

📒 Files selected for processing (7)
  • Dockerfile.dev (1 hunks)
  • apps/cyberstorm-remix/README.md (1 hunks)
  • apps/cyberstorm-remix/entrypoint.dev.sh (1 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/beta-switch/src/index.ts
  • apps/cyberstorm-remix/entrypoint.dev.sh
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (4)
tools/nginx/new-localhost.conf (1)

1-24: LGTM!

The nginx configuration correctly handles websocket upgrades, preserves the Host header, disables caching for development, and proxies to the Remix service. The past concern about the Host header has been addressed.

Dockerfile.dev (2)

4-6: System dependencies installed for SSR routing.

The iptables and socat packages are likely used by the entrypoint script for development SSR routing. While appropriate for a dev container, consider adding a comment explaining their purpose.


1-1: Node.js 24 is available and appropriate for this project.

Node.js 24 was released on May 6, 2025, and entered Active LTS on October 28, 2025, with maintenance through April 30, 2028. The project's package.json specifies "engines": { "node": ">=20.17.0" }, which fully supports Node 24. Using node:24-bookworm in Dockerfile.dev is valid and current.

Likely an incorrect or invalid review comment.

docker-compose.remix.development.yml (1)

13-28: Well-designed sync strategy.

The one-time sync followed by continuous watch pattern with atomic nginx config updates (using tmp file + mv) is a solid approach for development file synchronization.

@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from b680ab9 to 340658e Compare December 15, 2025 15:58
@Oksamies Oksamies requested a review from Copilot December 15, 2025 16:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- Added Dockerfile.dev for development setup with Node.js and necessary dependencies.
- Created entrypoint script to manage directory permissions and install dependencies.
- Updated docker-compose configuration for local development, including new sync and watch services.
- Adjusted beta-switch script to use localhost for development.
- Added new Nginx configuration for local development.
@Oksamies Oksamies force-pushed the 12-10-docker_dev_env_setup branch from 340658e to 5554b2c Compare December 15, 2025 16:49
@Oksamies Oksamies requested a review from Copilot December 15, 2025 16:54
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/cyberstorm-remix/README.md (1)

36-45: Add Node.js and Yarn version requirements to Manual Setup.

The Manual Setup section lacks prerequisites similar to those flagged in earlier review feedback. Add Node version and Yarn specifications to clarify requirements.

Apply this diff to document prerequisites:

 ## Manual Setup
 
 If you prefer running Node locally instead of in Docker:
 
+### Prerequisites
+
+- [Node.js](https://nodejs.org/) (version 18.x or later recommended)
+- [Yarn](https://yarnpkg.com/) (classic, v1.x)
+
+### Steps
+
-1.  **Install Dependencies**: `yarn install` (in repo root)
+1.  **Install Dependencies**: From the repo root, run `yarn install`
 2.  **Configure Env**: Copy `.env.example` to `.env` in `apps/cyberstorm-remix`.
 3.  **Run Dev Server**:
     ```bash
     yarn workspace @thunderstore/cyberstorm-remix dev --port 3000 --host 0.0.0.0
     ```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 340658e and 5554b2c.

📒 Files selected for processing (7)
  • Dockerfile.dev (1 hunks)
  • apps/cyberstorm-remix/README.md (1 hunks)
  • apps/cyberstorm-remix/entrypoint.dev.sh (1 hunks)
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js (1 hunks)
  • docker-compose.remix.development.yml (1 hunks)
  • packages/beta-switch/src/index.ts (1 hunks)
  • tools/nginx/new-localhost.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/beta-switch/src/index.ts
  • tools/nginx/new-localhost.conf
  • apps/cyberstorm-remix/entrypoint.dev.sh
  • apps/cyberstorm-remix/public/cyberstorm-static/scripts/beta-switch.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Generate visual diffs
🔇 Additional comments (5)
docker-compose.remix.development.yml (3)

13-28: LGTM on rsync sync/watch services structure.

The rsync initialization and watch pattern using atomic file operations (temp file + mv for nginx config) is solid. The set -e error handling is appropriate.


69-70: Verify external thunderstore_nginx_conf volume exists before compose startup.

This external volume must be created separately before docker compose up. Confirm that Docker volume creation instructions or bootstrap steps are documented (e.g., in a setup script, README, or additional documentation).

Also verify that build-secrets/.npmrc exists locally, as it's referenced by the Docker Compose configuration at line 51.


74-74: Verify build-secrets/.npmrc exists and is properly excluded from version control.

The npmrc secret is expected at ./build-secrets/.npmrc (relative to docker-compose file). Ensure:

  1. This file exists for local development
  2. The .npmrc and build-secrets/ are properly .gitignore'd to prevent credential leaks
  3. Setup documentation instructs developers how to create this file
Dockerfile.dev (2)

6-7: File exists and is properly tracked.

The apps/cyberstorm-remix/entrypoint.dev.sh script is present in the repository and tracked in git. The RUN chmod +x command on line 7 will properly make it executable at build time.


1-1: Use Node 20 instead of Node 24 in Dockerfile.dev.

Your project pins Node to the 20.x branch (see .github/actions/get-node-version/package.json with ^20.17.0), while node:24-bookworm creates a mismatch between development and CI environments. Change to node:20-bookworm for consistency.

⛔ Skipped due to learnings
Learnt from: anttimaki
Repo: thunderstore-io/thunderstore-ui PR: 1559
File: packages/ts-api-react/package.json:16-18
Timestamp: 2025-10-01T11:36:11.065Z
Learning: In the thunderstore-ui repository, exact Node version pinning (e.g., "24.9.0") is intentionally used in package.json engines fields rather than semver ranges, to ensure consistency across environments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Oksamies Oksamies requested a review from Roffenlund December 15, 2025 17:54
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.

2 participants