{"draft":null,"from":35,"to":36,"files":[{"path":"client/src/issues.ts","added":21,"removed":6,"diff":"--- a/client/src/issues.ts\n+++ b/client/src/issues.ts\n@@ -27,6 +27,7 @@\n import { fromEnv } from \"./env-names.ts\";\n import { ignoredHere } from \"./fetch.ts\";\n import { loadIgnore, relativeTo } from \"./folder.ts\";\n+import { queuedLines, standing } from \"./queue.ts\";\n import { seenText, shortWhen } from \"./times.ts\";\n \n const q = (s: string): string => JSON.stringify(s);\n@@ -698,17 +699,31 @@\n \tconst { api, config } = openIssues(env);\n \tconst mine = bool(args, \"mine\") || str(args, \"of\") === config.agent;\n \tconst of = mine ? config.agent : str(args, \"of\");\n-\tconst { asks } = mine ? await api.waitingMine() : await api.waiting(of);\n+\t// With --mine, your own publishes still in the merge queue are open work too. A server without a queue,\n+\t// or one that can't be read now, leaves them out rather than failing the asks.\n+\tconst [{ asks }, queue] = await Promise.all([\n+\t\tmine ? api.waitingMine() : api.waiting(of),\n+\t\tmine ? api.queueState().catch(() => undefined) : undefined,\n+\t]);\n+\tconst queued = queuedLines(queue, config.agent);\n+\tconst yours = (queue?.items ?? []).filter((q) => q.agent === config.agent);\n \treturn {\n-\t\ttext:\n-\t\t\tasks.length === 0\n-\t\t\t\t? `Nothing is waiting${of ? ` on ${of}` : \"\"}.`\n+\t\ttext: [\n+\t\t\t...queued,\n+\t\t\t...(asks.length === 0\n+\t\t\t\t? [queued.length > 0 ? `No open asks of ${of}.` : `Nothing is waiting${of ? ` on ${of}` : \"\"}.`]\n \t\t\t\t: [\n \t\t\t\t\t\t`${plural(asks.length, \"open ask\")}${of ? ` of ${of}` : \"\"}, soonest due first:`,\n \t\t\t\t\t\t...asks.map((a) => askLine(a, api)),\n \t\t\t\t\t\t'abso answer <ask> \"...\" answers one asked of you.',\n-\t\t\t\t\t].join(\"\\n\"),\n-\t\tjson: { asks },\n+\t\t\t\t\t]),\n+\t\t].join(\"\\n\"),\n+\t\tjson: {\n+\t\t\tasks,\n+\t\t\t...(yours.length > 0\n+\t\t\t\t? { queued: yours.map((q) => ({ id: q.id, message: q.message, standing: standing(queue!.items, q.id) })) }\n+\t\t\t\t: {}),\n+\t\t},\n \t};\n }\n "}],"unmatched":[]}