paseo-follow-up 1.4.0-beta.39 → 1.4.0-beta.40
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/README.md +1 -1
- package/client/brief.tsx +65 -38
- package/client/chat.tsx +3 -2
- package/client/home.tsx +6 -5
- package/client/needs-you.tsx +7 -6
- package/client/panel.tsx +5 -4
- package/client/questions.tsx +31 -23
- package/client/rich-text.tsx +31 -0
- package/client/stacks.tsx +2 -1
- package/client/tasks.tsx +4 -3
- package/index.server.ts +3 -3
- package/package.json +1 -1
- package/server/agent-hook.mjs +1 -1
- package/server/agent-parity.ts +3 -2
- package/server/hook-source.ts +1 -1
- package/server/inbox.ts +20 -15
- package/server/mcp-source.ts +1 -1
- package/server/mcp.mjs +4 -4
- package/server/questions.ts +10 -4
- package/shared/activity.ts +2 -2
- package/shared/brief.ts +19 -11
- package/shared/contracts.ts +5 -3
- package/shared/links.ts +49 -0
- package/shared/questions.ts +49 -9
package/README.md
CHANGED
|
@@ -238,7 +238,7 @@ This replaces the separate **Wait** plugin (`paseo-wait`). While that plugin is
|
|
|
238
238
|
Install the beta:
|
|
239
239
|
|
|
240
240
|
```sh
|
|
241
|
-
paseo plugin update follow-through --version 1.4.0-beta.
|
|
241
|
+
paseo plugin update follow-through --version 1.4.0-beta.40
|
|
242
242
|
# or, for a fresh install:
|
|
243
243
|
paseo plugin install npm:paseo-follow-up@beta
|
|
244
244
|
```
|
package/client/brief.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { browserKey, BROWSER_POLL_MS } from "./keys";
|
|
|
3
3
|
import { Platform, Pressable, Text, View, useWindowDimensions } from "react-native";
|
|
4
4
|
import { useQuery } from "@tanstack/react-query";
|
|
5
5
|
import { openExternalUrl, useRpc, type PluginClientContext, type PluginTimelineItemProps } from "@getpaseo/plugin/client";
|
|
6
|
-
import { Icon, copyText } from "@getpaseo/plugin/client/ui";
|
|
6
|
+
import { Icon, TextInput, copyText } from "@getpaseo/plugin/client/ui";
|
|
7
7
|
import { BRIEF_KIND, BRIEF_VERSION, askedDecisions, pickedCount, briefSchema, collapsedLine, extrasFit, hasOriginal, nothingNeededLine, isTight, pastRows, selectsFirst, sendBar, type Brief, type BriefDecision, type BriefMove } from "../shared/brief";
|
|
8
8
|
import { age } from "../shared/inbox";
|
|
9
9
|
import { briefKey, HEADLINE_WORD } from "../shared/headline";
|
|
@@ -11,8 +11,10 @@ import { briefKey, HEADLINE_WORD } from "../shared/headline";
|
|
|
11
11
|
const word = (kind: Brief["kind"]) => HEADLINE_WORD[briefKey(kind)];
|
|
12
12
|
import { briefActionRpc, browserStatusRpc } from "../shared/contracts";
|
|
13
13
|
import { errorText } from "../shared/errors";
|
|
14
|
+
import { OTHER, OTHER_LABEL, isOther } from "../shared/questions";
|
|
14
15
|
import type { Workspace } from "../shared/model";
|
|
15
16
|
import { text, useNow } from "./kit";
|
|
17
|
+
import { RichText } from "./rich-text";
|
|
16
18
|
import { PrSheet } from "./pr-sheet";
|
|
17
19
|
import { isLight, withAlpha, type Colors } from "./theme";
|
|
18
20
|
|
|
@@ -58,35 +60,42 @@ function Btn({ label, icon, primary, onPress, c, compact, disabled }: { label: s
|
|
|
58
60
|
* Picks on a multi-decision card, per brief, shared by every copy of the card on this client (the chat, the panel and
|
|
59
61
|
* Home render the same brief), so a pick made in one shows in the others. In memory only; nothing is sent until Send.
|
|
60
62
|
*/
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
+
const cardStore = (toggle: boolean) => {
|
|
64
|
+
const values = new Map<string, Record<string, string>>(); const listeners = new Set<() => void>();
|
|
63
65
|
const none: Record<string, string> = {};
|
|
64
66
|
return {
|
|
65
67
|
subscribe(l: () => void) { listeners.add(l); return () => { listeners.delete(l); }; },
|
|
66
|
-
get: (briefId: string) =>
|
|
68
|
+
get: (briefId: string) => values.get(briefId) ?? none,
|
|
67
69
|
/** Picks `letter`; picking the same letter again clears that decision (it can then be skipped). */
|
|
68
|
-
set(briefId: string, decisionId: string,
|
|
69
|
-
const next = { ...
|
|
70
|
-
if (next[decisionId] ===
|
|
71
|
-
|
|
70
|
+
set(briefId: string, decisionId: string, value: string) {
|
|
71
|
+
const next = { ...values.get(briefId) };
|
|
72
|
+
if (toggle && next[decisionId] === value || !value) delete next[decisionId]; else next[decisionId] = value;
|
|
73
|
+
values.set(briefId, next); for (const l of listeners) l();
|
|
72
74
|
},
|
|
73
|
-
clear(briefId: string) { if (
|
|
75
|
+
clear(briefId: string) { if (values.delete(briefId)) for (const l of listeners) l(); },
|
|
74
76
|
};
|
|
75
|
-
}
|
|
77
|
+
};
|
|
78
|
+
const pickStore = cardStore(true);
|
|
79
|
+
/** Something else's words, per decision, shared the same way so a half-written answer survives a re-render elsewhere. */
|
|
80
|
+
const wordStore = cardStore(false);
|
|
81
|
+
const useWords = (briefId: string) => useSyncExternalStore(wordStore.subscribe, () => wordStore.get(briefId), () => wordStore.get(briefId));
|
|
82
|
+
/** Picks that can be sent: Something else counts only once it has words. */
|
|
83
|
+
const ready = (picks: Record<string, string>, words: Record<string, string>) => Object.fromEntries(Object.entries(picks).filter(([id, c]) => !isOther(c) || !!words[id]?.trim()));
|
|
76
84
|
const usePicks = (briefId: string) => useSyncExternalStore(pickStore.subscribe, () => pickStore.get(briefId), () => pickStore.get(briefId));
|
|
77
85
|
|
|
78
86
|
/**
|
|
79
87
|
* One option. `send` answers on tap (a single-decision card); `select` marks it as this decision's pick (a card with
|
|
80
88
|
* several decisions, sent together); `readonly` shows a past card, the chosen option marked and the rest dimmed.
|
|
81
89
|
*/
|
|
82
|
-
function OptionRow({ option, recommended, sending, disabled, tight, open, onToggle, onPress, c, compact, mode = "send", selected = false, answered = false }: {
|
|
90
|
+
function OptionRow({ option, recommended, sending, disabled, tight, open, onToggle, onPress, c, compact, mode = "send", selected = false, answered = false, other = false }: {
|
|
83
91
|
option: BriefDecision["options"][number]; recommended: boolean; sending: boolean; disabled: boolean; tight: boolean; open: boolean; onToggle: () => void; onPress: () => void; c: Colors; compact: boolean;
|
|
84
|
-
mode?: "send" | "select" | "readonly"; selected?: boolean; answered?: boolean;
|
|
92
|
+
mode?: "send" | "select" | "readonly"; selected?: boolean; answered?: boolean; other?: boolean;
|
|
85
93
|
}) {
|
|
86
94
|
const strong = withAlpha(c.foreground, isLight(c) ? 0.38 : 0.42);
|
|
87
95
|
const showDetail = !!option.consequence && (!tight || open);
|
|
88
96
|
const readonly = mode === "readonly";
|
|
89
|
-
|
|
97
|
+
// Something else marks itself in send mode too: tapping it opens the answer field instead of sending.
|
|
98
|
+
const marked = selected && (mode !== "send" || other);
|
|
90
99
|
// While picking, only a pick is loud: a recommendation keeps its label but not the filled badge, so it never looks
|
|
91
100
|
// picked. A past card mutes what wasn't picked through colour, not opacity, so it stays readable.
|
|
92
101
|
const dim = !readonly && disabled && !sending;
|
|
@@ -95,23 +104,23 @@ function OptionRow({ option, recommended, sending, disabled, tight, open, onTogg
|
|
|
95
104
|
const border = marked ? c.accent : loudRecommend ? strong : c.border;
|
|
96
105
|
const badge = marked ? c.accent : loudRecommend ? c.foreground : c.surface2;
|
|
97
106
|
const badgeText = marked ? c.accentForeground : loudRecommend ? c.surface1 : muted ? c.foregroundMuted : c.foreground;
|
|
98
|
-
const label = mode === "select" ? `${option.letter}: ${option.label}${recommended ? " (recommended)" : ""}` : readonly ? `${option.letter}: ${option.label}${selected ? " (your answer)" : ""}` : `Answer ${option.letter}: ${option.label}${recommended ? " (recommended)" : ""}`;
|
|
107
|
+
const label = other ? `${option.label}${readonly ? `: ${option.consequence ?? ""}` : ", write your own answer"}` : mode === "select" ? `${option.letter}: ${option.label}${recommended ? " (recommended)" : ""}` : readonly ? `${option.letter}: ${option.label}${selected ? " (your answer)" : ""}` : `Answer ${option.letter}: ${option.label}${recommended ? " (recommended)" : ""}`;
|
|
99
108
|
return <View style={{ flexDirection: "row", alignItems: "stretch", borderRadius: 8, borderWidth: 1, borderColor: border, backgroundColor: marked && !readonly ? withAlpha(c.accent, isLight(c) ? 0.06 : 0.1) : "transparent", opacity: dim ? 0.45 : 1, overflow: "hidden" }}>
|
|
100
|
-
<Pressable accessibilityRole={mode === "select" ? "radio" : readonly ? "text" : "button"} accessibilityLabel={label} accessibilityHint={mode === "select" && selected ? "Tap again to clear" : option.consequence ?? undefined}
|
|
101
|
-
accessibilityState={mode === "select" ? { checked: selected, disabled } : { disabled: disabled || readonly, busy: sending }} disabled={disabled || readonly} onPress={onPress}
|
|
109
|
+
<Pressable accessibilityRole={mode === "select" || other && !readonly ? "radio" : readonly ? "text" : "button"} accessibilityLabel={label} accessibilityHint={mode === "select" && selected ? "Tap again to clear" : option.consequence ?? undefined}
|
|
110
|
+
accessibilityState={mode === "select" || other && !readonly ? { checked: selected, disabled } : { disabled: disabled || readonly, busy: sending }} disabled={disabled || readonly} onPress={onPress}
|
|
102
111
|
style={({ hovered, pressed, focused }: { hovered?: boolean; pressed: boolean; focused?: boolean }) => ({ ...ring(focused, c), flex: 1, flexDirection: "row", alignItems: "flex-start", gap: 10, paddingVertical: readonly ? (compact ? 8 : 7) : compact ? 11 : 9, paddingHorizontal: 10, minHeight: readonly ? 0 : compact ? 44 : 0,
|
|
103
112
|
backgroundColor: readonly ? "transparent" : pressed ? c.surface2 : hovered && !disabled ? withAlpha(c.foreground, 0.05) : "transparent" })}>
|
|
104
113
|
<View style={{ width: 22, height: 22, borderRadius: 5, alignItems: "center", justifyContent: "center", backgroundColor: badge }}>
|
|
105
|
-
{marked ? <Icon name="Check" size={13} color={badgeText} /> : <Text style={{ fontSize: 12, fontWeight: "700", color: badgeText }}>{option.letter}</Text>}
|
|
114
|
+
{marked ? <Icon name="Check" size={13} color={badgeText} /> : other ? <Icon name="PenLine" size={12} color={badgeText} /> : <Text style={{ fontSize: 12, fontWeight: "700", color: badgeText }}>{option.letter}</Text>}
|
|
106
115
|
</View>
|
|
107
116
|
<View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
108
117
|
<View style={{ flexDirection: "row", alignItems: "center", columnGap: 8, flexWrap: "wrap" }}>
|
|
109
|
-
<
|
|
118
|
+
<RichText linkColor={c.foreground} style={{ color: muted ? c.foregroundMuted : c.foreground, fontSize: 14, lineHeight: 20, fontWeight: muted ? "400" : "600" }}>{`${marked && !other ? `${option.letter} · ` : ""}${option.label}`}</RichText>
|
|
110
119
|
{recommended && !readonly && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontWeight: "600" }}>Recommended</Text>}
|
|
111
120
|
{readonly && selected && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontWeight: "600" }}>Your answer</Text>}
|
|
112
121
|
{sending && <Text accessibilityLiveRegion="polite" style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>Sending…</Text>}
|
|
113
122
|
</View>
|
|
114
|
-
{showDetail && <
|
|
123
|
+
{showDetail && <RichText linkColor={c.foreground} style={{ color: c.foregroundMuted, fontSize: 13, lineHeight: 18 }}>{option.consequence}</RichText>}
|
|
115
124
|
</View>
|
|
116
125
|
</Pressable>
|
|
117
126
|
{tight && !!option.consequence && <Pressable accessibilityRole="button" aria-expanded={open} accessibilityLabel={`${open ? "Hide" : "Show"} what ${option.letter} means`} onPress={onToggle}
|
|
@@ -125,9 +134,10 @@ function OptionRow({ option, recommended, sending, disabled, tight, open, onTogg
|
|
|
125
134
|
* The card's body: decisions, error text, details, context, facts and links, and the agent's extra ask. Shared by the
|
|
126
135
|
* open card and by a past card's read-only "Show full question", so a past question reads exactly as it was asked.
|
|
127
136
|
*/
|
|
128
|
-
function BriefBody({ b, c, compact, tight, embedded, height, mode, picks, onPick, busy, onSend }: {
|
|
137
|
+
function BriefBody({ b, c, compact, tight, embedded, height, mode, picks, onPick, busy, onSend, words = {}, onWords, onSendOther }: {
|
|
129
138
|
b: Brief; c: Colors; compact: boolean; tight: boolean; embedded: boolean; height: number;
|
|
130
139
|
mode: "send" | "select" | "readonly"; picks: Record<string, string>; onPick: (decisionId: string, letter: string) => void; busy: string | null; onSend?: (key: string) => void;
|
|
140
|
+
words?: Record<string, string>; onWords?: (decisionId: string, text: string) => void; onSendOther?: (decisionId: string) => void;
|
|
131
141
|
}) {
|
|
132
142
|
const [open, setOpen] = useState<Record<string, boolean>>({});
|
|
133
143
|
const [details, setDetails] = useState(false);
|
|
@@ -137,20 +147,33 @@ function BriefBody({ b, c, compact, tight, embedded, height, mode, picks, onPick
|
|
|
137
147
|
const numbered = b.decisions.length > 1;
|
|
138
148
|
return <>
|
|
139
149
|
{b.decisions.map((d, i) => <View key={d.id} accessibilityRole={mode === "select" ? "radiogroup" : undefined} accessibilityLabel={mode === "select" ? d.question : undefined} style={{ gap: 8 }}>
|
|
140
|
-
{(numbered || d.question.trim() !== b.ask.trim()) && <
|
|
150
|
+
{(numbered || d.question.trim() !== b.ask.trim()) && <RichText style={{ color: c.foreground, fontSize: 14, lineHeight: 20, fontWeight: numbered ? "600" : "400" }}>{`${numbered ? `${i + 1}. ` : ""}${d.question}`}</RichText>}
|
|
141
151
|
{d.options.length > 0 && <View style={{ gap: 6 }}>
|
|
142
152
|
{d.options.map(o => <OptionRow key={o.letter} option={o} recommended={d.recommend === o.letter} mode={mode} selected={readonly ? d.chosen === o.letter : picks[d.id] === o.letter} answered={readonly && !!d.chosen}
|
|
143
153
|
sending={busy === `${d.id}:${o.letter}`} disabled={!!busy} tight={tight && !readonly}
|
|
144
154
|
open={!!open[`${d.id}:${o.letter}`]} onToggle={() => setOpen(v => ({ ...v, [`${d.id}:${o.letter}`]: !v[`${d.id}:${o.letter}`] }))}
|
|
145
155
|
onPress={() => mode === "send" ? onSend?.(`${d.id}:${o.letter}`) : onPick(d.id, o.letter)} c={c} compact={compact} />)}
|
|
156
|
+
{/* Built in after the agent's options on every decision: the developer's own answer. */}
|
|
157
|
+
{(!readonly || isOther(d.chosen)) && <OptionRow other option={{ letter: "", label: OTHER_LABEL, consequence: readonly ? `"${d.words ?? ""}"` : null }} recommended={false} mode={mode}
|
|
158
|
+
selected={readonly ? isOther(d.chosen) : isOther(picks[d.id])} answered={readonly && !!d.chosen} sending={busy === `${d.id}:${OTHER}`} disabled={!!busy} tight={false} open={false} onToggle={() => undefined}
|
|
159
|
+
onPress={() => onPick(d.id, OTHER)} c={c} compact={compact} />}
|
|
160
|
+
{!readonly && isOther(picks[d.id]) && <View style={{ gap: 8 }}>
|
|
161
|
+
<TextInput accessibilityLabel={`Your answer${numbered ? ` to question ${i + 1}` : ""}, required`} placeholder="Your answer (required)" placeholderTextColor={c.foregroundMuted} autoFocus multiline maxLength={2000}
|
|
162
|
+
value={words[d.id] ?? ""} editable={!busy} onChangeText={t => onWords?.(d.id, t)}
|
|
163
|
+
style={{ minHeight: compact ? 66 : 58, paddingHorizontal: 10, paddingVertical: 8, borderRadius: 8, borderWidth: 1, borderColor: words[d.id]?.trim() ? c.border : withAlpha(c.accent, 0.7), color: c.foreground, backgroundColor: c.surface0, fontSize: 14, lineHeight: 20, textAlignVertical: "top" }} />
|
|
164
|
+
{mode === "send" && <View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 10 }}>
|
|
165
|
+
<Btn label={busy === `${d.id}:${OTHER}` ? "Sending…" : "Send answer"} icon="Send" primary disabled={!words[d.id]?.trim() || !!busy} onPress={() => onSendOther?.(d.id)} c={c} compact={compact} />
|
|
166
|
+
{!words[d.id]?.trim() && <Text style={{ flexShrink: 1, color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>Write your answer, then send it.</Text>}
|
|
167
|
+
</View>}
|
|
168
|
+
</View>}
|
|
146
169
|
</View>}
|
|
147
170
|
{readonly && b.state === "answered" && d.options.length > 0 && !d.chosen && numbered && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>Skipped</Text>}
|
|
148
|
-
{!readonly && mode === "send" && !tight && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{embedded ? d.options.length ? "
|
|
171
|
+
{!readonly && mode === "send" && !tight && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{embedded ? d.options.length ? "" : "Reply below." : d.options.length ? `Or type ${letters(d)} in the composer.` : "Reply in the composer."}</Text>}
|
|
149
172
|
{!readonly && (mode === "select" || tight) && !d.options.length && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{embedded ? "Reply below." : "Reply in the composer."}</Text>}
|
|
150
173
|
</View>)}
|
|
151
174
|
|
|
152
175
|
{!!b.mono && !b.ask.endsWith(b.mono) && <View style={{ borderRadius: 8, backgroundColor: withAlpha(c.statusDanger, isLight(c) ? 0.07 : 0.1), paddingHorizontal: 10, paddingVertical: 8 }}>
|
|
153
|
-
<
|
|
176
|
+
<RichText selectable numberOfLines={tight && !readonly ? 3 : undefined} style={{ color: c.foreground, fontFamily: mono(), fontSize: 12, lineHeight: 18 }}>{b.mono}</RichText>
|
|
154
177
|
</View>}
|
|
155
178
|
|
|
156
179
|
{!readonly && extra && tight && !extrasFit(b, height) && <Pressable accessibilityRole="button" aria-expanded={details} accessibilityLabel={details ? "Hide details" : "Show details"} onPress={() => setDetails(v => !v)} hitSlop={6}
|
|
@@ -159,7 +182,7 @@ function BriefBody({ b, c, compact, tight, embedded, height, mode, picks, onPick
|
|
|
159
182
|
<Text style={{ color: c.foregroundMuted, fontSize: 13, lineHeight: 18, fontWeight: "500" }}>Details</Text>
|
|
160
183
|
</Pressable>}
|
|
161
184
|
|
|
162
|
-
{showExtra && !!b.context && <
|
|
185
|
+
{showExtra && !!b.context && <RichText selectable linkColor={c.foreground} numberOfLines={readonly ? undefined : 4} style={{ color: c.foregroundMuted, fontSize: 13, lineHeight: 19 }}>{b.context}</RichText>}
|
|
163
186
|
|
|
164
187
|
{showExtra && (b.facts.length > 0 || b.links.length > 0) && <View style={{ flexDirection: "row", flexWrap: "wrap", gap: 6 }}>
|
|
165
188
|
{b.facts.slice(0, 3).map((f, i) => { const col = factTone(f.tone, c); return <View key={`f${i}`} style={{ flexDirection: "row", alignItems: "center", gap: 5, paddingHorizontal: 8, minHeight: 24, borderRadius: 6, backgroundColor: f.tone === "muted" ? c.surface2 : withAlpha(col, isLight(c) ? 0.1 : 0.14) }}>
|
|
@@ -218,7 +241,7 @@ function Past({ b, c, now, compact, height }: { b: Brief; c: Colors; now: number
|
|
|
218
241
|
<View style={{ paddingTop: answered ? 2 : 0 }}><Icon name={icon} size={15} color={color} /></View>
|
|
219
242
|
{answered
|
|
220
243
|
? <View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
221
|
-
<
|
|
244
|
+
<RichText linkColor={c.foreground} numberOfLines={expanded ? undefined : 1} style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{b.ask}</RichText>
|
|
222
245
|
<Text style={{ color: c.foreground, fontSize: 14, lineHeight: 20, fontWeight: "600" }}>{b.outcome}</Text>
|
|
223
246
|
</View>
|
|
224
247
|
: <Text numberOfLines={expanded ? undefined : 1} style={{ flex: 1, minWidth: 0, color: c.foregroundMuted, fontSize: 13, lineHeight: 18 }}>{collapsedLine(b)}</Text>}
|
|
@@ -232,13 +255,13 @@ function Past({ b, c, now, compact, height }: { b: Brief; c: Colors; now: number
|
|
|
232
255
|
return <View accessibilityRole="summary" accessibilityLabel={`Answered: ${b.ask}`} style={{ marginVertical: 10, gap: 8, paddingVertical: 10, paddingHorizontal: 12, borderRadius: 10, borderWidth: 1, borderColor: c.border }}>
|
|
233
256
|
<View style={{ flexDirection: "row", gap: 8, alignItems: "flex-start" }}>
|
|
234
257
|
<View style={{ paddingTop: 2 }}><Icon name="CircleCheck" size={15} color={c.statusSuccess} /></View>
|
|
235
|
-
<
|
|
258
|
+
<RichText style={{ flex: 1, minWidth: 0, color: c.foreground, fontSize: 14, lineHeight: 20, fontWeight: "600" }}>{b.ask}</RichText>
|
|
236
259
|
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 20, fontVariant: ["tabular-nums"] }}>{right}</Text>
|
|
237
260
|
</View>
|
|
238
261
|
{!expanded && <View style={{ gap: 6, paddingLeft: 23 }}>
|
|
239
262
|
{pastRows(b).map(r => <View key={r.id} style={{ gap: 1 }}>
|
|
240
|
-
{!!r.question && <
|
|
241
|
-
<
|
|
263
|
+
{!!r.question && <RichText linkColor={c.foreground} numberOfLines={2} style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{r.question}</RichText>}
|
|
264
|
+
<RichText style={{ color: r.answer ? c.foreground : c.foregroundMuted, fontSize: 13, lineHeight: 19, fontWeight: r.answer ? "600" : "400" }}>{r.answer ?? "Skipped"}</RichText>
|
|
242
265
|
</View>)}
|
|
243
266
|
</View>}
|
|
244
267
|
<View style={{ paddingLeft: 23 }}><Reveal label="Show full question" open={expanded} onPress={() => setExpanded(v => !v)} c={c} compact={compact} /></View>
|
|
@@ -257,6 +280,7 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
257
280
|
const [error, setError] = useState<string | null>(null);
|
|
258
281
|
const [why, setWhy] = useState(false);
|
|
259
282
|
const picks = usePicks(b.id);
|
|
283
|
+
const words = useWords(b.id);
|
|
260
284
|
const [sheet, setSheet] = useState<{ key: string; intent: "merge" | "reviewers" } | null>(null);
|
|
261
285
|
const workspace = b.workspaceId ? deps.workspace(b.workspaceId) : undefined;
|
|
262
286
|
const browser = useQuery({ queryKey: browserKey, queryFn: () => browserRead({}), refetchInterval: BROWSER_POLL_MS, enabled: !!sheet });
|
|
@@ -286,7 +310,7 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
286
310
|
if (b.kind === "done" && b.source === "agent" && !b.flagged) return <View accessibilityRole="summary" accessibilityLabel={nothingNeededLine(b.ask)}
|
|
287
311
|
style={{ marginVertical: 6, flexDirection: "row", alignItems: "center", gap: 8, minHeight: 28, paddingHorizontal: 4 }}>
|
|
288
312
|
<Icon name="Check" size={13} color={c.foregroundMuted} />
|
|
289
|
-
<
|
|
313
|
+
<RichText linkColor={c.foreground} numberOfLines={1} style={{ flex: 1, minWidth: 0, color: c.foregroundMuted, fontSize: 13, lineHeight: 18 }}>{nothingNeededLine(b.ask)}</RichText>
|
|
290
314
|
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontVariant: ["tabular-nums"] }}>{ageText}</Text>
|
|
291
315
|
</View>;
|
|
292
316
|
|
|
@@ -302,8 +326,8 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
302
326
|
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontVariant: ["tabular-nums"] }}>{ageText}</Text>
|
|
303
327
|
</View>
|
|
304
328
|
<View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", columnGap: 10, rowGap: 8 }}>
|
|
305
|
-
<
|
|
306
|
-
style={{ flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, color: acts ? c.foreground : c.foregroundMuted, fontSize: 14, lineHeight: 20, fontWeight: acts ? "600" : "400" }}>{b.ask}</
|
|
329
|
+
<RichText numberOfLines={3} tooltip={b.ask}
|
|
330
|
+
style={{ flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, color: acts ? c.foreground : c.foregroundMuted, fontSize: 14, lineHeight: 20, fontWeight: acts ? "600" : "400" }}>{b.ask}</RichText>
|
|
307
331
|
{!embedded && moves.map(m => <Btn key={m.kind} label={busy === m.kind ? `${m.label}…` : m.label} icon={MOVE_ICON[m.kind]} disabled={!!busy} onPress={() => press(m)} c={c} compact={compact} />)}
|
|
308
332
|
</View>
|
|
309
333
|
{!!error && <Text accessibilityRole="alert" style={{ color: c.statusDanger, fontSize: 13, lineHeight: 18 }}>{error}</Text>}
|
|
@@ -314,7 +338,9 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
314
338
|
const pad = compact ? 14 : 16;
|
|
315
339
|
const multi = selectsFirst(b);
|
|
316
340
|
const sendOne = (key: string) => { const [decisionId, choice] = key.split(":"); void run(key, () => act({ agentId, briefId: b.id, decisionId, choice })); };
|
|
317
|
-
const
|
|
341
|
+
const sendable = ready(picks, words);
|
|
342
|
+
const sendAll = () => void run("answers", async () => { await act({ agentId, briefId: b.id, choices: Object.entries(sendable).map(([decisionId, choice]) => ({ decisionId, choice, ...(isOther(choice) ? { words: words[decisionId].trim() } : {}) })) }); pickStore.clear(b.id); wordStore.clear(b.id); });
|
|
343
|
+
const sendOther = (decisionId: string) => { const text = words[decisionId]?.trim(); if (text) void run(`${decisionId}:${OTHER}`, async () => { await act({ agentId, briefId: b.id, decisionId, choice: OTHER, words: text }); pickStore.clear(b.id); wordStore.clear(b.id); }); };
|
|
318
344
|
return <View accessibilityRole="summary" accessibilityLabel={`${acts ? "Needs you" : word(b.kind)}: ${b.ask}`}
|
|
319
345
|
style={{ marginVertical: embedded ? 0 : 10, borderRadius: 12, borderWidth: 1, borderColor: border, backgroundColor: c.surface1, overflow: "hidden" }}>
|
|
320
346
|
<View style={{ paddingHorizontal: pad, paddingTop: compact ? 12 : 14, paddingBottom: 14, gap: tight ? 10 : 12 }}>
|
|
@@ -323,7 +349,7 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
323
349
|
<Icon name={ICON[b.kind]} size={14} color={tone} />
|
|
324
350
|
<Text style={{ color: acts ? attention : tone, fontSize: 12, lineHeight: 16, fontWeight: "600" }}>{acts ? "Needs you" : word(b.kind)}</Text>
|
|
325
351
|
{acts && <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{word(b.kind)}</Text>}
|
|
326
|
-
{multi && <Text accessibilityLiveRegion="polite" style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontVariant: ["tabular-nums"] }}>· {pickedCount(b,
|
|
352
|
+
{multi && <Text accessibilityLiveRegion="polite" style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontVariant: ["tabular-nums"] }}>· {pickedCount(b, sendable)} of {askedDecisions(b).length} picked</Text>}
|
|
327
353
|
<View style={{ flex: 1 }} />
|
|
328
354
|
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontVariant: ["tabular-nums"] }}>{ageText}</Text>
|
|
329
355
|
{/* Phones: where the card's facts come from sits behind ⓘ instead of a footer under every card. */}
|
|
@@ -333,13 +359,14 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
333
359
|
</Pressable>}
|
|
334
360
|
</View>
|
|
335
361
|
{/* The ask role on phones (react-native-web ignores hitSlop, so the ⓘ above is a real 44 box); desktop keeps 19/26. */}
|
|
336
|
-
<
|
|
362
|
+
<RichText accessibilityRole="header" style={compact ? text(c, true).ask : { color: c.foreground, fontSize: 19, lineHeight: 26, fontWeight: "600", letterSpacing: -0.2 }}>{b.ask}</RichText>
|
|
337
363
|
</View>
|
|
338
364
|
|
|
339
365
|
<BriefBody b={b} c={c} compact={compact} tight={tight} embedded={embedded} height={height} mode={multi ? "select" : "send"} picks={picks}
|
|
340
|
-
onPick={(decisionId, letter) => { if (!busy) pickStore.set(b.id, decisionId, letter); }} busy={busy} onSend={sendOne}
|
|
366
|
+
onPick={(decisionId, letter) => { if (!busy) pickStore.set(b.id, decisionId, letter); }} busy={busy} onSend={sendOne}
|
|
367
|
+
words={words} onWords={(decisionId, t) => wordStore.set(b.id, decisionId, t)} onSendOther={sendOther} />
|
|
341
368
|
|
|
342
|
-
{multi && <SendBar b={b} picks={
|
|
369
|
+
{multi && <SendBar b={b} picks={sendable} busy={busy} error={error} onSend={sendAll} c={c} compact={compact} />}
|
|
343
370
|
|
|
344
371
|
{!embedded && moves.length > 0 && <View style={{ flexDirection: "row", flexWrap: "wrap", gap: 8 }}>
|
|
345
372
|
{moves.map((m, i) => <Btn key={m.kind} label={busy === m.kind ? `${m.label}…` : m.label} icon={MOVE_ICON[m.kind]} primary={i === 0 && !multi} disabled={!!busy} onPress={() => press(m)} c={c} compact={compact} />)}
|
|
@@ -349,8 +376,8 @@ export function BriefCard({ item, theme, layout, agentId, deps, embedded = false
|
|
|
349
376
|
|
|
350
377
|
{!!b.also && <View style={{ gap: 3, borderTopWidth: 1, borderTopColor: c.border, paddingTop: 10 }}>
|
|
351
378
|
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16, fontWeight: "600" }}>Also, from the agent:</Text>
|
|
352
|
-
<
|
|
353
|
-
{!tight && !!b.also.context && <
|
|
379
|
+
<RichText style={{ color: c.foreground, fontSize: 14, lineHeight: 20 }}>{b.also.ask}</RichText>
|
|
380
|
+
{!tight && !!b.also.context && <RichText linkColor={c.foreground} numberOfLines={3} style={{ color: c.foregroundMuted, fontSize: 13, lineHeight: 19 }}>{b.also.context}</RichText>}
|
|
354
381
|
</View>}
|
|
355
382
|
</View>
|
|
356
383
|
{(!compact || why) && <View style={{ borderTopWidth: 1, borderTopColor: c.border, paddingHorizontal: pad, paddingVertical: 8, flexDirection: "row", alignItems: "center", gap: 6 }}>
|
package/client/chat.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { answerCardSchema, batchCardSchema, createMomentLedger, followTimelineIt
|
|
|
6
6
|
import { parseAnswerMessage, parseAnswersMessage } from "../shared/questions";
|
|
7
7
|
import { Reveal } from "./motion";
|
|
8
8
|
import { tint, withAlpha } from "./theme";
|
|
9
|
+
import { RichText } from "./rich-text";
|
|
9
10
|
|
|
10
11
|
const mono = () => (Platform.OS === "ios" ? "Menlo" : "monospace");
|
|
11
12
|
const TOOL_KIND = "tool-row";
|
|
@@ -113,12 +114,12 @@ function AnswerCardView({ item, theme }: PluginTimelineItemProps<AnswerCard>) {
|
|
|
113
114
|
{card.answers ? <View style={{ paddingHorizontal: 12, paddingBottom: 10, gap: 8 }}>
|
|
114
115
|
{/* Each answer sits under the question it answers, so the chat says what was decided without scrolling back. */}
|
|
115
116
|
{card.answers.map((a, i) => <View key={a.id} style={{ gap: 1 }}>
|
|
116
|
-
{!!a.question && <
|
|
117
|
+
{!!a.question && <RichText linkColor={c.foreground} style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{`${i + 1}. ${a.question}`}</RichText>}
|
|
117
118
|
<Text selectable style={{ color: a.choice ? c.foreground : c.foregroundMuted, fontSize: 13, lineHeight: 19 }}>{a.choice ? <><Text style={{ fontWeight: "600" }}>{a.choice}</Text>{a.label ? ` · ${a.label}` : ""}</> : "Skipped · still open"}</Text>
|
|
118
119
|
</View>)}
|
|
119
120
|
</View> : <View style={{ paddingHorizontal: 12, paddingBottom: 10, gap: 3 }}>
|
|
120
121
|
<Text selectable style={{ color: c.foreground, fontSize: 13, lineHeight: 19 }}><Text style={{ fontWeight: "600", fontVariant: ["tabular-nums"] }}>{card.choice}</Text>{card.label ? ` · ${card.label}` : ""}</Text>
|
|
121
|
-
{!!card.words && <
|
|
122
|
+
{!!card.words && <RichText selectable linkColor={c.foreground} style={{ color: c.foregroundMuted, fontSize: 13, lineHeight: 19 }}>{card.words}</RichText>}
|
|
122
123
|
</View>}
|
|
123
124
|
{expanded && <View style={{ borderTopWidth: 1, borderTopColor: c.border }}>
|
|
124
125
|
<ScrollView style={[{ maxHeight: 300 }, Platform.OS === "web" ? ({ overscrollBehavior: "contain" } as object) : null]} contentContainerStyle={{ padding: 12 }}>
|
package/client/home.tsx
CHANGED
|
@@ -30,6 +30,7 @@ import { UpdateNotice } from "./updates";
|
|
|
30
30
|
import { ReleaseNotesSheet, VersionLine, WhatsNewGate } from "./release-notes";
|
|
31
31
|
import { useRowMenu } from "./row-actions";
|
|
32
32
|
import { laterChoices } from "../shared/row-menu";
|
|
33
|
+
import { RichText } from "./rich-text";
|
|
33
34
|
|
|
34
35
|
export const HOME_SCREEN = "follow-through";
|
|
35
36
|
|
|
@@ -508,13 +509,13 @@ function Step({ step, c, last }: { step: TailStep; c: Colors; last: boolean }) {
|
|
|
508
509
|
const t = text(c);
|
|
509
510
|
if (step.kind === "tool") return <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
510
511
|
<Icon name="Terminal" size={13} color={step.failed ? c.statusDanger : c.foregroundMuted} />
|
|
511
|
-
<
|
|
512
|
+
<RichText plain numberOfLines={1} style={[t.meta, { flex: 1, fontFamily: mono }]}>{step.text}</RichText>
|
|
512
513
|
</View>;
|
|
513
514
|
if (step.kind === "you") return <View style={{ padding: 10, borderRadius: 8, backgroundColor: c.surface1, gap: 3 }}>
|
|
514
|
-
<Text style={t.small}>You</Text><
|
|
515
|
+
<Text style={t.small}>You</Text><RichText numberOfLines={3} style={t.body}>{answerLine(step.text) ?? step.text}</RichText>
|
|
515
516
|
</View>;
|
|
516
|
-
if (step.kind === "error") return <
|
|
517
|
-
return <
|
|
517
|
+
if (step.kind === "error") return <RichText numberOfLines={4} style={[t.body, { color: c.statusDanger }]}>{step.text}</RichText>;
|
|
518
|
+
return <RichText selectable numberOfLines={last ? 40 : 4} style={[t.body, { lineHeight: 19 }]}>{step.text.replace(/\*\*/g, "")}</RichText>;
|
|
518
519
|
}
|
|
519
520
|
|
|
520
521
|
function permissionText(p: Permission): string {
|
|
@@ -647,7 +648,7 @@ function LogRow({ l, c, onOpen }: { l: LogLine; c: Colors; onOpen?: () => void }
|
|
|
647
648
|
<View style={{ paddingTop: 2 }}><Icon name={l.icon} size={13} color={tone} /></View>
|
|
648
649
|
<View style={{ flex: 1, minWidth: 0 }}>
|
|
649
650
|
<Text numberOfLines={1} style={t.body}>{l.text} <Text style={{ color: c.foregroundMuted }}>· {l.workspaceTitle}</Text></Text>
|
|
650
|
-
{!!l.detail && <
|
|
651
|
+
{!!l.detail && <RichText plain numberOfLines={2} style={t.meta}>{`${l.detail}${l.took ? ` · took ${l.took}` : ""}`}</RichText>}
|
|
651
652
|
</View>
|
|
652
653
|
<Age iso={l.at} c={c} />
|
|
653
654
|
</Pressable>;
|
package/client/needs-you.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import { meanwhile } from "./questions";
|
|
|
12
12
|
import { useReviewerSettings } from "./reviewers";
|
|
13
13
|
|
|
14
14
|
import { overviewKey, workspaceKey } from "./keys";
|
|
15
|
+
import { RichText } from "./rich-text";
|
|
15
16
|
export { overviewKey, workspaceKey };
|
|
16
17
|
|
|
17
18
|
function glyph(item: NeedItem, colors: Colors): { name: string; color: string } {
|
|
@@ -84,8 +85,8 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
84
85
|
<View style={{ flexDirection: "row", gap: 10 }}>
|
|
85
86
|
<View style={{ paddingTop: 3 }}><Icon name={glyph(featured, c).name} size={16} color={c.statusWarning} /></View>
|
|
86
87
|
<View style={{ flex: 1, minWidth: 0, gap: 6 }}>
|
|
87
|
-
<
|
|
88
|
-
{!!featured.detail && !sameText(featured.detail, featured.title.replace(/^Q\d+ · /, "")) && <
|
|
88
|
+
<RichText accessibilityRole="header" style={t.ask}>{featured.title}</RichText>
|
|
89
|
+
{!!featured.detail && !sameText(featured.detail, featured.title.replace(/^Q\d+ · /, "")) && <RichText linkColor={c.foreground} numberOfLines={2} style={[t.body, { color: c.foregroundMuted }]}>{featured.detail}</RichText>}
|
|
89
90
|
<QuestionState workspace={w} questionId={featured.questionId} theme={theme} />
|
|
90
91
|
</View>
|
|
91
92
|
</View>
|
|
@@ -102,8 +103,8 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
102
103
|
<View style={{ flexDirection: "row", alignItems: "center", gap: 10 }}>
|
|
103
104
|
<Icon name={g.name} size={16} color={g.color} />
|
|
104
105
|
<View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
105
|
-
<
|
|
106
|
-
{"detail" in item && !!item.detail && !sameText(item.detail, item.title.replace(/^Q\d+ · /, "")) && <
|
|
106
|
+
<RichText numberOfLines={2} style={t.label}>{item.title}</RichText>
|
|
107
|
+
{"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>}
|
|
107
108
|
</View>
|
|
108
109
|
{button}
|
|
109
110
|
</View>
|
|
@@ -112,8 +113,8 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
112
113
|
<View style={{ flexDirection: "row", gap: 9 }}>
|
|
113
114
|
<View style={{ paddingTop: 2 }}><Icon name={g.name} size={14} color={g.color} /></View>
|
|
114
115
|
<View style={{ flex: 1, minWidth: 0, gap: 3 }}>
|
|
115
|
-
<
|
|
116
|
-
{"detail" in item && !!item.detail && !sameText(item.detail, item.title.replace(/^Q\d+ · /, "")) && <
|
|
116
|
+
<RichText style={compact ? t.label : t.body}>{item.title}</RichText>
|
|
117
|
+
{"detail" in item && !!item.detail && !sameText(item.detail, item.title.replace(/^Q\d+ · /, "")) && <RichText linkColor={c.foreground} numberOfLines={item.kind === "question" ? 2 : 3} style={t.meta}>{item.detail}</RichText>}
|
|
117
118
|
{item.kind === "question" && <QuestionState workspace={w} questionId={item.questionId} theme={theme} />}
|
|
118
119
|
{item.kind === "send" && <View style={{ gap: 2 }}>
|
|
119
120
|
{item.tasks.slice(0, 4).map((task, i) => <Text key={i} numberOfLines={2} style={t.meta}><Text style={{ fontVariant: ["tabular-nums"] }}>{`${i + 1}. `}</Text>{shortRefs(task, w)}</Text>)}
|
package/client/panel.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import { SpecRow, SpecSheet } from "./spec";
|
|
|
28
28
|
import { mergedColor, tint } from "./theme";
|
|
29
29
|
import { SummaryRow } from "./about";
|
|
30
30
|
import { WhatsNewGate } from "./release-notes";
|
|
31
|
+
import { RichText } from "./rich-text";
|
|
31
32
|
|
|
32
33
|
export { overviewKey, workspaceKey };
|
|
33
34
|
|
|
@@ -172,9 +173,9 @@ function AgentCard({ workspace: w, theme, compact, now, openAgent }: { workspace
|
|
|
172
173
|
<Text style={[t.meta, { marginBottom: 6 }]}>{sent ? `Sent ${batch.tasks.length} repair${batch.tasks.length === 1 ? "" : "s"} ${ago(batch.sentAt, now)}. Follow-up waits for the agent to report back.` : `${batch.tasks.length} repair${batch.tasks.length === 1 ? "" : "s"} queued · ${blocker ?? "sends when the agent is idle"}`}</Text>
|
|
173
174
|
{batch.tasks.map((task, i) => <View key={task.key} style={{ flexDirection: "row", gap: 6 }}>
|
|
174
175
|
<Text style={[t.meta, { width: 16, fontVariant: ["tabular-nums"] }]}>{i + 1}.</Text>
|
|
175
|
-
<
|
|
176
|
+
<RichText linkColor={c.foreground} style={[t.meta, { flex: 1 }]}>{shortRefs(task.title, w)}</RichText>
|
|
176
177
|
</View>)}
|
|
177
|
-
{!!batch.result && <
|
|
178
|
+
{!!batch.result && <RichText style={[t.meta, { marginTop: 6, color: c.statusWarning }]}>{batch.result}</RichText>}
|
|
178
179
|
</CardRow>
|
|
179
180
|
</Card>;
|
|
180
181
|
}
|
|
@@ -193,7 +194,7 @@ function ShippedCard({ workspace: w, theme, compact, now }: { workspace: Workspa
|
|
|
193
194
|
<Text style={t.meta}>{merged ? `${merged} PR${merged === 1 ? "" : "s"} merged · ` : ""}declared {ago(w.completion.declaredAt, now)}</Text>
|
|
194
195
|
</View>
|
|
195
196
|
</View>
|
|
196
|
-
<
|
|
197
|
+
<RichText selectable style={[t.body, { color: c.foreground }]}>{w.completion.summary}</RichText>
|
|
197
198
|
{!!w.completion.unconfirmed?.length && <Text style={t.meta}>{`Deploy not confirmed by Follow-up for ${w.completion.unconfirmed.map(k => shortRefs(k, w)).join(", ")}. The summary above is the agent's evidence.`}</Text>}
|
|
198
199
|
<Text style={t.meta}>Archive the workspace from its menu when you're finished with it.</Text>
|
|
199
200
|
</View>
|
|
@@ -238,7 +239,7 @@ function WorkspaceCard({ workspace: w, theme, compact, open, toggle, openAgent,
|
|
|
238
239
|
<Text style={t.meta}>A separate agent reads this workspace's history to find PRs and tasks Follow-up missed. It never edits code or messages the main agent.</Text>
|
|
239
240
|
</View>
|
|
240
241
|
{recoveryState && <Text style={[t.meta, { color: c.foreground }]}>{recoveryState}{last?.settledAt ? ` · ${ago(last.settledAt)}` : ""}</Text>}
|
|
241
|
-
{!!last?.result && <
|
|
242
|
+
{!!last?.result && <RichText linkColor={c.foreground} numberOfLines={4} selectable style={t.meta}>{last.result}</RichText>}
|
|
242
243
|
<View style={{ flexDirection: "row", flexWrap: "wrap", gap: 8 }}>
|
|
243
244
|
{last?.state === "pending" ? <Button title="Run queued recovery" theme={theme} compact={compact} loading={runQueued.isPending} onPress={() => runQueued.mutate(last.id)} />
|
|
244
245
|
: <Button title={recovery.isPending || last?.state === "sending" ? "Starting recovery…" : "Run recovery"} icon="History" theme={theme} compact={compact} loading={recovery.isPending}
|