Make every question blocking and drop inbox priority

This commit is contained in:
Ian Gulliver
2026-10-16 08:35:49 -07:00
parent 1427814014
commit 78cca2fcbe
25 changed files with 268 additions and 322 deletions
+3 -8
View File
@@ -674,7 +674,7 @@ export interface paths {
path?: never;
cookie?: never;
};
/** @description Inbox items, highest priority first (blocked, gate, review, fyi), then oldest first. Filters narrow the one query to a project's or a task's view. */
/** @description Inbox items, oldest first. Filters narrow the one query to a project's or a task's view. */
get: operations["listInbox"];
put?: never;
post?: never;
@@ -711,7 +711,7 @@ export interface paths {
};
get?: never;
put?: never;
/** @description Answers one or more items in one submission. Answers reach the agent as one message once it is idle and none of its blocking questions are unanswered. */
/** @description Answers one or more items in one submission. Answers reach the agent as one message once it is idle and none of its questions are unanswered. */
post: operations["respondInbox"];
delete?: never;
options?: never;
@@ -803,9 +803,7 @@ export interface components {
};
/** @description Which new inbox items and finished turns notify this user in their open byre pages. */
NotificationPrefs: {
/** @description Questions asked with blocking: true. On by default. */
blocking_questions: boolean;
/** @description Non-blocking questions. */
/** @description Questions. On by default. */
questions: boolean;
/** @description Task turns that end with a summary (turn.ended with summary: true). */
reports: boolean;
@@ -1131,9 +1129,6 @@ export interface components {
thread_id: string;
/** @enum {string} */
kind: "question" | "session_error" | "rate_limited";
/** @enum {string} */
priority: "blocked" | "gate" | "review" | "fyi";
blocking: boolean;
/** @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"];
+1 -2
View File
@@ -101,11 +101,10 @@ function card(item: InboxItem): HTMLElement {
const actions = h("div", { class: "card-actions" });
const el = h(
"article",
{ class: `card ${item.kind} ${item.priority}` },
{ class: `card ${item.kind}` },
h(
"header",
{},
h("span", { class: `priority ${item.priority}` }, item.priority),
h("span", { class: "kind" }, item.kind.replace("_", " ")),
h("time", { dateTime: item.created_at, title: item.created_at }, ago(item.created_at)),
),
+1 -1
View File
@@ -4,7 +4,7 @@ import { findTask, focusTask, state } from "./state.js";
function wants(p: NotificationPrefs, item: InboxItem): boolean {
switch (item.kind) {
case "question":
return item.blocking ? p.blocking_questions : p.questions;
return p.questions;
case "session_error":
return p.errors;
case "rate_limited":
+1 -2
View File
@@ -3,8 +3,7 @@ import { errorText, h, replace, showAlert } from "./dom.js";
import { on, state } from "./state.js";
const kinds: { key: keyof NotificationPrefs; label: string }[] = [
{ key: "blocking_questions", label: "Blocking questions" },
{ key: "questions", label: "Non-blocking questions" },
{ key: "questions", label: "Questions" },
{ key: "reports", label: "Turn summaries" },
{ key: "errors", label: "Session errors" },
{ key: "rate_limits", label: "Rate limits" },
+1 -1
View File
@@ -1027,7 +1027,7 @@ function renderEvent(ev: ByreEvent, ctx: Ctx): HTMLElement | null {
const kind = p["kind"];
if (kind === "question") {
const q = p["payload"] as Record<string, unknown>;
return h("div", { class: "note ask" }, `asked${p["blocking"] ? " (blocking)" : ""}: `, String(q["question"]));
return h("div", { class: "note ask" }, "asked: ", String(q["question"]));
}
if (kind === "session_error" || kind === "rate_limited") {
const q = p["payload"] as Record<string, unknown>;