Bold questions

This commit is contained in:
Ian Gulliver
2026-10-14 19:35:34 -07:00
parent ab4c3d2c6f
commit 1ea055682b
54 changed files with 3696 additions and 762 deletions
+9 -4
View File
@@ -1,8 +1,8 @@
import { post, type Attachment, type InboxItem, type InboxResponseCreate } from "./api.js";
import { mountChanges } from "./changes.js";
import { ago, errorText, h, replace } from "./dom.js";
import { inlineMarkdown, markdown } from "./markdown.js";
import { findTask, onEach, state } from "./state.js";
import { reportCard } from "./task.js";
type Scope = "all" | "project" | "task";
type Mode = "pick" | "reply" | "snooze" | "dismiss";
@@ -113,9 +113,14 @@ export function mountInbox(root: HTMLElement): () => void {
};
const off = onEach(["inbox", "selection", "tasks"], render);
replace(root, h("div", { class: "inbox-view" }, tabs, submitBar, list));
const changes = h("section", { class: "inbox-changes" });
replace(root, h("div", { class: "inbox-view" }, changes, tabs, submitBar, list));
const offChanges = mountChanges(changes, true);
render();
return off;
return () => {
off();
offChanges();
};
}
type Group = { taskId: string; projectId: string; blocked: boolean; items: InboxItem[] };
@@ -214,7 +219,7 @@ function card(item: InboxItem, changed: () => void): HTMLElement {
);
break;
case "report":
replace(body, reportCard(p));
replace(body, markdown(String(p["text"] ?? ""), "md summary"));
break;
case "session_error":
replace(body, h("p", { class: "error-text" }, String(p["error"])));