You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI's ui-tests job proves the UI is self-consistent, not that it works. It runs yarn typecheck, yarn lint, yarn test, and yarn test:pw — and test:pw is the mock suite, served by MSW with no backend at all. A backend contract change cannot fail it.
#2653 is what that looks like in practice: #2638 stopped populating three fields the Substrate page renders, every check stayed green, and it was found by hand.
A live suite already exists and CI never runs it:
ui/playwright/live/ holds pages.spec.ts, agent-lifecycle.spec.ts, and substrate.spec.ts, run by yarn test:pw:live.
No workflow references test:pw:live or UI_LOOP_LIVE.
Live mode also does not test the shipped artifact. LIVE_COMMAND in ui/playwright.config.ts is yarn dev, so the suite hits a Vite dev server proxying to the cluster — not the nginx image an operator runs.
Proposal
Run the live suite in CI against the real built UI image.
Serve the image from ui/Dockerfile, not yarn dev, so the run exercises what ships: nginx addressing and the runtime window.environmentVariables rewrite, which no dev-server run touches.
Point the suite at the port-forwarded svc/kagent-ui rather than a Vite port. playwright.config.ts is already written for this — the comment above LIVE_COMMAND names a probed port-forward as the case that replaces that line.
Reuse what exists rather than building a second path: scripts/setup-cluster/setup-cluster.sh already builds ui/Dockerfile, sets it on deploy/kagent-ui, and port-forwards the service on 8080. The test-e2e job already stands up a Kind cluster with helm-install, and build (ui) already builds the image.
Keep chat on the mock backend
Chat stays where it is. Its journeys need deterministic streaming deltas, tool call and result ordering, cancellation, and a failed turn with retry — none of which a real model gives you reliably, and all of which the mock suite already asserts.
The live directory has no chat spec today, and it should not gain one. Live coverage is for the surfaces where a controller response is the thing under test.
Notes
ui/playwright/DEFERRED.md already anticipates this: the cleanup.spec.ts entry is deferred "while the suite runs on the mock backend" and says to revisit "if the suite gains a live-backend mode".
The mock suite keeps its job. It is fast, runs both engines, and covers error paths a real cluster will not produce on demand. This adds a lane rather than replacing one.
Problem
CI's
ui-testsjob proves the UI is self-consistent, not that it works. It runsyarn typecheck,yarn lint,yarn test, andyarn test:pw— andtest:pwis the mock suite, served by MSW with no backend at all. A backend contract change cannot fail it.#2653 is what that looks like in practice: #2638 stopped populating three fields the Substrate page renders, every check stayed green, and it was found by hand.
A live suite already exists and CI never runs it:
ui/playwright/live/holdspages.spec.ts,agent-lifecycle.spec.ts, andsubstrate.spec.ts, run byyarn test:pw:live.test:pw:liveorUI_LOOP_LIVE.Live mode also does not test the shipped artifact.
LIVE_COMMANDinui/playwright.config.tsisyarn dev, so the suite hits a Vite dev server proxying to the cluster — not the nginx image an operator runs.Proposal
Run the live suite in CI against the real built UI image.
ui/Dockerfile, notyarn dev, so the run exercises what ships: nginx addressing and the runtimewindow.environmentVariablesrewrite, which no dev-server run touches.svc/kagent-uirather than a Vite port.playwright.config.tsis already written for this — the comment aboveLIVE_COMMANDnames a probed port-forward as the case that replaces that line.scripts/setup-cluster/setup-cluster.shalready buildsui/Dockerfile, sets it ondeploy/kagent-ui, and port-forwards the service on 8080. Thetest-e2ejob already stands up a Kind cluster withhelm-install, andbuild (ui)already builds the image.Keep chat on the mock backend
Chat stays where it is. Its journeys need deterministic streaming deltas, tool call and result ordering, cancellation, and a failed turn with retry — none of which a real model gives you reliably, and all of which the mock suite already asserts.
The live directory has no chat spec today, and it should not gain one. Live coverage is for the surfaces where a controller response is the thing under test.
Notes
ui/playwright/DEFERRED.mdalready anticipates this: thecleanup.spec.tsentry is deferred "while the suite runs on the mock backend" and says to revisit "if the suite gains a live-backend mode".🤖 written by Claude