notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 98b21aa3d484e28216ece8e04747ab934ca1d001
parent 03a9be10d1179e1b0bb4fcb1deb3bab7b39c627d
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 27 Jan 2026 12:30:59 -0800

dave: plan status badge changes

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mcrates/notedeck_dave/src/ui/dave.rs | 35+++++++++++------------------------
1 file changed, 11 insertions(+), 24 deletions(-)

diff --git a/crates/notedeck_dave/src/ui/dave.rs b/crates/notedeck_dave/src/ui/dave.rs @@ -680,18 +680,18 @@ impl<'a> DaveUi<'a> { dave_response = DaveResponse::send(); } - // Show plan mode indicator when active (without keybind to keep layout stable) + // Show plan mode indicator with optional keybind hint when Ctrl is held let ctrl_held = ui.input(|i| i.modifiers.ctrl); - let plan_badge_response = if self.plan_mode_active { - Some( - super::badge::StatusBadge::new("PLAN") - .variant(super::badge::BadgeVariant::Info) - .show(ui) - .on_hover_text("Ctrl+P to toggle plan mode"), - ) - } else { - None - }; + let mut badge = super::badge::StatusBadge::new("PLAN") + .variant(if self.plan_mode_active { + super::badge::BadgeVariant::Info + } else { + super::badge::BadgeVariant::Default + }); + if ctrl_held { + badge = badge.keybind("P"); + } + badge.show(ui).on_hover_text("Ctrl+P to toggle plan mode"); let r = ui.add( egui::TextEdit::multiline(self.input) @@ -715,19 +715,6 @@ impl<'a> DaveUi<'a> { ); notedeck_ui::include_input(ui, &r); - // Show Ctrl+P hint as overlay when Ctrl is held - // Using paint_at() instead of show() avoids layout changes that cause focus loss - if ctrl_held { - let hint_pos = if let Some(ref badge_resp) = plan_badge_response { - // Paint near the PLAN badge when in plan mode - badge_resp.rect.right_center() + egui::vec2(4.0, 0.0) - } else { - // Paint near the right side of the input area - r.rect.right_center() + egui::vec2(-30.0, 0.0) - }; - super::paint_keybind_hint(ui, hint_pos, "P", 18.0); - } - // Request focus if flagged (e.g., after spawning a new agent or entering tentative state) if *self.focus_requested { r.request_focus();