better project and session selection and filtering

This commit is contained in:
Joe Fleming
2026-03-07 16:20:20 -07:00
parent bfa337ff13
commit c3c8683f53

9
app.py
View File

@@ -378,6 +378,7 @@ class SessionMoverApp(App):
table = self.query_one("#sessions-table") table = self.query_one("#sessions-table")
table.zebra_stripes = True table.zebra_stripes = True
table.cursor_type = "row" table.cursor_type = "row"
table.show_cursor = False
table.add_columns(" ", "ID", "Title", "Project", "Workspace", "Msgs", "Created") table.add_columns(" ", "ID", "Title", "Project", "Workspace", "Msgs", "Created")
# Don't load sessions until a project is selected # Don't load sessions until a project is selected
@@ -475,6 +476,14 @@ class SessionMoverApp(App):
else: else:
count_widget.update("0 selected") count_widget.update("0 selected")
def on_descendant_focus(self, event) -> None:
table = self.query_one("#sessions-table", DataTable)
table.show_cursor = table.has_focus
def on_descendant_blur(self, event) -> None:
table = self.query_one("#sessions-table", DataTable)
table.show_cursor = table.has_focus
def on_list_view_highlighted(self, event: ListView.Highlighted) -> None: def on_list_view_highlighted(self, event: ListView.Highlighted) -> None:
"""Handle project list selection.""" """Handle project list selection."""
if event.list_view.id != "project-list": if event.list_view.id != "project-list":