Modal dialog for browsing and resuming threads.
Displays recent threads with keyboard navigation, fuzzy search, configurable columns, and delete support.
Returns a thread_id string on selection, or None on cancel.
ThreadSelectorScreen(
self,
current_thread: str | None = None,
*,
thread_limit: int | None = None,
initial_threads: list[ThreadInfo] | None = None
)ModalScreen[str | None]| Name | Type | Description |
|---|---|---|
current_thread | str | None | Default: NoneThe currently active thread ID (to highlight). |
thread_limit | int | None | Default: NoneMaximum number of rows to fetch when querying DB. |
initial_threads | list[ThreadInfo] | None | Default: NoneOptional preloaded rows to render immediately. |
| Name | Type |
|---|---|
| current_thread | str | None |
| thread_limit | int | None |
| initial_threads | list[ThreadInfo] | None |
Compose the screen layout.
Fetch threads, configure border for ASCII terminals, and build the list.
Filter threads as user types.
Handle Enter key when filter input is focused.
Return focus to search when letters are typed from other controls.
Route sort, relative-time, and column-visibility checkbox changes.
Move selection up.
Move selection down.
Move selection up by one visible page.
Move selection down by one visible page.
Confirm the highlighted thread and dismiss the selector.
Move focus through the filter and column-toggle controls.
Move focus backward through the filter and column-toggle controls.
Toggle sort between updated_at and created_at.
Show delete confirmation for the highlighted thread.
Open Rich-style hyperlinks on single click.
Handle click on a thread option.
Cancel the selection.