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
+1 -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";
const delegateText = "Use your judgment for this decision and continue within the existing task instructions.";
@@ -83,7 +82,7 @@ function card(item) {
const p = item.payload;
const body = h("div", { class: "card-body" });
const actions = h("div", { class: "card-actions" });
const el = h("article", { class: `card ${item.kind}` }, h("header", {}, h("span", { class: "kind" }, item.kind.replace("_", " ")), 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);
const el = h("article", { class: `card ${item.kind}` }, h("header", {}, h("span", { class: "kind" }, item.kind.replace("_", " ")), h("time", { dateTime: item.created_at, title: item.created_at }, ago(item.created_at))), body, thread(item), actions);
const busy = () => el.classList.contains("submitting");
const lock = (on) => {
el.classList.toggle("submitting", on);
+1 -1
View File
File diff suppressed because one or more lines are too long
-11
View File
@@ -401,17 +401,6 @@ export function handleEvent(ev) {
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);
+1 -1
View File
File diff suppressed because one or more lines are too long
-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);
-7
View File
@@ -1873,13 +1873,6 @@ pre.file-text .line::before {
display: none;
}
.card-reviews {
display: flex;
flex-direction: column;
gap: 8px;
margin: 8px 0;
}
.review header {
display: flex;
flex-wrap: wrap;