Skip to content

Agent chat tests: a prompt after tool rows stays centred in its gap - #31360

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
prompt-bubble-gap-after-tools
Nov 1, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
prompt-bubble-gap-after-tools

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-01, on a steer whose bubble nearly touched the "Sent to …" tool line over it: "this is too close to tool calls, center it".

What this does

While this PR was open, #27580 landed. It moved the transcript onto stack gaps (grid.md §5.5): a prompt now takes the 32px turn gap on both sides, which already centres it after tool rows. This PR's original fix (a --cv-prompt-gap row edge) became redundant, so I dropped it in the merge with base. What remains is the regression guard for Leo's ask:

  • Gallery agent-pane.prompt-after-tool-rows: a running turn with three tool rows, a steer the person sent, then two more calls. It is shaped like the screenshot.
  • webviews/test/transcript-prompt-after-tools.test.ts (Chromium, light and dark) measures the room from the tool line over the steer's bubble to the bubble's top, and from the bubble's bottom to the next tool line. The two must be equal to 0.5px and equal to the turn gap. The bubble's box is its edge, because its meta row (time, Copy, Retry) shows on hover and sits in the room under it.

Spec: leo-workspace design/chat-transcript.md, "Prompts after tool rows"; grid.md §5.5.

Gaps (Chromium, gallery entry, tool line box to bubble box)

over the bubble under the bubble
before #27580 4px 38px
now (base and this head) 32px 32px

Same numbers in light (Apple System Colors Light) and dark (Catppuccin Mocha).

Testing

Command: cmux-ci test -- bash -c 'cd webviews && bun install --frozen-lockfile; CMUX_BROWSER_TESTS=1 bun test test/transcript-prompt-after-tools.test.ts'

Observed / Not run

  • Observed: the fleet runs above.
  • Not run: a native DEV build. This PR adds only a test and a gallery entry.

risk: low (test and gallery only).

Changelog

none

🤖 Generated with Claude Code

Agent session: agent session

teamleaderleo and others added 3 commits November 1, 2026 13:19
Leo, 2026-11-01: "this is too close to tool calls, center it". Adds the
gallery entry agent-pane.prompt-after-tool-rows and a Chromium test that
the steer's bubble has as much room over it as under it. Red on base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
Leo, 2026-11-01: "this is too close to tool calls, center it". A tool or
one-line row right over the person's own prompt now ends at
--cv-prompt-gap, the room the prompt has under its bubble (reply room +
the next step's 2px top = 38px), instead of the 4px run gap. model.ts
statusEdge marks it before-prompt and the estimate follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 4994a93: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr31360 -f ref=prompt-bubble-gap-after-tools -f platform=macos -f backend_mode=local

Gallery before/after for 4994a93: 16 states rendered, 11 images differ, 760 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41357629794 -R manaflow-ai/cmux -n gallery-advisory-31360-4994a9352d68f49bf4a7ee32d02f3baedc4aecf2 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.prompt-after-tool-rows/centered Apple System Colors Light new 0% own PromptAfterToolRows.gallery.ts
agent-pane.prompt-after-tool-rows/centered Apple System Colors new 0% own PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-no-credits Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-no-credits Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-low-credits Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-low-credits Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-no-offer Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.access-offer/turn-no-offer Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batches Apple System Colors changed 0.0012% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batches Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batch-raw Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batch-raw Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batch-sending Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.acpmux-batch-send/batch-sending Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.addressed-message/relayed Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.addressed-message/relayed Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/unicode-boundary Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/unicode-boundary Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent Apple System Colors changed 0.0123% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent Apple System Colors Light changed 0.0115% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/lanes Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/lanes Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-subagents Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-subagents Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-hover Apple System Colors Light changed 0.0136% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-hover Apple System Colors changed 0.0133% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-opened Apple System Colors Light changed 0.0154% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-opened Apple System Colors changed 0.0135% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-opened-long Apple System Colors changed 0.0137% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/sent-opened-long Apple System Colors Light changed 0.0132% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/outcomes Apple System Colors Light unchanged 0% same-folder PromptAfterToolRows.gallery.ts
agent-pane.agent-message-row/outcomes Apple System Colors unchanged 0% same-folder PromptAfterToolRows.gallery.ts

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 412578b to compare; do not merge until green; see lane-rules

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 8 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp21fvdvxf/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmptyapq6pi/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
imported web bundle inputs are not routed:/imported web bundle inputs are not routed: View Logs
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)/
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)
View Logs

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

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

#27580 moved the transcript onto stack gaps: a prompt takes the 32px turn
gap on both sides, which centres it after tool rows. This branch's
--cv-prompt-gap edge is dropped for base's; the gallery scene and the
browser test stay as the guard, now asserting 32px both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base c026ef2 to this head): SHIP at 03ac848.

No P1/P2 findings.

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo teamleaderleo changed the title Agent chat: centre a prompt between the tool rows around it Agent chat tests: a prompt after tool rows stays centred in its gap Nov 1, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent opus-5.5 medium): SHIP at 4994a93

No blocking findings. The test measures what it says (nearest .cv-tool line above and below the steer's bubble) and fails if any element is missing, if the gaps differ, or if the gap is not 32px.
Follow-ups:

  • The gallery and test comments mention a "sent message" / "Sent to …" row, but the fixture has three commands. Reword the comments, or make the middle row a send-message tool.
  • Optionally add a variant that shows the old 4px/38px layout.
  • Optionally drop model.ts from the gallery's covers.

@teamleaderleo
teamleaderleo merged commit 7795ff0 into feat-cmux-next Nov 1, 2026
183 of 186 checks passed
@teamleaderleo
teamleaderleo deleted the prompt-bubble-gap-after-tools branch November 1, 2026 23:10

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 4994a935 Deployed Nov 1, 2026 by teamleaderleo via cmux-tui tree preflight #97728
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant