Skip to content

feat: 1000yen gacha#9

Merged
nakasyou merged 3 commits intopnsk-lab:mainfrom
oto-lab:feat/1000yen-gacha
May 4, 2026
Lines changed: 170 additions & 8 deletions
Merged

feat: 1000yen gacha#9
nakasyou merged 3 commits intopnsk-lab:mainfrom
oto-lab:feat/1000yen-gacha

Conversation

@otoneko1102
Copy link
Copy Markdown
Collaborator

Why?

1000yen gacha is fun

Verified

This commit was signed with the committer’s verified signature.
otoneko1102 otoneko.

Verified

This commit was signed with the committer’s verified signature.
otoneko1102 otoneko.

Verified

This commit was signed with the committer’s verified signature.
otoneko1102 otoneko.
Copy link
Copy Markdown
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

Adds a “1000円ガチャ” feature to the Betterzeriya session ordering page, plus build/runtime wiring to support using server-side menu mock data during development while stubbing it out in production bundles.

Changes:

  • Add a gacha UI + selection logic (budgeted random menu picks) and a results dialog on sessions/[id].
  • Introduce $server-mock aliasing and a production stub JSON to avoid shipping the full server mock menu JSON in production.
  • Adjust root scripts to add build/start conveniences and split app dev (dev:app) from server dev.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Updates root scripts (dev/app dev, build/start aliases).
apps/betterzeriya/vite.config.ts Adds production-only alias to stub $server-mock/menu.json.
apps/betterzeriya/svelte.config.js Adds $server-mock alias to server data directory.
apps/betterzeriya/src/routes/sessions/[id]/+page.svelte Implements gacha logic/UI and DEV-only initial menu availability via mock state map.
apps/betterzeriya/src/routes/layout.css Adds toolbar + gacha dialog/list styling; adds line-clamp.
apps/betterzeriya/src/lib/server-mock-stub.json Adds an empty JSON stub for production builds.

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

package.json
"type": "module",
"scripts": {
"dev": "bun --cwd packages/server --watch src/main.ts",
"dev": "cd packages/server && bun --watch src/main.ts",

Copilot commented on May 4, 2026

Root dev script now duplicates the server package's own dev script and relies on cd ... && .... To avoid divergence and keep a single source of truth for the server entrypoint/watch flags, call the package script via bun --cwd packages/server dev (or bun run --cwd packages/server dev) instead of inlining the command.

Suggested changeset  (1)
package.json
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"type": "module",
99
"scripts": {
10-
"dev": "cd packages/server && bun --watch src/main.ts",
10+
"dev": "bun run --cwd packages/server dev",
1111
"dev:app": "bun run --cwd apps/betterzeriya dev",
1212
"betterzeriya:build": "bun run --cwd packages/client build && bun run --cwd apps/betterzeriya build",
1313
"betterzeriya:start": "node apps/betterzeriya/build",
Copilot uses AI. Check for mistakes.
package.json
"betterzeriya:build": "bun run --cwd packages/client build && bun run --cwd apps/betterzeriya build",
"betterzeriya:start": "node apps/betterzeriya/build",
"build": "bun run betterzeriya:build",
"start": "HOST=localhost node apps/betterzeriya/build",

Copilot commented on May 4, 2026

The new root start script forces HOST=localhost, which changes runtime behavior compared to the previous node apps/betterzeriya/build (it will no longer bind externally, which can break Docker/LAN access). Consider keeping start compatible with the documented command and adding a separate start:local (or similar) for the localhost-only binding.

Suggested changeset  (1)
package.json
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"betterzeriya:build": "bun run --cwd packages/client build && bun run --cwd apps/betterzeriya build",
1313
"betterzeriya:start": "node apps/betterzeriya/build",
1414
"build": "bun run betterzeriya:build",
15-
"start": "HOST=localhost node apps/betterzeriya/build",
15+
"start": "node apps/betterzeriya/build",
16+
"start:local": "HOST=localhost node apps/betterzeriya/build",
1617
"cli": "bun --cwd packages/client cli.ts",
1718
"format": "vp fmt . --write",
1819
"format:check": "vp fmt . --check",
Copilot uses AI. Check for mistakes.
@nakasyou nakasyou merged commit 8b1c958 into pnsk-lab:main May 4, 2026
4 checks passed
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.

None yet

3 participants