Skip to content

Craft Anything: understand how any software works, and craft your own.

Rust

Keep the Advanced console's status clear of its tabs when narrow (#984)

Justin John4041784fcb39
diff --git a/crates/ui-egui/src/workbench.rs b/crates/ui-egui/src/workbench.rs
index b6162b1f..2a4d7c14 100644
--- a/crates/ui-egui/src/workbench.rs
+++ b/crates/ui-egui/src/workbench.rs
@@ -883,8 +883,10 @@ fn status_line(app: &CraftApp, ui: &mut Ui) {
let t = Tokens::get(ui.ctx());
let n = app.jobs.running().filter(|j| j.visible).count();
let text = if n > 0 { crate::i18n::trf("{n} job(s) running", &[("n", &n.to_string())]) } else { tr("Ready") };
- ui.label(RichText::new(text).color(t.text_faint).size(theme::CAPTION));
- ui.label(RichText::new(format!("· {} {}", app.view.findings.len(), tr("findings"))).color(t.text_faint).size(theme::CAPTION));
+ // One label that shortens: in a narrow console, two would run over the tabs beside them. The
+ // count goes first so it's what stays; the Jobs tab's title also says how many are running.
+ let text = format!("{} {} · {text}", app.view.findings.len(), tr("findings"));
+ ui.add(egui::Label::new(RichText::new(text).color(t.text_faint).size(theme::CAPTION)).truncate());
}
fn bottom(app: &mut CraftApp, ui: &mut Ui) {
diff --git a/crates/ui-egui/tests/smoke.rs b/crates/ui-egui/tests/smoke.rs
index cc9e485d..97f72d27 100644
--- a/crates/ui-egui/tests/smoke.rs
+++ b/crates/ui-egui/tests/smoke.rs
@@ -1024,6 +1024,23 @@ fn workbench_lists_fall_back_gracefully() {
}
}
+#[test]
+fn the_agent_console_status_stays_clear_of_its_tabs_when_narrow() {
+ let mut h = harness_sized(egui::vec2(1000.0, 500.0), || {
+ let mut a = demo::app(demo::engine(Mode::Experienced, true));
+ demo::fill_workbench(&mut a);
+ a
+ });
+ h.run_steps(4);
+ let log = h.get_by_label("Log").rect();
+ let row = log.y_range();
+ let status: Vec<_> = h.query_all_by_label_contains("findings").map(|n| n.rect()).filter(|r| row.contains(r.center().y)).collect();
+ assert!(!status.is_empty(), "the status is on the tabs' row");
+ for s in status {
+ assert!(log.right() <= s.left(), "the Log tab ends at {} and the status starts at {}", log.right(), s.left());
+ }
+}
+
#[test]
fn the_agent_console_keeps_its_size() {
// The console's history and prompt box came out 17 points taller than the panel, so the panel
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 262c9196..9d0f4744 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -758,6 +758,8 @@ Gaps found while using the app for real projects.
- [ ] A live build with two Claude Code AIs signed in to two accounts, and one over SSH with a
`~/` folder (the remote line is unit-tested, not run on another computer)
+- [x] The Advanced console's status stays clear of its tabs when the console is narrow
+ — claimed: justinjohn0306, branch bugfix/r2.9-console-status-overlap
- [ ] Keep the builder-availability smoke regression independent of live agent discovery.
— claimed: Afloat16, branch test/r2.9-builder-discovery-fixture-20261104
Test fixture implemented with controlled discovery; automated validation remains pending.