feat(gui): Add block/unblock buttons to ticket queue

This commit is contained in:
2026-03-07 16:28:13 -05:00
parent 8b514e0d4d
commit 2ff5a8beee

View File

@@ -1954,6 +1954,22 @@ class App:
if self.controller and self.controller.engine:
self.controller.engine.kill_worker(ticket_id)
def _cb_block_ticket(self, ticket_id: str) -> None:
t = next((t for t in self.active_tickets if str(t.get('id', '')) == ticket_id), None)
if t:
t['status'] = 'blocked'
t['manual_block'] = True
t['blocked_reason'] = '[MANUAL] User blocked'
self._push_mma_state_update()
def _cb_unblock_ticket(self, ticket_id: str) -> None:
t = next((t for t in self.active_tickets if str(t.get('id', '')) == ticket_id), None)
if t and t.get('manual_block', False):
t['status'] = 'todo'
t['manual_block'] = False
t['blocked_reason'] = None
self._push_mma_state_update()
def _reorder_ticket(self, src_idx: int, dst_idx: int) -> None:
if src_idx == dst_idx: return
new_tickets = list(self.active_tickets)
@@ -2072,6 +2088,12 @@ class App:
if status == 'in_progress':
if imgui.button(f"Kill##{tid}"):
self._cb_kill_ticket(tid)
elif status == 'todo':
if imgui.button(f"Block##{tid}"):
self._cb_block_ticket(tid)
elif status == 'blocked' and t.get('manual_block', False):
if imgui.button(f"Unblock##{tid}"):
self._cb_unblock_ticket(tid)
imgui.end_table()