commit 296512b8e31b8e65d0023f160371ef2c68eec06f
parent 801452d1e1a902ec2aaa77afdef7a055c24bf637
Author: William Casarin <jb55@jb55.com>
Date: Tue, 17 Feb 2026 14:34:56 -0800
fix diff view overflow and move permission buttons to bottom left
Wrap diff view in a ScrollArea with max 400px height so large diffs
no longer extend off screen. Move allow/deny buttons to bottom left
for easier access on mobile.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/crates/notedeck_dave/src/ui/dave.rs b/crates/notedeck_dave/src/ui/dave.rs
@@ -509,13 +509,10 @@ impl<'a> DaveUi<'a> {
// Diff view
diff::file_update_ui(&file_update, ui);
- // Approve/deny buttons at the bottom right
- ui.with_layout(
- egui::Layout::right_to_left(egui::Align::Center),
- |ui| {
- self.permission_buttons(request, ui, &mut action);
- },
- );
+ // Approve/deny buttons at the bottom left
+ ui.horizontal(|ui| {
+ self.permission_buttons(request, ui, &mut action);
+ });
});
} else {
// Parse tool input for display (existing logic)
diff --git a/crates/notedeck_dave/src/ui/diff.rs b/crates/notedeck_dave/src/ui/diff.rs
@@ -8,13 +8,18 @@ const LINE_NUMBER_COLOR: Color32 = Color32::from_rgb(128, 128, 128);
/// Render a file update diff view
pub fn file_update_ui(update: &FileUpdate, ui: &mut Ui) {
- // Code block frame - no scroll, just show full diff height
egui::Frame::new()
.fill(ui.visuals().extreme_bg_color)
.inner_margin(8.0)
.corner_radius(4.0)
.show(ui, |ui| {
- render_diff_lines(update.diff_lines(), &update.update_type, ui);
+ let max_height = ui.available_height().min(400.0);
+ egui::ScrollArea::both()
+ .max_height(max_height)
+ .auto_shrink([false, true])
+ .show(ui, |ui| {
+ render_diff_lines(update.diff_lines(), &update.update_type, ui);
+ });
});
}