Skip to content

docs(console): correct the VITE_SERVER_URL dev default to empty/same-origin - #5910

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-5802-console-doc-env-default
Aug 23, 2026
Merged

docs(console): correct the VITE_SERVER_URL dev default to empty/same-origin#5910
os-zhuang merged 1 commit into
mainfrom
claude/issue-5802-console-doc-env-default

Conversation

@claude

@claudeclaudeBot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Fixes#5802

content/docs/guide/console.md still described the pre-#5765 world: a non-empty
VITE_SERVER_URL dev default. PR #5765 emptied it, and #5766 already landed the
matching correction in apps/console/README.md and examples/console-starter/README.md.
This PR brings the guide in line with those two files rather than inventing a third
phrasing.

The measured reality (not the card's memory)

apps/console/vite.config.ts line 710, read on this branch:

proxy: {'/api': {target: process.env.DEV_PROXY_TARGET||'http://localhost:3000',changeOrigin: true},},

That is the only proxy entry — /api and nothing else — and the fallback target
really is http://localhost:3000. apps/console/.env.development ships
VITE_SERVER_URL= (empty), and its own header comment states why: a non-empty value
makes every relative-target type: 'api' action resolve cross-origin, and the action
runtime does not attach Authorization / X-Tenant-ID / Accept-Language to a
cross-origin fetch — a 401 on the standard pnpm dev stack.

Before / after

1. Quick Start (line 18)

before: There is no bundled mock backend — apps/console/.env.development points VITE_SERVER_URL at http://localhost:3000, so an ObjectStack server has to be listening there.

after: There is no bundled mock backend — apps/console/.env.development ships VITE_SERVER_URLempty (same origin), and the Vite dev server proxies /api/* to http://localhost:3000 by default, so an ObjectStack server has to be listening there.

2. Configuration, input 1 (lines 62-63)

before: apps/console/.env.development defaults it to http://localhost:3000, and an empty value means same origin.

after: apps/console/.env.development ships it empty, which means same origin — the Vite dev server proxies /api/* to the backend.

3. Running with a Real Backend, step 1 (lines 81-85)bounded in-place correction,
called out explicitly

The card named two passages. A third one in the same file, same defect class, told the
reader to run VITE_SERVER_URL=http://localhost:3000 pnpm dev — precisely the setting
that opts dev out of same-origin and into the 401 documented above. Leaving it would have
shipped a corrected page that still steers readers into the trap #5765 removed. The
corrected form is pinned by existing evidence (the .env.development header comment and
the two READMEs #5766 brought up to date), so it is mechanical, not a judgement call:

before: VITE_SERVER_URL=http://localhost:3000 pnpm dev … Leave it empty (VITE_SERVER_URL=) to use the same origin

after: leave VITE_SERVER_URL empty and point the dev proxy instead — DEV_PROXY_TARGET=https://demo.objectstack.ai pnpm dev — noting that an absolute VITE_SERVER_URL remains right for a built console deployed apart from its backend.

Verification

Docs-only diff, one file. No ablation is available for a docs-only change and none was
staged — the substitute evidence is that the new claim is true, shown by reading the
config above.

Gate union re-run after the final commit, at 3bd142415:

gateexitverdict line
check-doc-links.mjs0Links are valid across 13 scan roots.
check-doc-component-types.mjs0✅ Every documented component type is registered.
check-doc-snippet-types.mjs0Every covered documentation snippet compiles against the built types.
check-changeset-presence.mjs0✅ No source of a released package changed in this range, so no changeset is owed.
check-changeset-no-major.mjs0✅ No changeset declares a major bump.
check-control-bytes.mjs0✅ check-control-bytes: OK (scanned 4916 tracked text file(s); skipped 85 binary).

Exit codes were captured into a variable before any pipe (cmd > log 2>&1; E=$?).

On the snippet gate: its first run reported "The snippet program was NOT run: the
packages it resolves against are not built"
— a precondition, not a verdict. The closure
was built with the gate's own --build-filter (plus the ... dependency-closure suffix,
without which @object-ui/react fails on an unbuilt @object-ui/i18n) and the gate was
re-run for the real judgement above. Its harness controls passed: resolution to
packages/types/dist/index.d.ts, sentinel produced TS2305, positive produced 0. This page
is not in the gate's UNGATED_DOCS debt list, and it holds only bash fences — 0
ts/tsx blocks — so it contributes nothing to the 101 compiled blocks either way.

Lint narrowing, declared with its three pieces of evidence:

  1. Population, from eslint's own resolution: running eslint --no-inline-config on the
    changed file returns File ignored because no matching configuration was supplied.
    every config block in eslint.config.js targets **/*.{ts,tsx} or narrower, so
    markdown is outside the linted population entirely.
  2. Count, from --format json: 1 file result, 0 errors, 1 warning, and that single
    warning is the "no matching configuration" notice rather than a rule finding.
  3. Invariance:grep for projectService / parserOptions / project: /
    tsconfigRootDir / recommendedTypeChecked in eslint.config.js returns no matches —
    this repo configures no type-aware linting, so a one-file markdown diff cannot move the
    verdict on any untouched file.

The changed file was also self-scanned for raw control bytes
(grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'): none.

Scope

content/docs/guide/console.md only. .env.development, apps/console/vite.config.ts
and the two READMEs #5766 brought up to date were read but not modified. No changeset —
the presence gate prints that none is owed for this range.


Generated by Claude Code

…origin
`apps/console/.env.development` ships `VITE_SERVER_URL` empty (same origin);
the Vite dev server proxies `/api/*` to `DEV_PROXY_TARGET`, falling back to
`http://localhost:3000`. The guide still described the old non-empty default
in two places and recommended an inline absolute value in a third, which is
the setting that opts dev out of same-origin auth.
Matches the wording already landed in `apps/console/README.md` and
`examples/console-starter/README.md`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
@os-zhuang
os-zhuang marked this pull request as ready for review August 23, 2026 20:19
@os-zhuang
os-zhuang added this pull request to the merge queueAug 23, 2026
Merged via the queue into main with commit 2437988Aug 23, 2026
20 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-5802-console-doc-env-default branch August 23, 2026 20:19
Sign up for freeto 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.

content/docs/guide/console.md still states a VITE_SERVER_URL http://localhost:3000 dev default that PR #5765 emptied

2 participants

@os-zhuang@claude