Repository navigation
Description
Problem
No CI job runs the webapp Cypress suite. A broken chatroom spec cannot fail a CI job, so nobody sees it.
A code trace on 14ab7f9c1 shows:
prod.docs.plus.ymlandstage.docs.plus.ymlrunbash scripts/run-tests.sh --extensions(.github/workflows/prod.docs.plus.yml:298,.github/workflows/stage.docs.plus.yml:127). That mode runs extension gates only, never a webapp spec. Stage runs all five. Prod runs one gate per changed extension.- Both also run webapp Jest with
bun run --filter @docs.plus/webapp test(.github/workflows/prod.docs.plus.yml:337,.github/workflows/stage.docs.plus.yml:145). scripts/run-tests.shhas an--e2emode (scripts/run-tests.sh:43). No workflow calls it.backend-ci.ymlruns backend suites only: unit, integration, and real-infra E2E. Only the prod pipeline calls it, never stage or a pull request (.github/workflows/backend-ci.yml:3-6).
One chatroom spec fails today, and no job reports it. apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts asserts a [data-status] attribute that the feed never renders. #263 fixes that spec. Without a CI job, the next spec failure goes unreported too.
The suite needs preconditions that CI does not provide yet:
NEXT_PUBLIC_E2E=trueon the webapp dev server. Without it,/c/[channelId]renders nothing on the dev server, so all nine chatroom specs fail at their first visit (apps/webapp/src/pages/c/[channelId].tsx:53-59).- A Supabase URL and anon key, so the client starts. The specs stub the reads they assert with
cy.intercept, and no seed createstest-channel. Four specs (jump-to-present,long-press-reaction,reply-jump-in-window,scroll-and-prepend) stub no messages, so they can fail even with the flag. apps/webapp/cypress/e2e/document/draft-first-edit-anchor.cy.tshardcodeshttp://localhost:3001(:8). Itscy.taskcalls (:22,:32) runpsqlin thedocsy-postgres-localcontainer, not in Supabase (apps/webapp/cypress.config.ts:7-37). It needs the whole local stack. Without the container, one of its tests passes with no database (apps/webapp/cypress.config.ts:34-36).- The runner counts every webapp spec, which is 54 today (
scripts/run-tests.sh:443-460). It also prompts when the webapp does not answer (:87-98). A chatroom-only job needs a spec scope.
Acceptance criteria
- Before the workflow lands, a local run of the nine chatroom specs with
NEXT_PUBLIC_E2E=trueis posted on this issue, with the result for each spec. - A workflow runs the nine chatroom specs on pushes to
main, and on pull requests tomainthat change chatroom code or chatroom specs. - The job serves the webapp with
NEXT_PUBLIC_E2E=true, a Supabase URL, and an anon key. It starts every service that the local run needed. - A failing chatroom spec fails the job.
- The spec-count check counts the job's scope, so a chatroom spec that does not run fails the job.
- Every other webapp spec either joins the job or is listed on this issue with the reason it stays out.
Agent Brief
Category: enhancement
Summary: Add a CI job that runs the webapp chatroom Cypress specs against the webapp dev server with the E2E flag.
Current behavior:
CI runs the extension Cypress gates, webapp Jest, and the backend test suites. The webapp Cypress suite runs only by hand, on a laptop.
Desired behavior:
The chatroom specs run in CI and fail the job when they fail. The job provides every precondition the specs need.
Key interfaces:
- The webapp E2E mode of the shared test runner, root script
test:e2e. It runs every webapp spec and fails when fewer specs ran than exist. A chatroom-only job needs a spec scope, and the count check must use the same scope. NEXT_PUBLIC_E2E— gates the chatroom test page at/c/<channelId>.- The shared Cypress binary setup action. The extension gates already use it; reuse it for the webapp job.
Out of scope
- The extension gates and the backend jobs.
- Making the new job block deploys. Decide that once the job is stable.
- Fixing individual specs, unless a spec cannot run in CI at all.
Notes
Reuse scripts/run-tests.sh. Do not write a second runner. Add a spec scope to --e2e, and scope the count check to match. Start the webapp and wait for it first, because the runner prompts when the server is down.
Land this job after #263. Until then, two send-and-retry tests fail, so the job starts red.
No spec covers the phone composer. The specs only call cy.viewport, the /c test page renders the desktop variant (apps/webapp/src/pages/c/[channelId].tsx:65), and the phone shell is chosen by user agent.
Activity
HMarzban commentedon Sep 22, 2026
Status on 2026-09-22. Upstream #303 covers five of the six acceptance criteria:
chatroom-e2e.ymlruns the nine chatroom specs on pushes and pull requests tomain, throughscripts/test-chatroom.sh.NEXT_PUBLIC_E2E=true, and the specs stub the Supabase reads they assert.scripts/run-tests.sh --e2e --scope chatroom, so the spec count uses the job's scope, and a failing spec fails the job.One criterion is still open: every other webapp spec joins the job, or is listed here with its reason.
e2e/document/draft-first-edit-anchor.cy.tsstays out. It needs the whole local stack and a real IndexedDB reload, as its header says.e2e/editor/have not been tried in the job. They load/editor, and a production build serves that page whenNEXT_PUBLIC_E2E=true. So they may join with--scope editor. That is the next step for this issue.HMarzban commentedon Sep 23, 2026
Two new specs run locally only until this lands:
cypress/e2e/editor/find/caret-find.cy.ts(#250) andcypress/e2e/editor/slash/slash-menu.cy.ts(#251). Both were proved by sabotage. Also see #311: the Filter apply test has never passed.HMarzban commentedon Oct 15, 2026
Related issues
Cross-link review, 2026-10-15. Generated by Claude Code