From f7228717f8dcaf1f8419aa6e0e9451dec987672f Mon Sep 17 00:00:00 2001 From: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> Date: Tue, 25 Aug 2026 07:09:57 +0530 Subject: [PATCH 1/3] fix: Clean up awkward user-facing tune/config output lines - Remove stray spaces in ESTIMATED tuning header line Fixes #25 Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> --- crates/launchbound-cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/launchbound-cli/src/main.rs b/crates/launchbound-cli/src/main.rs index ef274a3..dd6d9ce 100644 --- a/crates/launchbound-cli/src/main.rs +++ b/crates/launchbound-cli/src/main.rs @@ -420,7 +420,7 @@ fn cmd_tune( )?; let dev = device(cc)?; println!( - "{} — ESTIMATED tuning (analytical model, cc {cc}); the gate is full, the timings are NOT measurements:", + "{} — ESTIMATED tuning (analytical model, cc {cc}); the gate is full, the timings are NOT measurements:", spec.name ); let mut admitted: Vec<_> = verdicts From df6bb4f30c06bbf1f8448422d7d998d808b7470f Mon Sep 17 00:00:00 2001 From: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> Date: Tue, 25 Aug 2026 07:12:15 +0530 Subject: [PATCH 2/3] fix: pluralize refused configuration banner Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> --- COMMITMSG | 7 +++++++ PRBODY.md | 9 +++++++++ crates/launchbound-tui/src/app.rs | 9 +++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 COMMITMSG create mode 100644 PRBODY.md diff --git a/COMMITMSG b/COMMITMSG new file mode 100644 index 0000000..e1e406d --- /dev/null +++ b/COMMITMSG @@ -0,0 +1,7 @@ +fix: Clean up awkward user-facing tune/config output lines + +- Remove stray spaces in ESTIMATED tuning header line + +Fixes #25 + +Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> diff --git a/PRBODY.md b/PRBODY.md new file mode 100644 index 0000000..bff92a8 --- /dev/null +++ b/PRBODY.md @@ -0,0 +1,9 @@ +## Summary + +Clean up awkward user-facing tune/config output lines + +## Changes + +- Remove stray spaces in ESTIMATED tuning header line + +Fixes #25 diff --git a/crates/launchbound-tui/src/app.rs b/crates/launchbound-tui/src/app.rs index 885424a..c2d67ff 100644 --- a/crates/launchbound-tui/src/app.rs +++ b/crates/launchbound-tui/src/app.rs @@ -134,8 +134,13 @@ fn draw_overview(frame: &mut Frame<'_>, app: &App, area: Rect) { lines.push(Line::from("")); lines.push(Line::from(Span::styled( format!( - "{} REFUSED configuration(s) measured FASTER than the chosen one — view 3", - r.rejected_faster.len() + "{} REFUSED {} measured FASTER than the chosen one — view 3", + r.rejected_faster.len(), + if r.rejected_faster.len() == 1 { + "configuration" + } else { + "configurations" + } ), Style::default().add_modifier(Modifier::BOLD), ))); From 142660fdd2be1f1c1075af034087f7f94a1b0461 Mon Sep 17 00:00:00 2001 From: Vyncint Ng <115854244+vyncint@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:35:33 +0700 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20finish=20the=20review=20items=20?= =?UTF-8?q?=E2=80=94=20stray=20files,=20goldens,=20plural=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three things from the review on #27, none of them the contributor's string changes, which were right. The diff carried COMMITMSG and PRBODY.md at the repository root — local scratch files for composing the commit message and the PR body. Removed. The goldens still recorded `configuration(s)`, so all four checks were red: `overview_at_80x24`, `resize_relayouts_the_frame` and `stress_100_runs_at_80x24`, on both runners, plus the same three inside `ci`. Re-blessed with LAUNCHBOUND_BLESS=1, and the diff is exactly the two banner lines in the two goldens that carry it — nothing else moved, which is the point of reading a bless before committing it. The `else` branch had no test and could not easily get one: the count comes from measured timings, and the single fixture the golden frames are built on yields exactly one rejected-faster candidate. Reaching the plural through a rendered frame would mean rebuilding that fixture and moving every golden in the suite to cover one word. So the banner is a function now, and both arities are asserted directly. That is a better shape for it anyway — a `format!` with an `if` inside it is harder to read than a named thing, and this one is the line the view exists to draw attention to. Rendering is unchanged, which the goldens confirm. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com> --- COMMITMSG | 7 --- PRBODY.md | 9 ---- crates/launchbound-tui/src/app.rs | 46 +++++++++++++++---- .../tests/golden/overview-110x32.txt | 2 +- .../tests/golden/overview-80x24.txt | 2 +- 5 files changed, 39 insertions(+), 27 deletions(-) delete mode 100644 COMMITMSG delete mode 100644 PRBODY.md diff --git a/COMMITMSG b/COMMITMSG deleted file mode 100644 index e1e406d..0000000 --- a/COMMITMSG +++ /dev/null @@ -1,7 +0,0 @@ -fix: Clean up awkward user-facing tune/config output lines - -- Remove stray spaces in ESTIMATED tuning header line - -Fixes #25 - -Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com> diff --git a/PRBODY.md b/PRBODY.md deleted file mode 100644 index bff92a8..0000000 --- a/PRBODY.md +++ /dev/null @@ -1,9 +0,0 @@ -## Summary - -Clean up awkward user-facing tune/config output lines - -## Changes - -- Remove stray spaces in ESTIMATED tuning header line - -Fixes #25 diff --git a/crates/launchbound-tui/src/app.rs b/crates/launchbound-tui/src/app.rs index c2d67ff..387c303 100644 --- a/crates/launchbound-tui/src/app.rs +++ b/crates/launchbound-tui/src/app.rs @@ -108,6 +108,22 @@ fn draw_header(frame: &mut Frame<'_>, app: &App, area: Rect) { frame.render_widget(Paragraph::new(lines), area); } +/// The banner above the field when refused configurations measured faster. +/// +/// A function rather than an inline `format!` so both arities can be tested. +/// The count comes from measured timings, and the one fixture the golden +/// frames are built on yields exactly one — so the plural branch is not +/// reachable from a rendered frame without rebuilding that fixture, which +/// would move every golden in the suite to cover two words. +fn refused_faster_banner(count: usize) -> String { + let noun = if count == 1 { + "configuration" + } else { + "configurations" + }; + format!("{count} REFUSED {noun} measured FASTER than the chosen one — view 3") +} + fn draw_overview(frame: &mut Frame<'_>, app: &App, area: Rect) { let r = &app.report; let mut lines = Vec::new(); @@ -133,15 +149,7 @@ fn draw_overview(frame: &mut Frame<'_>, app: &App, area: Rect) { if !r.rejected_faster.is_empty() { lines.push(Line::from("")); lines.push(Line::from(Span::styled( - format!( - "{} REFUSED {} measured FASTER than the chosen one — view 3", - r.rejected_faster.len(), - if r.rejected_faster.len() == 1 { - "configuration" - } else { - "configurations" - } - ), + refused_faster_banner(r.rejected_faster.len()), Style::default().add_modifier(Modifier::BOLD), ))); } @@ -368,3 +376,23 @@ fn bar(done: usize, total: usize, width: usize) -> String { } s } + +#[cfg(test)] +mod tests { + use super::refused_faster_banner; + + #[test] + fn the_refused_faster_banner_agrees_with_its_own_count() { + assert_eq!( + refused_faster_banner(1), + "1 REFUSED configuration measured FASTER than the chosen one — view 3" + ); + assert_eq!( + refused_faster_banner(2), + "2 REFUSED configurations measured FASTER than the chosen one — view 3" + ); + // Not reachable through the view — the banner is drawn only when the + // list is non-empty — but the function is total, so it is pinned. + assert!(refused_faster_banner(0).starts_with("0 REFUSED configurations")); + } +} diff --git a/crates/launchbound-tui/tests/golden/overview-110x32.txt b/crates/launchbound-tui/tests/golden/overview-110x32.txt index 55d9b52..f72f797 100644 --- a/crates/launchbound-tui/tests/golden/overview-110x32.txt +++ b/crates/launchbound-tui/tests/golden/overview-110x32.txt @@ -4,7 +4,7 @@ launchbound — reduce-flip · gate cc 8.6 · measured · NVIDIA A10G ┌overview────────────────────────────────────────────────────────────────────────────────────────────────────┐ │CHOSEN c1-0000000000000009 block_x=32 tile=512 unroll=4 0.0400 ms [0.0398, 0.0402] │ │ │ -│1 REFUSED configuration(s) measured FASTER than the chosen one — view 3 │ +│1 REFUSED configuration measured FASTER than the chosen one — view 3 │ │ │ │GPU-seconds consumed: 25.5 │ │ │ diff --git a/crates/launchbound-tui/tests/golden/overview-80x24.txt b/crates/launchbound-tui/tests/golden/overview-80x24.txt index c1f812d..9d2c89e 100644 --- a/crates/launchbound-tui/tests/golden/overview-80x24.txt +++ b/crates/launchbound-tui/tests/golden/overview-80x24.txt @@ -4,7 +4,7 @@ launchbound — reduce-flip · gate cc 8.6 · measured · NVIDIA A10G ┌overview──────────────────────────────────────────────────────────────────────┐ │CHOSEN c1-0000000000000009 block_x=32 tile=512 unroll=4 0.0400 ms [0.0398, │ │ │ -│1 REFUSED configuration(s) measured FASTER than the chosen one — view 3 │ +│1 REFUSED configuration measured FASTER than the chosen one — view 3 │ │ │ │GPU-seconds consumed: 25.5 │ │ │