mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3529] [Feature]: Warn at startup when the client build is missing instead of silently serving API-only #1905
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1905
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jul 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3529
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
When
packages/client/distdoesn't exist, the server starts silently API-only: the static-file registration and the SPA fallback are both insideif (existsSync(clientDist)) { ... }(packages/server/src/app.ts:172), so nothing serves/, and the browser gets Fastify's bare JSON 404:Nothing in the launcher window or server log hints at the cause, so it reads like a broken install rather than a missing build. This bites in a real, recurring scenario: checking out a PR branch (or any fresh clone) means no
dist/(it's gitignored), and the launcher skips its rebuild step when its ff-only update doesn't land (e.g. on a non-main branch:[WARN] Update did not land on origin/main. Continuing with current version.) — so the server comes up, the API answers, and/404s with no explanation. Hit exactly this today while testing a PR branch.Proposed solution
A one-line warning in an
elsebranch of theexistsSync(clientDist)check, e.g.:That's the whole ask — make the silence say what's wrong and how to fix it.
Alternatives considered
GET /handler in the no-dist case that returns a plain-text/HTML hint ("Client build missing — runpnpm build") instead of the raw 404. Friendlier for people who only look at the browser, slightly more code; could be a follow-up on top of the log line.Additional context
Repro: on a checkout without
packages/client/dist(fresh clone or PR branch), start the server; openhttp://127.0.0.1:7860/→ JSON 404, no diagnostic anywhere.packages/server/src/app.ts:169-212is the relevant block.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 12, 2026):
Taking this in #3530. I’m preserving the existing chroma/theming fixes in the same branch and adding explicit missing-client-build diagnostics before marking the PR ready.