test(ios): capture the running jump-to-bottom control

Merged
TE
8d ago
+64-0

Adds an offline UI capture test for the running-state jump-to-bottom control in the NEXT iOS app. The test opens the existing kbd-chat demo, verifies that Stop Agent is enabled, scrolls older history until the jump button appears, retains a screenshot, taps the button, and verifies it disappears with a second screenshot.

Leo’s audit request (2026-10-29): “i also want all those ui fixes/improvements in and stuff too along with more think tanks to improve stuff too after learning all those ui dev things”.

This is a test-only companion to #27349, with no production changes or new fixtures. The synthetic waiting turn activates the existing AgentChatStore.isRunning gate until answered. It is not a live-agent streaming test, and the assertions verify the gate and control behavior, not pixel recognition of the ring/spinner. Screenshots are XCTest attachments named jump-working-scrolled-away and jump-returned-to-bottom; native execution passed at 9de7df83 and both screenshots are below.

Screenshots (fleet simulator, iPhone 17 Pro / iOS 26.5, head 9de7df83, step 7e917d095f073c2aea36440d, 1/1 passed)

Working, scrolled away: jump control shownAfter tapping it: back at the bottom, control gone

These are the test's own XCTest attachments, exported by #27379. This PR is test-only, so there is no product before/after; #27349 carries the visual change.

Run on the fleet:

cmux-ci run --class simulator --script scripts/ci/cmux-next-ios-sim.sh --ref FULL_SHA --arg test --arg ui=AgentChatJumpCaptureUITests --artifact artifacts/ios-sim/evidence.zip

For the before/after comparison, apply this identical test-only file to #27349’s base and reviewed head in isolated capture snapshots. The existing project includes every file under cmux-next-ios/UITests; no production fixture, project setting, or dependency changes are needed. Do not update the reviewed product PR to add this harness.

Validation: git diff --check and static prepush gates passed. Final head 9de7df83d26806fe3d62b8ba32b7e10094f55f43 passed native UI execution: AgentChatJumpCaptureUITests/testRunningJumpControlCaptureAndReturnToBottom, 1/1 on iPhone 17 Pro / iOS 26.5, fleet step 7e917d095f073c2aea36440d. Both retained XCTest screenshots were exported using #27379 and are embedded above. This supersedes the earlier b2946f08 run, which passed but did not export its screenshot attachments. Local Swift parsing was unavailable; the final-head native run supplies the execution evidence. The coordinator compared the CmuxMobileKit failure against base: both fail only CmuxMobileTerminalTests/TerminalSurfaceFramePacingTests/busyOutputDrawsAtMostOneFramePerDisplayRefresh(), line 59, with “too few batches ... to outrun the display: the test proves nothing” (PR: 9 batches; base: 4), with no crash or truncated run. This is a base warning, not a claim that all CI is green. The overlap tool could not read its GraphQL query through the broker; an all-state title search found #27349 and no duplicate capture-test PR.

Risk: only the opt-in UI-test suite is added. XCTest expectations bound each state wait; there are no manual sleep or polling loops and no product timers, observers, or animations added.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds an offline UI capture test for the running-state jump-to-bottom control in the NEXT iOS app, as a test-only companion to #27349 with no production changes.

  • Opens the existing kbd-chat demo, confirms Stop Agent is enabled to verify the AgentChatStore.isRunning gate, and scrolls older history until the jump control appears.
  • Captures screenshots before and after tapping the jump control to confirm it hides when returning to the bottom.
  • Uses XCTest expectations for all state waits; no manual sleeps, polling loops, timers, or observers.
  • Merged feat-cmux-next to enable screenshot attachment export from the run.

Risk is limited to the opt-in UI-test suite; native execution passed.

Current head: 9de7df83d26806fe3d62b8ba32b7e10094f55f43, a conflict-free merge with parents b2946f08326380874b3f0dc8e21848bda46da64b and 90e1666c0ff07ebbc896f0e5400f8a9de02a847a. The capture test is byte-for-byte unchanged; relative to the merged base, only that original test file is added. Static prepush gates against both parents passed. This final head passed the native UI capture rerun, and both screenshot attachments are retained above. Merged as e297e3bab95fc63af962b82b69efa7eb24c376cf.

Agent session: agent session