Project Info
Inspiration
Playwright tests often fail for a simple reason: the product UI changes, but a locator in the test still points to an old selector. Fixing that is usually small work, yet it interrupts developers and can become risky when automated tools are allowed to modify code without review. We wanted to explore a more trustworthy form of AI assistance: one that helps developers understand and repair a narrow failure, while keeping the human in control.
What it does
Repair Console is an approval-gated Playwright locator repair tool. In its bundled browser sandbox, a user can simulate a login-button selector regression without a terminal command. The console captures the failed selector, a short error message, the source location, and a sanitized DOM snapshot. Qwen proposes one replacement CSS selector with concise evidence. The user reviews the exact diff and must select Approve & rerun before any test file changes. After approval, Repair Console applies one validated selector change, reruns the affected test, and then verifies the full demo suite.
How we built it
We built the project with React, Vite, Express, TypeScript, Playwright, Vitest, Zod, and a server-only Qwen integration. Codex and GPT-5.6 helped us refine the idea into a deliberately narrow product scope, write the specification and task plan, implement the approval-gated workflow, create tests, and improve the browser demo experience. The backend validates every proposal and restricts writes to one CSS-selector literal in the Playwright test directory. Server-sent events keep the dashboard timeline updated while the repair is being verified.
Challenges we ran into
The main challenge was making the demo feel like a real customer workflow without making unsafe claims about autonomous code repair. We replaced terminal-driven mutation steps with visible browser controls, while keeping the mutation limited to the bundled sandbox fixture. We also found and corrected a baseline-state mismatch between the fixture, test selector, and sandbox labels. This reinforced why deterministic browser and mutation tests are essential for a live demo. Another challenge was balancing live AI behavior with demo reliability. Qwen is the primary provider when configured, while a clearly labelled offline fixture fallback preserves the same approval and verification safety model for rehearsal.
Accomplishments we're proud of
We created a complete browser-operated repair loop: simulate a regression, inspect evidence, review one diff, approve the patch, and watch both the target test and full suite pass. We are especially proud that the system does not patch before approval, does not expose credentials to the browser, and restores the test file if verification fails. The product makes its limits visible instead of presenting itself as a general autonomous test-healing system.
What we learned
AI-assisted developer tools become more credible when their scope is narrow, their evidence is visible, and their actions are reversible. We learned that the most valuable automation is not necessarily fully autonomous. A small, fast, reviewable repair loop can reduce maintenance work while preserving developer judgment and trust.
What's next
Next, we would validate the workflow with real frontend and QA engineers, improve selector confidence signals, and support more controlled locator patterns. Longer term, we would explore secure repository connections, isolated workers, persistent audit history, and CI integrations. Those additions would require strong authentication, repository isolation, and policy controls before the product could responsibly move beyond its local sandbox.
Repair Console
Repair Console is an approval-gated developer tool for one common Playwright maintenance problem: a frontend selector changes while an end-to-end test still expects the old selector.
Instead of applying a model-generated change automatically, the console captures focused failure evidence, presents one proposed CSS-selector replacement, and requires explicit developer approval. After approval, it verifies the repaired target test and the complete demo suite.
Track: Developer Tools
Supported platform: local Windows development with Node.js 22 LTS. The project uses a browser-based sandbox and does not require a database, external repository connection, or CI account.
Demo video
The video demonstrates the browser-only workflow: simulate a selector regression, review the proposal, approve the change, and watch the target test and full suite pass.
What it does
- Simulates a controlled login-button selector regression directly in the browser.
- Captures the failed selector, short error message, source location, and sanitized DOM snapshot.
- Uses Qwen as the live proposal provider when server-side configuration is available.
- Shows the diagnosis, evidence, and exact selector diff before any test file changes.
- Permits exactly one validated CSS-selector literal change below
tests/e2e/. - Requires Approve & rerun before patching, then verifies the target test and full suite.
- Provides a clearly labelled offline fixture fallback for deterministic rehearsal.
Quick start
Prerequisites
- Node.js 22 LTS
- npm
- Chromium for Playwright
From a fresh clone:
cd code
npm ci
npx playwright install chromium
Copy-Item .env.example .env
npm run dev
Open http://127.0.0.1:5173. The React dashboard runs on port 5173; its local Express API runs on port 3001.
Live Qwen configuration
Edit code/.env locally; never commit it.
QWEN_API_KEY=your-server-only-key
QWEN_BASE_URL=https://your-qwen-openai-compatible-endpoint/v1
QWEN_MODEL=qwen3.7-plus-2026-05-26
When both the key and base URL are configured, Live Qwen is preselected in the console. Otherwise, select Offline fixture fallback to exercise the same approval and verification workflow without a network call.
Judge-friendly sandbox
Judges can test the complete approval-gated workflow without Qwen credentials:
- Follow the Quick start steps.
- Open the local dashboard and select Offline fixture fallback.
- Follow the Browser demo flow below.
The fallback changes no safety policy: it still requires approval, patches one validated selector literal, and runs the target test and full suite.
Browser demo flow
- Start at Fixture state: Baseline.
- Select Simulate selector regression. The login fixture changes but the Playwright test remains stale.
- Select Start repair, review the failure, evidence, and one-selector diff.
- Select Approve & rerun. Do not refresh or reset while verification is in progress.
- Wait for Repair completed: the patched target test and the full suite have passed.
After a successful repair, use Simulate selector regression again to start the next controlled cycle. Reset sandbox is for recovery before approval or after a failed repair; it is deliberately unavailable after a successful repair.
Commands
Run these from code/.
| Command | Purpose |
|---|---|
npm run dev | Start the Vite dashboard and Express API. |
npm run lint | Run ESLint. |
npm run typecheck | Run TypeScript strict-mode checking. |
npm run test:unit | Run the Vitest unit and API tests. |
npm run test:e2e | Run the Playwright browser suite. |
npm run test:mutation | Verify that the controlled mutation causes exactly the @repair-target test to fail, then restores the prior state. |
npm run build | Type-check and create a production frontend build. |
Run the complete quality gate before a demo or submission:
npm run lint
npm run typecheck
npm run test:unit
npm run test:e2e
npm run build
Safety model
The scope is intentionally narrow:
- The browser can mutate only the bundled login button ID; it cannot send file paths, shell commands, or arbitrary source changes.
- Qwen credentials stay server-side. The browser never receives API keys, base URLs, or raw provider errors.
- A proposal is data, not code. It must pass schema validation and the locator-only patch policy.
- No test file changes before explicit approval.
- Failed target or full-suite verification restores the pre-patch test file.
Repair Console is a local sandbox demonstration, not a hosted service for arbitrary repositories, CI providers, or general-purpose autonomous test healing.
Architecture
React/Vite dashboard
-> Express repair API and SSE status updates
-> Playwright failure capture and sanitized DOM context
-> Qwen or recorded fixture proposal
-> strict proposal validation and one-string patch policy
-> explicit approval
-> target-test verification -> full-suite verification
Key implementation areas:
code/src/RepairConsole.tsx— browser workspace, provider selection, proposal review, and timeline.code/src/repair-orchestrator.ts— approval-gated repair lifecycle and restoration behavior.code/src/qwen-proposal-provider.ts— server-only Qwen JSON proposal provider.code/src/sandbox-fixture.ts— fixed, browser-triggered login-selector mutation boundary.code/tests/— Vitest unit/API coverage and Playwright browser coverage.
How Codex and GPT-5.6 were used
Codex and GPT-5.6 accelerated the project from idea to verified demo:
- Refined the product from a broad “self-healing tests” concept into one constrained, reviewable locator-repair workflow.
- Produced the specification, dependency-ordered implementation plan, safety boundaries, and demo plan.
- Implemented the React/Express workflow incrementally with strict TypeScript, validation, and approval-gated patching.
- Created and iterated on unit, API, mutation, and browser tests.
- Reviewed the browser workflow, identified a sandbox baseline inconsistency, added its regression coverage, and verified the corrected end-to-end flow.
- Prepared the demo narrative and submission documentation.
The core product specification is in docs/specs/self-healing-playwright-repair-console.md. The browser-operated sandbox extension and its safety boundary are documented in docs/specs/browser-only-sandbox-repair-workflow.md.
Scope
In scope: one Playwright CSS selector repair, a server-only live proposal provider, a deterministic fallback, explicit approval, and local target/full-suite verification.
Out of scope: application-code repairs, multi-file patches, automatic approval, authentication, databases, hosted repository connections, CI integration, commits, and pull requests.
Analysis
View
Metric
- 19
- 9
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- ReactIn code
- TypeScriptIn code
- Node.jsClaimed
7 of 8 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
223 KB
Source files
54
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
peishuen/OpenAI_BuildWeek
61 files · 421 KB · @ 4f0aa72
Structure
Interface
1 file · 2%Screens, components and styles rendered to the user.
Application logic
22 files · 36%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript61%
- Markdown34%
- CSS4%
- JavaScript0%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
code/package.json
npm · 25- dotenv
- express
- jsdom
- openai
- react
- react-dom
- zod
- +18 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.