Repository navigation
test: e2e Playwright test of the core loop (#79) - #91
Merged
Merged
Conversation
Drive the core loop through the window.__dominic hooks: installFixture, reload, updateApp, injectBrokenApp, then Ask Agent to Fix, plus a second test for the runtime-crash path. /api/chat is answered in the browser with an AI SDK v4 data-stream reply (encoded with the SDK's own formatDataStreamPart) carrying an update_app call, so no provider key is needed. Requests off the app's origin are blocked, and the test server starts with blank provider keys. Playwright builds the app and serves the Nitro output on 127.0.0.1:3179. `npm run test:e2e` type-checks tests/e2e first. A new, separate CI job installs Chromium, runs the suite, and uploads the report on failure. lint:md now skips the gitignored e2e artifact folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
Open
xcjs
approved these changes
Oct 3, 2026
xcjs
left a comment
Owner
There was a problem hiding this comment.
Reviewed: Playwright e2e of the core loop with a stubbed /api/chat (no provider key), CI e2e job with report artifact upload, lint:md excludes for test artifacts, tsc'd spec harness. Heads-up for merge order: this and #94 (my lint-precommit PR) both touch package.json/package-lock.json; whichever merges second may need a trivial lock rebase. Approving.
This was referenced Oct 3, 2026
This was referenced Oct 3, 2026
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Playwright end-to-end test of the core loop through the existing
window.__dominichooks (installFixture, reload,updateApp,injectBrokenApp, then Ask Agent to Fix), plus a shorter test of the runtime-crash path. The test answers/api/chatinside the browser with an AI SDK v4 data-stream reply that carries anupdate_appcall, so it needs no provider key, locally or in CI.tests/e2e/README.mdexplains how to run it.A separate new
e2ejob in CI installs Chromium and runsnpm run test:e2eagainst a production build. The change also touchespackage.jsonand.github/workflows/ci.yml, so it needs Zack's review for those files.Verification
npm run test:e2e: 2/2 passed locally (about 11 s), repeatedly; it also goes red when the loop is broken on purpose.npm run typecheck: clean.npm run lint:md: 0 errors. A freshnpm ciwith the new lockfile works..nvmrc, and local runs used Node 22. The first CI run of thee2ejob is the real check.Closes #79.
🤖 Generated with Claude Code