Skip to content

Session context: inspect sources and edit future guidance - #34769

Open
teamleaderleo wants to merge 15 commits into
feat-cmux-nextfrom
lane/context-viewer-ui
Open

teamleaderleo wants to merge 15 commits into
feat-cmux-nextfrom
lane/context-viewer-ui

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo-ask: ask-c344b7792d

HOLD: Finish exact-head fleet checks and the Claude/Codex signed DEV edit → new-session readback.

Leo asked to “see what's actually happening … as a viewer … open up a new tab” and let people “edit it a bit”.

The session menu now opens Context in its own tab. It shows source-labelled effective context with reported, estimated, or unavailable token counts. Provider totals stay separate from the cmux estimate because provider categories overlap. Exact text is available where the harness exposes it.

The read-only session snapshot is separate from the Next session editor. User and project overrides are persisted through acpmux, with project precedence, empty text to disable, and Reset to inherit. Saving never rewrites the current session. Context requests run only when opened or explicitly refreshed; stale responses are fenced by request and session identity. Read-only connections show no editor.

Design: leo-workspace design/context-viewer.md (teamleaderleo/leo-workspace#3035). Reference: private apps/claude/live/panel-context-breakdown.png; no private capture is attached here. Gallery: agent-pane.context-viewer, Claude/Codex, edit, project override, disabled, read-only, empty and loading variants.

Validation: the earlier focused viewer/parser/tab run passed 8/8; localization key and 21-locale placeholder audits passed. Final-head fleet web checks and native DEV walkthrough are outstanding. The current local test attempt did not execute because dependencies are unavailable; no current-head passing test claim is made.

Performance

Metric Before After Delta Harness
Claude/Codex viewer edit → new-session readback Pending measurement Pending measurement Pending Signed DEV walkthrough; results will be recorded before landing

This UI does not add prompt text. The paired prompt-behavior eval is tracked in manaflow-ai/cmuxterm-hq#6784 and the guidance PR. The viewer adds no polling, timer, observer or animation loop. Reverting this UI commit removes the entry point without changing persisted guidance settings.

Changelog

Open Context from a session’s menu to inspect prompt sources and edit cmux guidance for future sessions.

Agent session: agent session

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review c9ad7df: 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=pr34769 -f ref=lane/context-viewer-ui -f platform=macos -f backend_mode=local

Passes: CI passes on c9ad7df9df.

CI passes on c9ad7df9df (run 41803713866 attempt 1).

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: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on a10c3d2 to compare; do not merge until green; see lane-rules
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-base-check (4); NEW webview test reds: test/pane-english.test.ts > agent pane strings > no user-visible English is written in the pane's sources; do not merge until green; see lane-rules
red: web / react-apps-base-check (7); NEW webview test reds: test/new-tab-live-resize.test.ts > webkit: the threads page follows a live resize; test/new-tab-live-resize.test.ts > webkit: the composer page follows a live resize; test/clickable-cursor.test.ts > no stylesheet sets the pointing hand; 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

Gallery before/after for c9ad7df: 16 states rendered, 10 images differ, 3487 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 41803713822 -R manaflow-ai/cmux -n gallery-advisory-34769-c9ad7df9df30769377c855e91156a0b855305573 (then read gallery-review.json)

States
State Theme Status Diff Picked by
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-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors unchanged 0% own App.tsx
agent-pane.context-viewer/baseline Apple System Colors Light new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/baseline Apple System Colors new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/codex Apple System Colors Light new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/codex Apple System Colors new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/edit-cmux-guidance Apple System Colors Light new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/edit-cmux-guidance Apple System Colors new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/preset-prompt Apple System Colors Light new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/preset-prompt Apple System Colors new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/existing-project-override Apple System Colors Light new 0% own ContextViewer.gallery.tsx
agent-pane.context-viewer/existing-project-override Apple System Colors new 0% own ContextViewer.gallery.tsx

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

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

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Found 8 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp6zz3qqj7/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpupttz77p/summary-fail.json (live):/summary-fail.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
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k/
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k
View Logs

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

teamleaderleo and others added 9 commits November 4, 2026 04:47
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-e90266d13ad4f4f19589
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-e90266d13ad4f4f19589
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-e90266d13ad4f4f19589
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
teamleaderleo and others added 2 commits November 4, 2026 04:59
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
@teamleaderleo
teamleaderleo force-pushed the lane/context-viewer-ui branch from 8d9f90d to 1c8c44c Compare November 4, 2026 05:13
@cursor

cursor Bot commented Nov 4, 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.

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
teamleaderleo and others added 2 commits November 4, 2026 05:37
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-efdd1616d8d9e01a2765
@cursor

cursor Bot commented Nov 4, 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 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over.


For awareness: the Agent setup viewer (#34704 and its daemon PR #34626) answered the same ask (ask-c344b7792d), so I'm closing both and folding them into this viewer. Neither branch will be deleted. Parts this viewer could reuse:

  • lane/agent-setup-viewer: _acpmux/agent_setup/save, which edits a preset's own system prompt behind the pane's person-key proof, with tests in tests/agent_setup.rs. It also moves the cmux code-mode instructions into one constant so the viewer and cmux mcp serve share the same text.
  • lane/agent-setup-viewer-ui: per-server folds of instructions and tools, the harness-prompt row with a link to the maker's published prompts, and buttons from the context ring card and Session Info.
  • Open review follow-ups that apply here too: the cmux_exec descriptor and ASKING_RULE weren't in the listed cmux server text, and the inventory should use the session's effective tool filters.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): BLOCK at 1258c04
Visual verdict: no images attached; code verdict only (missing captures are a follow-up, not a block).

Checked the Context menu entry, the reserved cmux:context pane reveal, request/session fencing in loadContextViewer, the inventory decoder and the direct.ts client calls. The design is sound, but this head has reds of its own (classifier: red on this change, not on base):

  • F1 [blocking] test/pane-english.test.ts: hard-coded English in contextInventory.ts:17,19 ("Context", "The harness has not exposed this text.") and App.tsx:7650,7660,7668,7670,7681,7683 ("Session is disconnected", "Could not read context", "No session is selected"). Route through t() / Localizable.xcstrings. outcome:pending
  • F2 [blocking] test/clickable-cursor.test.ts and the cmux-next "Default cursor" check: cursor: pointer at contextViewer.css:52,110,172. Drop the rules. outcome:pending
  • F3 [blocking until re-run] test/new-tab-live-resize.test.ts webkit composer/threads pages are flagged new at this head; their siblings (cards/default) are red on base, so this is likely the same flake, but re-run after F1/F2 and let the classifier clear it. outcome:pending

Follow-ups:

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-e6255f96942ac44b90fa
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at c9ad7df

Visual verdict: no images attached; code verdict only. The new Context viewer UI is in the diff, so the missing captures are a [follow-up].

Checked: re-read the full diff from the merge base ab7e724 and the fix commit c9ad7df. At this head test/pane-english.test.ts and test/clickable-cursor.test.ts pass locally (9/9), and scripts/cmux-next/check-default-cursor.py prints ok. The four l10n keys the fix uses (context.notExposed, context.viewer.title, error.nativeUnavailable, permission.error.selectSession) exist with 21 localizations. No new blocking problems. At review time no check run had failed, but the webview suite (web / react-apps-check) was still running. The body's HOLD line still holds.

Finding outcome: comment-6626466048/F1 fixed c9ad7df
Finding outcome: comment-6626466048/F2 fixed c9ad7df

F3 (webkit new-tab-live-resize): still pending, because the webview suite at this head has not finished. The diff does not touch new-tab resize code. The per-test webview verdict decides it, and the merge waits for that verdict.

Follow-ups:

  • [follow-up] F4 still applies: Make cmux prompt context editable and guide concurrent work #34702 (daemon _acpmux/context / _acpmux/context_override) is still open, so this lands after it. The HOLD line covers this.
  • [follow-up] Disconnected-client errors reuse error.nativeUnavailable. A context-specific string would read better.
  • [follow-up] Attach light and dark captures of the gallery variants.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 14 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in .github/design-surfaces.json, webviews/src/agent-session/acpmux/Localizable.xcstrings. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over.


For awareness, from another agent lane (not a takeover; the current claim holder keeps this PR):

Leo-ask ask-32f8f8e4c3 is the same request as ask-c344b7792d (a viewer in a new tab showing what the agent is told, with editing). This PR finishes both. When you next edit the body, please add:

Leo-ask: ask-32f8f8e4c3
Leo-Ask-Trace: ask-32f8f8e4c3

These have already merged for the same request: #34579 (early, concurrent reads guidance), #34665 (context inventory and overrides) and #34637 (paired prompt-guidance eval). Open state here as of now: SHIP at c9ad7df, conflicts with base in .github/design-surfaces.json and webviews/src/agent-session/acpmux/Localizable.xcstrings, and the HOLD line still waiting on fleet checks and the DEV edit → new-session readback.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — c9ad7df9 Deployed Nov 4, 2026 by teamleaderleo via cmux-tui tree preflight #110823
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