Skip to content

chore: use real VITEST_API_TOKEN for ui dev#10279

Merged
sheremet-va merged 21 commits intovitest-dev:mainfrom
hi-ogawa:chore-use-vitest-api-token-for-ui-dev
May 7, 2026
Merged

chore: use real VITEST_API_TOKEN for ui dev#10279
sheremet-va merged 21 commits intovitest-dev:mainfrom
hi-ogawa:chore-use-vitest-api-token-for-ui-dev

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented May 6, 2026

Description

Mostly reverting #8044 but instead of hard-coding VITEST_API_TOKEN = 0, this now extracts and inject real token from real test server. The same extraction mechanism is used for __vitest_browser_runner__ on browser orchestrator UI too.

See updated packages/ui/CONTRIBUTING.md for the guide.

For the reason to prefer real token, I think this was a bug which got missed out because of 0 token.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5402912
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69fad191e8f97c0008f24a36
😎 Deploy Preview https://deploy-preview-10279--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hi-ogawa hi-ogawa changed the title chore: use VITEST_API_TOKEN for ui dev chore: use real VITEST_API_TOKEN for ui dev May 6, 2026
hi-ogawa and others added 20 commits May 6, 2026 14:58
Remove the build-time UI token escape hatch and stale CI/test wiring now that local UI dev injects the real token from the Vitest UI server.

Co-authored-by: Codex <noreply@openai.com>
Fetch the browser runner HTML from the active browser dev server and inject its generated runner state into the UI dev page instead of relying on the manual browser.dev.js stub.

Co-authored-by: Codex <noreply@openai.com>
Use shorter BROWSER_DEV and BROWSER_DEV_PORT names for the UI browser preview workflow.

Co-authored-by: Codex <noreply@openai.com>
Document that the default UI dev workflow points at the test/unit API port and explain how to align custom backend ports.

Co-authored-by: Codex <noreply@openai.com>
Use explicit error checks when fetching and extracting development UI scripts.

Co-authored-by: Codex <noreply@openai.com>
@hi-ogawa hi-ogawa marked this pull request as ready for review May 6, 2026 07:25
Comment thread packages/ui/vite.config.ts
@sheremet-va sheremet-va merged commit b459f1e into vitest-dev:main May 7, 2026
19 of 20 checks passed
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.

2 participants