Skip to content

Pre-boot branding script reads window.__CONSOLE_SERVER_URL (set nowhere); modules read VITE_SERVER_URL — dev setups fetch runtime/config against the wrong origin #5660

Description

@os-zhuang

Filed by the PM on behalf of the #5544 dev agent, whose search-before-file step was blocked by a GitHub API rate limit. Found during PR #5658.

The pre-boot branding script inlined at apps/console/index.html:49 reads window.__CONSOLE_SERVER_URLwhich is set nowhere in this repository — while every module-side consumer reads import.meta.env.VITE_SERVER_URL (apps/console/src/main.tsx:65).

Consequence: a dev setup that points the console at a separate server via VITE_SERVER_URL has the two code paths targeting different origins — the inline script fetches /api/v1/runtime/config against the Vite dev origin, 404s, and early branding silently never applies. Pre-existing, dev-only: both resolve to '' in production builds (same-origin), which is why PR #5658's dedup works there.

Not graded — severity is a triage call. The narrow fix is to inject the same value the modules read (or drop the inline fetch now that PR #5658 shares the in-flight promise between the two callers, which may make the inline script's fetch redundant entirely — worth checking before patching the variable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions