mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8111] [MERGED] fix(client): proxy dev /api to the PORT in the root .env #8107
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#8107
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8111
Author: @ylli-selmani
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ylli-selmani
Base:
staging← Head:fix/vite-proxy-env-port📝 Commits (2)
b4c8b43fix(client): proxy dev /api to the PORT in the root .envd34d3dbfix(client): resolve the dev proxy PORT like the server does📊 Changes
1 file changed (+32 additions, -1 deletions)
View changed files
📝
packages/client/vite.config.ts(+32 -1)📄 Description
Linked issue
No issue yet. This is a small dev-tooling bug found while running several checkouts side by side; one should be opened if a maintainer wants it tracked separately.
Why this change
/apitohttp://127.0.0.1:${process.env.PORT ?? 7860}.PORTreaches Vite only when it is exported in the shell, but the server reads it from the root.env. Sopnpm --filter @marinara-engine/client dev(or any launcher that starts the client without exportingPORT) proxied to 7860 even when.envsaid otherwise.What changed
packages/client/vite.config.ts: the dev proxy port now resolves the way the server'sgetPort()does: an exportedPORTwins (dotenv never overrides it), otherwisePORTfrom the root.env, parsed withNumber.parseInt, falling back to 7860. The file is read withnode:utilparseEnv, not a repo script, so container builds (which do not copyscripts/) still resolve the config.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-side checks (not a substitute for the boxes above):
pnpm checkexit 0 on this branch. A probe loadedvite.config.tsthrough Vite'sloadConfigFromFileand printed the/apitarget:.env, noPORT7860.envPORT=6999, nothing exported6999(staging:7860).env6999, exportedPORT=70017001.env6999, exportedPORT=(empty)7860(server: 7860 too).envPORT=6999x6999(same asgetPort()).envPORT=(empty)7860.envPORT="6999" # comment6999Local CodeRabbit (
--committed --base origin/staging) on the first commit: 0 findings. Dottore round 1 found the container-build break (the first version importedscripts/read-launcher-env.mjs, which the images do not copy) and the raw-string port; both fixed in the second commit.No regression test:
vite.config.tshas no test harness, and the resolution is a few lines mirroringgetPort(); the probe above is the proof.Manual verification notes
PORT=<not 7860>in the root.envandPORTnot exported, runpnpm --filter @marinara-engine/client devnext to a server on that port, open the dev URL, and confirm the app loads data from that server and no build-skew banner appears.PORTexported in the shell, the exported value still wins over.env.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No docs reference the proxy port, so none were changed.
UI evidence (if applicable)
Not a UI change.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.