test(activation): address code-review findings on E2E flows, mock, CI

Review fixes (REQUEST_CHANGES round 1):

1. HIGH activation-negative-401.yaml: after dismissing the "Connection
   Failed" alert the app stays on the Add-Connection modal
   (handleQuickConnect's failure branch never calls router.back()), so the
   old `text: "No Connection"` assertion (Sessions-tab empty state) could
   never pass. Now asserts connect-submit-button is still visible instead.

2. MEDIUM mock-opencode-server.ts: prompt_async now parses the request
   body, persists the USER's message, and broadcasts it (message.updated +
   message.part.updated) BEFORE the canned assistant reply — matching real
   server behavior. Without this, the app's handleEvent strips the
   optimistic temp- user message when the assistant's message.updated
   arrives and the sent message vanishes from the transcript.
   activation-positive.yaml now also asserts chat-bubble-user and the
   user's message text are visible after the reply lands, so that
   regression class is actually covered.

3. MEDIUM activation-e2e.yml: timeout-minutes 15 -> 60. The job runs the
   same npm install + prebuild + assembleRelease + emulator pipeline that
   cua-smoke.yml budgets 60 min for (emulator-boot-timeout alone is 10 min).

4. MEDIUM activation-e2e.yml: replicated cua-smoke.yml's "Purge stale
   generated sources" step — the Gradle cache key/restore-keys are shared
   with that workflow, so the stale-autolinking-tree failure mode
   (compileReleaseJavaWithJavac against the old package id) applies here too.

Verified locally: tsc --noEmit clean; npm test 81/81 pass; all three
touched YAML files parse valid; mock server exercised standalone —
full prompt cycle confirms GET /session/:id/message returns BOTH user
and assistant messages, SSE order is message.updated(user) ->
message.part.updated(user) -> busy -> message.updated(assistant) ->
message.part.updated(assistant) -> idle, user events carry the
sessionID/messageID fields handleEvent filters on, and --fail-auth
mode returns 401. Still no emulator run in this environment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJKAQ6HAikWGQK7PGZ5Y4E
This commit is contained in:
engineer
2026-07-16 17:19:46 -07:00
parent 01dd0191b3
commit 7ca5d2eb19
4 changed files with 77 additions and 5 deletions

View File

@@ -60,9 +60,11 @@ name: Activation - negative path (connect-time 401 must surface a visible error)
- takeScreenshot: negative-S4_visible_error_alert
# The connection must NOT have been silently saved: dismiss the alert and
# confirm we are still on the empty/no-connection state, not a fake
# "connected" screen.
# confirm we are still on the add-connection screen, not a fake "connected"
# screen. (handleQuickConnect's failure branch never calls router.back(), so
# the app stays on this modal — the Sessions-tab "No Connection" empty state
# is NOT visible here.)
- tapOn: "OK"
- assertVisible:
text: "No Connection"
- takeScreenshot: negative-S5_still_disconnected_after_dismiss
id: "connect-submit-button"
- takeScreenshot: negative-S5_still_on_add_connection_after_dismiss