Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:18
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The devcontainer base image pins Node 18, but the current dependency tree includes packages that declare Node >= 20 in their engines (see package-lock.json). Using Node 18 can lead to install/runtime failures (or strict engine errors). Please update the devcontainer image to a supported Node LTS that matches the project’s requirements (e.g., 20/22).

Suggested change
FROM mcr.microsoft.com/devcontainers/typescript-node:18
FROM mcr.microsoft.com/devcontainers/typescript-node:20

Copilot uses AI. Check for mistakes.

USER node

WORKDIR /app/

COPY --chown=node:node package*.json ./

RUN npm install

Comment on lines +9 to +10
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

RUN npm install during image build is likely wasted work because compose.yml bind-mounts the workspace over /app, which hides the image’s node_modules. Either mount a dedicated node_modules volume so the build-layer install is usable, or remove the build-time install and rely on postCreateCommand (optionally using npm ci for reproducibility).

Suggested change
RUN npm install

Copilot uses AI. Check for mistakes.
COPY --chown=node:node . .

EXPOSE 3000
12 changes: 12 additions & 0 deletions .devcontainer/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/app:cached
command: sleep infinity

volumes:
node_modules:
Comment on lines +8 to +12
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

node_modules is declared as a named volume but never mounted, so dependencies installed via postCreateCommand will land in the bind-mounted workspace and get synced (slow) and can differ by host OS. Mount the named volume at /app/node_modules (or use devcontainer mounts) to keep installs container-local and improve performance.

Copilot uses AI. Check for mistakes.
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

{
"name": "systemcore-blocks-interface",
"dockerComposeFile": "compose.yml",
"service": "app",
"remoteUser": "node",
"workspaceFolder": "/app/",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"ms-python.python"
]
}
},
"forwardPorts": [
3000
],
"postCreateCommand": "npm install",
"postAttachCommand": "npm run start"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

postAttachCommand runs on every attach/re-attach and may start multiple dev servers (or fail due to port already in use). Prefer postStartCommand (runs once per container start) or add a guard so npm run start only launches if it’s not already running.

Suggested change
"postAttachCommand": "npm run start"
"postStartCommand": "npm run start"

Copilot uses AI. Check for mistakes.
}
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git/
node_modules/
*.log
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would change API specifications or require data migrations)
2 changes: 2 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="vitest" />
/// <reference types="@vitest/browser/matchers" />

import { defineConfig } from "vitest/config";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { playwright } from '@vitest/browser-playwright'
Expand All @@ -24,6 +25,7 @@ export default defineConfig({
}),
],
server: {
host: true,
port: 3000,
},
Comment on lines 27 to 30
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

Setting server.host: true makes the dev server bind to all interfaces (0.0.0.0), which can unintentionally expose the app to the local network when running vite outside a container. Consider scoping this to devcontainer/Codespaces only (e.g., conditional on an env var) or explicitly documenting that the dev server will be network-accessible.

Copilot uses AI. Check for mistakes.
define: {
Expand Down