commit 08cb175e03da4e6410c19db2d30d5e369cd2b587
parent 8d9793cc4032395905e68754ac26ff3898fcd313
Author: William Casarin <jb55@jb55.com>
Date: Thu, 12 Feb 2026 15:42:39 -0800
dave: hide git status expand button when repo is clean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/crates/notedeck_dave/src/ui/git_status_ui.rs b/crates/notedeck_dave/src/ui/git_status_ui.rs
@@ -17,13 +17,17 @@ pub fn git_status_bar_ui(cache: &mut GitStatusCache, ui: &mut Ui) {
// preventing the parent's bottom_up layout from pushing the
// expanded file list above the header into the chat area.
ui.vertical(|ui| {
- ui.horizontal(|ui| {
- // Expand/collapse toggle
+ let is_dirty = matches!(cache.current(), Some(Ok(data)) if !data.is_clean());
+
+ // Only show expand toggle when there are files to list
+ if is_dirty {
let arrow = if cache.expanded { "\u{25BC}" } else { "\u{25B6}" };
if ui.small_button(arrow).clicked() {
cache.expanded = !cache.expanded;
}
+ }
+ ui.horizontal(|ui| {
match cache.current() {
Some(Ok(data)) => {
// Branch name