Thread actions menu, as T3's sidebar context menu

- . or a right-click opens T3's thread menu, built by the web's buildThreadActionMenuItems
- Settle, pin, snooze (server presets or a typed time), rename, regenerate title, mark unread,
  auto-settle, copy path/branch/thread/ID, archive, delete (confirmed), new thread on branch
- Submenus open as pickers; their items are searchable from the top
- Copy via OSC 52 plus the local clipboard tool
- Palette group keys no longer collide for untitled groups
This commit is contained in:
Callum Alpass committed 2026-11-02 19:49:23 +11:00
1 parent 925fc15a3d
commit 43347d1d58
10 files changed
+517 -15

No files matched your search

+4 -3
View File
@@ -19,10 +19,11 @@ export function Palette(props: {
const width = Math.min(80, props.width - 4);
const listHeight = Math.max(4, Math.min(props.height - 8, 22));
// Rows are entries plus a header per group; keep the selection in view.
const rows: ({ kind: "header"; label: string } | { kind: "entry"; entry: PaletteEntry; index: number })[] = [];
const rows: ({ kind: "header"; label: string; key: string } | { kind: "entry"; entry: PaletteEntry; index: number })[] = [];
let index = 0;
for (const group of props.groups) {
rows.push({ kind: "header", label: group.label });
// Untitled groups (separators) share a label, so the key carries the position.
rows.push({ kind: "header", label: group.label, key: `h-${rows.length}-${group.label}` });
for (const entry of group.entries) rows.push({ kind: "entry", entry, index: index++ });
}
const selectedRow = rows.findIndex((row) => row.kind === "entry" && row.index === props.selected);
@@ -38,7 +39,7 @@ export function Palette(props: {
{rows.length === 0 ? <text fg={colors.muted} paddingLeft={1}>No matches</text> : null}
{rows.slice(start, start + listHeight).map((row) =>
row.kind === "header" ? (
<text key={`h-${row.label}`} fg={colors.faint} paddingLeft={1}>
<text key={row.key} fg={colors.faint} paddingLeft={1}>
{row.label}
</text>
) : (