Private
Public Access
0
0

fix(gui): explicit child size for comms_scroll and prior_scroll prevents early clipping

ROOT CAUSE: When child windows used ImVec2(0, 0) for auto-fill, the
child's reported height was unstable inside tab items (especially when
the parent tab was inside a tab_bar inside a window). Result: the
scrollable child rendered with a fixed smaller height, showing only the
first half of the content, with empty space below.

FIX: Use imgui.get_content_region_avail() to compute explicit dimensions
and pass them to begin_child. Now the child fills the full available area
inside the tab content.

- render_comms_history_panel: avail.x, avail.y
- render_prior_session_view: same, plus added entry count indicator next
  to the Exit Prior Session button ({N} entries) for at-a-glance info

Tests:
- test_comms_scroll_no_clipping.py: verifies comms_scroll child uses
  explicit (non-zero) size
- test_prior_session_no_clipping.py: same for prior_scroll child
- test_log_management_first_open.py: minor cleanup
- 42/42 broad regression pass
This commit is contained in:
2026-06-03 13:47:08 -04:00
parent 91fe07f72a
commit df7bda6e0d
4 changed files with 167 additions and 74 deletions
+2
View File
@@ -27,6 +27,8 @@ def test_log_management_populates_registry_on_first_open(app_instance):
mock_imgui.end_table = lambda: None
mock_imscope.window.return_value.__enter__.return_value = (True, True)
app_instance.cb_load_prior_log = MagicMock()
app_instance.controller = MagicMock()
del app_instance.controller._log_registry
render_log_management(app_instance)
assert app_instance._log_registry is not None
assert "s1" in app_instance._log_registry.data, f"Registry should be populated on first open. Got: {list(app_instance._log_registry.data.keys())}"