Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41896,7 +41896,7 @@ mod tests {
.expect("minibuffer widget render should not panic");
assert_eq!(app.layout.matrix_widget_hits.len(), 3);
let text = rendered_text(term.backend().buffer());
assert!(text.contains("minibuffer ─"));
assert!(text.contains("monitor ─"));
assert!(
text.contains("■"),
"selected widget indicator should be filled"
Expand Down Expand Up @@ -42077,7 +42077,7 @@ mod tests {
.expect("collapsed rain title bar should render");
let text = rendered_text(term.backend().buffer());
assert!(
text.contains("minibuffer"),
text.contains("monitor"),
"collapsed panel should keep its title bar: {text:?}"
);

Expand Down Expand Up @@ -42141,7 +42141,7 @@ mod tests {
term.draw(|f| crate::ui::render(f, &mut app))
.expect("minibuffer approval title should render");
let text = rendered_text(term.backend().buffer());
assert!(text.contains("minibuffer !"));
assert!(text.contains("monitor !"));
let (x_start, _x_end, y) = app
.layout
.matrix_minibuffer_title_hit
Expand Down
23 changes: 15 additions & 8 deletions crates/cli/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,9 +1184,9 @@ fn render_list_title_button_tooltips(f: &mut Frame, app: &App) {
if let Some((xs, xe, y)) = matrix_rain_close_button_range(rain) {
if my == y && mx >= xs && mx < xe {
let (label, anchor_y) = if app.matrix_rain_hidden {
(" Expand Minibuffer ", y)
(" Expand monitor ", y)
} else {
(" Collapse Minibuffer ", y.saturating_add(2))
(" Collapse monitor ", y.saturating_add(2))
};
render_button_tooltip(f, &app.theme, label, xs, anchor_y);
}
Expand Down Expand Up @@ -3777,7 +3777,7 @@ fn split_lineage_section(

/// Render the sidebar's lineage section: a header bar (a `─` rule carrying
/// the `⑂ lineage` label, the view-mode toggle, and a `−`/`+` collapse
/// button — the same furniture as the minibuffer panel's title bar lower in
/// button — the same furniture as the monitor panel's title bar lower in
/// the sidebar)
/// above the selected session's lineage diagram. Reuses
/// `App::lineage_section_rows` (`crate::lineage::build_tree`/`flatten`
Expand Down Expand Up @@ -3807,7 +3807,7 @@ fn render_lineage_section(
app.layout.lineage_area = Some(rect);
let focused = app.lineage_focused && app.focus == PaneFocus::List;

// Header bar: a full-width `─` rule (the minibuffer panel's visual
// Header bar: a full-width `─` rule (the monitor panel's visual
// language), label at the left, mode toggle + collapse button at the
// right. The bare bar doubles as the height drag handle.
let line_style = if focused {
Expand Down Expand Up @@ -3843,7 +3843,7 @@ fn render_lineage_section(
} else {
" − "
};
// Flush right, matching the minibuffer panel's toggle below.
// Flush right, matching the monitor panel's toggle below.
let bx = rect.x + rect.width.saturating_sub(3);
let button = Rect {
x: bx,
Expand Down Expand Up @@ -5583,10 +5583,17 @@ fn render_matrix_rain_header(f: &mut Frame, area: Rect, app: &mut App, now: Inst
// so the squares below reflect the live shown/pinned widget.
app.matrix_widget_visible(now);
let approval_pending = app.minibuffer_has_pending_approval();

// Pane title: this pane is the fleet's ambient *monitor* (rain / token
// meter / widget strip), so it must not be titled after the minibuffer
// — that names the dispatcher session in the bottom strip (spec 0199).
// The label still carries the minibuffer affordances (status tooltip,
// approval alert, click-to-open) because the default sidebar width has
// no room for a separate chip; the tooltip names the minibuffer.
let minibuffer_text = if approval_pending {
"minibuffer !"
"monitor !"
} else {
"minibuffer"
"monitor"
};

// Play/pause toggle for the minibuffer ambient loop.
Expand All @@ -5612,7 +5619,7 @@ fn render_matrix_rain_header(f: &mut Frame, area: Rect, app: &mut App, now: Inst
.set_string(loop_icon_x, area.y, loop_icon, loop_icon_style);
app.layout.matrix_minibuffer_loop_hit = Some((loop_icon_x, loop_icon_end, area.y));

// Prompt label renders after the icon; the leading space in " minibuffer "
// Prompt label renders after the icon; the leading space in " monitor "
// provides the visual gap between icon and text.
let label = format!(" {minibuffer_text} ");
let label_x = loop_icon_end;
Expand Down
18 changes: 10 additions & 8 deletions crates/daemon/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
background: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Minibuffer ambient panel (spec 0019 / 0167): fleet token meter by default. */
/* Monitor ambient panel (spec 0019 / 0167): fleet token meter by default. */
.minibuffer-panel {
flex: 0 0 auto;
display: flex;
Expand Down Expand Up @@ -3880,19 +3880,21 @@
<div class="lineage-body" id="lineageBody" role="tree" aria-label="session lineage"></div>
</section>
<!--
Minibuffer ambient panel (specs 0019 / 0167): fleet token meter by
Monitor ambient panel (specs 0019 / 0167): fleet token meter by
default, with a rain mode toggle. Anchored at the bottom of the
sidebar like the TUI matrix-rain region.
sidebar like the TUI matrix-rain region. Titled "monitor" — the
pane observes the fleet; "minibuffer" names the dispatcher session
(spec 0199), not this pane.
-->
<section class="minibuffer-panel" id="minibufferPanel">
<!-- Resize handle on the TOP border of the title bar (TUI parity). -->
<div class="minibuffer-resize" id="minibufferResize" role="separator"
aria-orientation="horizontal" aria-label="resize minibuffer panel"></div>
aria-orientation="horizontal" aria-label="resize monitor panel"></div>
<div class="minibuffer-header" id="minibufferHeader">
<span class="section-title" id="minibufferTitle">minibuffer</span>
<button type="button" id="minibufferModeBtn" aria-label="toggle minibuffer panel mode"
<span class="section-title" id="minibufferTitle">monitor</span>
<button type="button" id="minibufferModeBtn" aria-label="toggle monitor panel mode"
title="Toggle rain / tokens">tokens ⇄</button>
<button type="button" id="minibufferCollapseBtn" aria-label="collapse minibuffer panel"
<button type="button" id="minibufferCollapseBtn" aria-label="collapse monitor panel"
title="Collapse">−</button>
</div>
<div class="minibuffer-body" id="minibufferBody">
Expand Down Expand Up @@ -6263,7 +6265,7 @@ <h2 id="operatorViewTitle"></h2>
minibufferCollapseBtn.textContent = state.minibufferCollapsed ? "+" : "−";
minibufferCollapseBtn.setAttribute(
"aria-label",
state.minibufferCollapsed ? "expand minibuffer panel" : "collapse minibuffer panel",
state.minibufferCollapsed ? "expand monitor panel" : "collapse monitor panel",
);
}
const tokens = state.minibufferPanelMode !== "rain";
Expand Down
4 changes: 2 additions & 2 deletions specs/0019-minibuffer-widgets-use-matrix-rain-viewport.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 0019-minibuffer-widgets-use-matrix-rain-viewport

Status: accepted
Date: 2026-06-05 (amended 2026-08-01)
Date: 2026-06-05 (amended 2026-08-16)
Area: tui
Scope: Defines the ambient panel's selectable body modes and how the collapsed Minibuffer communicates through it.

Expand All @@ -20,7 +20,7 @@ of the body, not a mode of its own.

When the Minibuffer session is collapsed, the panel may act as a transient viewport over the Minibuffer session's normal sticky widgets. Minibuffer widgets keep the same lifecycle as all session widgets: sessions create, update, and delete them, and the viewport only controls temporary visibility.

Updating a Minibuffer widget briefly reveals it in the panel. The title bar shows the lowercase `minibuffer` label followed by one square indicator per visible Minibuffer widget, and a mode switch naming the mode currently showing, carrying the same swap glyph as the session list's view-mode toggle so the two controls read as one convention. Hovering the Minibuffer label may reveal the current Minibuffer status in a tooltip. Hovering a widget indicator may reveal that widget's title. Clicking an empty square selects and shows the widget; clicking the filled square hides the widget viewport. The existing close button continues to hide the Minibuffer/ambient panel itself, and is distinct from the mode switch — switching modes never collapses the panel. When the widget viewport hides or no Minibuffer widgets exist, the panel returns to its selected mode.
Updating a Minibuffer widget briefly reveals it in the panel. The title bar names the pane with the lowercase `monitor` title — the pane observes the fleet; `minibuffer` names the dispatcher session (spec 0199) and must never double as this pane's name. The title may also carry the Minibuffer affordances (loop toggle, status tooltip, approval alert, click-to-open) when the bar has no room for a second chip; the hover tooltip still names the Minibuffer so the control is not confused with the pane itself. Then come one square indicator per visible Minibuffer widget, and a mode switch naming the mode currently showing, carrying the same swap glyph as the session list's view-mode toggle so the two controls read as one convention. Hovering the title may reveal the current Minibuffer status in a tooltip. Hovering a widget indicator may reveal that widget's title. Clicking an empty square selects and shows the widget; clicking the filled square hides the widget viewport. The existing close button continues to hide the monitor/ambient panel itself, and is distinct from the mode switch — switching modes never collapses the panel. When the widget viewport hides or no Minibuffer widgets exist, the panel returns to its selected mode.

## Reason

Expand Down
2 changes: 1 addition & 1 deletion specs/0081-lineage-section-in-sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ diagram glyph beneath them, while their full-cell tracks remain
mouse-interactive.

The section's header is a one-row horizontal rule carrying its label and
controls — the same visual furniture as the minibuffer panel's title bar
controls — the same visual furniture as the monitor panel's title bar
lower in the sidebar: a `−`/`+` collapse button at the right end, the view-mode
toggle beside it, and the bare rule doubling as a height drag handle (dragging
up grows the section, within the same caps). The collapse state, the dragged
Expand Down
8 changes: 4 additions & 4 deletions specs/0186-webui-lineage-and-token-meter.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 0186-webui-lineage-and-token-meter

Status: accepted
Date: 2026-08-02 (amended 2026-08-05)
Date: 2026-08-02 (amended 2026-08-16)
Area: webui
Scope: The web UI sidebar and persistent header expose the fleet token meter alongside the selected-session lineage section.

## Decision

The web client's left sidebar stacks the same durable regions the TUI
does: session rows, then a collapsible **lineage** section, then a
collapsible **minibuffer** ambient panel. Operators remain ordinary list
collapsible **monitor** ambient panel. Operators remain ordinary list
rows (as they already are on the web).

### Lineage section
Expand All @@ -36,7 +36,7 @@ subagent / reset-snapshot), and subagent-group collapse match the TUI;
the presentation uses HTML tree rows so the section remains usable on
touch and narrow viewports.

### Minibuffer ambient panel
### Monitor ambient panel

The ambient panel sits at the bottom of the sidebar and hosts the same
named body modes as the TUI (spec 0019):
Expand Down Expand Up @@ -89,7 +89,7 @@ the gap was client presentation.
## Consequences

- Future web sidebar work must preserve the stack order: list → lineage
minibuffer, and must not drop Cost events that arrive for unfocused
monitor, and must not drop Cost events that arrive for unfocused
sessions.
- A collapse or expansion in the narrow mobile menu must not consume the
corresponding wide-sidebar preference, or vice versa.
Expand Down
Loading