test(dashboard): browser smoke tests for agents CRUD UI #117
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
PR #116 (A6 agents CRUD) added 4 structural HTML smoke tests in
src/dashboard-smoke.test.tsthat verify the Agents tab, create modal, and delete-confirm modal are present in the served HTML.Full runtime smoke tests (form submission, modal toggling, list renders from SSE) require a browser environment. The project currently has no Playwright or JSDOM infrastructure.
Acceptance criteria
happy-domvia Bun) in the projectloadAgents()resolves+ New agentopens the create modalPOST /agents⚠️ Guardrails for this dispatch
Prior attempt (task
af076472, 2026-04-20) died mid-pivot between happy-dom → jsdom with exit 137 — the dev agent's container silently disappeared during abun install. Unclear root cause; not reproducible yet. Operator recreated the container and is re-dispatching.To reduce the risk of a second runaway:
Scope your test runs
bun testat repo root during exploration. The 400+ existing tests include some that exercise SQLite + container-reconcile paths, and iterating those while you're also installing new deps is a heavy combo that's already caused one bun-install timeout / kill. Scope every test invocation to your new file only:bun test src/<name>.test.ts.bun test+just qasuite once, at the end, right before committing.Pick the library quickly
happy-domhas a known<select>bug per the prior run. Either:jsdom(more mature, standard choice for Node/Bun DOM smoke tests), or<select>issue in the test (e.g. synthesize achangeevent directly instead of letting happy-dom's select logic handle it).bun add -d jsdom), switch to happy-dom + the workaround rather than thrashing between them.Keep installs minimal
devDependenciesdep. Don't install Playwright — AC doesn't require it, and its Chromium bundle is ~200 MB.bun install --production=falseglobally or refresh the lockfile for unrelated deps.If you hit an environment issue
Scope of acceptance
The AC (5 smoke tests in
src/dashboard-smoke.test.tsor a new file) is intentionally small. Expected diff: ~1 new test file, ~1 line inpackage.jsonfor the DOM dep, ~1 line inbun.lock. Anything substantially beyond that is scope creep.claude-hooks-dev-defaultcontainer disappears silently #132claude-hooks-dev-defaultcontainer disappears silently #132