9437af6cb1
These scripts were created during the search for the "Missing End()" imgui error that the user reported on 2026-06-29. They are throwaway diagnostic tools; their purpose was to find the orphan imgui.end_child() call in render_tier_stream_panel (commitc2155593) and verify the fix worked. No production code depends on these. They are kept for archival purposes only so future debugging of similar imbalanced-begin/end issues has a reference. Scripts included: - apply_fix.py : the actual applied fix to src/gui_2.py - fix_orphan.py/fix_orphan2.py : iterative attempts at removing the orphan - fix_indent.py : was used to attempt an indent fix; superseded - remove_orphan.py : rejected because pattern didn't match - find_imbalance.py : the canonical begin/end imbalance detector - find_extras.py : finds orphan imgui.end() (window-level) - find_ends.py : dumps all imgui.end() lines with context - peek*.py (8 files) : various context-dump helpers used during investigation - check_dynamic.py : dynamic-control-flow imbalanced tracker - check_indents.py : indent diagnostic for L7086 - diag_install_heuristic.py : earlier diagnostic for install heuristic - inspect_imgui_apis.py : dumps imgui-bundle API surface - search_indent*.py (3) : indent search helpers - window_balance.py : dedicated imgui.begin/imgui.end balance check - apply_fix.py/remove_orphan2.py : final iterations that succeeded None of these are imported by src/ or tests/. The fix commitc2155593is the actual production change; these scripts are just the trail of breadcrumbs left during the investigation.
17 lines
537 B
Python
17 lines
537 B
Python
"""Look at the conditional structure around L3757 and L8809."""
|
|
from pathlib import Path
|
|
|
|
text = Path("src/gui_2.py").read_text(encoding="utf-8", errors="replace")
|
|
lines = text.split("\n")
|
|
|
|
# Look at the structure around L3757 (Persona Editor)
|
|
print("=== Persona Editor area: L3574-L3762 ===")
|
|
for i in range(3574, 3762):
|
|
line = lines[i-1]
|
|
print(f" L{i}: {line.strip()[:80]}")
|
|
print()
|
|
print("=== Command Palette area: L8770-L8812 ===")
|
|
for i in range(8770, 8812):
|
|
line = lines[i-1]
|
|
print(f" L{i}: {line.strip()[:80]}")
|