fix(markdown): add missing table_setup_column calls in render_table
ROOT CAUSE: src/markdown_table.py:render_table was missing imgui.table_setup_column() calls. In ImGui, columns MUST be configured via table_setup_column before table_headers_row is called. Without it, the table has no defined columns, causing cells to render at overlapping Y positions. This manifested as text overlap in the Discussion Hub's read_mode entries (e.g., 'swc2 -> gte_sw' overlapping the line above it). FIX: Call imgui.table_setup_column(h, TableColumnFlags_.width_stretch) for each header BEFORE table_headers_row(). Each column now has a defined width (stretch = fills available space) and cells render correctly without overlap. Tests: - New test_markdown_table_columns.py asserts setup_column is called once per column and table_next_column is called for each cell. - 16/16 broad regression pass (test_markdown_table, test_markdown_table_render, test_markdown_render_robust, test_gen_send_empty_context, test_gui_fast_render)
This commit is contained in:
@@ -12,6 +12,8 @@ def render_table(block: "TableBlock") -> None:
|
||||
if n_cols == 0: return
|
||||
flags = imgui.TableFlags_.borders | imgui.TableFlags_.row_bg | imgui.TableFlags_.resizable
|
||||
if not imgui.begin_table("md_table", n_cols, flags): return
|
||||
for h in block.headers:
|
||||
imgui.table_setup_column(h, imgui.TableColumnFlags_.width_stretch)
|
||||
imgui.table_headers_row()
|
||||
for h in block.headers:
|
||||
imgui.table_next_column()
|
||||
|
||||
Reference in New Issue
Block a user