Skip to main content

Module thread_list

Module thread_list 

Source
Expand description

Conversation list: new, switch, rename, archive, delete, and search.

The application owns the threads (grouped into sections such as Today / Yesterday / Earlier) and the active thread ID; the list owns only its native search input, the “show archived” toggle, which row holds keyboard focus, and the flattened snapshot it virtualizes. Every intent — selecting, creating, renaming, archiving, deleting — is a typed ThreadListEvent keyed by stable ID.

Two constraints shape the rendering. Construction is bounded by the visible window: section headers and surviving threads are flattened into ThreadRows once, in the setters that can change them, and gpui::list asks for rows by index — a ten-thousand-thread snapshot builds a screenful. And rows are uniform: Rename / Archive / Delete live in an upstream popup menu anchored to the row’s ellipsis rather than in a toolbar revealed inside the row, so opening one never changes a row’s height or shifts the conversations below it, and dismissal plus focus return come from upstream.

Structs§

ThreadItem
One conversation with stable identity.
ThreadList
A controlled conversation list with native search.
ThreadSection
A labeled group of threads (for example “Today”).

Enums§

ThreadListEvent
An interaction emitted by ThreadList.