From 5abe59f94afcc5cdddab2c07c240c271a8299eac Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Thu, 25 Jun 2026 22:13:45 +0200 Subject: [PATCH] chore(fmt): fix colibri-glasspane-tui test fmt drift from #195 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cargo fmt --all --check failed on main with 5 drift sites in crates/colibri-glasspane-tui/src/main.rs — all inside the tests added by #195, which hand-packed Pane struct literals as `id: .., agent: .., state: ..,` on a single line. rustfmt wants one field per line. Pure formatting: 91 insertions / 38 deletions, no logic change (only structural additions are field continuations and one assert!(...) arg wrap). Unblocks the fmt half of the workspace gate; second merged PR in a row (#193, #195) to land fmt-red — worth tightening the CI fmt check as a required gate. Verified: fmt clean workspace-wide, clippy -D warnings clean, 18/18 tests pass. (Sam & Claude) --- crates/colibri-glasspane-tui/src/main.rs | 129 ++++++++++++++++------- 1 file changed, 91 insertions(+), 38 deletions(-) diff --git a/crates/colibri-glasspane-tui/src/main.rs b/crates/colibri-glasspane-tui/src/main.rs index 87ddb77..bc5b8ec 100644 --- a/crates/colibri-glasspane-tui/src/main.rs +++ b/crates/colibri-glasspane-tui/src/main.rs @@ -1175,29 +1175,49 @@ mod tests { "2026-06-25T12:00:00Z", vec![ colibri_glasspane::Pane { - id: "pane-0".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-0".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-1".into(), agent: "zot".into(), - state: AgentState::Error, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-1".into(), + agent: "zot".into(), + state: AgentState::Error, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-2".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-2".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-3".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: true, + id: "pane-3".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: true, }, colibri_glasspane::Pane { - id: "pane-4".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-4".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, ], ); @@ -1226,29 +1246,49 @@ mod tests { "2026-06-25T12:00:00Z", vec![ colibri_glasspane::Pane { - id: "pane-0".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-0".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-1".into(), agent: "zot".into(), - state: AgentState::Error, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-1".into(), + agent: "zot".into(), + state: AgentState::Error, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-2".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-2".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-3".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: true, + id: "pane-3".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: true, }, colibri_glasspane::Pane { - id: "pane-4".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-4".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }, ], ); @@ -1279,16 +1319,22 @@ mod tests { "2026-06-25T12:00:00Z", vec![ colibri_glasspane::Pane { - id: "pane-s1-ok".into(), agent: "zot".into(), + id: "pane-s1-ok".into(), + agent: "zot".into(), state: AgentState::Working, session_id: Some("s1".into()), - last_event_at: None, cwd: None, stalled: false, + last_event_at: None, + cwd: None, + stalled: false, }, colibri_glasspane::Pane { - id: "pane-s2-err".into(), agent: "zot".into(), + id: "pane-s2-err".into(), + agent: "zot".into(), state: AgentState::Error, session_id: Some("s2".into()), - last_event_at: None, cwd: None, stalled: false, + last_event_at: None, + cwd: None, + stalled: false, }, ], ); @@ -1319,9 +1365,13 @@ mod tests { "osa", "2026-06-25T12:00:00Z", vec![colibri_glasspane::Pane { - id: "pane-ok".into(), agent: "zot".into(), - state: AgentState::Working, session_id: None, - last_event_at: None, cwd: None, stalled: false, + id: "pane-ok".into(), + agent: "zot".into(), + state: AgentState::Working, + session_id: None, + last_event_at: None, + cwd: None, + stalled: false, }], ); let mut app = App::new(PathBuf::from("/tmp/nonexistent.sock")); @@ -1334,6 +1384,9 @@ mod tests { // Status message should be set. assert!(app.status_msg.is_some()); let msg = &app.status_msg.as_ref().unwrap().0; - assert!(msg.contains("no attention"), "expected 'no attention' in: {msg}"); + assert!( + msg.contains("no attention"), + "expected 'no attention' in: {msg}" + ); } } -- 2.45.3