INNER CODE UNIT · Python
on_list_view_selected
VisionForge-OU/foreman · src/foreman/tui/app.py:233
def on_list_view_selected(self, event: ListView.Selected) -> None:
if event.item is None:
return
self.selected = event.item.name
self._update_log()
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.