reviews and inbox smashing

This commit is contained in:
Ian Gulliver
2026-10-16 13:56:46 -07:00
parent 8f873788d7
commit a0e6a3953f
15 changed files with 178 additions and 241 deletions
-2
View File
@@ -1326,8 +1326,6 @@ export interface components {
/** @description question: context (Markdown with the choices inline as `- ( ) text` / `- (*) text` pick-one or `- [ ] text` / `- [x] text` pick-any list items), question, why_blocked, options (each choice's text, in order), multiple (true for pick-any), recommended (the marked choices' text), attachments. session_error: error. rate_limited: vendor, rate_limit (the vendor's rate-limit status), error. */
payload: Record<string, never>;
state: components["schemas"]["InboxState"];
/** @description question: the review of the first snapshot the task took after the question was asked (the snapshot at the end of the turn that asked it), once that snapshot exists; empty for other items. */
reviews: components["schemas"]["Review"][];
/** Format: date-time */
created_at: string;
resolved_by?: string;
-2
View File
@@ -4,7 +4,6 @@ import { ago, errorText, h, replace, showAlert } from "./dom.js";
import { image, inlineMarkdown, markdown } from "./markdown.js";
import { checkedAnswer, clearAnswer, dropTextAnswer, flushDrafts, hasTextAnswer, setCheckedAnswer, setTextAnswer, textAnswer } from "./drafts.js";
import { diagram } from "./mermaid.js";
import { reviewCard } from "./reviews.js";
import { focusTab, onEach, state } from "./state.js";
import { taskStyle } from "./taskcolor.js";
@@ -102,7 +101,6 @@ function card(item: InboxItem): HTMLElement {
h("time", { dateTime: item.created_at, title: item.created_at }, ago(item.created_at)),
),
body,
item.reviews.length > 0 ? h("section", { class: "card-reviews" }, ...item.reviews.map((r) => reviewCard(r, item.task_id))) : null,
thread(item),
actions,
);
-11
View File
@@ -475,17 +475,6 @@ export function handleEvent(ev: ByreEvent): void {
case "summary.read":
noteSummaryRead(String(ev.payload["task_id"]), Number(ev.payload["seq"]));
break;
case "review.started":
case "review.finished":
if (state.inbox.some((i) => i.task_id === ev.task_id && i.kind === "question")) {
void loadInbox();
}
break;
case "review.finding":
if (state.inbox.some((i) => i.task_id === ev.task_id && i.kind === "question")) {
void loadInbox();
}
break;
case "focus.updated":
if (ev.actor !== state.me?.login) {
applyFocus(ev.payload as unknown as Focus);