fix(gui): Correct indentation bug in _render_mma_dashboard that caused crash

The code after the 'prior session' return block was incorrectly indented
at 1 space, placing it inside the 'if is_viewing_prior_session' block
instead of after it. This caused 'total_cost' and 'perc' to be undefined
when viewing an active session, triggering an IM_ASSERT error.

Fix: Moved 'track_name', 'track_stats', and 'total_cost' to the
correct 2-space indentation (method body level).
This commit is contained in:
2026-05-06 19:41:22 -04:00
parent 6bd052efc5
commit f6feab9243
9 changed files with 356 additions and 12 deletions
+1 -2
View File
@@ -4083,7 +4083,7 @@ def hello():
imgui.text_colored(c, "HISTORICAL VIEW - READ ONLY")
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_mma_dashboard")
return
# Task 5.3: Dense Summary Line
# Task 5.3: Dense Summary Line
track_name = self.active_track.description if self.active_track else "None"
if getattr(self, "ui_project_execution_mode", "native") == "beads":
track_name = "Beads Graph"
@@ -4092,7 +4092,6 @@ def hello():
track_stats = project_manager.calculate_track_progress(self.active_track.tickets)
elif self.active_tickets:
track_stats = project_manager.calculate_track_progress(self.active_tickets)
total_cost = 0.0
for usage in self.mma_tier_usage.values():
model = usage.get('model', 'unknown')