From 692780560045389090015a812eb717a272ab9776 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Tue, 11 Aug 2026 09:26:06 +0200 Subject: [PATCH] fix(ui): stop clipping the last log line in scrollable output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avalonia 12 leaves ScrollViewer.Padding out of the scroll Extent, so at maximum offset the content still overhangs the viewport by the padding height — the last lines were cut off and unreachable even after ScrollToEnd(). Move the inset onto the content (Margin on the inner ItemsControl/StackPanel) and leave the ScrollViewer padding-free. Affects the work console Output/Git/Session tabs, the reusable session terminal (task + prep log) and the log visualizer. --- src/ClaudeDo.Ui/CLAUDE.md | 1 + .../Views/Islands/Detail/WorkConsole.axaml | 16 +++++++++------- .../Views/Islands/SessionTerminalView.axaml | 7 ++++--- .../Views/Modals/LogVisualizerView.axaml | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/ClaudeDo.Ui/CLAUDE.md b/src/ClaudeDo.Ui/CLAUDE.md index fb2f5549..c106949b 100644 --- a/src/ClaudeDo.Ui/CLAUDE.md +++ b/src/ClaudeDo.Ui/CLAUDE.md @@ -111,6 +111,7 @@ snaps `CanResize="True"` windows, which is the opt-in), and it insets itself by - **`PathIcon` *fills* its geometry.** Line-art/stroke icons must be authored as filled geometry or rendered with a stroked `Path` (e.g. `Icon.PlanDay` via the `Path.plan-icon` style). A pure stroke path in a `PathIcon` is **invisible**. - **`NumericUpDown.Value` is `decimal?` and goes null while the box is empty** — i.e. every time the user clears a value to type a new one. Bound TwoWay to a non-nullable `int`/`decimal`, that null throws `InvalidCastException`. Either bind a `decimal?` property (as `AgentConfigEditorViewModel.MaxTurns` does) or add `Converter={StaticResource KeepLastNumber}`, which drops the null via `BindingOperations.DoNothing`. +- **`ScrollViewer.Padding` is excluded from the Extent (Avalonia 12).** At max scroll the content still sticks out below the viewport by the padding height, so the last line(s) are clipped and unreachable — even after `ScrollToEnd()`. Put the inset on the *content* (`Margin` on the inner `ItemsControl`/`StackPanel`) instead. Verified headlessly: 12,8,12,4 on the viewer → last item 20px below the viewport; same inset as content margin → fully visible. - **Never bind bare punctuation gestures.** Window key bindings live on `MainWindow` (`Ctrl+K` search, `Ctrl+N` add-task). `OemQuestion` once held search focus and silently swallowed `#` app-wide on a German layout. - **`FocusClearing`'s Escape handler is scoped to `MainWindow`** (`AddClassHandler`, not ``) — it clears focus from a TextBox on Escape, mirroring click-outside. Modals are separate `Window` instances that bind their own Escape → close, so it never runs there. Mission Control's ConPTY tiles are in `MissionControlWindow`, also unaffected, so **Escape always reaches the PTY**. - **Review gate:** Approve & Merge stays disabled until the diff has been opened once, and re-locks per run → [review-merge](../../docs/explore-notes/review-merge.md). diff --git a/src/ClaudeDo.Ui/Views/Islands/Detail/WorkConsole.axaml b/src/ClaudeDo.Ui/Views/Islands/Detail/WorkConsole.axaml index d669cc35..17811483 100644 --- a/src/ClaudeDo.Ui/Views/Islands/Detail/WorkConsole.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/Detail/WorkConsole.axaml @@ -269,11 +269,13 @@ Command="{Binding RejectReviewCommand}" /> + - + AllowAutoHide="False"> + @@ -293,8 +295,8 @@ - - + + @@ -393,8 +395,8 @@ - - + + diff --git a/src/ClaudeDo.Ui/Views/Islands/SessionTerminalView.axaml b/src/ClaudeDo.Ui/Views/Islands/SessionTerminalView.axaml index 40752fd0..90e84282 100644 --- a/src/ClaudeDo.Ui/Views/Islands/SessionTerminalView.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/SessionTerminalView.axaml @@ -51,11 +51,12 @@ + - + AllowAutoHide="False"> + diff --git a/src/ClaudeDo.Ui/Views/Modals/LogVisualizerView.axaml b/src/ClaudeDo.Ui/Views/Modals/LogVisualizerView.axaml index 069ab75f..434e4387 100644 --- a/src/ClaudeDo.Ui/Views/Modals/LogVisualizerView.axaml +++ b/src/ClaudeDo.Ui/Views/Modals/LogVisualizerView.axaml @@ -42,8 +42,8 @@ - - + +