paseo-follow-up 2.1.0-beta.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/client/brief.tsx +12 -7
- package/client/chat.tsx +15 -6
- package/client/needs-you.tsx +25 -7
- package/client/questions.tsx +21 -15
- package/client/report-issue.tsx +2 -2
- package/client/spec.tsx +1 -1
- package/index.server.ts +92 -15
- package/package.json +1 -1
- package/server/agent-actions.ts +1 -1
- package/server/agent-hook.mjs +7 -2
- package/server/agent-parity.ts +5 -0
- package/server/daemon.ts +86 -32
- package/server/engine.ts +212 -122
- package/server/hook-source.ts +7 -2
- package/server/inbox.ts +64 -64
- package/server/linked.ts +28 -6
- package/server/local-titles.ts +67 -0
- package/server/mcp-source.ts +4 -2
- package/server/mcp.mjs +4 -2
- package/server/message-queue.ts +384 -0
- package/server/overseer.ts +12 -3
- package/server/questions.ts +4 -2
- package/server/report-send.ts +3 -2
- package/server/spec.ts +18 -29
- package/server/store.ts +9 -2
- package/server/teardown.ts +7 -1
- package/server/transcript-titles.ts +165 -0
- package/shared/about.ts +1 -0
- package/shared/attention.ts +12 -3
- package/shared/brief.ts +2 -3
- package/shared/chat.ts +1 -1
- package/shared/contracts.ts +5 -1
- package/shared/headline.ts +1 -0
- package/shared/linked-display.ts +6 -1
- package/shared/linked.ts +2 -2
- package/shared/local-titles.ts +68 -0
- package/shared/model.ts +6 -0
- package/shared/overseer.ts +3 -0
- package/shared/questions.ts +35 -7
- package/shared/queue.ts +173 -0
- package/shared/spec.ts +1 -0
- package/shared/status-invariants.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of Follow-up, newest first. Follow-up shows the curated part of a major release in "What's new" after the update, and every version's notes from Home's version line.
|
|
4
4
|
|
|
5
|
+
## 2.1.0 (2026-11-17)
|
|
6
|
+
|
|
7
|
+
Answers reach the agent even when Paseo is busy, search is one key away, and artifact links have their real names.
|
|
8
|
+
|
|
9
|
+
- **Answers reach the agent on their own.** They wait in a queue and retry until they land, even while Paseo is busy or unreachable, without arriving twice. The card says when the next try is.
|
|
10
|
+
- **⌘/ opens Follow-up search from anywhere** (Ctrl+/ on Windows and Linux). Walk Home and the sidebar view with ↑/↓ or j/k, and Enter opens the chat.
|
|
11
|
+
- **Find things faster:** search inside a workspace's Pull requests, Tasks and Activity, and the sidebar filter puts name matches first.
|
|
12
|
+
- **Artifact links show their real names** instead of "Untitled artifact", or where they came from and when if the name was never seen.
|
|
13
|
+
- **New:** Follow-up's own icon, a resizable side pane on Home, the Overseer in the sidebar view, and Report an issue can start in a new workspace.
|
|
14
|
+
- **Steadier and lighter:** Follow-up starts on its own after Paseo restarts, keeps one connection to Paseo, gives memory back after a busy stretch, and tells you when it can't save instead of failing silently.
|
|
15
|
+
|
|
16
|
+
<details><summary>Full changelog since 2.0.1</summary>
|
|
17
|
+
|
|
18
|
+
### Home and Needs you
|
|
19
|
+
|
|
20
|
+
- Follow-up has its own icon now, in the sidebar, the workspace header button and the panel tab, instead of the pull request icon. While a workspace needs you, the icon's dot turns amber.
|
|
21
|
+
- Walk Home and Follow-up's sidebar view from the keyboard: ↑/↓ or j/k move between workspaces, Home and End jump to the ends, and Enter opens the chat.
|
|
22
|
+
- Drag the line between Home's list and the right-hand pane to make the pane wider or narrower. Follow-up keeps the width you pick, and on a keyboard you can move it with the arrow keys.
|
|
23
|
+
- Press ⌘/ (Ctrl+/ on Windows and Linux) anywhere in Paseo to open Follow-up Home with the cursor in its search, even while you're typing a message. Pick another key, or none, in Settings under Inbox & display.
|
|
24
|
+
- Search inside a workspace's Pull requests, Tasks and Activity: the search icon in each section's header finds a PR by number, title, branch or failing check, a task by its title or evidence, and anything in Activity, including folded items.
|
|
25
|
+
- Filtering the sidebar list puts workspaces whose name matches first, then matches in a branch, PR or linked item, then matches elsewhere in the row.
|
|
26
|
+
- On a narrow Home list, a row's badges and pull request chip now make room (shortening, then hiding the least important) instead of covering when the row last changed.
|
|
27
|
+
- A task scheduled for a time now starts at that time, not up to a minute later.
|
|
28
|
+
|
|
29
|
+
### Questions and answers
|
|
30
|
+
|
|
31
|
+
- Sending repairs answers at once, even when Paseo is slow. Follow-up queues the message and sends it as soon as the agent is free; the message line says why it's waiting.
|
|
32
|
+
- An answer and the repairs waiting for the same agent now go together as one message, so the agent wakes up once instead of twice.
|
|
33
|
+
- Your answers reach the agent on their own. If Paseo is busy or unreachable, Follow-up keeps the answer and retries until it lands, and the card says when it tries next. Once Paseo is back, the answer goes out within about 15 seconds.
|
|
34
|
+
- An answer that can't be confirmed after several tries shows Failed with Retry, instead of waiting silently for you to resend it.
|
|
35
|
+
- On a phone, Report an issue's Send to list scrolls again, and the new workspace and new agent options come first.
|
|
36
|
+
|
|
37
|
+
### Repairs and PRs
|
|
38
|
+
|
|
39
|
+
- Lists inside sheets and popovers scroll on a phone, and the reviewer field in a PR sheet stays above the keyboard.
|
|
40
|
+
- Follow-up keeps one connection to Paseo while it runs, instead of reconnecting every minute or two between checks.
|
|
41
|
+
- The deploy check reads Cloud Run in Follow-up itself instead of starting gcloud for every fleet read; gcloud now only hands out the access token, once every 45 minutes.
|
|
42
|
+
|
|
43
|
+
### The Overseer and AI priority
|
|
44
|
+
|
|
45
|
+
- Overseer forwards and reports handed to an agent are kept and retried until they arrive.
|
|
46
|
+
|
|
47
|
+
### Summary and Linked items
|
|
48
|
+
|
|
49
|
+
- Rename title with AI works with linked artifacts and fixes long or quoted suggestions before showing them.
|
|
50
|
+
|
|
51
|
+
### Providers and helper agents
|
|
52
|
+
|
|
53
|
+
- Report an issue can start the report in a new workspace, with an agent on the default model.
|
|
54
|
+
|
|
55
|
+
### Agents and tools
|
|
56
|
+
|
|
57
|
+
- Rename title with AI works for workspaces beyond the first page, including background workspaces.
|
|
58
|
+
|
|
59
|
+
### Setup, Settings and updates
|
|
60
|
+
|
|
61
|
+
- Release tooling waits for delayed registry updates after npm accepts a version, rather than treating the version as failed.
|
|
62
|
+
- Retrying an accepted release resumes verification when npm reports that the version was already published.
|
|
63
|
+
|
|
64
|
+
### Performance
|
|
65
|
+
|
|
66
|
+
- Follow-up gives memory back after a busy stretch: once agents and the app go quiet, the worker returns to its usual size instead of staying at its peak.
|
|
67
|
+
- Follow-up does less work while agents are busy.
|
|
68
|
+
- Follow-up sends the app less data when it refreshes your workspaces, so the worker uses less memory.
|
|
69
|
+
|
|
70
|
+
### More
|
|
71
|
+
|
|
72
|
+
- Agents can read Follow-up's message queue and retry or cancel a waiting message, like you can.
|
|
73
|
+
- Artifact and spec links reuse names from local publish and read receipts across workspaces. Existing unnamed links fill at startup, chosen names stay intact, and unnamed artifacts show their source and date.
|
|
74
|
+
- Follow-up reliably frees its previous session when the app restarts, so tracking can resume.
|
|
75
|
+
- The action is now called Rename title with AI in menus, ⌘K and the dialog.
|
|
76
|
+
|
|
77
|
+
### Fixes
|
|
78
|
+
|
|
79
|
+
- A message to an agent that can't go out (an Overseer forward or a report) now shows in Needs you with Retry and Cancel.
|
|
80
|
+
- Fixed: an answer card could reach the agent twice when Paseo was slow to confirm it. Follow-up now checks the agent's chat before sending anything again.
|
|
81
|
+
- Follow-up's sidebar view now shows the Overseer, with its state, like Home does. Tap it to open the Overseer's chat, or to start it.
|
|
82
|
+
- Saving reviewers, agent settings and the PR workflow no longer stalls on a slow disk, and Needs you no longer waits while the inbox saves.
|
|
83
|
+
- A setting that can't be saved now shows an error instead of failing silently; your change is kept and saving keeps retrying.
|
|
84
|
+
- A message waiting to go out now says "Next try at 12:04" instead of "retrying at 12:04", so its status line no longer repeats the Retrying label.
|
|
85
|
+
- Suggestions stay editable when they need a change, and a busy host no longer refuses a rename click.
|
|
86
|
+
- The sort menu now says only when your workspaces were last ranked, without the run's cost or a note about Home.
|
|
87
|
+
- If Follow-up can't save your tracked work, it now says so and keeps retrying instead of failing silently.
|
|
88
|
+
- Follow-up no longer stays down after Paseo restarts while the previous Follow-up is still stopping. It waits for that one to exit and starts on its own, and says it is waiting meanwhile.
|
|
89
|
+
|
|
90
|
+
</details>
|
|
91
|
+
|
|
5
92
|
## 2.0.1 (2026-11-14)
|
|
6
93
|
|
|
7
94
|
Fixes are easier to follow, merging takes one click, and Follow-up runs much lighter.
|
package/client/brief.tsx
CHANGED
|
@@ -4,8 +4,9 @@ import { Platform, View, useWindowDimensions } from "react-native";
|
|
|
4
4
|
import { Pressable, Text } from "./text";
|
|
5
5
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { openExternalUrl, useRpc, type PluginClientContext, type PluginTimelineItemProps } from "@getpaseo/plugin/client";
|
|
7
|
+
import { deliveryStatus } from "../shared/queue";
|
|
7
8
|
import { Icon, TextInput, copyText, useToast } from "@getpaseo/plugin/client/ui";
|
|
8
|
-
import { BRIEF_KIND, BRIEF_VERSION, askedDecisions, cardPicks, notedCount, pickedCount, briefSchema, collapsedLine, extrasFit, hasOriginal, nothingNeededLine, isTight, pastRows, pastTone, selectsFirst, sendBar, shownBrief, pastAsk, liveBrief, newAnswerId,
|
|
9
|
+
import { BRIEF_KIND, BRIEF_VERSION, askedDecisions, cardPicks, notedCount, pickedCount, briefSchema, collapsedLine, extrasFit, hasOriginal, nothingNeededLine, isTight, pastRows, pastTone, selectsFirst, sendBar, shownBrief, pastAsk, liveBrief, newAnswerId, type Brief, type BriefDecision, type BriefMove } from "../shared/brief";
|
|
9
10
|
import { age } from "../shared/inbox";
|
|
10
11
|
import { noReviewReposVersion, onNoReviewRepos } from "../shared/pr-workflow";
|
|
11
12
|
import { briefKey, HEADLINE_WORD } from "../shared/headline";
|
|
@@ -287,17 +288,21 @@ function Past({ b, c, now, compact, height, pending = false, onResend, resending
|
|
|
287
288
|
const picked = answered && asked.some(d => d.chosen);
|
|
288
289
|
// The answer is recorded the moment Send is pressed; getting it to the agent can take Paseo a minute or more (a dormant
|
|
289
290
|
// agent resumes first). Until it lands the card reads as in progress, and if every retry failed it says so with Send again.
|
|
290
|
-
|
|
291
|
+
// The message queue's state, worded as on every card (shared/queue.ts deliveryStatus).
|
|
292
|
+
const delivery = b.delivery ? deliveryStatus({ state: b.delivery.state, reason: b.delivery.error, nextAt: b.delivery.nextAt }) : null;
|
|
293
|
+
const sending = pending || !!delivery?.pending || unsent;
|
|
291
294
|
const failed = b.delivery?.state === "failed";
|
|
295
|
+
const cancelled = b.delivery?.state === "cancelled";
|
|
292
296
|
// Pending reads as in progress (a dashed circle), and becomes the solid check when the send lands.
|
|
293
297
|
const icon = b.state === "superseded" ? "History" : failed ? "CircleAlert" : sending ? "CircleDashed" : "CircleCheck";
|
|
294
298
|
const spoken = pending ? `Done, sending (undo available): ${ask}` : unsent ? `${status!.label}: ${ask}` : failed ? `Answer not delivered: ${ask}` : sending ? `Answered, sending to the agent: ${ask}` : undefined;
|
|
295
|
-
const color = failed ? c.
|
|
299
|
+
const color = failed ? c.statusWarning : pastTone(b.state, sending) === "success" ? c.statusSuccess : c.foregroundMuted;
|
|
296
300
|
// A Done card already says "Done" as its outcome; its time stands alone rather than repeating it.
|
|
297
|
-
const right =
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
const right = delivery && !pending ? delivery.label : unsent ? status!.label : answered && b.outcomeAt ? (b.outcome === "Done" ? clock(b.outcomeAt) : `Answered ${clock(b.outcomeAt)}`) : age(b.outcomeAt ?? b.at, now);
|
|
302
|
+
// Failed (the rare loud case) says so with Retry; a timer's wait (Queued, Retrying) offers Try now; Cancelled says why.
|
|
303
|
+
const undelivered = (indent: number) => delivery && !pending && (failed || cancelled || delivery.action === "try-now") && <View style={{ paddingLeft: indent, gap: 8, alignItems: "flex-start" }}>
|
|
304
|
+
<Text accessibilityRole={failed ? "alert" : undefined} style={{ color: failed ? c.statusWarning : c.foregroundMuted, fontSize: 13, lineHeight: 18 }}>{failed ? `${delivery.detail} Your answer is kept.` : delivery.detail}</Text>
|
|
305
|
+
{onResend && delivery.action && <Btn label={resending ? "Sending…" : delivery.action === "retry" ? "Retry" : "Try now"} icon="RotateCcw" primary={delivery.action === "retry"} onPress={onResend} disabled={resending} c={c} compact={compact} hint={delivery.action === "retry" ? "Sends the same answer again" : "Tries sending it now"} />}
|
|
301
306
|
</View>;
|
|
302
307
|
const body = expanded && <View style={{ gap: 10, paddingTop: 4 }}>
|
|
303
308
|
<BriefBody b={b} c={c} compact={compact} tight={false} embedded height={height} mode="readonly" picks={{}} onPick={() => undefined} busy={null} />
|
package/client/chat.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import type { PluginClientContext, PluginTimelineItemProps } from "@getpaseo/plu
|
|
|
5
5
|
import { Icon, ScrollView } from "@getpaseo/plugin/client/ui";
|
|
6
6
|
import { answerCardSchema, answerCardWhose, batchCardSchema, createMomentLedger, followTimelineItem, parseBatchPrompt, toolRowSchema, type AnswerCard, type BatchCard, type ToolRow } from "../shared/chat";
|
|
7
7
|
import { parseAnswerMessage, parseAnswersMessage } from "../shared/questions";
|
|
8
|
+
import { envelopeParts } from "../shared/queue";
|
|
8
9
|
import { CREATED_KIND, CREATED_VERSION, createdCard } from "../shared/created";
|
|
9
10
|
import { timelineSupported } from "./created";
|
|
10
11
|
import { unconfirmedNote, unconfirmedRefs } from "../shared/status";
|
|
@@ -138,6 +139,16 @@ function AnswerCardView({ item, theme }: PluginTimelineItemProps<AnswerCard>) {
|
|
|
138
139
|
</View>;
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
/** One Follow-up part of a user message as its chat card: an answer (one or several decisions) or a repair batch. */
|
|
143
|
+
function promptCard(text: string) {
|
|
144
|
+
const several = parseAnswersMessage(text);
|
|
145
|
+
if (several) return { type: "plugin" as const, kind: ANSWER_KIND, version: 1, data: { id: several.answers.map(a => a.id).join(", "), title: several.title, choice: "", label: null, words: null, text, answers: several.answers } as Record<string, unknown> };
|
|
146
|
+
const answer = parseAnswerMessage(text);
|
|
147
|
+
if (answer) return { type: "plugin" as const, kind: ANSWER_KIND, version: 1, data: { ...answer, text } as Record<string, unknown> };
|
|
148
|
+
const card = parseBatchPrompt(text);
|
|
149
|
+
return card ? { type: "plugin" as const, kind: BATCH_KIND, version: 1, data: card as Record<string, unknown> } : null;
|
|
150
|
+
}
|
|
151
|
+
|
|
141
152
|
export function contributeChat(client: PluginClientContext) {
|
|
142
153
|
// A host whose client API has no timeline transformers or renderers keeps every plain row.
|
|
143
154
|
if (!timelineSupported(client)) return () => {};
|
|
@@ -159,12 +170,10 @@ export function contributeChat(client: PluginClientContext) {
|
|
|
159
170
|
client.addTimelineTransformer({
|
|
160
171
|
id: "follow-batch-prompts", query: { itemType: "user_message" },
|
|
161
172
|
transform({ item }) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
const card = parseBatchPrompt(item.text);
|
|
167
|
-
return card ? { items: [{ type: "plugin" as const, kind: BATCH_KIND, version: 1, data: card }] } : undefined;
|
|
173
|
+
// One message can carry several parts (an answer and the repairs that rode along, shared/queue.ts): a card each,
|
|
174
|
+
// in order. A part no card recognises keeps the whole message as Paseo's plain row.
|
|
175
|
+
const cards = envelopeParts(item.text).map(promptCard);
|
|
176
|
+
return cards.every(Boolean) ? { items: cards as never } : undefined;
|
|
168
177
|
},
|
|
169
178
|
}),
|
|
170
179
|
client.addTimelineRenderer({ kind: TOOL_KIND, version: 1, schema: toolRowSchema, Component: ToolRowView }),
|
package/client/needs-you.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { Pressable, Text } from "./text";
|
|
|
4
4
|
import { Icon, useToast } from "@getpaseo/plugin/client/ui";
|
|
5
5
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
6
6
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
7
|
-
import { answerQuestionRpc, checkPrActionRpc, controlRpc, sendRpc } from "../shared/contracts";
|
|
7
|
+
import { answerQuestionRpc, checkPrActionRpc, controlRpc, queueActionRpc, sendRpc } from "../shared/contracts";
|
|
8
8
|
import { agentName, needsYou, workspaceSnoozed, type NeedItem } from "../shared/attention";
|
|
9
9
|
import { laterLabel } from "./inbox";
|
|
10
10
|
import { sameText } from "../shared/home";
|
|
@@ -26,6 +26,7 @@ import { PrLinksProvider, RichText } from "./rich-text";
|
|
|
26
26
|
import { useMergeButtons } from "./merge-button";
|
|
27
27
|
import { mergeScope } from "../shared/merge-click";
|
|
28
28
|
import { prLinksByNumber } from "../shared/presentation";
|
|
29
|
+
import { deliveryStatus } from "../shared/queue";
|
|
29
30
|
export { overviewKey, workspaceKey };
|
|
30
31
|
|
|
31
32
|
function glyph(item: NeedItem, colors: Colors): { name: string; color: string } {
|
|
@@ -34,6 +35,7 @@ function glyph(item: NeedItem, colors: Colors): { name: string; color: string }
|
|
|
34
35
|
case "retry": return { name: "OctagonAlert", color: colors.statusDanger };
|
|
35
36
|
case "capped": return { name: "CircleAlert", color: colors.statusWarning };
|
|
36
37
|
case "check": return { name: "CircleHelp", color: colors.statusWarning };
|
|
38
|
+
case "message": return { name: "MessageSquareWarning", color: colors.statusWarning };
|
|
37
39
|
case "decision": return { name: "MessageCircleQuestion", color: colors.statusWarning };
|
|
38
40
|
case "question": return { name: item.state === "stopped" ? "CirclePause" : "MessageCircleQuestion", color: colors.statusWarning };
|
|
39
41
|
case "answer": return item.waiting ? { name: item.waiting === "in-chat" ? "MessageSquareText" : "Copy", color: colors.statusWarning } : { name: "TriangleAlert", color: colors.statusWarning };
|
|
@@ -56,7 +58,7 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
56
58
|
useReviewerSettings();
|
|
57
59
|
const toast = useToast();
|
|
58
60
|
const cache = useQueryClient();
|
|
59
|
-
const control = useRpc(controlRpc); const send = useRpc(sendRpc); const check = useRpc(checkPrActionRpc); const answer = useRpc(answerQuestionRpc);
|
|
61
|
+
const control = useRpc(controlRpc); const send = useRpc(sendRpc); const check = useRpc(checkPrActionRpc); const answer = useRpc(answerQuestionRpc); const queueAction = useRpc(queueActionRpc);
|
|
60
62
|
const refresh = () => { void cache.invalidateQueries({ queryKey: workspaceKey(w.id) }); void cache.invalidateQueries({ queryKey: overviewKey }); };
|
|
61
63
|
const fail = (error: Error) => { toast.error(errorText(error)); refresh(); };
|
|
62
64
|
const resume = useMutation({ mutationFn: () => control({ workspaceId: w.id, clearHold: true }), onSuccess: () => { toast.show("Follow-up resumed", { variant: "success" }); refresh(); actions.after?.(); }, onError: fail });
|
|
@@ -80,15 +82,24 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
80
82
|
}, onSuccess: (result, questionId) => {
|
|
81
83
|
const d = result.question.answer?.delivery;
|
|
82
84
|
if (d?.state === "sent") toast.show(`Sent your ${questionId} answer to ${agentName(w)}`, { variant: "success" });
|
|
83
|
-
else if (d?.state === "
|
|
84
|
-
else toast.show(
|
|
85
|
+
else if (d?.state === "failed" || d?.state === "cancelled") toast.show(deliveryStatus({ state: d.state, reason: d.reason }).detail, { variant: "warning" });
|
|
86
|
+
else toast.show(`Sending your ${questionId} answer to ${agentName(w)}`, { variant: "info" });
|
|
85
87
|
refresh(); actions.after?.();
|
|
86
88
|
}, onError: fail });
|
|
89
|
+
// Retry on a failed answer: the developer checked the chat, so the queue resends it now (shared/queue.ts).
|
|
90
|
+
const resendAnswer = useMutation({ mutationFn: (questionId: string) => {
|
|
91
|
+
const a = w.questions.find(q => q.id === questionId)?.answer;
|
|
92
|
+
if (!a) throw new Error(`${questionId} has no recorded answer`);
|
|
93
|
+
return answer({ workspaceId: w.id, questionId, choice: a.choice, words: a.words ?? undefined, action: "resend" });
|
|
94
|
+
}, onSuccess: (_result, questionId) => { toast.show(`Sending your ${questionId} answer again`, { variant: "info" }); refresh(); actions.after?.(); }, onError: fail });
|
|
95
|
+
// A forward or report that didn't go out (Workspace.undelivered): Retry or Cancel its queue item, the queue tools' path.
|
|
96
|
+
const queueAct = useMutation({ mutationFn: (input: { itemId: string; action: "retry" | "cancel" }) => queueAction(input),
|
|
97
|
+
onSuccess: (_r, input) => { toast.show(input.action === "retry" ? "Sending it again" : "Cancelled; it won't be sent", { variant: "info" }); refresh(); actions.after?.(); }, onError: fail });
|
|
87
98
|
const inspect = useMutation({ mutationFn: (actionId: string) => check({ workspaceId: w.id, actionId }), onSuccess: reply => { toast.show(reply.result, { variant: reply.state === "failed" ? "warning" : "info" }); refresh(); }, onError: fail });
|
|
88
99
|
const items = rows ?? needsYou(w, now);
|
|
89
100
|
const mergeControl = useMergeButtons(w);
|
|
90
101
|
if (!items.length) return null;
|
|
91
|
-
const busy = resume.isPending || retry.isPending || retryTask.isPending || deliver.isPending || sendAnswer.isPending || inspect.isPending;
|
|
102
|
+
const busy = resume.isPending || retry.isPending || retryTask.isPending || deliver.isPending || sendAnswer.isPending || resendAnswer.isPending || queueAct.isPending || inspect.isPending;
|
|
92
103
|
const openMain = actions.openAgent ? () => actions.openAgent!(w.mainAgentId) : undefined;
|
|
93
104
|
const action = (item: NeedItem) => {
|
|
94
105
|
switch (item.kind) {
|
|
@@ -104,6 +115,10 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
104
115
|
{openMain && <Button theme={theme} compact={compact} icon="MessageSquare" title="Open agent" accessibilityLabel="Open main agent" onPress={openMain} />}
|
|
105
116
|
</>;
|
|
106
117
|
case "check": return <Button theme={theme} compact={compact} icon="RefreshCw" title="Check state" loading={inspect.isPending} disabled={busy} onPress={() => inspect.mutate(item.actionId)} />;
|
|
118
|
+
case "message": return <>
|
|
119
|
+
<Button theme={theme} compact={compact} kind="primary" icon="RotateCcw" title="Retry" accessibilityLabel={`Send it again: ${item.title}`} loading={queueAct.isPending && queueAct.variables?.action === "retry"} disabled={busy} onPress={() => queueAct.mutate({ itemId: item.itemId, action: "retry" })} />
|
|
120
|
+
<Button theme={theme} compact={compact} kind="ghost" icon="X" title="Cancel" accessibilityLabel={`Don't send it: ${item.title}`} loading={queueAct.isPending && queueAct.variables?.action === "cancel"} disabled={busy} onPress={() => queueAct.mutate({ itemId: item.itemId, action: "cancel" })} />
|
|
121
|
+
</>;
|
|
107
122
|
case "decision": return openMain && <Button theme={theme} compact={compact} icon="MessageSquare" title="Answer in chat" onPress={openMain} />;
|
|
108
123
|
case "question": return actions.openQuestion && <Button theme={theme} compact={compact} icon="MessageCircleReply" title="Answer" accessibilityLabel={`Answer ${item.title}`} onPress={() => actions.openQuestion!(item.questionId)} />;
|
|
109
124
|
case "answer": return item.waiting
|
|
@@ -111,7 +126,10 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
111
126
|
<Button theme={theme} compact={compact} icon="Send" title="Send" accessibilityLabel={`Send your ${item.questionId} answer to ${agentName(w)}`} loading={sendAnswer.isPending} disabled={busy} onPress={() => sendAnswer.mutate(item.questionId)} />
|
|
112
127
|
{actions.openQuestion && !compact && <Button theme={theme} compact={compact} kind="ghost" title="Open" accessibilityLabel={`Open ${item.questionId}`} onPress={() => actions.openQuestion!(item.questionId)} />}
|
|
113
128
|
</>
|
|
114
|
-
:
|
|
129
|
+
: <>
|
|
130
|
+
<Button theme={theme} compact={compact} kind="primary" icon="RotateCcw" title="Retry" accessibilityLabel={`Send your ${item.questionId} answer again`} loading={resendAnswer.isPending} disabled={busy} onPress={() => resendAnswer.mutate(item.questionId)} />
|
|
131
|
+
{actions.openAgent && <Button theme={theme} compact={compact} kind="ghost" icon="MessageSquare" title="Open agent" accessibilityLabel={`Open the agent's chat to check for your ${item.questionId} answer`} onPress={() => { const q = w.questions.find(x => x.id === item.questionId); actions.openAgent!(q?.askedBy ?? w.mainAgentId); }} />}
|
|
132
|
+
</>;
|
|
115
133
|
case "send": return <Button theme={theme} compact={compact} kind="primary" icon="Send" title={item.finish ? "Ask to finish" : `Send ${item.tasks.length} task${item.tasks.length === 1 ? "" : "s"}`} accessibilityLabel={item.finish ? `Ask to finish: ${FINISH_ASK}` : `Send ${item.tasks.length} task${item.tasks.length === 1 ? "" : "s"} to ${agentName(w)}`} accessibilityHint={item.blocker ?? undefined} loading={deliver.isPending} disabled={busy || !!item.blocker} onPress={() => deliver.mutate(item.batchId)} />;
|
|
116
134
|
// One click merges what the button names (a-click-on-merge-merges); the sheet's confirm only when the scope can't be known.
|
|
117
135
|
case "merge": return mergeControl(item.prKey, { theme, compact, fallback: actions.openPr ? () => actions.openPr!(item.prKey, "merge") : undefined }).button;
|
|
@@ -142,7 +160,7 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
142
160
|
<View style={item.kind === "reviewers" ? { alignSelf: "flex-start", paddingTop: 2 } : undefined}><Icon name={g.name} size={16} color={g.color} /></View>
|
|
143
161
|
<View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
144
162
|
{!said && <RichText numberOfLines={2} style={t.label}>{item.title}</RichText>}
|
|
145
|
-
{"detail" in item && !!item.detail && !sameText(item.detail, item.title.replace(/^Q\d+ · /, "")) && <RichText linkColor={c.foreground} numberOfLines={1} style={t.meta}>{item.detail}</RichText>}
|
|
163
|
+
{"detail" in item && !!item.detail && !sameText(item.detail, item.title.replace(/^Q\d+ · /, "")) && <RichText linkColor={c.foreground} numberOfLines={item.kind === "answer" || item.kind === "message" ? 3 : 1} style={t.meta}>{item.detail}</RichText>}
|
|
146
164
|
{item.kind === "reviewers" && <NoReviewLink repo={item.prKey.split("#")[0]} theme={theme} compact />}
|
|
147
165
|
</View>
|
|
148
166
|
<View style={item.kind === "reviewers" ? { alignSelf: "flex-start" } : undefined}>{pair ?? button}</View>
|
package/client/questions.tsx
CHANGED
|
@@ -10,8 +10,9 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
|
10
10
|
import { answerQuestionRpc } from "../shared/contracts";
|
|
11
11
|
import type { Workspace } from "../shared/model";
|
|
12
12
|
import type { ListQuestion, ListWorkspace } from "../shared/list";
|
|
13
|
-
import { OTHER, OTHER_LABEL, answerHeading, answerLabel, answerStatus, answerMessage, isOpen, isOther, questionState, type Question } from "../shared/questions";
|
|
13
|
+
import { OTHER, OTHER_LABEL, answerHeading, answerLabel, answerStatus, answerMessage, answerHasActions, resendTitle, isOpen, isOther, questionState, type Question } from "../shared/questions";
|
|
14
14
|
import { ago } from "../shared/attention";
|
|
15
|
+
import { RETRYING_DETAIL, deliveryStatus } from "../shared/queue";
|
|
15
16
|
import { mootNote, sentence } from "../shared/errors";
|
|
16
17
|
import { activity, type ActivityTone } from "../shared/activity";
|
|
17
18
|
import { Button, Card, CardRow, Chip, FoldRow, IconButton, SubmitScope, errorText, text, type Theme } from "./kit";
|
|
@@ -53,9 +54,12 @@ function deliveryLine(w: ListWorkspace, q: ListQuestion, now: number): { icon: s
|
|
|
53
54
|
if (!d) return null;
|
|
54
55
|
switch (d.state) {
|
|
55
56
|
case "sent": return { icon: "CircleCheck", tone: "success", text: `Sent to ${who(w, d.to)} ${ago(d.at, now)}` };
|
|
56
|
-
|
|
57
|
-
case "
|
|
58
|
-
|
|
57
|
+
// The queue's states read one way everywhere (shared/queue.ts deliveryStatus).
|
|
58
|
+
case "sending": case "queued": case "retrying": case "failed": case "cancelled": {
|
|
59
|
+
const s = deliveryStatus({ state: d.state, reason: d.reason, nextAt: d.nextAt });
|
|
60
|
+
return { icon: s.tone === "spinner" ? "" : d.state === "queued" ? "Clock" : d.state === "retrying" ? "RotateCcw" : d.state === "cancelled" ? "CircleSlash" : "TriangleAlert", tone: s.tone === "danger" ? "warning" : s.tone, text: s.detail };
|
|
61
|
+
}
|
|
62
|
+
case "unconfirmed": return { icon: "RotateCcw", tone: "muted", text: RETRYING_DETAIL };
|
|
59
63
|
case "copied": return { icon: "Copy", tone: "muted", text: `Copied ${ago(d.at, now)}. Paste it into the agent's chat, or send it from here.` };
|
|
60
64
|
case "signed-off": return { icon: "Check", tone: "muted", text: `You signed it off ${ago(d.at, now)}; Follow-up didn't see it in the chat.` };
|
|
61
65
|
case "in-chat": return { icon: "MessageSquareText", tone: "muted", text: `Put in ${who(w, d.to)}'s chat ${ago(d.at, now)}. Send it there, or send it from here.` };
|
|
@@ -131,8 +135,8 @@ export function QuestionBody({ workspace: w, question: q, theme, compact, now =
|
|
|
131
135
|
const d = result.question.answer?.delivery;
|
|
132
136
|
if (action === "copy") toast.show(`Copied the ${q.id} answer. Paste it into the agent's chat.`, { variant: "success" });
|
|
133
137
|
else if (d?.state === "sent") toast.show(`Sent your ${q.id} answer to the agent`, { variant: "success" });
|
|
134
|
-
else if (d?.state === "
|
|
135
|
-
else toast.show(
|
|
138
|
+
else if (d?.state === "failed" || d?.state === "cancelled") toast.show(deliveryStatus({ state: d.state, reason: d.reason }).detail, { variant: "warning" });
|
|
139
|
+
else toast.show(`Answer saved. Follow-up delivers it and retries on its own.`, { variant: "info" });
|
|
136
140
|
refresh();
|
|
137
141
|
},
|
|
138
142
|
onError: error => { toast.error(errorText(error)); refresh(); },
|
|
@@ -167,8 +171,9 @@ export function QuestionBody({ workspace: w, question: q, theme, compact, now =
|
|
|
167
171
|
if (action === "copy") return { message: `Copied the ${q.id} answer. Paste it into the agent's chat.` };
|
|
168
172
|
if (action === "chat") return { message: `Your ${q.id} answer is in ${agent}'s chat. Send it there.` };
|
|
169
173
|
if (d?.state === "sent") return { message: `Sent to ${agent}` };
|
|
170
|
-
if (d?.state === "
|
|
171
|
-
|
|
174
|
+
if (d?.state === "failed" || d?.state === "cancelled") return { tone: "warning", message: deliveryStatus({ state: d.state, reason: d.reason }).detail };
|
|
175
|
+
// Recorded and queued: Follow-up sends it within seconds and retries on its own.
|
|
176
|
+
return { message: `Sending to ${agent}` };
|
|
172
177
|
},
|
|
173
178
|
onSuccess: () => { clearPendingAnswer(w.id, q.id); refresh(); },
|
|
174
179
|
onError: error => { failPendingAnswer(w.id, q.id, errorText(error)); refresh(); },
|
|
@@ -237,10 +242,11 @@ export function QuestionBody({ workspace: w, question: q, theme, compact, now =
|
|
|
237
242
|
{(open || isOther(q.answer?.choice)) && <OptionCard theme={theme} compact={compact} dense={dense} own label={OTHER_LABEL} consequence={open && !dense ? "Write your own answer" : undefined} recommended={false}
|
|
238
243
|
selected={(open ? choice : q.answer?.choice) === OTHER} disabled={!open || run.isPending} onPress={() => { setChoice(OTHER); if (pinned) setNoteOpen(true); }} />}
|
|
239
244
|
</View>}
|
|
240
|
-
{/* Not sent yet (copied, or in the agent's message box) never reads as answered: no check, no green
|
|
241
|
-
|
|
245
|
+
{/* Not sent yet (copied, or in the agent's message box) never reads as answered: no check, no green. Only a
|
|
246
|
+
delivered answer is green; queued, retrying or failed keeps the check but stays neutral (answerHeading). */}
|
|
247
|
+
{heading && <View style={{ gap: 6, padding: 10, borderRadius: 8, backgroundColor: heading.delivered ? tint(c.statusSuccess, c) : c.surface1 }}>
|
|
242
248
|
<View style={{ flexDirection: "row", gap: 6 }}>
|
|
243
|
-
<View style={{ paddingTop: 2 }}><Icon name={heading.waiting ? "CircleDashed" : "CircleCheck"} size={13} color={heading.
|
|
249
|
+
<View style={{ paddingTop: 2 }}><Icon name={heading.waiting ? "CircleDashed" : "CircleCheck"} size={13} color={heading.delivered ? c.statusSuccess : c.foregroundMuted} /></View>
|
|
244
250
|
<RichText selectable style={[t.label, { flex: 1 }]}>{heading.text}</RichText>
|
|
245
251
|
</View>
|
|
246
252
|
{!!q.answer?.words && <RichText selectable style={[t.meta, { color: c.foreground, paddingLeft: 19 }]}>{q.answer.words}</RichText>}
|
|
@@ -258,7 +264,7 @@ export function QuestionBody({ workspace: w, question: q, theme, compact, now =
|
|
|
258
264
|
</View>}
|
|
259
265
|
{open && !pinned && input}
|
|
260
266
|
</View>;
|
|
261
|
-
const actions = (open || q.answer &&
|
|
267
|
+
const actions = (open || q.answer && answerHasActions(q.answer.delivery)) && <View style={{ gap: 6 }}>
|
|
262
268
|
<View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 8 }}>
|
|
263
269
|
{open && <Button shortcut theme={theme} compact={compact} grow={compact} kind="primary" icon="Send" title="Send to agent" accessibilityLabel={`Send your ${q.id} answer to the agent`} accessibilityHint={other && !words.trim() ? "Write your answer first" : compact ? `Puts your answer straight into the asking agent's chat, even mid-turn. Follow-up keeps it under ${q.id}.` : undefined} disabled={!answer || run.isPending} onPress={() => quick("send")} />}
|
|
264
270
|
{open && composer && <Button theme={theme} compact={compact} icon="MessageSquareText" title="Put in chat" accessibilityLabel={`Put your ${q.id} answer in the agent's chat, to read over and send there`} disabled={!answer || run.isPending} onPress={putIn} />}
|
|
@@ -266,10 +272,10 @@ export function QuestionBody({ workspace: w, question: q, theme, compact, now =
|
|
|
266
272
|
{open && !composer && <Button theme={theme} compact={compact} icon="Copy" title="Copy" accessibilityLabel={`Copy your ${q.id} answer instead of sending it`} disabled={!answer || run.isPending} onPress={() => quick("copy")} />}
|
|
267
273
|
{open && composer && <IconButton theme={theme} compact={compact} icon="Copy" label="Copy answer" tooltip disabled={!answer || run.isPending} onPress={() => quick("copy")} />}
|
|
268
274
|
{(q.answer?.delivery.state === "copied" || q.answer?.delivery.state === "in-chat") && <Button shortcut theme={theme} compact={compact} kind="primary" icon="Send" title="Send to agent" accessibilityLabel={`Send your ${q.id} answer to the agent`} loading={run.isPending} onPress={() => run.mutate("send")} />}
|
|
269
|
-
{q.answer &&
|
|
270
|
-
{q.answer &&
|
|
275
|
+
{q.answer && resendTitle(q.answer.delivery) && <Button theme={theme} compact={compact} kind={q.answer.delivery.state === "failed" ? "primary" : undefined} icon="RotateCcw" title={resendTitle(q.answer.delivery)!} accessibilityLabel={q.answer.delivery.state === "failed" ? `Send the ${q.id} answer again` : `Try sending the ${q.id} answer now`} loading={run.isPending} onPress={() => run.mutate("resend")} />}
|
|
276
|
+
{q.answer && (q.answer.delivery.state === "failed" || q.answer.delivery.state === "cancelled") && <Button theme={theme} compact={compact} kind="ghost" icon="Copy" title="Copy" accessibilityLabel={`Copy the ${q.id} answer`} onPress={() => { void copyText(answerMessage(q, q.answer!.choice, q.answer!.words)).then(() => toast.show("Copied", { variant: "success" }), () => toast.error("Couldn't copy here")); }} />}
|
|
271
277
|
{q.answer?.delivery.state === "in-chat" && composer && <Button theme={theme} compact={compact} kind="ghost" icon="MessageSquareText" title="Open chat" accessibilityLabel={`Open the chat your ${q.id} answer is in`} onPress={() => { onClose?.(); void composer.focus().catch(() => undefined); }} />}
|
|
272
|
-
{q.answer?.delivery.state === "unconfirmed" && openAgent && <Button theme={theme} compact={compact} kind="ghost" icon="MessageSquare" title="Open agent" onPress={() => openAgent(q.askedBy ?? w.mainAgentId)} />}
|
|
278
|
+
{(q.answer?.delivery.state === "failed" || q.answer?.delivery.state === "unconfirmed") && openAgent && <Button theme={theme} compact={compact} kind="ghost" icon="MessageSquare" title="Open agent" onPress={() => openAgent(q.askedBy ?? w.mainAgentId)} />}
|
|
273
279
|
{pinned && open && !free && !other && !noteOpen && <Button theme={theme} compact={compact} kind="ghost" icon="Pencil" title="Note" accessibilityLabel={`Add a note for the agent about ${q.id}`} onPress={() => setNoteOpen(true)} />}
|
|
274
280
|
{dense && onDetails && <IconButton theme={theme} compact={compact} icon="Maximize2" label={`Open ${q.id} with its links and full context`} onPress={onDetails} />}
|
|
275
281
|
</View>
|
package/client/report-issue.tsx
CHANGED
|
@@ -73,7 +73,7 @@ function Segmented({ value, onChange, theme, compact }: { value: ReportKind; onC
|
|
|
73
73
|
</View>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
type Phase = { kind: "edit" } | { kind: "sending" } | { kind: "sent"; agentId: string; title: string; started: boolean } | { kind: "failed"; message: string };
|
|
76
|
+
type Phase = { kind: "edit" } | { kind: "sending" } | { kind: "sent"; agentId: string; title: string; started: boolean; queued?: boolean } | { kind: "failed"; message: string };
|
|
77
77
|
|
|
78
78
|
export function ReportSheet({ request, theme, layout, openAgent, onClose }: { request: ReportRequest; theme: Theme; layout: PluginHostProps["layout"]; openAgent?: (agentId: string) => void; onClose: () => void }) {
|
|
79
79
|
const c = theme.colors; const compact = layout.compact; const t = text(c, compact);
|
|
@@ -123,7 +123,7 @@ export function ReportSheet({ request, theme, layout, openAgent, onClose }: { re
|
|
|
123
123
|
<View accessibilityRole="alert" style={{ flexDirection: "row", gap: 10, padding: 12, borderRadius: 8, backgroundColor: tint(c.statusSuccess, c) }}>
|
|
124
124
|
<Icon name="CircleCheck" size={16} color={c.statusSuccess} />
|
|
125
125
|
<View style={{ flex: 1 }}>
|
|
126
|
-
<Text style={t.label}>{phase.started ? `Started ${phase.title}` : `Sent to ${phase.title}`}</Text>
|
|
126
|
+
<Text style={t.label}>{phase.started ? `Started ${phase.title}` : phase.queued ? `Sending to ${phase.title}. Follow-up retries until it lands.` : `Sent to ${phase.title}`}</Text>
|
|
127
127
|
<Text style={t.body}>It'll ask you anything it needs in that chat, then show you the issue before filing it.</Text>
|
|
128
128
|
</View>
|
|
129
129
|
</View>
|
package/client/spec.tsx
CHANGED
|
@@ -109,7 +109,7 @@ export function SpecSheet({ workspace: w, open, theme, compact, onClose }: { wor
|
|
|
109
109
|
{others.map(a => <View key={a.url} style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
110
110
|
<Icon name="FileText" size={13} color={c.foregroundMuted} />
|
|
111
111
|
<View style={{ flex: 1, minWidth: 0 }}>
|
|
112
|
-
<Text numberOfLines={1} style={t.body}>{a.title ?? "
|
|
112
|
+
<Text numberOfLines={1} style={t.body}>{a.title ?? "Claude artifact"}</Text>
|
|
113
113
|
<Text numberOfLines={1} style={t.small}>{a.publishes > 1 ? `Published ${a.publishes} times` : "Published once"}{a.lastAt ? ` · ${ago(a.lastAt)}` : ""}</Text>
|
|
114
114
|
</View>
|
|
115
115
|
<Button theme={theme} compact={compact} kind="ghost" icon="ArrowUpRight" title="Open" accessibilityLabel={`Open ${a.title ?? "artifact"}`} onPress={() => openUrl(a.url)} />
|