Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ runs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Cache Bun install
uses: actions/cache@v6
with:
path: .cache/bun/install
key: ${{ runner.os }}-bun-install-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-install-

- name: Checkout Container
working-directory: ./docker/
shell: bash
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
hostname: thunlights
container_name: distopia-dev
working_dir: /workspaces/distopia
command: sleep infinity
ports:
- "127.0.0.1:${PROD_PORT:-3000}:3000"
- "127.0.0.1:${DEV_PORT:-5173}:5173"
Expand Down
3 changes: 0 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ services:
init: true
networks:
- distopia-network
command: sleep infinity
volumes:
- ..:/workspaces/distopia:cached
- distopia-cache:/workspaces/distopia/.cache
- distopia-node-modules:/workspaces/distopia/node_modules

volumes:
distopia-db-store:
external: true
distopia-cache:
distopia-node-modules:

networks:
Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

RUN [[ $(id -u ubuntu) = $USER_UID ]] || usermod -u $USER_UID ubuntu \
&& [[ $(id -u ubuntu) = $USER_GID ]] || groupmod -g $USER_GID ubuntu \
&& [[ $(id -g ubuntu) = $USER_GID ]] || groupmod -g $USER_GID ubuntu \
&& echo "ubuntu ALL=NOPASSWD: ALL" > /etc/sudoers.d/ubuntu \
&& chmod 0440 /etc/sudoers.d/ubuntu

Expand Down
2 changes: 1 addition & 1 deletion src/presentation/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"setup": "playwright install --with-deps && npm run build-storybook",
"setup": "playwright install --with-deps",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"test:unit": "vitest",
"test": "npm run test:unit -- --run && npm run test:e2e",
"test:e2e": "playwright test",
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineConfig({
baseURL: "http://localhost:4173",
},
webServer: {
command: "npm run build && npm run preview",
command: "npm run preview",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== playwright.config.ts ==\n'
cat -n src/presentation/web/playwright.config.ts | sed -n '1,120p'

printf '\n== package.json ==\n'
cat -n src/presentation/web/package.json | sed -n '1,120p'

printf '\n== search for webServer command / preview usage ==\n'
rg -n '"npm run preview"|"bun run preview"|"vite preview"|"build && preview"|"playwright' src/presentation/web -S

Repository: ThunLights/distopia

Length of output: 4640


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== root package/workflow references ==\n'
rg -n '"test:e2e"|"playwright test"|"vite build"|"bun run build"|"npm run build"|"npm run preview"|"bun run preview"|"playwright install"|"preview"' \
  . \
  -g '!**/node_modules/**' \
  -g '!**/dist/**' \
  -g '!**/.git/**' \
  -S

printf '\n== files mentioning playwright.config.ts or webServer ==\n'
rg -n 'webServer|playwright.config.ts|reuseExistingServer|baseURL' src .github . -g '!**/node_modules/**' -S

Repository: ThunLights/distopia

Length of output: 1119


Restore the build step before preview. vite preview expects an existing dist, so npm run preview can fail on a clean Playwright run and bypasses the repo’s Bun-only script convention.

Suggested change
-    command: "npm run preview",
+    command: "bun run build && bun run preview",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
command: "npm run preview",
command: "bun run build && bun run preview",
🤖 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 `@src/presentation/web/playwright.config.ts` at line 9, The Playwright preview
command in the config is using npm directly and skips the required build step,
which can fail on a clean run. Update the preview setup in the playwright config
so it follows the repo’s Bun script convention and runs the build before
starting preview, ensuring the existing dist output is created first. Use the
preview command entry in the Playwright config to make this change.

Source: Coding guidelines

port: 4173,
// Reuse the server if it is already running (e.g. from a previous test run or `npm run preview`).
reuseExistingServer: true,
Expand Down
5 changes: 3 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"cache": false
},
"test": {
"dependsOn": ["^test"],
"dependsOn": ["build", "^test"],
"cache": false
},
"lint": {
Expand All @@ -16,7 +16,8 @@
"dependsOn": ["^format"]
},
"setup": {
"dependsOn": ["^setup"]
"dependsOn": ["^setup"],
"cache": false
},
"typecheck": {
"dependsOn": ["^typecheck"]
Expand Down
Loading