WIP: Regression hell
This commit is contained in:
18
src/gui_2.py
18
src/gui_2.py
@@ -1793,22 +1793,23 @@ class App:
|
||||
imgui.separator()
|
||||
# 4. Task DAG Visualizer
|
||||
imgui.text("Task DAG")
|
||||
if self.active_track:
|
||||
if self.active_track and self.node_editor_ctx:
|
||||
ed.set_current_editor(self.node_editor_ctx)
|
||||
ed.begin('Visual DAG')
|
||||
# Selection detection
|
||||
selected = ed.get_selected_nodes()
|
||||
if selected:
|
||||
for node_id in selected:
|
||||
node_val = node_id.id()
|
||||
for t in self.active_tickets:
|
||||
if abs(hash(str(t.get('id', '')))) == node_id:
|
||||
if abs(hash(str(t.get('id', '')))) == node_val:
|
||||
self.ui_selected_ticket_id = str(t.get('id', ''))
|
||||
break
|
||||
break
|
||||
for t in self.active_tickets:
|
||||
tid = str(t.get('id', '??'))
|
||||
int_id = abs(hash(tid))
|
||||
ed.begin_node(int_id)
|
||||
ed.begin_node(ed.NodeId(int_id))
|
||||
imgui.text_colored(C_KEY, f"Ticket: {tid}")
|
||||
status = t.get('status', 'todo')
|
||||
s_col = C_VAL
|
||||
@@ -1819,18 +1820,18 @@ class App:
|
||||
imgui.same_line()
|
||||
imgui.text_colored(s_col, status)
|
||||
imgui.text(f"Target: {t.get('target_file','')}")
|
||||
ed.begin_pin(abs(hash(tid + "_in")), ed.PinKind.input)
|
||||
ed.begin_pin(ed.PinId(abs(hash(tid + "_in"))), ed.PinKind.input)
|
||||
imgui.text("->")
|
||||
ed.end_pin()
|
||||
imgui.same_line()
|
||||
ed.begin_pin(abs(hash(tid + "_out")), ed.PinKind.output)
|
||||
ed.begin_pin(ed.PinId(abs(hash(tid + "_out"))), ed.PinKind.output)
|
||||
imgui.text("->")
|
||||
ed.end_pin()
|
||||
ed.end_node()
|
||||
for t in self.active_tickets:
|
||||
tid = str(t.get('id', '??'))
|
||||
for dep in t.get('depends_on', []):
|
||||
ed.link(abs(hash(dep + "_" + tid)), abs(hash(dep + "_out")), abs(hash(tid + "_in")))
|
||||
ed.link(ed.LinkId(abs(hash(dep + "_" + tid))), ed.PinId(abs(hash(dep + "_out"))), ed.PinId(abs(hash(tid + "_in"))))
|
||||
|
||||
# Handle link creation
|
||||
if ed.begin_create():
|
||||
@@ -1855,7 +1856,7 @@ class App:
|
||||
t.setdefault('depends_on', []).append(source_tid)
|
||||
self._push_mma_state_update()
|
||||
break
|
||||
ed.end_create()
|
||||
ed.end_create()
|
||||
|
||||
# Handle link deletion
|
||||
if ed.begin_delete():
|
||||
@@ -1870,7 +1871,7 @@ class App:
|
||||
t['depends_on'] = [dep for dep in deps if abs(hash(dep + "_" + tid)) != lid_val]
|
||||
self._push_mma_state_update()
|
||||
break
|
||||
ed.end_delete()
|
||||
ed.end_delete()
|
||||
# Validate DAG after any changes
|
||||
try:
|
||||
from src.dag_engine import TrackDAG
|
||||
@@ -1881,7 +1882,6 @@ class App:
|
||||
except Exception:
|
||||
pass
|
||||
ed.end()
|
||||
ed.set_current_editor(None)
|
||||
# 5. Add Ticket Form
|
||||
imgui.separator()
|
||||
if imgui.button("Add Ticket"):
|
||||
|
||||
Reference in New Issue
Block a user