ThreadActionAdapter
Per-thread row-action adapter. Consumer-provided. The framework calls these methods after user confirmation (delete) or commit (rename) and manages optimistic UI + rollback on rejection.
Consumers MUST refresh their threads signal on success — the framework
clears optimistic overrides in a finally block, so a successful adapter
call that leaves the input list unchanged would re-render the row.
import type { ThreadActionAdapter } from '@threadplane/chat';Declaration
export interface ThreadActionAdapter {
archive?(threadId: string): Promise<void>;
delete?(threadId: string): Promise<void>;
moveToProject?(threadId: string, projectId: string | null): Promise<void>;
pin?(threadId: string): Promise<void>;
rename?(threadId: string, newTitle: string): Promise<void>;
reorderPinned?(threadId: string, beforeId: string | null): Promise<void>;
unarchive?(threadId: string): Promise<void>;
unpin?(threadId: string): Promise<void>;
}Members
archive · overload 1
Archive a thread (reversible). No confirmation dialog — framework calls this immediately on click.
archive?(threadId: string): Promise<void>;Parameters
threadId· requiredstring
Returns
Promise<void>delete · overload 1
delete?(threadId: string): Promise<void>;Parameters
threadId· requiredstring
Returns
Promise<void>moveToProject · overload 1
Move thread to a project (or pass null to remove from any project). Optimistically hides the row from the current project's visible list; consumer is expected to refresh the threads input.
moveToProject?(threadId: string, projectId: string | null): Promise<void>;Parameters
threadId· requiredstringprojectId· requiredstring | null
Returns
Promise<void>pin · overload 1
Mark the thread as pinned.
pin?(threadId: string): Promise<void>;Parameters
threadId· requiredstring
Returns
Promise<void>rename · overload 1
rename?(threadId: string, newTitle: string): Promise<void>;Parameters
threadId· requiredstringnewTitle· requiredstring
Returns
Promise<void>reorderPinned · overload 1
Reorder a pinned thread. beforeId is the id of the pinned thread it
should be placed before, or null to move to the end of the pinned list.
Framework optimistically reorders the visible list and awaits this
method; rejection rolls back.
reorderPinned?(threadId: string, beforeId: string | null): Promise<void>;Parameters
threadId· requiredstringbeforeId· requiredstring | null
Returns
Promise<void>unarchive · overload 1
Restore an archived thread to the active list.
unarchive?(threadId: string): Promise<void>;Parameters
threadId· requiredstring
Returns
Promise<void>unpin · overload 1
Unpin a previously pinned thread.
unpin?(threadId: string): Promise<void>;Parameters
threadId· requiredstring
Returns
Promise<void>