Private
Public Access
0
0

fix(gui): Force newline in discussion entries to prevent squashed layout

- Insert imgui.new_line() before rendering discussion content.
- Ensures the Markdown renderer inherits the full horizontal width of the panel.
- Definitively fixes vertical squashing of tables and long text blocks.
This commit is contained in:
2026-06-02 15:42:04 -04:00
parent fee41032b6
commit 4d8e949720
11 changed files with 485 additions and 44 deletions
+29
View File
@@ -0,0 +1,29 @@
import pytest
from unittest.mock import patch, MagicMock
from src.imgui_scopes import _ScopeId
import src.imgui_scopes as imgui_scopes
def test_scope_id_string():
with patch('src.imgui_scopes.imgui') as mock_imgui:
sid = _ScopeId("test_id")
with sid:
pass
mock_imgui.push_id.assert_called_once_with("test_id")
mock_imgui.pop_id.assert_called_once()
def test_scope_id_int():
with patch('src.imgui_scopes.imgui') as mock_imgui:
# Python type hint is str, but we test runtime resilience
sid = _ScopeId(1234)
with sid:
pass
# Verify it was converted to string to prevent low-level crashes
mock_imgui.push_id.assert_called_once_with("1234")
mock_imgui.pop_id.assert_called_once()
def test_id_helper_function():
with patch('src.imgui_scopes.imgui') as mock_imgui:
with imgui_scopes.id(42):
pass
mock_imgui.push_id.assert_called_once_with("42")
mock_imgui.pop_id.assert_called_once()