Skip to content

fix: bugs found by new browser e2e flows, plus the flows - #10

Merged
Prashant-Surya merged 5 commits into
mainfrom
feat/e2e-tests
Nov 24, 2026
Merged

Prashant-Surya merged 5 commits into
mainfrom
feat/e2e-tests

Conversation

@Prashant-Surya

Copy link
Copy Markdown
Member

What

  • Was: browser flows covered a few surfaces; edits failed silently, typed input was lost, toasts and lists lied.
  • Now: Playwright drives every feature from the UI (app + admin projects, model-free, CI nightly), plus opt-in real-model flows (models project: just e2e-models, or a dispatch-only workflow).
  • The 18 bugs the flows found are fixed; each flow's knownBug mark is lifted, and each fix has a unit/DOM test seen failing first.
  • Core runs blank every provider key; model runs read the key from the env or the E2E_ANTHROPIC_API_KEY secret only.

Where to look

  1. 🔴 backend/prismoid/operations/memory.py - memory PATCH/retire 500: re-read updated_at after commit (MissingGreenlet)
  2. 🔴 web/app/routes/signup/route.tsx - copy for the server's vague 403; leaks nothing the server's own message did not
  3. 🔴 .github/workflows/e2e-models.yml, web/e2e/stack.sh - where the key rides, the leak drop, blanked keys on core runs
  4. 🟡 web/app/components/composer/task-composer.tsx - refusals reject, so the composer keeps the draft
  5. 🟡 web/app/routes/inbox/keys.ts, inbox/route.tsx, tasks.$id/task-menu.tsx, artifact/artifact-view.tsx - key ownership, merged Projects filter, Pause per status, receipt re-read per artifact
  6. 🟡 web/app/lib/paging.ts, components/admin/resource-list.tsx, routes/bots/use-authoring-poll.ts - refresh() for rows; poll until the job lands
  7. ⚪ the rest of web/app/ - small fixes, one per bug (allowed sites, channels, invite, settings, sidebar, task browser, Run now)
  8. ⚪ web/e2e/ - ~5.6k of the ~6.9k changed lines: specs and support helpers

Watch out for: signup is fixed in the web only (the API keeps its deliberately vague 403); the inbox merges added/removed-from-project into one Projects filter rather than renaming them; ReasonDialog minLength={3} mirrors the routine-pause serializer.

Blast Radius

  • Memory edit/retire (settings, bot Memory tab) - saves and answers 200
  • Composer send (home, project, a routine When) - a refusal keeps text and files; a send still clears
  • Task menu (task page) - Pause only running/waiting, Resume only paused, Cancel any live task
  • Inbox keyboard + filter - arrows/Enter on the page and rows, never on a focused control
  • Admin lists (users, bots, projects, workspaces, routines) - row signature gained an optional 2nd arg; pause refreshes
  • Reader receipt (task page split pane) - flips when the verdict lands, per artifact
  • Bots Configure (Draft for me, Test evals) - re-reads until the result lands, capped at 3 min
  • Sidebar delete, workspace invite, allowed sites, channels, project settings, task browser counts

Proof

Important

Confidence: Medium - every flow above is verified by the browser suites locally, but neither workflow has run on GitHub and the full integration suite did not run.

  • Ran: just check green · just e2e 150/150, no expected failures left · just e2e-models 10/10 on the final code (local, about $0.19) · tests/integration/memory 52 passed on a throwaway Postgres · a sweep of every caller of the changed shared APIs (menuVerbs, onInvite, ResourceList.row, ReasonDialog, useKeysetList, memory update/retire, ArtifactView)
  • Try it: just e2e; then with a provider key in the env, just up and just e2e-models; E2E_SHOW_BUGS=1 runs any future knownBug flow as an ordinary one
  • Not verified: full just test (the local compose Postgres holds another edition's schema); e2e.yml and e2e-models.yml on a runner; the peek sheet and task peek still read a receipt once (no live stream there, unchanged)

Rollout

  • New repository secret E2E_ANTHROPIC_API_KEY for e2e-models.yml; dispatch-only, and Actions offers it only once the file is on main
  • No migration, no product env flag, no durable job renamed

Media

N/A - behaviour fixes, each covered by a browser flow

Links

  • Issue: None
  • Decision record / design: docs/adr/081-playwright-smoke-flows.md (amended in place: the core flows and the model flows)
  • Stack / follow-ups: not split; most of the size is test specs. Review by commit: 772c2d7 flows · 684ab88 + 1cfd728 fixes · 48e1b6d docs
  • Author notes: written with Claude Code

🤖 Generated with Claude Code

…l flows

Core flows (the app and admin Playwright projects) cover sign-in, signup, password
reset, email proof, workspaces, projects and members, settings, allowed sites,
connectors, home, tasks, the task page, inbox, bots, routines and the admin console,
model-free on a private stack whose provider keys are blanked. Bugs the flows found
are marked knownBug (test.fail) until their fix lands; E2E_SHOW_BUGS=1 runs them red.

Model flows (the models project, E2E_MODELS=1) run real tasks, a follow-up, a fork,
a Markdown document with its verification, clarifying questions, a bot's chat, evals,
publish and drafter, and a routine's run on a real provider key: `just e2e-models`,
or by hand from the E2E model flows workflow (secret E2E_ANTHROPIC_API_KEY).

stack.sh waits for Postgres over TCP so migrations never meet the init server, and
removes the stack's frames on exit. ADR-081 amended in place.
Backend
- memory: PATCH and retire answered 500 after saving. The ORM fetches a server
  default after an INSERT but not an UPDATE, so updated_at stayed expired and the
  serializer lazy-loaded it outside the greenlet (MissingGreenlet). update/retire
  now read it back inside the session.

Web
- composer: a refused send (no goal, fleet or attachments on a routine) resolved,
  so the composer cleared the typed goal and files; refusals now reject.
- signup: an address the API refuses (a deliberately vague 403) gets the form's
  own sentence instead of the raw server words.
- workspace invite: a refused invite closed the dialog and lost the address.
- routines: Run now said "Fired" for a skipped fire; the toast now reads the
  decision (fire-note.ts).
- allowed sites: an already-allowed host was listed twice.
- bot channels: removing a channel kept showing its dead token.
- admin: the reason dialog takes the door's minimum (3 for a routine pause), and
  the list refreshes after a pause (useKeysetList.refresh).
- inbox: the list's keys stand aside for any focused control (keys.ts), and
  added-to/removed-from a project share one Projects filter.
- project settings: saving one field no longer wipes an unsaved edit in the other.
- task menu: Pause only for a running or waiting task, Resume only when paused.
- sidebar: a refused delete puts the task back.
- bots: a search no longer closes (and remounts) the open bot's pane; Draft for
  me and Test evals re-read until the result lands, not for 40 s.
- task browser: the status totals recount on Archived.
- reader: a verdict that lands while the reader is open re-reads the receipt.
The verdict the reader had already read was remembered without its artifact, and the
pane does not remount ArtifactView when it opens another one. After one document
signed `pass`, a second one (a follow-up's revised head, another deliverable) that
also signed `pass` never re-read its receipt and kept "Not verified yet". The
remembered verdict now belongs to an artifact id and resets when the pane moves on.
DESIGN.md names the verdict hand-off.
Comment thread web/e2e/admin/login.spec.ts Fixed
@Prashant-Surya Prashant-Surya changed the title fix: 18 bugs found by new browser e2e flows, plus the flows fix: bugs found by new browser e2e flows, plus the flows Nov 23, 2026
Two admin specs escaped a value for a RegExp by hand and skipped backslashes
(CodeQL js/incomplete-sanitization). Every spec now uses fixtures.escapeRegExp,
including two that inlined a full copy of it.
@Prashant-Surya
Prashant-Surya merged commit 5e0cdec into main Nov 24, 2026
10 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.

3 participants