Session context: inspect sources and edit future guidance

TE
1d ago
+1287-2

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

MetricBeforeAfterDeltaHarness
Claude/Codex viewer edit → new-session readbackPending measurementPending measurementPendingSigned 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