notedeck

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

commit efcc0814589fd9241a69930f586ae89247e31e0b
parent c4b335e9401327527b83bc85b02574e870b99af7
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 17 Feb 2026 14:55:46 -0800

move all permission buttons to their own line below tool info

Non-diff permission UIs had buttons inline with the tool name,
causing them to appear top-right. Move them to a separate line.
Also fix plan approval buttons to use left-to-right layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/ui/dave.rs | 53+++++++++++++++++++++++++----------------------------
1 file changed, 25 insertions(+), 28 deletions(-)

diff --git a/crates/notedeck_dave/src/ui/dave.rs b/crates/notedeck_dave/src/ui/dave.rs @@ -542,8 +542,6 @@ impl<'a> DaveUi<'a> { ui.horizontal(|ui| { ui.label(egui::RichText::new(&request.tool_name).strong()); ui.label(desc); - - self.permission_buttons(request, ui, &mut action); }); // Command on next line if present if let Some(cmd) = command { @@ -557,16 +555,10 @@ impl<'a> DaveUi<'a> { ui.horizontal(|ui| { ui.label(egui::RichText::new(&request.tool_name).strong()); ui.label(egui::RichText::new(value).monospace()); - - self.permission_buttons(request, ui, &mut action); }); } else { // Fallback: show JSON - ui.horizontal(|ui| { - ui.label(egui::RichText::new(&request.tool_name).strong()); - - self.permission_buttons(request, ui, &mut action); - }); + ui.label(egui::RichText::new(&request.tool_name).strong()); let formatted = serde_json::to_string_pretty(&request.tool_input) .unwrap_or_else(|_| request.tool_input.to_string()); ui.add( @@ -576,6 +568,11 @@ impl<'a> DaveUi<'a> { .wrap_mode(egui::TextWrapMode::Wrap), ); } + + // Buttons on their own line + ui.horizontal(|ui| { + self.permission_buttons(request, ui, &mut action); + }); }); } } @@ -725,47 +722,47 @@ impl<'a> DaveUi<'a> { // Approve/Reject buttons with shift support for adding message let shift_held = ui.input(|i| i.modifiers.shift); - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| { let button_text_color = ui.visuals().widgets.active.fg_stroke.color; - // Reject button (red) - let reject_response = super::badge::ActionButton::new( - "Reject", - egui::Color32::from_rgb(178, 34, 34), + // Approve button (green) + let approve_response = super::badge::ActionButton::new( + "Approve", + egui::Color32::from_rgb(34, 139, 34), button_text_color, ) - .keybind("2") + .keybind("1") .show(ui) - .on_hover_text("Press 2 to reject, Shift+2 to reject with message"); + .on_hover_text("Press 1 to approve, Shift+1 to approve with message"); - if reject_response.clicked() { + if approve_response.clicked() { if shift_held { - action = Some(DaveAction::TentativeDeny); + action = Some(DaveAction::TentativeAccept); } else { action = Some(DaveAction::ExitPlanMode { request_id: request.id, - approved: false, + approved: true, }); } } - // Approve button (green) - let approve_response = super::badge::ActionButton::new( - "Approve", - egui::Color32::from_rgb(34, 139, 34), + // Reject button (red) + let reject_response = super::badge::ActionButton::new( + "Reject", + egui::Color32::from_rgb(178, 34, 34), button_text_color, ) - .keybind("1") + .keybind("2") .show(ui) - .on_hover_text("Press 1 to approve, Shift+1 to approve with message"); + .on_hover_text("Press 2 to reject, Shift+2 to reject with message"); - if approve_response.clicked() { + if reject_response.clicked() { if shift_held { - action = Some(DaveAction::TentativeAccept); + action = Some(DaveAction::TentativeDeny); } else { action = Some(DaveAction::ExitPlanMode { request_id: request.id, - approved: true, + approved: false, }); } }