diff --git a/crates/zet-gpu/src/presentation.rs b/crates/zet-gpu/src/presentation.rs index 1884d3d..eff6e8d 100644 --- a/crates/zet-gpu/src/presentation.rs +++ b/crates/zet-gpu/src/presentation.rs @@ -43,35 +43,35 @@ impl UiTextStyle { } /// Compact geometric wordmark role for the application identity. -pub const UI_BRAND: UiTextStyle = UiTextStyle::new(26.0, 30.0, 700, 1.1, UiFontFamily::SansSerif); +pub const UI_BRAND: UiTextStyle = UiTextStyle::new(28.0, 32.0, 700, 0.9, UiFontFamily::SansSerif); /// Upper application/header labels. -pub const UI_HEADER: UiTextStyle = UiTextStyle::new(15.0, 19.0, 700, 1.45, UiFontFamily::Monospace); +pub const UI_HEADER: UiTextStyle = UiTextStyle::new(16.5, 21.0, 700, 0.8, UiFontFamily::Monospace); /// Indexed section headings such as `COMMAND LEDGER`. pub const UI_SECTION: UiTextStyle = - UiTextStyle::new(14.0, 18.0, 700, 1.05, UiFontFamily::Monospace); + UiTextStyle::new(15.0, 19.0, 700, 1.05, UiFontFamily::Monospace); /// Ordinary native labels and observed values. -pub const UI_BODY: UiTextStyle = UiTextStyle::new(13.5, 18.0, 400, 0.1, UiFontFamily::Monospace); +pub const UI_BODY: UiTextStyle = UiTextStyle::new(15.5, 20.0, 400, 0.1, UiFontFamily::Monospace); /// Compact state, path, and provenance metadata. -pub const UI_META: UiTextStyle = UiTextStyle::new(11.5, 16.0, 500, 0.15, UiFontFamily::Monospace); +pub const UI_META: UiTextStyle = UiTextStyle::new(12.5, 17.0, 500, 0.2, UiFontFamily::Monospace); /// Session identity role: larger than supporting state while remaining below /// the selected command focal point. pub const UI_SESSION: UiTextStyle = - UiTextStyle::new(15.0, 18.0, 600, 0.05, UiFontFamily::Monospace); + UiTextStyle::new(16.5, 20.0, 600, 0.05, UiFontFamily::Monospace); /// Selected command identity and other high-salience evidence labels. pub const UI_COMMAND: UiTextStyle = - UiTextStyle::new(16.5, 20.0, 600, 0.05, UiFontFamily::Monospace); + UiTextStyle::new(17.0, 21.0, 600, 0.05, UiFontFamily::Monospace); /// Important observed values such as exit status and duration. -pub const UI_VALUE: UiTextStyle = UiTextStyle::new(15.0, 18.0, 500, 0.05, UiFontFamily::Monospace); +pub const UI_VALUE: UiTextStyle = UiTextStyle::new(16.0, 19.0, 500, 0.05, UiFontFamily::Monospace); /// Captured output stays readable and dense without inheriting terminal cells. -pub const UI_OUTPUT: UiTextStyle = UiTextStyle::new(13.0, 16.0, 400, 0.0, UiFontFamily::Monospace); +pub const UI_OUTPUT: UiTextStyle = UiTextStyle::new(14.5, 18.0, 400, 0.0, UiFontFamily::Monospace); /// Pixel-space rectangle used by presentation geometry and hit-test helpers. #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/zet-gpu/src/renderer.rs b/crates/zet-gpu/src/renderer.rs index 8e0e807..5285851 100644 --- a/crates/zet-gpu/src/renderer.rs +++ b/crates/zet-gpu/src/renderer.rs @@ -970,6 +970,23 @@ impl Renderer { )); } } + if let Some((start, end)) = segments.get(active) { + let (cw, ch) = (self.cell_w as u32, self.cell_h as u32); + let x = (*start as u32).saturating_mul(cw); + let width = end.saturating_sub(*start) as u32 * cw; + if width > 0 { + self.draw_rect_px( + x, + (row as u32) + .saturating_add(1) + .saturating_mul(ch) + .saturating_sub(2), + width, + 2, + PANEL_CYAN, + ); + } + } } /// Tab bar variant with an excluded leading rail region. diff --git a/crates/zet/src/window/layout.rs b/crates/zet/src/window/layout.rs index 7b1e53b..ef3c006 100644 --- a/crates/zet/src/window/layout.rs +++ b/crates/zet/src/window/layout.rs @@ -100,6 +100,16 @@ impl From for Layout { } } +/// Truthful chrome label for the effective (not requested) panel state. +pub fn chrome_mode_label(rail: bool, inspector: bool) -> &'static str { + match (rail, inspector) { + (true, true) => "MISSION CONTROL", + (true, false) => "WORKSPACE", + (false, true) => "EVIDENCE VIEW", + (false, false) => "TERMINAL FOCUS", + } +} + /// A cell rectangle inside the window grid. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct Viewport { @@ -304,6 +314,14 @@ fn proportional_panel_cols(cols: u32, percent: u32, minimum: u32) -> u32 { mod tests { use super::*; + #[test] + fn chrome_mode_label_tracks_effective_panels() { + assert_eq!(chrome_mode_label(false, false), "TERMINAL FOCUS"); + assert_eq!(chrome_mode_label(true, false), "WORKSPACE"); + assert_eq!(chrome_mode_label(false, true), "EVIDENCE VIEW"); + assert_eq!(chrome_mode_label(true, true), "MISSION CONTROL"); + } + #[test] fn terminal_focus_is_the_full_width_grid() { let layout = LayoutMode::TerminalFocus.layout(); diff --git a/crates/zet/src/window/mod.rs b/crates/zet/src/window/mod.rs index 705a5a6..2025189 100644 --- a/crates/zet/src/window/mod.rs +++ b/crates/zet/src/window/mod.rs @@ -1976,7 +1976,7 @@ impl App { let row = ((y - top) / ch as f64).floor() as usize; let col = ((x - left) / cw as f64).floor() as usize; // Clickable Inspector view switch. - if row == 1 { + if row == 2 { if (8..16).contains(&col) { self.set_inspector_view(panels::InspectorView::Session); return; @@ -2143,12 +2143,12 @@ impl App { if row >= vp.rows { return; } - Self::draw_ui_row(r, vp, row, 1, index, UI_SECTION, index_ink); - Self::draw_ui_row(r, vp, row, 4, title, UI_SECTION, title_ink); + Self::draw_ui_row(r, vp, row, 2, index, UI_SECTION, index_ink); + Self::draw_ui_row(r, vp, row, 5, title, UI_SECTION, title_ink); let (cw, ch) = r.cell_px(); let title_end = - vp.x.saturating_add(4) + vp.x.saturating_add(5) .saturating_add(panels::text_cells(title) as u32 + 1) .saturating_mul(cw); let right = @@ -2215,7 +2215,7 @@ impl App { PANEL_BORDER_STRONG, PANEL_CYAN, PANEL_DANGER, PANEL_INSET, PANEL_RED, PANEL_SECONDARY, PANEL_TEAL, PANEL_TEXT, PANEL_VIOLET, RAIL_ACCENT, RAIL_ACTIVE_BG, RAIL_BORDER, RAIL_DIM_INK, RAIL_FOCUS, RAIL_FOOTER_BG, RAIL_FOOTER_INK, RAIL_HEADER_INK, - RAIL_HOVER_BG, RAIL_SECTION_INK, RAIL_SELECTED_BG, RAIL_TEXT_INK, + RAIL_HOVER_BG, RAIL_SELECTED_BG, RAIL_TEXT_INK, }; let (cw, ch) = r.cell_px(); let origin_x = vp.x.saturating_mul(cw); @@ -2348,7 +2348,7 @@ impl App { "02", "SESSIONS", RAIL_ACCENT, - RAIL_SECTION_INK, + RAIL_HEADER_INK, ); let count = snapshot.sessions.len().to_string(); let count_col = content_cols.saturating_sub(panels::text_cells(&count) as u32); @@ -2373,9 +2373,7 @@ impl App { let is_hovered = hovered_row .is_some_and(|hover| hover == row || hover == row.saturating_add(1)); - let card_border = if is_selected { - PANEL_BORDER_STRONG - } else if is_hovered { + let card_border = if is_selected || is_hovered { PANEL_VIOLET } else if is_active { PANEL_BORDER_STRONG @@ -2404,38 +2402,57 @@ impl App { .saturating_add(4), 3, ch.saturating_mul(2).saturating_sub(8), - if is_selected && focused { - PANEL_CYAN + if is_selected { + PANEL_VIOLET } else { - PANEL_BORDER_STRONG + PANEL_CYAN }, ); } + let index_ink = if is_active { + PANEL_CYAN + } else if is_selected { + PANEL_VIOLET + } else { + RAIL_DIM_INK + }; + Self::draw_ui_row( + r, + content, + row, + 3, + &format!("{:02}", session.index), + UI_META, + index_ink, + ); + if is_active { + let dot_x = origin_x + .saturating_add(content_cols.saturating_mul(cw)) + .saturating_sub(cw / 2 + 4); r.draw_status_dot_px( - origin_x + cw * 4, + dot_x, node_y, 4, PANEL_CYAN, Some(PANEL_BORDER_STRONG), ); - } else { - Self::draw_ui_row(r, content, row, 3, "○", UI_META, RAIL_DIM_INK); } - let name = format!("{} {}", session.index, session.cwd_tail); - let name_budget = content_cols.saturating_sub(5); - let name = panels::truncate_to_cells(&name, name_budget as usize); - let name_ink = if is_active || is_selected { + let name_budget = content_cols.saturating_sub(7); + let name = panels::truncate_to_cells(&session.cwd_tail, name_budget as usize); + let name_ink = if is_active { PANEL_CYAN + } else if is_selected { + PANEL_TEXT } else { RAIL_TEXT_INK }; - Self::draw_ui_row(r, content, row, 5, &name, UI_SESSION, name_ink); + Self::draw_ui_row(r, content, row, 6, &name, UI_SESSION, name_ink); if row + 1 < vp.rows { - let detail_cols = content_cols.saturating_sub(5); + let detail_cols = content_cols.saturating_sub(6); let state_text = if session.state == "exited" && session.exit != "—" { format!("exit {}", session.exit) } else { @@ -2448,10 +2465,12 @@ impl App { PANEL_TEAL } else if session.state == "exited" { PANEL_RED + } else if is_active { + PANEL_CYAN } else { RAIL_DIM_INK }; - Self::draw_ui_row(r, content, row + 1, 5, &state, UI_META, state_ink); + Self::draw_ui_row(r, content, row + 1, 6, &state, UI_META, state_ink); } if !path.is_empty() { let state_cells = panels::text_cells(&state) as u32; @@ -2459,7 +2478,7 @@ impl App { r, content, row + 1, - 5 + state_cells + 1, + 6 + state_cells + 1, &path, UI_META, RAIL_DIM_INK, @@ -2477,7 +2496,7 @@ impl App { "03", "COMMAND LEDGER", RAIL_ACCENT, - RAIL_SECTION_INK, + RAIL_HEADER_INK, ); let count = snapshot.commands.len().to_string(); let count_col = content_cols.saturating_sub(panels::text_cells(&count) as u32); @@ -2539,6 +2558,24 @@ impl App { } else { RAIL_TEXT_INK }; + let index_ink = if selected_command_row { + if failed { + PANEL_RED + } else { + PANEL_CYAN + } + } else { + RAIL_DIM_INK + }; + Self::draw_ui_row( + r, + content, + row, + 2, + &format!("{:02}", index + 1), + UI_META, + index_ink, + ); let command_text = panels::truncate_to_cells( &command.command, content_cols.saturating_sub(5) as usize, @@ -2559,28 +2596,45 @@ impl App { }; if failed { r.draw_status_dot_px( - origin_x + cw * 3 + 2, + origin_x + cw * 2 + 2, node_y, if selected_command_row { 5 } else { 4 }, PANEL_RED, Some(PANEL_DANGER), ); - Self::draw_ui_row(r, content, row, 3, "✕", UI_META, PANEL_RED); } else { r.draw_status_dot_px( - origin_x + cw * 3 + 2, + origin_x + cw * 2 + 2, node_y, if selected_command_row { 4 } else { 3 }, PANEL_TEAL, None, ); } - let status = panels::format_command_metadata( + let (exit_col, duration_col) = panels::rail_command_detail_columns( + content_cols, &command.exit, &command.duration, - content_cols.saturating_sub(6), ); - Self::draw_ui_row(r, content, row, 5, &status, UI_META, status_ink); + let exit_text = format!("exit {}", command.exit); + Self::draw_ui_row( + r, content, row, exit_col, &exit_text, UI_META, status_ink, + ); + if let Some(duration_col) = duration_col { + Self::draw_ui_row( + r, + content, + row, + duration_col, + &command.duration, + UI_META, + if selected_command_row { + PANEL_SECONDARY + } else { + RAIL_DIM_INK + }, + ); + } } } panels::RailRow::Footer => { @@ -2610,8 +2664,21 @@ impl App { "04", "RESOURCES", RAIL_ACCENT, - RAIL_SECTION_INK, + RAIL_HEADER_INK, ); + let empty_label = "NO SOURCES"; + let empty_col = content_cols.saturating_sub(panels::text_cells(empty_label) as u32 + 1); + if empty_col > 16 { + Self::draw_ui_row( + r, + content, + row, + empty_col, + empty_label, + UI_META, + RAIL_DIM_INK, + ); + } if row.saturating_add(1) < footer_row { Self::draw_ui_row( r, @@ -2749,7 +2816,6 @@ impl App { Self::draw_evidence_divider(r, vp, row + 1, zet_gpu::renderer::PANEL_BORDER); } - #[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)] fn draw_agents_inspector( r: &mut Renderer, @@ -2778,15 +2844,10 @@ impl App { .unwrap_or(0); let layout = panels::agent_inspector_layout(vp.rows, count, list_offset); - Self::draw_ui_row(r, vp, 0, 4, "AGENT ACTIVITY", UI_HEADER, PANEL_TEXT); - Self::draw_ui_row(r, vp, 1, 2, "VIEW", UI_META, PANEL_MUTED); - Self::draw_ui_row(r, vp, 1, 8, "SESSION", UI_META, PANEL_MUTED); - Self::draw_ui_row(r, vp, 1, 16, "TIMELINE", UI_META, PANEL_MUTED); - Self::draw_ui_row(r, vp, 1, 25, "AGENTS", UI_META, PANEL_CYAN); Self::draw_ui_row( r, vp, - 2, + 3, 2, "CANDIDATE EVIDENCE, NOT VERIFIED STATE", UI_META, @@ -2794,18 +2855,18 @@ impl App { ); let (hint_col, hint) = panels::agent_shortcut_hint(vp.cols); if hint_col == 2 { - Self::draw_ui_row(r, vp, 3, hint_col, hint, UI_META, PANEL_MUTED); + Self::draw_ui_row(r, vp, 4, hint_col, hint, UI_META, PANEL_MUTED); } else { Self::draw_ui_row( r, vp, - 3, + 4, 2, "RECORDED COMMAND CANDIDATES", UI_META, PANEL_MUTED, ); - Self::draw_ui_row(r, vp, 3, hint_col, hint, UI_META, PANEL_MUTED); + Self::draw_ui_row(r, vp, 4, hint_col, hint, UI_META, PANEL_MUTED); } let snap = match agent_snapshot { @@ -3059,34 +3120,34 @@ impl App { let (cw, ch) = r.cell_px(); let origin_x = vp.x.saturating_mul(cw); let origin_y = vp.y.saturating_mul(ch); - if vp.rows > 2 { + if vp.rows > 3 { r.draw_fill( zet_gpu::renderer::Viewport { x: vp.x, - y: vp.y.saturating_add(2), + y: vp.y.saturating_add(3), cols: vp.cols, - rows: vp.rows.saturating_sub(2), + rows: vp.rows.saturating_sub(3), }, PANEL_BG, ); } if vp.rows > 4 { - Self::draw_ui_row(r, vp, 2, 2, "SOURCE", UI_META, PANEL_MUTED); + Self::draw_ui_row(r, vp, 3, 2, "SOURCE", UI_META, PANEL_MUTED); Self::draw_ui_row( r, vp, - 2, + 3, 12.min(vp.cols.saturating_sub(1)), "RECORDED BLOCKS", UI_BODY, PANEL_SECONDARY, ); - Self::draw_ui_row(r, vp, 3, 2, "ORDER", UI_META, PANEL_MUTED); + Self::draw_ui_row(r, vp, 4, 2, "ORDER", UI_META, PANEL_MUTED); Self::draw_ui_row( r, vp, - 3, + 4, 12.min(vp.cols.saturating_sub(1)), "DATABASE INSERTION", UI_BODY, @@ -3094,7 +3155,7 @@ impl App { ); } - let activity_header = 4u32; + let activity_header = 5u32; if activity_header < vp.rows { Self::draw_ui_row( r, @@ -3261,7 +3322,10 @@ impl App { vp, content.saturating_add(1), 2, - &format!("SESSION {}", command.session), + &panels::truncate_to_cells( + &format!("SESSION {}", command.session), + vp.cols.saturating_sub(3) as usize, + ), UI_META, PANEL_SECONDARY, ); @@ -3446,41 +3510,108 @@ impl App { ); r.draw_rect_px(origin_x, origin_y, 1, height_px, PANEL_BORDER_STRONG); - r.draw_aperture_mark_px( - origin_x.saturating_add(8), - origin_y.saturating_add(6), - ch.saturating_sub(8), - PANEL_CYAN, - ); - Self::draw_ui_row( - r, - vp, - 0, - 4, - if agents { - "AGENT ACTIVITY" - } else if timeline { - "OBSERVED WORK TIMELINE" - } else { - "CONTEXTUAL INSPECTOR" - }, + let (title, descriptor, descriptor_ink) = if agents { + ("AGENT ACTIVITY", "LAUNCH CANDIDATES ONLY", PANEL_AMBER) + } else if timeline { + ( + "OBSERVED WORK TIMELINE", + "CROSS-SESSION / OBSERVED", + PANEL_SECONDARY, + ) + } else { + ( + "CONTEXTUAL INSPECTOR", + "SESSION-SCOPED / OBSERVED", + PANEL_SECONDARY, + ) + }; + let header = panels::inspector_header_layout(vp.cols, ch, title, descriptor); + let mark_x = origin_x.saturating_add(header.mark_left_px); + let mark_y = origin_y.saturating_add(header.mark_top_px); + let mark_size = header.mark_size_px; + r.draw_aperture_mark_px(mark_x, mark_y, mark_size, PANEL_CYAN); + + let title_x = origin_x.saturating_add(header.title_left_px); + let title_baseline = origin_y as f32 + header.title_baseline_px; + let title_max_width = vp + .cols + .saturating_mul(cw) + .saturating_sub(header.title_left_px); + r.draw_ui_text_px( + title_x as f32, + title_baseline, + title, UI_HEADER, PANEL_TEXT, + Some(title_max_width), ); Self::draw_ui_row(r, vp, 1, 2, "VIEW", UI_META, PANEL_MUTED); + + r.draw_rect_px( + origin_x.saturating_add(cw.saturating_mul(2)), + origin_y.saturating_add(ch.saturating_mul(3).saturating_sub(2)), + vp.cols + .saturating_mul(cw) + .saturating_sub(cw.saturating_mul(4)), + 1, + PANEL_BORDER_STRONG, + ); + + let (tab_start, tab_end) = if agents { + (25u32, 33u32) + } else if timeline { + (16u32, 25u32) + } else { + (8u32, 16u32) + }; + let tab_end = tab_end.min(vp.cols); + let tab_x = origin_x + .saturating_add(tab_start.saturating_mul(cw)) + .saturating_add(2); + let tab_y = origin_y + .saturating_add(ch.saturating_mul(2)) + .saturating_add(2); + let tab_w = tab_end + .saturating_sub(tab_start) + .saturating_mul(cw) + .saturating_sub(4); + let tab_h = ch.saturating_sub(4); + if tab_w > 4 && tab_h > 4 { + r.draw_chamfered_panel_px( + tab_x, + tab_y, + tab_w, + tab_h, + 4, + PANEL_RAISED, + PANEL_BORDER_STRONG, + ); + r.draw_rect_px( + tab_x, + tab_y.saturating_add(tab_h.saturating_sub(2)), + tab_w, + 2, + PANEL_CYAN, + ); + } + Self::draw_ui_row( r, vp, - 1, + 2, 8, "SESSION", UI_META, - if timeline { PANEL_MUTED } else { PANEL_CYAN }, + if timeline || agents { + PANEL_MUTED + } else { + PANEL_CYAN + }, ); Self::draw_ui_row( r, vp, - 1, + 2, 16, "TIMELINE", UI_META, @@ -3489,53 +3620,22 @@ impl App { Self::draw_ui_row( r, vp, - 1, + 2, 25, "AGENTS", UI_META, if agents { PANEL_CYAN } else { PANEL_MUTED }, ); - let title = if agents { - "AGENT ACTIVITY" - } else if timeline { - "OBSERVED WORK TIMELINE" - } else { - "CONTEXTUAL INSPECTOR" - }; - let descriptor = if agents { - "LAUNCH CANDIDATES ONLY" - } else { - "OBSERVED / SESSION-SCOPED" - }; - if let Some(descriptor_col) = - panels::inspector_header_descriptor_col(vp.cols, title, descriptor) - { + + if let Some(descriptor_col) = header.descriptor_col { Self::draw_ui_row( r, vp, - 0, + 1, descriptor_col, descriptor, UI_META, - PANEL_SECONDARY, - ); - } - r.draw_rect_px( - origin_x.saturating_add(cw.saturating_mul(2)), - origin_y.saturating_add(ch.saturating_mul(1).saturating_sub(2)), - vp.cols - .saturating_mul(cw) - .saturating_sub(cw.saturating_mul(4)), - 1, - PANEL_BORDER_STRONG, - ); - if focused { - r.draw_rect_px( - origin_x.saturating_add(cw.saturating_mul(2)), - origin_y.saturating_add(ch.saturating_sub(2)), - cw.saturating_mul(5).min(vp.cols.saturating_mul(cw)), - 1, - PANEL_CYAN, + descriptor_ink, ); } @@ -3562,8 +3662,8 @@ impl App { Self::draw_instrument_surface( r, vp, - 2, - vp.rows.saturating_sub(3), + 3, + vp.rows.saturating_sub(4), PANEL_INSET, PANEL_BORDER, 7, @@ -3634,33 +3734,75 @@ impl App { // Session overview: real state only, kept separate from the command // ledger so the Inspector has a different job from the Mission Rail. if vp.rows > 5 { - Self::draw_instrument_surface(r, vp, 2, 4, PANEL_RAISED, PANEL_BORDER, 7); - Self::draw_ui_row(r, vp, 2, 2, "SESSION", UI_META, PANEL_MUTED); - Self::draw_ui_row( - r, - vp, + Self::draw_instrument_surface(r, vp, 3, 4, PANEL_RAISED, PANEL_BORDER_STRONG, 7); + r.draw_rect_px( + origin_x.saturating_add(8), + origin_y + .saturating_add(ch.saturating_mul(3)) + .saturating_add(8), 2, - 12.min(vp.cols.saturating_sub(1)), - &snapshot.session, - UI_BODY, - PANEL_TEXT, + ch.saturating_mul(4).saturating_sub(16), + PANEL_CYAN, ); - Self::draw_ui_row(r, vp, 3, 2, "STATE", UI_META, PANEL_MUTED); let state_ink = match snapshot.state.as_str() { "exited" => PANEL_RED, "running" => PANEL_TEAL, _ => PANEL_CYAN, }; + Self::draw_ui_row(r, vp, 3, 2, "SESSION", UI_META, PANEL_MUTED); Self::draw_ui_row( r, vp, 3, - 12.min(vp.cols.saturating_sub(1)), - &snapshot.state, + 10.min(vp.cols.saturating_sub(1)), + &format!("{:02}", snapshot.active.saturating_add(1)), UI_VALUE, - state_ink, + PANEL_TEXT, + ); + let state_label = snapshot.state.to_uppercase(); + let chip_style = UI_META; + let chip_text_w = r.measure_ui_text_px(&state_label, chip_style); + let chip_w = chip_text_w.saturating_add(18); + let chip_h = ch.saturating_sub(6); + let chip_x = origin_x + .saturating_add(vp.cols.saturating_mul(cw)) + .saturating_sub(chip_w) + .saturating_sub(8); + let chip_y = origin_y + .saturating_add(ch.saturating_mul(3)) + .saturating_add(3); + if chip_w > 18 && chip_h > 6 { + r.draw_chamfered_panel_px( + chip_x, + chip_y, + chip_w, + chip_h, + 4, + PANEL_INSET, + state_ink, + ); + r.draw_ui_text_px( + chip_x.saturating_add(8) as f32, + chip_y as f32 + + (chip_h.saturating_sub(chip_style.line_height_px as u32) as f32 * 0.5) + + chip_style.baseline_offset(), + &state_label, + chip_style, + state_ink, + Some(chip_w.saturating_sub(12)), + ); + } + Self::draw_ui_row(r, vp, 4, 2, "CWD", UI_META, PANEL_MUTED); + Self::draw_ui_row( + r, + vp, + 4, + 8.min(vp.cols.saturating_sub(1)), + &panels::truncate_left_to_cells(&snapshot.cwd, vp.cols.saturating_sub(9) as usize), + UI_BODY, + PANEL_SECONDARY, ); - Self::draw_ui_row(r, vp, 4, 2, "LAST EXIT", UI_META, PANEL_MUTED); + Self::draw_ui_row(r, vp, 5, 2, "LAST EXIT", UI_META, PANEL_MUTED); let exit_ink = if snapshot.exit == "0" { PANEL_TEAL } else if snapshot.exit == "—" { @@ -3671,22 +3813,19 @@ impl App { Self::draw_ui_row( r, vp, - 4, - 12.min(vp.cols.saturating_sub(1)), + 5, + 13.min(vp.cols.saturating_sub(1)), &snapshot.exit, UI_VALUE, exit_ink, ); - Self::draw_ui_row(r, vp, 5, 2, "CWD", UI_META, PANEL_MUTED); - Self::draw_ui_row( - r, - vp, - 5, - 12.min(vp.cols.saturating_sub(1)), - &panels::truncate_to_cells(&snapshot.cwd, vp.cols.saturating_sub(13) as usize), - UI_BODY, - PANEL_SECONDARY, - ); + let observed = format!("{} OBSERVED", snapshot.commands.len()); + let observed_col = vp + .cols + .saturating_sub(panels::text_cells(&observed) as u32 + 2); + if observed_col > 16 { + Self::draw_ui_row(r, vp, 5, observed_col, &observed, UI_META, PANEL_MUTED); + } } let detail_start = panels::inspector_detail_start(displayed_commands.len()); @@ -3790,21 +3929,11 @@ impl App { UI_META, if selected { PANEL_CYAN } else { PANEL_MUTED }, ); - let session_compact = panels::truncate_to_cells(&command.session, 4); - Self::draw_ui_row( - r, - vp, - row, - 4, - &session_compact, - UI_META, - if selected { PANEL_CYAN } else { PANEL_MUTED }, - ); Self::draw_command_summary_row( r, vp, row, - 8, + 5, 2, command, if selected { @@ -3871,24 +4000,46 @@ impl App { } let Some(command) = selected else { if card_rows > 2 { - Self::draw_ui_row( - r, - vp, - card_row + 1, + r.draw_rect_px( + origin_x.saturating_add(10), + origin_y + .saturating_add(card_row.saturating_add(1).saturating_mul(ch)) + .saturating_add(4), 2, - "SELECT A RECORDED COMMAND", - UI_COMMAND, - PANEL_SECONDARY, + ch.saturating_mul(card_rows.saturating_sub(1)) + .saturating_sub(8), + PANEL_VIOLET, ); Self::draw_ui_row( r, vp, - card_row + 3, - 2, - "Evidence will appear here.", - UI_BODY, - PANEL_MUTED, + card_row + 1, + 3, + if displayed_commands.is_empty() { + "NO OBSERVED EVIDENCE" + } else { + "SELECT A RECORDED COMMAND" + }, + UI_COMMAND, + PANEL_TEXT, ); + let (line1, line2) = if displayed_commands.is_empty() { + ( + "Run a command in this session.", + "Recorded output will appear here.", + ) + } else { + ( + "Choose an observed row above.", + "Result and output appear here.", + ) + }; + if card_row + 3 < vp.rows { + Self::draw_ui_row(r, vp, card_row + 3, 3, line1, UI_BODY, PANEL_SECONDARY); + } + if card_row + 4 < vp.rows { + Self::draw_ui_row(r, vp, card_row + 4, 3, line2, UI_BODY, PANEL_MUTED); + } } return; }; @@ -3900,7 +4051,7 @@ impl App { vp, card_row + 1, 4, - &panels::truncate_to_cells(&command.command, vp.cols.saturating_sub(10) as usize), + &panels::truncate_to_cells(&command.command, vp.cols.saturating_sub(4) as usize), UI_COMMAND, PANEL_TEXT, ); @@ -4013,7 +4164,7 @@ impl App { vp, context_session, 10, - &command.session, + &panels::truncate_to_cells(&command.session, vp.cols.saturating_sub(11) as usize), UI_BODY, PANEL_SECONDARY, ); @@ -4148,7 +4299,7 @@ impl App { ) -> (u32, u32, u32) { let mark_size = ch.saturating_mul(2).saturating_sub(8).max(18); let brand_x = 18u32.saturating_add(mark_size).saturating_add(14); - let descriptor_x = brand_x.saturating_add(brand_width).saturating_add(14); + let descriptor_x = brand_x.saturating_add(brand_width).saturating_add(30); let mode_x = width_px.saturating_sub(mode_width).saturating_sub(18); let descriptor_max_width = mode_x.saturating_sub(descriptor_x).saturating_sub(18); (descriptor_x, descriptor_max_width, mode_x) @@ -4158,13 +4309,7 @@ impl App { /// than a one-row terminal banner: the identity, descriptor, datum seam, /// and tab surface share a precise architectural frame while the live /// terminal begins below it on an untouched cell grid. - fn draw_app_chrome( - r: &mut Renderer, - cols: u32, - rail_cols: u32, - bar_rows: usize, - layout: layout::Layout, - ) { + fn draw_app_chrome(r: &mut Renderer, cols: u32, rail_cols: u32, bar_rows: usize, mode: &str) { if cols == 0 || bar_rows == 0 { return; } @@ -4209,14 +4354,7 @@ impl App { let mark_size = ch.saturating_mul(2).saturating_sub(8).max(18); r.draw_aperture_crystal_mark_px(18, 8, mark_size, mark_size); let brand_x = 18u32.saturating_add(mark_size).saturating_add(14); - let mode = if layout.inspector { - "EVIDENCE VIEW" - } else { - "WORKSPACE" - }; - let mode_width = (mode.chars().count() as u32) - .saturating_mul(8) - .saturating_add(22); + let mode_width = r.measure_ui_text_px(mode, UI_META).saturating_add(22); let mode_x = width_px.saturating_sub(mode_width).saturating_sub(18); let brand_width = r.draw_ui_text_px( @@ -5582,7 +5720,14 @@ impl ApplicationHandler for App { } } if bar > 0 { - Self::draw_app_chrome(r, cols as u32, rail_cols as u32, bar, self.layout); + let chrome_mode = if inspector_cols > 0 { + "MISSION CONTROL" + } else if rail_cols > 0 { + "WORKSPACE" + } else { + "TERMINAL FOCUS" + }; + Self::draw_app_chrome(r, cols as u32, rail_cols as u32, bar, chrome_mode); r.draw_tabbar_surface_at(active, labels.len(), cols, rail_cols, bar - 1); Self::draw_ui_tabbar(r, &labels, active, cols, rail_cols, bar - 1); } @@ -8807,7 +8952,7 @@ mod p4a3_r3_acceptance { (29usize, "AGENTS"), ] { let x = (vp.x as f64 + col_range as f64) * cw as f64 + 5.0; - let y = top + 1.5 * ch as f64; + let y = top + 2.5 * ch as f64; app.handle_mouse_click(x, y, cw, ch); assert!( !app.agent_evidence_open && app.agent_evidence.is_none(), @@ -9506,4 +9651,46 @@ mod p4a3_r3_acceptance { Some(panels::AgentEvidenceRowKind::Footer) ); } + + #[test] + fn inspector_header_title_has_positive_top_padding() { + use zet_gpu::presentation::UI_HEADER; + use zet_gpu::text::Shaper; + + let mut shaper = Shaper::new(16.0); + let (_cw, ch) = shaper.cell_px(); + let layout = panels::inspector_header_layout( + 80, + ch, + "OBSERVED WORK TIMELINE", + "CROSS-SESSION / OBSERVED", + ); + + let mut top = i32::MAX; + let mut bottom = i32::MIN; + for c in "OBSERVED WORK TIMELINE".chars() { + let glyph = shaper.rasterize_ui_glyph( + c, + UI_HEADER.size_px, + UI_HEADER.line_height_px, + UI_HEADER.weight, + UI_HEADER.family, + ); + let glyph_top = (layout.title_baseline_px + glyph.offset_y as f32).round() as i32; + let glyph_bottom = glyph_top + glyph.height as i32; + top = top.min(glyph_top); + bottom = bottom.max(glyph_bottom); + } + + assert!(top >= 5, "title top padding must be positive: {top}"); + assert!( + bottom <= ch as i32, + "title must not overflow its row: {bottom} > {ch}" + ); + assert!( + layout.mark_left_px as i32 + layout.mark_size_px as i32 + 12 + <= layout.title_left_px as i32, + "mark and title must stay separated" + ); + } } diff --git a/crates/zet/src/window/panels.rs b/crates/zet/src/window/panels.rs index ea24c51..ce8503b 100644 --- a/crates/zet/src/window/panels.rs +++ b/crates/zet/src/window/panels.rs @@ -539,6 +539,21 @@ pub const SESSION_GAP_ROWS: usize = 1; /// Keeping this in the pure layout model makes drawing and hit-testing agree. pub const COMMAND_CARD_ROWS: usize = 2; +/// Column for the exit label and, when it can sit clear of the exit, the +/// right-aligned duration in a rail command detail row. +pub const RAIL_EXIT_COL: u32 = 5; + +pub fn rail_command_detail_columns(cols: u32, exit: &str, duration: &str) -> (u32, Option) { + let exit_text = format!("exit {}", single_line(exit)); + let exit_end = RAIL_EXIT_COL + .saturating_add(text_cells(&exit_text) as u32) + .saturating_add(1); + let duration_cells = text_cells(&single_line(duration)) as u32; + let duration_col = cols.saturating_sub(duration_cells.saturating_add(1)); + let duration_col = (duration_cells > 0 && duration_col > exit_end).then_some(duration_col); + (RAIL_EXIT_COL, duration_col) +} + /// Deterministic rail row layout shared by rendering and hit testing. /// /// Expanded rails get a brand row, a mode row, a spacer, the sessions @@ -648,7 +663,10 @@ pub fn rail_row_layout( #[cfg(test)] mod rail_row_tests { - use super::{rail_command_at_row, rail_rows, rail_session_at_row, RailRow, COMMAND_CARD_ROWS}; + use super::{ + rail_command_at_row, rail_command_detail_columns, rail_rows, rail_session_at_row, + text_cells, RailRow, COMMAND_CARD_ROWS, RAIL_EXIT_COL, + }; #[test] fn one_session_has_two_rows_and_footer_last() { @@ -815,18 +833,36 @@ mod rail_row_tests { assert_eq!(rail_session_at_row(rows.saturating_sub(1), 3, rows), None); } } + + #[test] + fn command_detail_columns_never_overlap_and_keep_duration_when_readable() { + let (exit_col, duration_col) = rail_command_detail_columns(22, "0", "7ms"); + assert_eq!(exit_col, RAIL_EXIT_COL); + let duration_col = duration_col.expect("duration fits"); + let exit_end = exit_col + text_cells("exit 0") as u32; + assert!(duration_col > exit_end); + assert!(duration_col + text_cells("7ms") as u32 <= 22); + + let (_, duration_col) = rail_command_detail_columns(12, "255", "123456789ms"); + assert_eq!( + duration_col, None, + "crowded detail must drop metadata, not overlap" + ); + let (_, duration_col) = rail_command_detail_columns(22, "0", ""); + assert_eq!(duration_col, None); + } } #[cfg(test)] mod inspector_layout_tests { use super::{ inspector_command_position, inspector_command_row, inspector_detail_start, - inspector_header_descriptor_col, inspector_selection_at_row, + inspector_header_descriptor_col, inspector_header_layout, inspector_selection_at_row, inspector_selection_for_command, inspector_session_command_at_row, inspector_visible_commands, text_cells, timeline_display_rows, timeline_empty_row, timeline_layout, timeline_preview_heading, timeline_row_layout, timeline_session_badges, CommandRow, InspectorView, Provenance, TimelineAvailability, INSPECTOR_ACTIVITY_START, - TIMELINE_BADGE_COL, TIMELINE_COMMAND_COL, TIMELINE_INDEX_COL, + INSPECTOR_HEADER_RIGHT_INSET, TIMELINE_BADGE_COL, TIMELINE_COMMAND_COL, TIMELINE_INDEX_COL, }; fn command(id: i64, session: &str, text: &str, exit: &str, duration: &str) -> CommandRow { @@ -1077,6 +1113,70 @@ mod inspector_layout_tests { ); } + #[test] + fn refined_inspector_descriptors_stay_clear_at_supported_widths() { + let views = [ + ("CONTEXTUAL INSPECTOR", "SESSION-SCOPED / OBSERVED"), + ("OBSERVED WORK TIMELINE", "CROSS-SESSION / OBSERVED"), + ("AGENT ACTIVITY", "LAUNCH CANDIDATES ONLY"), + ]; + for (title, descriptor) in views { + assert_eq!( + inspector_header_descriptor_col(32, title, descriptor), + None, + "32-col Inspector must keep the title and descriptor clear: {title}" + ); + let col = inspector_header_descriptor_col(80, title, descriptor) + .unwrap_or_else(|| panic!("descriptor should fit at 80 cols: {title}")); + assert!(col > 4 + text_cells(title) as u32); + assert!(col + text_cells(descriptor) as u32 <= 78); + } + } + + #[test] + fn inspector_header_layout_has_positive_padding_and_clearance() { + for ch in [20u32, 22, 24, 32] { + let layout = inspector_header_layout( + 80, + ch, + "OBSERVED WORK TIMELINE", + "CROSS-SESSION / OBSERVED", + ); + assert!(layout.mark_left_px > 0, "left padding must be positive"); + assert!(layout.mark_top_px > 0, "top padding must be positive"); + assert!( + layout.title_left_px > layout.mark_left_px + layout.mark_size_px, + "title must clear mark" + ); + assert!( + layout.title_baseline_px > layout.mark_top_px as f32, + "title must be optically centered below top padding" + ); + assert!( + layout.separator_px > layout.tab_top_px, + "separator must sit below tab row" + ); + assert!(layout.tab_height_px > 4, "tabs must retain usable height"); + } + } + + #[test] + fn inspector_header_descriptor_has_right_breathing_room() { + let descriptor = "LAUNCH CANDIDATES ONLY"; + let col = inspector_header_descriptor_col(80, "AGENT ACTIVITY", descriptor).unwrap(); + assert!( + col + text_cells(descriptor) as u32 + INSPECTOR_HEADER_RIGHT_INSET <= 80, + "descriptor must keep the configured right-side inset" + ); + } + + #[test] + fn inspector_header_layout_narrow_width_drops_descriptor() { + let layout = + inspector_header_layout(32, 22, "OBSERVED WORK TIMELINE", "CROSS-SESSION / OBSERVED"); + assert_eq!(layout.descriptor_col, None); + } + #[test] fn header_descriptor_and_preview_hints_never_overlap_at_32_columns() { let title = "OBSERVED WORK TIMELINE"; @@ -1527,6 +1627,9 @@ pub const TIMELINE_INDEX_COL: u32 = 2; pub const TIMELINE_BADGE_COL: u32 = 6; pub const TIMELINE_COMMAND_COL: u32 = 9; pub const TIMELINE_RIGHT_INSET: u32 = 2; +/// Extra right-side breathing room for the Contextual Inspector header's +/// contextual descriptor, so it does not sit in the panel's edge area. +pub const INSPECTOR_HEADER_RIGHT_INSET: u32 = 4; pub const TIMELINE_MIN_COMMAND_CELLS: usize = 16; pub const TIMELINE_METADATA_MIN_COLS: u32 = 40; @@ -1775,10 +1878,61 @@ pub fn inspector_header_descriptor_col(cols: u32, title: &str, descriptor: &str) if descriptor_cells == 0 { return None; } - let col = cols - .saturating_sub(TIMELINE_RIGHT_INSET) - .saturating_sub(descriptor_cells); - (col > title_end).then_some(col) + // Prefer the roomier F2 inset, but fall back to the older, tighter + // insets when the viewport cannot otherwise keep the descriptor clear + // of the title. This restores the provisional-state label on widths + // where the larger inset would force it to disappear, while still + // avoiding the F1 overlap. + for inset in [INSPECTOR_HEADER_RIGHT_INSET, 3, 2, 1] { + let col = cols.saturating_sub(inset).saturating_sub(descriptor_cells); + if col > title_end { + return Some(col); + } + } + None +} + +/// Shared geometry for the Contextual Inspector's two-row header. +/// +/// The helper keeps the header inside the existing two-row footprint while +/// giving the Aperture mark, title, descriptor, and tab row intentional +/// padding. Pixel values are relative to the inspector viewport origin. +#[derive(Debug, Clone, Copy, PartialEq)] +pub struct InspectorHeaderLayout { + pub mark_left_px: u32, + pub mark_top_px: u32, + pub mark_size_px: u32, + pub title_left_px: u32, + pub title_baseline_px: f32, + pub descriptor_col: Option, + pub separator_px: u32, + pub tab_top_px: u32, + pub tab_height_px: u32, +} + +pub fn inspector_header_layout( + cols: u32, + ch: u32, + title: &str, + descriptor: &str, +) -> InspectorHeaderLayout { + let mark_size_px = ch.saturating_sub(8).max(12); + let mark_left_px = 12; + let mark_top_px = 5; + let title_left_px = mark_left_px + mark_size_px + 12; + let title_baseline_px = 17.5; + let descriptor_col = inspector_header_descriptor_col(cols, title, descriptor); + InspectorHeaderLayout { + mark_left_px, + mark_top_px, + mark_size_px, + title_left_px, + title_baseline_px, + descriptor_col, + separator_px: ch.saturating_mul(3).saturating_sub(2), + tab_top_px: ch.saturating_mul(2).saturating_add(2), + tab_height_px: ch.saturating_sub(4), + } } /// Preview heading plus a truthful Enter affordance when it fits. diff --git a/docs/design/P2C1-COMMAND-CENTER-REFINEMENT.md b/docs/design/P2C1-COMMAND-CENTER-REFINEMENT.md new file mode 100644 index 0000000..01c193c --- /dev/null +++ b/docs/design/P2C1-COMMAND-CENTER-REFINEMENT.md @@ -0,0 +1,88 @@ +# P2-C1 — Command Center Refinement + +**Status:** implementation slice for owner visual acceptance +**Scope:** native chrome, Mission Rail, Living Terminal framing, Contextual Inspector +**Authority:** P2-C1 brief; P2-B identity remains unchanged + +## Intent + +Bring the rest of ZET to the finish level of the approved signature identity. +The interface should read as one Aperture instrument: indexed navigation, +dominant living terminal, and an evidence inspector with explicit hierarchy. +The work is presentation-only. It does not add telemetry, orchestration, +approval semantics, PTY behavior, or new data sources. + +## Typography scale + +`zet_gpu::presentation` remains the single native type system. P2-C1 raises the +chrome scale while keeping terminal cells authoritative: + +| Role | Size | Use | +|---|---|---| +| `UI_BRAND` | 28 | ZET identity deck | +| `UI_HEADER` | 16.5 | tab identity, panel titles | +| `UI_SECTION` | 15 | indexed section headings | +| `UI_SESSION` | 16.5 | session names | +| `UI_COMMAND` | 17 | selected command / focal evidence | +| `UI_VALUE` | 16 | observed exit, duration, state | +| `UI_BODY` | 15.5 | commands, paths, body copy | +| `UI_OUTPUT` | 14.5 | recorded output well | +| `UI_META` | 12.5 | labels, counts, provenance | + +## Mission Rail + +- Indexed `01 WORKSPACE`, `02 SESSIONS`, `03 COMMAND LEDGER`, `04 RESOURCES` + headings use cyan indices, near-white titles, and a quiet datum line. +- Session cards separate index, name, state, and path. Active sessions keep the + cyan live dot and seam; a selected session uses the violet contextual seam + and border while the rail itself retains the cyan keyboard-focus outline. +- Command cards add a stable two-digit index, aligned command text, semantic + exit/duration fields, and a right-aligned duration. Failure rows keep the red + marker and red exit label. +- Resources report only `NO SOURCES` when no source exists; narrow rails omit + the label rather than colliding with the section rule. +- Empty selection is explicit in the Inspector; no placeholder evidence is + fabricated. + +## Contextual Inspector + +- Header keeps `CONTEXTUAL INSPECTOR` / `AGENT ACTIVITY` / `OBSERVED WORK + TIMELINE`, with a real segmented view control and a cyan active seam. +- The session band presents `SESSION 01`, a real state chip, CWD, last exit, + and observed-command count. Unknown values remain `—`. +- Evidence index rows keep the stable selection/hit-test contract; Session + view spends its width on the command instead of repeating the active session + id. +- Selected command card keeps the P3-A1/P4-A2/P4-A3 contracts: observed result, + execution context, bounded recorded output, and provenance footer. +- Agents view states `CANDIDATE EVIDENCE, NOT VERIFIED STATE` and never upgrades + a launch candidate into a verified execution. + +## Terminal framing + +- The Living Terminal remains the largest surface and the only PTY grid. +- Active tab gets a cyan datum under its segment; inactive tabs remain quiet. +- The mode chip is derived from the **effective** layout: + `MISSION CONTROL` (rail + Inspector), `WORKSPACE` (rail only), + `EVIDENCE VIEW` (Inspector only), `TERMINAL FOCUS` (neither). +- Focus colors are preserved: cyan for rail/Inspector keyboard focus, violet + for the terminal boundary. + +## Responsive behavior + +- 1920×1080: full three-column Mission Control. +- 1440×900: full three-column Mission Control with compact command budgets. +- 1024×768: Inspector refused by the existing layout resolver; chrome reports + `WORKSPACE` truthfully, rail and terminal remain usable. +- Narrow windows: Inspector/rail collapse before the terminal falls below the + existing minimum width. +- The wordmark and welcome dismissal behavior from P2-B are untouched. + +## Evidence + +Native captures live in `docs/evidence/p2c1-command-center/`. They include +before/after pairs for the workspace, rail focus, Inspector selection, Agents, +narrow layout, 1440×900, and OpenCode full-screen. Captures were taken from the +real native app in a nested Hyprland Wayland compositor with a headless +1920×1080 output because the host session was locked; no mockups or synthetic +terminals were used. diff --git a/docs/evidence/p2c1-command-center/01-before-workspace-1920.png b/docs/evidence/p2c1-command-center/01-before-workspace-1920.png new file mode 100644 index 0000000..83306a6 Binary files /dev/null and b/docs/evidence/p2c1-command-center/01-before-workspace-1920.png differ diff --git a/docs/evidence/p2c1-command-center/02-before-rail-focus.png b/docs/evidence/p2c1-command-center/02-before-rail-focus.png new file mode 100644 index 0000000..63376a7 Binary files /dev/null and b/docs/evidence/p2c1-command-center/02-before-rail-focus.png differ diff --git a/docs/evidence/p2c1-command-center/03-before-inspector-focus.png b/docs/evidence/p2c1-command-center/03-before-inspector-focus.png new file mode 100644 index 0000000..4867be2 Binary files /dev/null and b/docs/evidence/p2c1-command-center/03-before-inspector-focus.png differ diff --git a/docs/evidence/p2c1-command-center/04-before-agents.png b/docs/evidence/p2c1-command-center/04-before-agents.png new file mode 100644 index 0000000..3ed4672 Binary files /dev/null and b/docs/evidence/p2c1-command-center/04-before-agents.png differ diff --git a/docs/evidence/p2c1-command-center/05-before-empty.png b/docs/evidence/p2c1-command-center/05-before-empty.png new file mode 100644 index 0000000..784cd36 Binary files /dev/null and b/docs/evidence/p2c1-command-center/05-before-empty.png differ diff --git a/docs/evidence/p2c1-command-center/06-before-terminal.png b/docs/evidence/p2c1-command-center/06-before-terminal.png new file mode 100644 index 0000000..11bd9cd Binary files /dev/null and b/docs/evidence/p2c1-command-center/06-before-terminal.png differ diff --git a/docs/evidence/p2c1-command-center/07-before-1440.png b/docs/evidence/p2c1-command-center/07-before-1440.png new file mode 100644 index 0000000..744d215 Binary files /dev/null and b/docs/evidence/p2c1-command-center/07-before-1440.png differ diff --git a/docs/evidence/p2c1-command-center/08-before-1024.png b/docs/evidence/p2c1-command-center/08-before-1024.png new file mode 100644 index 0000000..c51fcff Binary files /dev/null and b/docs/evidence/p2c1-command-center/08-before-1024.png differ diff --git a/docs/evidence/p2c1-command-center/09-before-tui.png b/docs/evidence/p2c1-command-center/09-before-tui.png new file mode 100644 index 0000000..19d1c2d Binary files /dev/null and b/docs/evidence/p2c1-command-center/09-before-tui.png differ diff --git a/docs/evidence/p2c1-command-center/10-after-welcome.png b/docs/evidence/p2c1-command-center/10-after-welcome.png new file mode 100644 index 0000000..8066656 Binary files /dev/null and b/docs/evidence/p2c1-command-center/10-after-welcome.png differ diff --git a/docs/evidence/p2c1-command-center/11-after-workspace-1920.png b/docs/evidence/p2c1-command-center/11-after-workspace-1920.png new file mode 100644 index 0000000..7a61942 Binary files /dev/null and b/docs/evidence/p2c1-command-center/11-after-workspace-1920.png differ diff --git a/docs/evidence/p2c1-command-center/12-after-rail-focus.png b/docs/evidence/p2c1-command-center/12-after-rail-focus.png new file mode 100644 index 0000000..1d73e97 Binary files /dev/null and b/docs/evidence/p2c1-command-center/12-after-rail-focus.png differ diff --git a/docs/evidence/p2c1-command-center/13-after-inspector-focus.png b/docs/evidence/p2c1-command-center/13-after-inspector-focus.png new file mode 100644 index 0000000..d925d34 Binary files /dev/null and b/docs/evidence/p2c1-command-center/13-after-inspector-focus.png differ diff --git a/docs/evidence/p2c1-command-center/14-after-agents.png b/docs/evidence/p2c1-command-center/14-after-agents.png new file mode 100644 index 0000000..7720d20 Binary files /dev/null and b/docs/evidence/p2c1-command-center/14-after-agents.png differ diff --git a/docs/evidence/p2c1-command-center/15-after-timeline.png b/docs/evidence/p2c1-command-center/15-after-timeline.png new file mode 100644 index 0000000..67f33a5 Binary files /dev/null and b/docs/evidence/p2c1-command-center/15-after-timeline.png differ diff --git a/docs/evidence/p2c1-command-center/16-after-empty.png b/docs/evidence/p2c1-command-center/16-after-empty.png new file mode 100644 index 0000000..da079bf Binary files /dev/null and b/docs/evidence/p2c1-command-center/16-after-empty.png differ diff --git a/docs/evidence/p2c1-command-center/17-after-terminal.png b/docs/evidence/p2c1-command-center/17-after-terminal.png new file mode 100644 index 0000000..32bc3c0 Binary files /dev/null and b/docs/evidence/p2c1-command-center/17-after-terminal.png differ diff --git a/docs/evidence/p2c1-command-center/18-after-1440.png b/docs/evidence/p2c1-command-center/18-after-1440.png new file mode 100644 index 0000000..7b7437e Binary files /dev/null and b/docs/evidence/p2c1-command-center/18-after-1440.png differ diff --git a/docs/evidence/p2c1-command-center/19-after-1024.png b/docs/evidence/p2c1-command-center/19-after-1024.png new file mode 100644 index 0000000..f49ea43 Binary files /dev/null and b/docs/evidence/p2c1-command-center/19-after-1024.png differ diff --git a/docs/evidence/p2c1-command-center/20-after-tui.png b/docs/evidence/p2c1-command-center/20-after-tui.png new file mode 100644 index 0000000..348706b Binary files /dev/null and b/docs/evidence/p2c1-command-center/20-after-tui.png differ diff --git a/docs/evidence/p2c1-command-center/21-compare-workspace.png b/docs/evidence/p2c1-command-center/21-compare-workspace.png new file mode 100644 index 0000000..607fff4 Binary files /dev/null and b/docs/evidence/p2c1-command-center/21-compare-workspace.png differ diff --git a/docs/evidence/p2c1-command-center/22-compare-inspector.png b/docs/evidence/p2c1-command-center/22-compare-inspector.png new file mode 100644 index 0000000..2a40da8 Binary files /dev/null and b/docs/evidence/p2c1-command-center/22-compare-inspector.png differ diff --git a/docs/evidence/p2c1-command-center/23-compare-agents.png b/docs/evidence/p2c1-command-center/23-compare-agents.png new file mode 100644 index 0000000..4a17efb Binary files /dev/null and b/docs/evidence/p2c1-command-center/23-compare-agents.png differ diff --git a/docs/evidence/p2c1-command-center/24-compare-narrow.png b/docs/evidence/p2c1-command-center/24-compare-narrow.png new file mode 100644 index 0000000..4ce80c2 Binary files /dev/null and b/docs/evidence/p2c1-command-center/24-compare-narrow.png differ diff --git a/docs/evidence/p2c1-command-center/25-compare-1440.png b/docs/evidence/p2c1-command-center/25-compare-1440.png new file mode 100644 index 0000000..2fd92a2 Binary files /dev/null and b/docs/evidence/p2c1-command-center/25-compare-1440.png differ diff --git a/docs/evidence/p2c1-command-center/26-compare-tui.png b/docs/evidence/p2c1-command-center/26-compare-tui.png new file mode 100644 index 0000000..e6b3b46 Binary files /dev/null and b/docs/evidence/p2c1-command-center/26-compare-tui.png differ diff --git a/docs/evidence/p2c1-command-center/README.md b/docs/evidence/p2c1-command-center/README.md new file mode 100644 index 0000000..4e0f80a --- /dev/null +++ b/docs/evidence/p2c1-command-center/README.md @@ -0,0 +1,58 @@ +# P2-C1 — native before/after evidence + +These are real native captures of the ZET application running as a Wayland +client in Hyprland 0.56.2. The host session was locked, so the captures were +taken from a nested Hyprland session with a 1920×1080 headless output. The +application, compositor, GPU rendering path, PTY, recorder, and fonts are real; +no mockups, synthetic terminals, or composited fake output were used. + +Before captures use the approved baseline binary at +`a60507090ddf24517291f00249575252a1b5d790`. After captures use the P2-C1 +feature head recorded in the PR/report. The command sequences are genuine +shell commands run in the captured session; exact timings and session ids +differ between before/after runs because each run is a fresh real session. + +## Matching pairs + +| Pair | Viewport | Before | After | +|---|---|---|---| +| Workspace / Mission Control | 1920×1080 | `01-before-workspace-1920.png` | `11-after-workspace-1920.png` | +| Rail focused + selected command | 1920×1080 | `02-before-rail-focus.png` | `12-after-rail-focus.png` | +| Inspector focused + selected command/output | 1920×1080 | `03-before-inspector-focus.png` | `13-after-inspector-focus.png` | +| Agents / candidate evidence | 1920×1080 | `04-before-agents.png` | `14-after-agents.png` | +| Empty selection | 1920×1080 | `05-before-empty.png` | `16-after-empty.png` | +| Terminal focused | 1920×1080 | `06-before-terminal.png` | `17-after-terminal.png` | +| Standard desktop | 1440×900 | `07-before-1440.png` | `18-after-1440.png` | +| Narrow layout | 1024×768 | `08-before-1024.png` | `19-after-1024.png` | +| OpenCode full-screen | 1920×1080 | `09-before-tui.png` | `20-after-tui.png` | + +Additional after-only state: + +- `10-after-welcome.png` — approved P2-B identity, unchanged by P2-C1. +- `15-after-timeline.png` — cross-session observed work timeline. + +## Comparison sheets + +- `21-compare-workspace.png` — before left, after right. +- `22-compare-inspector.png` — selected-command evidence hierarchy. +- `23-compare-agents.png` — grounded candidate evidence. +- `24-compare-narrow.png` — 1024×768 responsive behavior. +- `25-compare-1440.png` — 1440×900 composition. +- `26-compare-tui.png` — OpenCode compatibility. + +## What the after state demonstrates + +- Larger, consistent native type hierarchy without changing PTY geometry. +- Active session (cyan live marker) versus selected session (violet contextual + seam) versus rail keyboard focus (cyan outline). +- Command indices, aligned command text, semantic exit/duration metadata, and + failure markers. +- Inspector session band with real state chip, CWD, last exit, and observed + count; no invented values. +- Session-scoped evidence index that uses its width for commands instead of + repeating the active session id. +- Selected command card with observed result, execution context, bounded output + well, and provenance footer. +- Truthful effective mode label (`MISSION CONTROL`, `WORKSPACE`, + `EVIDENCE VIEW`, `TERMINAL FOCUS`). +- OpenCode full-screen remains unobstructed.