Skip to content

Session Info: Compact in Context, and the composer ring's Compact back - #28969

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
session-info-context-compact
Oct 31, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
session-info-context-compact

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-31: "THE SESSION INFO HAS SO MANY FUCKING THINGS" / "THE VARIOUS OTHER FUCKING IMPROVEMENTS" / "WHERE IS MY FUCKING PARITY". 2026-10-28: "You don't have the fucking, like, show more. You don't have the compact session."

What was there before

This is a restore, not a new design. #17537 (10-06) put Compact (the agent's /compact, shown when the agent lists compact) in the composer context ring's popover. #20454 (10-14, the hq#1957 compact row) removed the ring and its onCompact wiring. #23785 (10-22) brought the ring back with a card (ContextCard.tsx) that still draws Compact, off while a turn runs, but nothing passed it onCompact, so Compact has been missing since 10-14. Session Info's Context never had it. The only working Compact was on the context-full failure footer (turnActions.compact).

Change

  • One handler in App.tsx (compactChat), with the same reach as the failure footer's Compact: offersCompact(snapshot.commands) (only when the agent lists /compact), then restartReaches (never a View Only chat, a read-only subagent pane, or the next chat during a switch's hold), then compactThrough (chat.send /compact).
  • Session Info > Context, when open: Compact is a quiet text action at the rows' trailing edge, styled like Environment's Save (acpmux-chat-inspector-link). It is off while a turn runs, as the ring card's is. With no handler (the agent offers no /compact, or the chat can't be sent to) nothing shows, so there is no dead click. A subagent's own panel has no Compact, because the context belongs to the chat.
  • Composer ring card: gets the same handler, so its existing Compact button shows again.
  • Gallery: full props now pass onCompact, so context-connectors-open and context-breakdown show it. New context-compact-working arm shows it off during a turn.

Design spec: leo-workspace design/session-panel.md: Context is one folded row with an icon, the title and the percent; open, it shows the token counts. This PR only adds the action inside the open section. It adds no narration label and no dead click, and draws no box. Placement still follows design/session-info.md. Nothing is removed.

Connectors "N connected" (the other half of this parity ask) is already on base: rail.connected when nothing failed, chatInspector.connectors.reconnect otherwise, and the row is hidden with zero servers. That needed no PR. #27966 (held) would change that value, and I commented there.

Overlap: #28773/#27923 (Usage) add their own onCompact to the same ChatInspector plumbing. The prop name and handler shape here match, so whichever lands second resolves trivially.

Tests

webviews/test/chat-inspector-context-breakdown.test.tsx: Context shows Compact only with a handler and sends it on click; Compact is disabled while working; the ring card shows Compact again with a handler.

Screenshots

Leo: "WE DONT NEED FUCKIGN SCREENSHOTS JUST LET ME TRY THE SHIT OUT". The gallery arms agent-pane.chat-inspector context-connectors-open / context-compact-working and agent-pane.context-ring card-claude-compact show the change.

Risk

Low. A new text button sends an existing command through the existing gated path.

🤖 Generated with Claude Code

Agent session: agent session

Leo, 2026-10-28: "You don't have the fucking, like, show more. You don't have
the compact session."

#17537 put Compact (the agent's /compact) in the context ring's popover.
#20454 dropped the ring's onCompact wiring; #23785 brought the ring back with a
card that still draws Compact, but nothing passed onCompact, so it never showed.

One App handler (compactChat) sends /compact with the reach the context-full
failure's Compact has (offersCompact + restartReaches + compactThrough). Session
Info's Context, open, shows it as a quiet text action (like Environment's Save),
off while a turn runs; a subagent's panel has none. The ring's card gets the
same handler.

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

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 8885261: 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=pr28969 -f ref=session-info-context-compact -f platform=macos -f backend_mode=local

Gallery before/after for 8885261: 16 states rendered, 12 images differ, 1524 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 41174572594 -R manaflow-ai/cmux -n gallery-advisory-28969-888526127b21c0f11a3582e2536cfd087873ff8f (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-inspector/context-compact-working Apple System Colors Light new 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/context-compact-working Apple System Colors new 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/full Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/full Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors Light changed 0.0045% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors changed 0.0042% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors Light unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors unchanged 0% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-compact Apple System Colors Light changed 0.0046% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-compact Apple System Colors changed 0.004% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-detail Apple System Colors Light changed 0.0046% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-detail Apple System Colors changed 0.0042% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-grid Apple System Colors Light changed 0.0046% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-grid Apple System Colors changed 0.0044% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-narrow Apple System Colors Light changed 0.0047% own ChatInspector.gallery.tsx
agent-pane.chat-inspector/workflow-agent-row-narrow Apple System Colors changed 0.0038% own ChatInspector.gallery.tsx
agent-pane.chat-inspector-surfaces/transcript Apple System Colors Light unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/transcript Apple System Colors unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/diff-in-place Apple System Colors Light unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/diff-in-place Apple System Colors unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/document-beside Apple System Colors Light unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/document-beside Apple System Colors unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/diff-closed Apple System Colors Light unchanged 0% own ChatInspector.tsx
agent-pane.chat-inspector-surfaces/diff-closed Apple System Colors unchanged 0% own ChatInspector.tsx
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer/font-size-chat-14 Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/font-size-chat-14 Apple System Colors unchanged 0% own Composer.tsx

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

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards. This PR merged before its CI finished: fix forward on main.

CI failed on 888526127b (run 41174528691 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-check (1) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs sessionStartFailure.test.ts a canceled start's late Trust refusal cannot replace the newer start's retry: failed (job)
  • seen on other PRs rowSummary.test.tsx no description line on any Settings page is over 60 characters, in any language: failed (job)
  • seen on other PRs rowSummary.test.tsx every schema summary fits 60 characters in every language: failed (job)
  • seen on other PRs check-type-scale.test.ts check-type-scale > this checkout matches its baseline: failed (job)
  • seen on other PRs classic-new-tab-pickers.test.tsx classic composer plugins receive the page's selected folder: failed (job)
  • seen on other PRs classic-new-tab-pickers.test.tsx a classic model pick starts in the project selected on the page: failed (job)
  • seen on other PRs classic-new-tab-trust.test.tsx classic Return with no agent named: a start refused for the folder's trust sends its prompt once Tru...: failed (job)
  • seen on other PRs classic-new-tab-trust.test.tsx a start refused after a while keeps the New Tab page until then, and gives the prompt back with the ...: failed (job)
Matched log lines
web / react-apps-check (1): (fail) a canceled start's late Trust refusal cannot replace the newer start's retry [309.16ms]

Not re-run automatically: web / react-apps-check (1), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check (1); NEW: Expected to contain: "check-type-scale: ok" Received: "check-type-scale: new raw font sizes (webviews/src/ui/README.md, Type scale):\n webviews/src/pages/apps/s (+5 more) is not red on the base d8a4522; do not merge until green; see lane-rules

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at bd2cfb3

BLOCK at bd2cfb3

Visual verdict: BLOCK — this UI change has no after screenshots; review/images/selection.json reports zero images.

  1. [P1] [blocking] After screenshots are required for UI diffs, but the PR explicitly marks them pending (review/pr.body:21-22) and supplies none (review/images/selection.json:2-5). Layout, clipping, and duplicate-control regressions cannot be reviewed.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at bd2cfb3

BLOCK at bd2cfb3

Visual verdict: BLOCK — no after screenshots were provided for this visible UI change.

  1. [P1] [blocking] review/pr.body:21-22 explicitly states “Screenshots: None.” The review rules require after-image evidence for UI diffs, so this PR cannot land without it.

Follow-ups: none

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

blacksmith-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)/
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)
View Logs
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)/
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)
View Logs

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
@teamleaderleo
teamleaderleo merged commit fbea666 into feat-cmux-next Oct 31, 2026
143 of 153 checks passed
@teamleaderleo
teamleaderleo deleted the session-info-context-compact branch October 31, 2026 06:18
lawrencecchen added a commit that referenced this pull request Oct 31, 2026
#28969 (ContextSection.css: padding 2px 6px 0) and d13d17a (apps .apps-instance: font-size 12px)
each added a raw value the design-token and type-scale ratchets reject, so every feat-cmux-next push
stopped in the pre-push web lint. Same sizes: calc(var(--ds-space-1) / 2) calc(var(--ds-space-3) / 2) 0
and var(--text-detail) (12px at scale 1).
lawrencecchen added a commit that referenced this pull request Oct 31, 2026
#28969 (ContextSection.css: padding 2px 6px 0) and d13d17a (apps .apps-instance: font-size 12px)
each added a raw value the design-token and type-scale ratchets reject, so every feat-cmux-next push
stopped in the pre-push web lint. Same sizes: calc(var(--ds-space-1) / 2) calc(var(--ds-space-3) / 2) 0
and var(--text-detail) (12px at scale 1).
@lawrencecchen

lawrencecchen commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Base red: this PR's .acpmux-chat-inspector-context__actions { padding: 2px 6px 0 } (fbea666) failed bun run check:design-tokens on feat-cmux-next (2px and 6px are off the 0/4/8/12/16/24/32 scale). Now fixed on feat-cmux-next by direct pushes 2d93485, a19e400 and e7bab27 (#29076 closed as superseded).

teamleaderleo added a commit that referenced this pull request Oct 31, 2026
Leo, 2026-10-31: "JUST FUCKING REMOVE COMPACT FROM THE FUCKING POPOVER".

#28969 wired Compact into the ring's card (ContextCardBody's onCompact,
from #23785/#17537). Deletes it end to end: the card's button and CSS, the
ContextRing/Composer onCompact and working props, the App wiring and the
gallery variant. Session Info's Context keeps its Compact.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
…n runs (#29641)

* Session Info: Compact session is a real button that works while a turn runs

Leo, 2026-10-31: "COMPACT BUTTON LITERALLY DOESN'T EVEN FUCKIGN WORK".

Why it did nothing: #28969 drew Session Info's Compact with disabled={working},
and Leo's chats are nearly always mid-turn. The disabled link looked exactly
like the enabled one (muted text, no disabled style), so a click just fell
on a dead button. The send path itself (compactChat -> compactThrough ->
chat.send "/compact") was fine.

Now Compact session stays live: its /compact goes through chat.send and
queues behind a running turn, as one typed in the composer does. It draws
as a real button at the rows' trailing edge (8px inset, on the spacing
scale), with "146.7K until auto-compact" on the leading edge when Claude's
/context reports an autocompact buffer. The working prop is gone from
ChatInspector and ContextSection.

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

* webviews: format

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 88852612 Deployed Oct 31, 2026 by teamleaderleo via wait for same-key tree publisher #87827
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.

2 participants