INNER CODE UNIT · Python
on_list_view_highlighted
VisionForge-OU/foreman · src/foreman/tui/app.py:239
def on_list_view_highlighted(self, event: ListView.Highlighted) -> None:
# Arrow-key navigation moves the highlight — follow it in the log pane.
if event.item is not None and event.item.name:
self.selected = event.item.name
self._update_log()
def action_next_worker(self) -> None:
lv = self.query_one("#wlist", ListView)
n = len(lv.children)
if not n:
return
# Moving the highlight fires Highlighted → updates self.selected + the log pane.
lv.index = ((lv.index or 0) + 1) % n
def action_kill(self) -> None:
if self.selected and self.app.controller.kill_worker(self.selected):
self.notify(f"kill signal sent to {self.selected}")
else: