Skip to content

fix(dev): stop .env.example pinning the web app to dead fixed ports - #842

Open
JeremyFunk wants to merge 1 commit into
mainfrom
fix/env-example-dev-urls
Open

fix(dev): stop .env.example pinning the web app to dead fixed ports#842
JeremyFunk wants to merge 1 commit into
mainfrom
fix/env-example-dev-urls

Conversation

@JeremyFunk

@JeremyFunk JeremyFunk commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator
  • bun dev derives VITE_API_BASE_URL / VITE_ELECTRIC_SYNC_URL from portless routes, but apps/web/vite.config.ts uses ??=, so a set value wins
  • .env.example still set the pre-alchemy fixed ports (localhost:3472, :3476); nothing listens there under bun dev
  • Any .env.local copied from the template → every web API call ERR_CONNECTION_REFUSED, app shows "Failed to load environments"
  • Fix: comment both out (kept as raw-port examples, same as VITE_INGEST_URL); drop the reference to the removed bun dev:portless script

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Documentation
    • Updated environment configuration guidance for bun dev and portless routes.
    • Clarified that automatically derived service URLs can be overridden with explicit values.
    • Documented when to leave API, ingest, and sync URL settings unset.

bun dev derives VITE_API_BASE_URL and VITE_ELECTRIC_SYNC_URL from the
portless routes, but vite.config.ts only fills them when unset. The
template still set the pre-alchemy fixed ports (3472, 3476), so any
.env.local copied from it sent every web API call to a closed port.
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 64bfc670-fc4d-4c16-9912-cd5bacdfdc14

📥 Commits

Reviewing files that changed from the base of the PR and between 59ef519 and 0cdc50c.

📒 Files selected for processing (1)
  • .env.example

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The .env.example web app override block now documents portless URL derivation and precedence rules. VITE_API_BASE_URL and VITE_ELECTRIC_SYNC_URL are active with unchanged values.

Changes

Web app environment configuration

Layer / File(s) Summary
Portless environment overrides
.env.example
The comment documents automatic URL derivation by bun dev, explicit-value precedence, and raw-port usage. The API and Electric sync URL entries are uncommented.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: makisuo

Merge Risk: ⚪ Minimal · up to 0cdc5

The example configuration now leaves the raw-port overrides unset as intended and presents no actionable merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: updating .env.example so the web app no longer pins development settings to obsolete fixed ports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/env-example-dev-urls

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant