Skip to content

fix: build Playwright UI bundles as declared Bazel outputs - #123

Merged
longlho merged 4 commits into
mainfrom
codex/ui-watch-root-fix
Oct 9, 2026
Merged

longlho merged 4 commits into
mainfrom
codex/ui-watch-root-fix

Conversation

@longlho

@longlho longlho commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The Playwright UI assembled its config and selected specs at runtime, outside Bazel's action graph. Its recursive watcher could also reach neighboring outputs/runfiles and exhaust macOS file descriptors before workers started (spawn EBADF).

Build the aggregate config and selected-spec import modules as declared actions, then package them in an immutable directory artifact. A generated js_binary entry point starts the declared Playwright CLI directly using Bazel's Node toolchain. Discovery follows the existing suite provider graph; relative imports and source/debugging inputs are preserved. Watchers stay inside the bundle, and test results are written outside Bazel outputs.

Remove runtime config generation, temporary spec staging, the custom subprocess launcher, and workspace-pnpm source mode. Callers now supply a compiled config and declared Playwright runtime; TypeScript edits require rebuilding/relaunching.

Native Mac proof: the Bazel-built UI discovers and runs both selected fixtures with directory watching enabled. AGI integration retains 554 tests across 42 files and starts its preview server to run the TOTP challenge-form browser test successfully. The bundle regression executes selected specs with relative imports, overrides project discovery, excludes unrelated tests, and verifies bundle contents remain unchanged.

Linux without a display serves the UI on loopback and prints its URL, avoiding the headed-browser X server failure. Explicit UI host/port options remain supported.

Generate wrapper source maps as declared actions so UI clicks using original TypeScript locations select the intended tests. Native Mac and headless devbox UI clicks both pass the AGI TOTP form test.

@longlho longlho changed the title fix: isolate Playwright UI watchers from Bazel outputs fix: build Playwright UI bundles as declared Bazel outputs Oct 9, 2026
@longlho
longlho marked this pull request as ready for review October 9, 2026 20:47
@longlho
longlho merged commit 8280956 into main Oct 9, 2026
16 checks passed
@longlho
longlho deleted the codex/ui-watch-root-fix branch October 9, 2026 21:41
longlho pushed a commit that referenced this pull request Oct 10, 2026
🤖 I have created a release *beep* *boop*
---


## 3.9.0 (2026-10-09)

## What's Changed
* feat: prune source maps from browser input directories by @longlho in
#114
* fix: let callers control browser test selection by @longlho in
#116
* fix: preserve npm package paths in runtime inputs by @longlho in
#117
* fix: allow remote caching for local browser tests by @longlho in
#119
* fix: leave host browser execution restrictions to callers by @longlho
in #120
* feat: aggregate E2E suites in local Playwright UI by @longlho in
#121
* fix: resolve caller data paths in Playwright UI by @longlho in
#122
* fix: build Playwright UI bundles as declared Bazel outputs by @longlho
in #123


**Full Changelog**:
v3.8.1...v3.9.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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