fix(webviews): trust-ask-corner and soft-edges browser tests match the composer they test

Merged
TE
16d ago
+13-4

Two browser tests that landed red on feat-cmux-next pass again. #22860 added one of them and broke the other. Neither ever ran before merging: every webviews browser test was skipped on PRs while the Chief inspector page was stale (#22839, fixed by #22877). Both are test fixes. The composer behaves as #22860 intends.

  • agent-pane-trust-ask-corner (added by #22860):
    • Corner case: it compared the trust bar with the card's borderTopLeftRadius, which is 0px by design when a queue or strip stands on the card (composerLocation.css squares the card's top corners there). It now reads the card's own corner, a bottom one, which is the --acpmux-composer-radius both read: 11px and 11px in the inline look.
    • Caption case: it took the first .acpmux-send to be Send, but mid-turn that's Stop (acpmux-send acpmux-cancel), and Send only appears with a draft's first letter (Claude desktop's box). It now types a draft and checks that the disabled Send's tooltip is "Answer the trust question first".
  • agent-pane-soft-edges: since #22860, the foot's fade runs 56px while Jump to latest stands there. The probe counted an edge as fading only at exactly 18px, so scrolled-up states read as "no fade". An edge now fades when its ramp is larger than zero. Reduce Transparency still reads as no fade, since it sets both ramps to 0px.

Testing

CMUX_BROWSER_TESTS=1 bun test test/<file> in webviews/ on Linux, bun 1.4.2:

filebase af8fbaad6adthis head
agent-pane-trust-ask-corner.test.ts0 pass 2 fail (@1100: bar 11px, card 0px; Received: "Stop")2 pass
agent-pane-soft-edges.test.ts0 pass 1 fail (middle.bottom/start.bottom false)1 pass

git bisect run with soft-edges from #22876 to the tip names #22860 (f42ed81cbc3). trust-ask-corner already fails at #22860's own merge commit. scripts/web-lint.sh and prepush-gate.py are clean.

Observed / Not run

Observed: the runs above. Not run: the other base browser-test reds. agent-pane-adopted-tool-calls (red since at least 03:03Z, before the skip window), the agent-pane-stream-jitter WebKit case, and the composer-* tests pane-toolbar owns (#22902) are separate.

Changelog

none

Agent session: huge-blue

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the two webviews browser tests that landed red on the base branch. Both are test fixes; composer behavior is unchanged, and the tests were skipped on PRs while the Chief inspector page was stale, so neither ran before the change that broke them landed.

  • agent-pane-trust-ask-corner reads the card's bottom corner instead of its top-left (which squares off by design under a queue or strip) and types a draft to find the disabled Send rather than taking Stop for Send.
  • agent-pane-soft-edges now treats an edge as fading when its ramp is larger than zero, since the foot fade runs 56px while Jump to latest stands there; Reduce Transparency still reads as no fade.