fix(cmux-next): the agent update notice's Not Now and words hold still
Summary
The agent update notice (above the composer, while an agent CLI updates and restarts) moved under the reader:
- Restart Chat and Try Again came before Not Now in a left-aligned row, so Not Now jumped each time one appeared or went.
- The busy spinner led the line, so the words jumped when Restarting started and ended.
Not Now now leads the actions, and the spinner trails the text. The gallery entry agent-pane.harness-health-notice#restart-after-turn measured a layout shift of 0.0021 against a limit of 0; it is now 0. Reordering alone left 0.0005, which came from the spinner.
Changelog
- Fixed: the agent update notice's Not Now button and text no longer jump when Restart Chat or the progress spinner appears.
Test
cd webviews && CMUX_BROWSER_TESTS=1 bun test test/gallery-agent-pane-entries.test.ts -t harness-health
- red (test commit, old product code):
restart-after-turnfails withclick [data-notice-action="restart"]: layout shift 0.0021 (limit 0) - head: 4 pass. The whole file: 15 pass.
The update-failed case is a regression guard only; it passes on the old code too, because its updater fails at once.
Observed / Not run
- Observed: the red and green runs above.
HarnessHealthNotice.test.tsxandharness-notice-bare-spinner.test.tspass. An independent review subagent passed it.prepush-gate.py: no new violations. test/ui-rules.test.tsfails onChoiceOrUrlEditor.tsxandCopyButton.tsx. That is a base failure in files this PR does not touch.- Not run: a native capture. This is web-only, and the gallery entry shows the states.
No capture: web pane change, shown by the gallery entry agent-pane.harness-health-notice.
Agent session: huge-blue
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the agent update notice's layout shift so the Not Now button and message text stay still while the update restarts.
Previously Restart Chat and Try Again appeared before Not Now, and the spinner led the message, so Not Now and the words jumped whenever those came or went. Not Now now leads the actions and the spinner trails the text, bringing the restart-after-turn gallery entry's layout shift from 0.0021 to 0.
- Reorders the notice actions and moves the spinner after the text in
HarnessHealthNotice.tsx. - Adds a regression guard for the failed-update case and two gallery entries covering the restart and failed-update variants.