From a8c25f0cb3f7dbd27cd6abe46d417474986d3aaf Mon Sep 17 00:00:00 2001 From: Martino Ferrari Date: Mon, 12 Oct 2026 11:06:31 +0200 Subject: [PATCH] test: the layout probe reads the sidebar's width `side_w` is the sidebar column's width, and it must be its own request (320) rather than 0. It turned a report of "I cannot see the right side panel" into `side_w=0` in one run, which is what a reading is for. It also shows the shape of the fault: the width is 320 during the first frames and 0 once the window settles, while the divider sits at 940 and the plot column ends around 752 -- so the paned is not giving the sidebar any width, whatever the column asks for. Four attempts to fix that here were each reverted, because each one left `side_w=0`: placing the divider from the paned's own width instead of an absolute 940, the property form of the paned's children, re-parenting the column in code, and a code-set size request on the scroller and the column. The cause is not one of those, and the next step is to read the paned's own width and the column's parent chain rather than to guess again. --- docs/claude/probe-readings.md | 3 +++ src/ui_probe.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/claude/probe-readings.md b/docs/claude/probe-readings.md index 9e3e236..f0e92ec 100644 --- a/docs/claude/probe-readings.md +++ b/docs/claude/probe-readings.md @@ -312,6 +312,9 @@ Two lines of the self-check output are assertions in disguise: — that is how it tells a gesture from its own echo — so a fit that wrote the group alone reads back as the zoomed range one frame later. - `[layout-probe] rows=N buttons=B done=D done_box=[x,y,WxH] rows_y=[..] close=[..] add=[..] traces=[..]` + `side_w` is the sidebar column's width and **must be its own request (320), never 0**: it read 0 while + the divider sat at the window's right edge, which is a panel that is not there. It was 320 during the + first frames and 0 once the window had settled, so read it from a `placed` line rather than the first. (stderr, `UDPSCOPE_PROBE_LAYOUT_MS`) — **`buttons` must be `2N+1`** while the editor is up (one `×` per row, one `+` per boundary) and **0 on the `editor off` line**: the buttons exist only while the editor does. `done` follows the same rule for the editor's diff --git a/src/ui_probe.cpp b/src/ui_probe.cpp index 9a53eba..64c1cfe 100644 --- a/src/ui_probe.cpp +++ b/src/ui_probe.cpp @@ -1536,11 +1536,15 @@ void layout_probe_report(App& a, const char* what) { } } std::fprintf(stderr, "[layout-probe] %-12s rows=%d buttons=%zu done=%d done_box=[%s] " - "rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s]\n", + "rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s] side_w=%d\n", what, rows, a.layout_buttons.size(), a.layout_done_button != nullptr ? 1 : 0, done_box.c_str(), geom.c_str(), close_tops.c_str(), add_tops.c_str(), resize_tops.c_str(), - traces.c_str()); + traces.c_str(), + // The sidebar, which is the pane a divider position can silently take away: `side_w` + // must be its own request (320) rather than 0, and `divider` the position the window's + // width less the sidebar's column left it at. + a.side_box != nullptr ? gtk_widget_get_width(a.side_box) : -1); std::fflush(stderr); }