paseo-follow-up 2.2.0-beta.4 → 2.2.0-beta.5
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/OVERVIEW.md +1 -1
- package/assets/icon.png +0 -0
- package/assets/icon.svg +1 -1
- package/client/catch-up.tsx +58 -34
- package/client/follow-up-icon.ts +3 -3
- package/docs/screenshots/follow-up-home.png +0 -0
- package/docs/screenshots/follow-up-linked-items.png +0 -0
- package/docs/screenshots/follow-up-panel.png +0 -0
- package/docs/screenshots/follow-up-phone.png +0 -0
- package/docs/screenshots/follow-up-pill.png +0 -0
- package/docs/screenshots/follow-up-pr-sheet.png +0 -0
- package/docs/screenshots/follow-up-sidebar.png +0 -0
- package/package.json +2 -1
- package/server/graphite.ts +15 -3
- package/server/pr-workflow.ts +2 -3
- package/shared/catch-up.ts +10 -3
package/OVERVIEW.md
CHANGED
|
@@ -36,7 +36,7 @@ This is a trusted, unsandboxed plugin. It reads workspace metadata, saved agent
|
|
|
36
36
|
|
|
37
37
|
Follow-up reads Paseo's agent, workspace and project lists into one in-memory directory shared by discovery, runtime checks, the Needs-you inbox, the Overseer and every client RPC. It reads the lists once at start, then patches the directory from lifecycle events: turn started or ended, permission requested or resolved, agent created, closed or archived, workspace created or archived. A change marks it dirty, and a dirty directory re-reads at most once a minute; a clean one re-reads every ten minutes. Before anything that would load an agent (a timeline or provider-subagent read), Follow-up re-reads that one agent, because the cached copy may predate Paseo unloading it. Provider subagents are asked about only when a send is due or waiting for acknowledgment, or completion is being checked. The Done label is sent only when it changes. In the app, the panel, the larger view and the pill draw from the client's shared workspace poll, which runs every 15 s plus a refresh shortly after Paseo reports an agent change. The inbox runs the same way and passes the tag of the list it holds, so an unchanged list comes back empty. Display preferences re-read once a minute. None of these poll while the app is hidden.
|
|
38
38
|
|
|
39
|
-
The PR workflow setting lives in `plugin-data/follow-up/pr-workflow.json` (owner-only): the default, per-repository overrides, merge methods and the review-fix instruction. Auto-detection reads only files: PATH for a `gt` executable,
|
|
39
|
+
The PR workflow setting lives in `plugin-data/follow-up/pr-workflow.json` (owner-only): the default, per-repository overrides, merge methods and the review-fix instruction. Auto-detection reads only files: PATH for a `gt` executable, `<config>/graphite/user_config`, `<config>/graphite/auth`, then `~/.graphite_user_config` for a sign-in token's presence (`<config>` is `$XDG_CONFIG_HOME` or `~/.config`) (never sent anywhere by detection), and `<git dir>/.graphite_repo_config` in the checkout of the repository's Paseo project, then in the working directories of tracked workspaces with PRs in that repository (from the agent list Follow-up already has). It never runs `gt` and caches for ten minutes. Repositories that resolve to GitHub get no Graphite API calls; their readiness, merge method and auto-merge come from the same `gh api graphql` query that already reads each PR, so there is no extra polling. The first start with this setting seeds the review-fix instruction to `/fix-pr` when `~/.claude/commands/fix-pr.md` or `~/.claude/skills/fix-pr/SKILL.md` exists, once.
|
|
40
40
|
|
|
41
41
|
Reviewer lists live in `plugin-data/follow-up/reviewers.json` (owner-only), apart from `state.json`. Each list is per repository, plus a default for repositories without one, and each user keeps their own. Collaborator and team suggestions are read with `gh api` only when you open Add reviewer. They are cached for ten minutes, and never polled.
|
|
42
42
|
|
package/assets/icon.png
CHANGED
|
Binary file
|
package/assets/icon.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><title>Follow-up</title><rect width="256" height="256" rx="52" fill="#
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><title>Follow-up</title><rect width="256" height="256" rx="52" fill="#222126"/><g transform="translate(24.8 24.8) scale(8.6)"><path d="M6.95 19.21C7.25 19.11 8.19 18.91 8.75 18.59C9.3 18.27 9.7 18 10.29 17.29C10.89 16.58 11.8 15.23 12.34 14.32C12.87 13.41 13.14 12.75 13.51 11.84C13.88 10.93 14.29 9.96 14.57 8.87C14.84 7.78 15.17 6.23 15.18 5.28C15.2 4.33 14.88 3.61 14.63 3.18C14.38 2.74 14.04 2.66 13.7 2.68C13.36 2.7 12.92 2.85 12.58 3.3C12.25 3.75 11.93 4.48 11.72 5.4C11.5 6.33 11.32 7.8 11.29 8.87C11.25 9.94 11.36 10.93 11.53 11.84C11.71 12.75 11.97 13.58 12.34 14.32C12.71 15.06 13.23 15.8 13.76 16.3C14.29 16.79 14.98 17.03 15.49 17.29C16.01 17.55 16.63 17.75 16.86 17.85" fill="none" stroke="#ffffff" stroke-width="1.42" stroke-linecap="round" stroke-linejoin="round"/><circle cx="4.85" cy="19.15" r="2.14" fill="none" stroke="#ffffff" stroke-width="1.42"/><circle cx="20.01" cy="18.03" r="1.92" fill="#B79CF0"/></g></svg>
|
package/client/catch-up.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import { age, snoozeUntil } from "../shared/inbox";
|
|
|
15
15
|
import { laterChoices } from "../shared/row-menu";
|
|
16
16
|
import { errorText } from "../shared/errors";
|
|
17
17
|
import { CATCH_UP_RAIL_DEFAULT, CATCH_UP_RAIL_MAX, CATCH_UP_RAIL_MIN } from "../shared/display";
|
|
18
|
-
import { CATCH_UP_KEYS, CONTEXT_ASKS, MODE, askHeadline, catchUpKey, keyLabel, deckCards, groupOf,
|
|
18
|
+
import { CATCH_UP_KEYS, CONTEXT_ASKS, MODE, askHeadline, catchUpKey, keyLabel, deckCards, groupOf, openInWorkspace, park, prevPos, applySwipe, skipWorkspace, swipeLock, swipeOutcome, settle as settleCard, startSession, statsOf, sync, type ContextRequest, type DeckCard, type Outcome, type Session } from "../shared/catch-up";
|
|
19
19
|
import type { Workspace } from "../shared/model";
|
|
20
20
|
import type { ListWorkspace } from "../shared/list";
|
|
21
21
|
import { bottomInset, Button, focusSoon, IconButton, SubmitScope, text, type Theme } from "./kit";
|
|
@@ -32,6 +32,7 @@ import { mergedColor, withAlpha, tint } from "./theme";
|
|
|
32
32
|
import { RichText } from "./rich-text";
|
|
33
33
|
import { DisplaySplit, PermissionBlock, useAgentLive } from "./home";
|
|
34
34
|
import { DockedPane } from "./docked-pane";
|
|
35
|
+
import { ownsKey, surfaceVisible } from "../shared/list-keys";
|
|
35
36
|
import { useReducedMotion } from "./motion";
|
|
36
37
|
import { PRIMARY_FORM } from "./dock";
|
|
37
38
|
|
|
@@ -129,23 +130,35 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
129
130
|
|
|
130
131
|
// Desktop keys (CATCH_UP_KEYS, catchUpKey in shared/catch-up.ts): every move has one. The card's controls are found
|
|
131
132
|
// by the names they already carry (option letters, Later (L), Open chat (O)), so a key does exactly what a click does.
|
|
133
|
+
// every-catch-up-key-works-wherever-focus-is: one owner for these keys whatever else is mounted. The listener is the
|
|
134
|
+
// window's, in the capture phase, so it runs before any document listener (Follow-up's list keys take j and k there
|
|
135
|
+
// and stop them); it takes a key only when focus is inside this screen, or on nothing while this screen is the one on
|
|
136
|
+
// view (a Catch up Paseo keeps mounted behind a tab never does), and it finds every control inside its own root.
|
|
132
137
|
const [keysOpen, setKeysOpen] = useState(false);
|
|
138
|
+
const rootRef = useRef<View>(null);
|
|
133
139
|
useEffect(() => {
|
|
134
140
|
if (Platform.OS !== "web" || compact) return;
|
|
135
|
-
type Ev = { key: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; isComposing: boolean; target: unknown; preventDefault(): void };
|
|
141
|
+
type Ev = { key: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; isComposing: boolean; target: unknown; preventDefault(): void; stopPropagation(): void };
|
|
136
142
|
type El = { tagName?: string; isContentEditable?: boolean; click?(): void; focus?(): void; closest?(q: string): El | null };
|
|
137
|
-
type
|
|
138
|
-
|
|
143
|
+
type Root = El & { querySelector(q: string): El | null; querySelectorAll(q: string): ArrayLike<El>; contains(n: unknown): boolean; checkVisibility?(): boolean; getClientRects?(): { length: number } };
|
|
144
|
+
type Doc = { body?: unknown; visibilityState?: string };
|
|
145
|
+
type Win = { addEventListener(t: string, f: (e: Ev) => void, capture?: boolean): void; removeEventListener(t: string, f: (e: Ev) => void, capture?: boolean): void };
|
|
146
|
+
const doc = (globalThis as { document?: Doc }).document; const win = globalThis as unknown as Win;
|
|
147
|
+
if (!doc || typeof win.addEventListener !== "function") return;
|
|
139
148
|
const mac = isMac();
|
|
140
|
-
const
|
|
141
|
-
const
|
|
149
|
+
const root = () => rootRef.current as unknown as Root | null;
|
|
150
|
+
const inCard = (q: string) => root()?.querySelector(`[data-catch-up-card] ${q}`) ?? null;
|
|
151
|
+
const railItems = () => Array.from(root()?.querySelectorAll("[data-catch-up-rail] [role=\"button\"]") ?? []);
|
|
142
152
|
const onKey = (e: Ev) => {
|
|
143
153
|
const el = e.target as El | null;
|
|
154
|
+
const r = root();
|
|
155
|
+
const onBody = !el || el === doc.body;
|
|
156
|
+
if (!r || !ownsKey({ inside: !!el && r.contains(el), onBody, claimBody: true, visible: onBody && surfaceVisible(r, doc) })) return;
|
|
144
157
|
const typing = !!el && (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || !!el.isContentEditable);
|
|
145
158
|
const hit = catchUpKey({ key: e.key, meta: e.metaKey, ctrl: e.ctrlKey, alt: e.altKey, shift: e.shiftKey, composing: e.isComposing, mac },
|
|
146
159
|
{ typing, inMore: !!el?.closest?.("[data-catch-up-more]"), moreOpen: more, inRail: !!el?.closest?.("[data-catch-up-rail]") });
|
|
147
160
|
if (!hit || finished && !["back", "keys", "leave", "rail"].includes(hit.action)) return;
|
|
148
|
-
const click = (q: string) => { const b =
|
|
161
|
+
const click = (q: string) => { const b = r.querySelector(q); b?.click?.(); return !!b; };
|
|
149
162
|
switch (hit.action) {
|
|
150
163
|
case "skip": skip(); break;
|
|
151
164
|
case "skip-workspace": if (wsLeft < 2) return; skipWs(); break;
|
|
@@ -156,16 +169,16 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
156
169
|
case "pick": inCard(`[role="radio"][aria-label^="${hit.arg}. "]`)?.click?.(); break;
|
|
157
170
|
case "own": inCard('[role="radio"][aria-label^="Something else"]')?.click?.(); break;
|
|
158
171
|
case "send": { const b = inCard('[aria-label^="Send your"]') ?? inCard('[aria-label^="Send "]'); if (!b) return; b.click?.(); break; }
|
|
159
|
-
case "note": { const add = inCard('[aria-label^="Add a note"]'); if (add) add.click?.(); else
|
|
172
|
+
case "note": { const add = inCard('[aria-label^="Add a note"]'); if (add) add.click?.(); else r.querySelector('[aria-label="Tell the agent something"]')?.focus?.(); break; }
|
|
160
173
|
// Its sheet or popover takes focus itself (MoveResult).
|
|
161
174
|
case "later": if (!click('[aria-label="Later (L)"]')) return; break;
|
|
162
175
|
case "chat": if (!click('[aria-label="Open chat (O)"]')) return; break;
|
|
163
|
-
case "chip":
|
|
176
|
+
case "chip": r.querySelectorAll("[data-catch-up-more] [role=\"radio\"]")[Number(hit.arg) - 1]?.click?.(); break;
|
|
164
177
|
case "ask": if (!click('[data-catch-up-more] [data-ask-agent] [role="button"]')) return; break;
|
|
165
178
|
case "rail": {
|
|
166
179
|
const items = railItems();
|
|
167
180
|
if (el?.closest?.("[data-catch-up-rail]")) { (el as { blur?(): void }).blur?.(); break; }
|
|
168
|
-
(
|
|
181
|
+
(r.querySelector("[data-catch-up-rail] [data-catch-up-here]") ?? items[0])?.focus?.();
|
|
169
182
|
break;
|
|
170
183
|
}
|
|
171
184
|
case "rail-up": case "rail-down": {
|
|
@@ -176,9 +189,11 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
176
189
|
default: return;
|
|
177
190
|
}
|
|
178
191
|
e.preventDefault();
|
|
192
|
+
// Acted: nothing else handles it (a list's j/k under a document listener).
|
|
193
|
+
e.stopPropagation();
|
|
179
194
|
};
|
|
180
|
-
|
|
181
|
-
return () =>
|
|
195
|
+
win.addEventListener("keydown", onKey, true);
|
|
196
|
+
return () => win.removeEventListener("keydown", onKey, true);
|
|
182
197
|
});
|
|
183
198
|
// Phones: the card follows the finger (Paseo's sidebar drag): left skips this card, right goes Back, the card about to
|
|
184
199
|
// show peeks underneath, and a drag held halfway stays there. The direction locks in the first SWIPE_LOCK_PX, so a
|
|
@@ -186,7 +201,7 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
186
201
|
// no follow, just the move on release. Transforms only (translateX), on the native driver where there is one.
|
|
187
202
|
const reduced = useReducedMotion();
|
|
188
203
|
const drag = useRef(new Animated.Value(0)).current;
|
|
189
|
-
const [dragDir, setDragDir] = useState<"skip" | "back" | null>(null);
|
|
204
|
+
const [dragDir, setDragDir] = useState<"skip-workspace" | "back" | null>(null);
|
|
190
205
|
const width = useRef(390);
|
|
191
206
|
const lock = useRef<"x" | "y" | null>(null);
|
|
192
207
|
// The finger's own offset from where it went down: react-native-web's accumulated gestureState.dx runs ahead of a
|
|
@@ -208,17 +223,18 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
208
223
|
onPanResponderTerminationRequest: () => false,
|
|
209
224
|
onPanResponderMove: e => {
|
|
210
225
|
const { dx } = offset(e);
|
|
211
|
-
setDragDir(dx < 0 ? "skip" : canBack ? "back" : null);
|
|
226
|
+
setDragDir(dx < 0 ? "skip-workspace" : canBack ? "back" : null);
|
|
212
227
|
// Nothing behind the first card: the drag resists instead of revealing an empty space.
|
|
213
228
|
if (!reduced) drag.setValue(dx > 0 && !canBack ? dx * 0.25 : dx);
|
|
214
229
|
},
|
|
215
230
|
onPanResponderRelease: (e, g) => {
|
|
216
231
|
lock.current = null;
|
|
217
232
|
const out = swipeOutcome({ dx: offset(e).dx, vx: g.vx, width: width.current, canBack });
|
|
218
|
-
|
|
233
|
+
// Left skips the whole workspace (Skip workspace, ⇧J); right is Back. The same applySwipe the tests run.
|
|
234
|
+
const act = () => { drag.setValue(0); setDragDir(null); setMore(false); setSession(s => applySwipe(s, out)); };
|
|
219
235
|
if (out === "stay") { setDragDir(null); if (!reduced) Animated.spring(drag, { toValue: 0, bounciness: 0, speed: 20, useNativeDriver: Platform.OS !== "web" }).start(); else drag.setValue(0); return; }
|
|
220
236
|
if (reduced) { act(); return; }
|
|
221
|
-
Animated.timing(drag, { toValue: (out === "skip" ? -1 : 1) * width.current, duration: 160, useNativeDriver: Platform.OS !== "web" }).start(act);
|
|
237
|
+
Animated.timing(drag, { toValue: (out === "skip-workspace" ? -1 : 1) * width.current, duration: 160, useNativeDriver: Platform.OS !== "web" }).start(act);
|
|
222
238
|
},
|
|
223
239
|
onPanResponderTerminate: () => { lock.current = null; setDragDir(null); drag.setValue(0); },
|
|
224
240
|
}), [compact, key, finished, canBack, reduced]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -278,14 +294,17 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
278
294
|
</ScrollView>;
|
|
279
295
|
|
|
280
296
|
// Under the dragged card: the one the release would show, so the drag says where it goes.
|
|
281
|
-
|
|
297
|
+
// The peek says exactly what the release does: where Skip workspace lands (skipWorkspace itself), or Back's card.
|
|
298
|
+
const ahead = dragDir === "skip-workspace" ? skipWorkspace(session) : null;
|
|
299
|
+
const peekKey = ahead ? ahead.order[ahead.pos] : dragDir === "back" ? session.order[prevPos(session)] : undefined;
|
|
300
|
+
const peekWhat = dragDir === "back" ? "Back" : wsLeft > 1 ? `Skip workspace · ${wsLeft} cards` : `Skip ${card ? skipNoun(card) : "card"}`;
|
|
282
301
|
const peekCard = cardOf(peekKey);
|
|
283
302
|
const peek = compact && dragDir && <View accessibilityElementsHidden importantForAccessibility="no-hide-descendants" pointerEvents="none"
|
|
284
|
-
style={{ position: "absolute", top: 0, bottom: 0, left: 0, right: 0, backgroundColor: c.surface1, justifyContent: "center", alignItems: dragDir === "skip" ? "flex-end" : "flex-start", paddingHorizontal: 20 }}>
|
|
285
|
-
<View style={{ maxWidth: "42%", gap: 4, alignItems: dragDir === "skip" ? "flex-end" : "flex-start" }}>
|
|
286
|
-
<Icon name={dragDir === "
|
|
287
|
-
<Text style={[t.small, { fontWeight: "600" }]}>{
|
|
288
|
-
<Text numberOfLines={2} style={[t.meta, { textAlign: dragDir === "skip" ? "right" : "left" }]}>{peekCard ? `${peekCard.s.title} · ${cardLabel(peekCard, peekCard.s.workspaceId ? live.get(peekCard.s.workspaceId) : undefined)}` : MODE.endOfDeck}</Text>
|
|
303
|
+
style={{ position: "absolute", top: 0, bottom: 0, left: 0, right: 0, backgroundColor: c.surface1, justifyContent: "center", alignItems: dragDir === "skip-workspace" ? "flex-end" : "flex-start", paddingHorizontal: 20 }}>
|
|
304
|
+
<View style={{ maxWidth: "42%", gap: 4, alignItems: dragDir === "skip-workspace" ? "flex-end" : "flex-start" }}>
|
|
305
|
+
<Icon name={dragDir === "back" ? "ChevronLeft" : wsLeft > 1 ? "ChevronsRight" : "ArrowRight"} size={18} color={c.foregroundMuted} />
|
|
306
|
+
<Text style={[t.small, { fontWeight: "600" }]}>{peekWhat}</Text>
|
|
307
|
+
<Text numberOfLines={2} style={[t.meta, { textAlign: dragDir === "skip-workspace" ? "right" : "left" }]}>{peekCard ? `${peekCard.s.title} · ${cardLabel(peekCard, peekCard.s.workspaceId ? live.get(peekCard.s.workspaceId) : undefined)}` : MODE.endOfDeck}</Text>
|
|
289
308
|
</View>
|
|
290
309
|
</View>;
|
|
291
310
|
const main = <View style={{ flex: 1, minWidth: 0, overflow: "hidden" }} onLayout={e => { width.current = e.nativeEvent.layout.width; }} {...pan.panHandlers}>
|
|
@@ -293,7 +312,7 @@ export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: T
|
|
|
293
312
|
<Animated.View {...({ dataSet: { catchUpDrag: "1" } } as object)} style={{ flex: 1, backgroundColor: c.surface0, transform: [{ translateX: drag }],
|
|
294
313
|
...(dragDir ? { shadowColor: "#000", shadowOpacity: 0.18, shadowRadius: 12, shadowOffset: { width: 0, height: 0 } } : {}) }}>{body}</Animated.View>
|
|
295
314
|
</View>;
|
|
296
|
-
return <View style={{ flex: 1, backgroundColor: c.surface0 }}>
|
|
315
|
+
return <View ref={rootRef} {...({ dataSet: { catchUpRoot: "1" } } as object)} style={{ flex: 1, backgroundColor: c.surface0 }}>
|
|
297
316
|
{progress}
|
|
298
317
|
<View style={{ flex: 1, borderTopWidth: 1, borderTopColor: c.border }}>
|
|
299
318
|
{/* Desktop: the queue rail beside the card, resizable (side-panes-are-resizable); its width is the Display field catch_up_rail_fraction. */}
|
|
@@ -335,7 +354,16 @@ function CardView({ card, w, theme, compact, deps, navigation, gone, more, setMo
|
|
|
335
354
|
{sameWorkspace.length > 1 ? ` · ${nth + 1} of ${sameWorkspace.length} here` : ""}
|
|
336
355
|
</Text>
|
|
337
356
|
</View>
|
|
338
|
-
|
|
357
|
+
{/* Skip workspace sits on the line of the workspace it skips, top right, the same place on phone and desktop (Tom,
|
|
358
|
+
beta.4: "maybe put the skip workspace button at the top right?"). Only while more than one card is left; the meta
|
|
359
|
+
line's "1 of 2 here" gives the count, and its accessible name says it. Negative margins keep its 44 px target
|
|
360
|
+
from pushing the title line apart. */}
|
|
361
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
362
|
+
<Text accessibilityRole="header" numberOfLines={2} style={[compact ? t.title : [t.title, { fontSize: 17, lineHeight: 23 }], { flex: 1 }]}>{s.title}{s.agent ? <Text style={{ color: c.foregroundMuted, fontWeight: "400" }}>{` › ${s.agent}`}</Text> : null}</Text>
|
|
363
|
+
{onSkipWorkspace && <View style={{ marginVertical: compact ? -10 : -6, marginRight: compact ? -14 : -11 }}>
|
|
364
|
+
<Tip label={`${skipWorkspaceHint(wsLeft)} (⇧J)`}><Button theme={theme} compact={compact} kind="ghost" icon="ChevronsRight" title="Skip workspace" accessibilityLabel={skipWorkspaceHint(wsLeft)} accessibilityHint={compact ? undefined : "Shift+J"} onPress={onSkipWorkspace} /></Tip>
|
|
365
|
+
</View>}
|
|
366
|
+
</View>
|
|
339
367
|
{ws && <SummaryLine key={ws.id} workspace={ws} theme={theme} compact={compact} />}
|
|
340
368
|
{full && <ReferencesLine workspace={full} theme={theme} compact={compact} />}
|
|
341
369
|
</View>;
|
|
@@ -399,7 +427,6 @@ function CardView({ card, w, theme, compact, deps, navigation, gone, more, setMo
|
|
|
399
427
|
{compact ? ready ? <IconButton theme={theme} compact icon="ArrowRight" label={skipCardHint(noun)} onPress={onSkip} />
|
|
400
428
|
: <View style={{ flex: 1 }}><Button theme={theme} compact grow icon="ArrowRight" title={`Skip ${noun}`} accessibilityLabel={skipCardHint(noun)} onPress={onSkip} /></View>
|
|
401
429
|
: <>
|
|
402
|
-
{onSkipWorkspace && <Tip label={`${skipWorkspaceHint(wsLeft)} (⇧J)`}><Button theme={theme} kind="ghost" icon="ChevronsRight" title="Skip workspace" accessibilityLabel={skipWorkspaceHint(wsLeft)} accessibilityHint="Shift+J" onPress={onSkipWorkspace} /></Tip>}
|
|
403
430
|
<Tip label={`${skipCardHint(noun)} (J or →)`}><Button theme={theme} icon="ArrowRight" title={`Skip ${noun}`} accessibilityLabel={skipCardHint(noun)} accessibilityHint="J" onPress={onSkip} /></Tip>
|
|
404
431
|
</>}
|
|
405
432
|
{send}
|
|
@@ -413,9 +440,6 @@ function CardView({ card, w, theme, compact, deps, navigation, gone, more, setMo
|
|
|
413
440
|
contentContainerStyle={{ padding: compact ? 16 : 28, gap: compact ? 16 : 18, ...(compact ? {} : { maxWidth: 720, width: "100%", alignSelf: "center" }) }}
|
|
414
441
|
dock={({ yields, typingInContent }) => compact && (sheet && !typingInContent || !yields) && <View style={[{ borderTopWidth: 1, borderTopColor: c.border, backgroundColor: c.surface0 }, bottomInset(compact)]}>
|
|
415
442
|
{sheet && !typingInContent && <MoveResult place="sheet" theme={theme} label={moreBlock ? "More context" : "Later"}>{sheet}</MoveResult>}
|
|
416
|
-
{!yields && !sheet && onSkipWorkspace && <View style={{ flexDirection: "row", justifyContent: "flex-end", paddingHorizontal: 12, paddingTop: 6 }}>
|
|
417
|
-
<Button theme={theme} compact kind="ghost" icon="ChevronsRight" title={`Skip workspace · ${wsLeft} cards`} accessibilityLabel={skipWorkspaceHint(wsLeft)} onPress={onSkipWorkspace} />
|
|
418
|
-
</View>}
|
|
419
443
|
{!yields && moves}
|
|
420
444
|
</View>}>
|
|
421
445
|
{goneBanner}
|
|
@@ -432,7 +456,7 @@ function CardView({ card, w, theme, compact, deps, navigation, gone, more, setMo
|
|
|
432
456
|
* Where a move's result opens (MOVE_OPENS, a-move-bar-action-opens-in-view): a sheet in the phone's dock or a popover
|
|
433
457
|
* on its desktop button. Focus moves into it (its first choice), and on the web it scrolls into view the least distance.
|
|
434
458
|
*/
|
|
435
|
-
function MoveResult({ place, theme, label, width, children }: { place: "sheet" | "popover"; theme: Theme; label: string; width?: number; children: ReactNode }) {
|
|
459
|
+
export function MoveResult({ place, theme, label, width, children }: { place: "sheet" | "popover"; theme: Theme; label: string; width?: number; children: ReactNode }) {
|
|
436
460
|
const c = theme.colors;
|
|
437
461
|
const ref = useRef<View>(null);
|
|
438
462
|
useEffect(() => {
|
|
@@ -445,7 +469,7 @@ function MoveResult({ place, theme, label, width, children }: { place: "sheet" |
|
|
|
445
469
|
}, 0);
|
|
446
470
|
return () => clearTimeout(t);
|
|
447
471
|
}, []);
|
|
448
|
-
return <View ref={ref} {...({ dataSet: { moveResult: place } } as object)}
|
|
472
|
+
return <View ref={ref} {...({ dataSet: { moveResult: place } } as object)} role="dialog" accessibilityLabel={label}
|
|
449
473
|
style={[{ padding: place === "sheet" ? 14 : 16, borderRadius: 12, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface1 },
|
|
450
474
|
place === "sheet"
|
|
451
475
|
? { marginHorizontal: 12, marginTop: 12 }
|
|
@@ -455,7 +479,7 @@ function MoveResult({ place, theme, label, width, children }: { place: "sheet" |
|
|
|
455
479
|
}
|
|
456
480
|
|
|
457
481
|
/** What came back for this card: the answer, "answered in its chat", a failure, or (seen going Back) that it's still asking. */
|
|
458
|
-
function ContextAnswer({ theme, compact, request, waiting, agent, openChat, openAgent }: { theme: Theme; compact: boolean; request: ContextRequest; waiting: boolean; agent: string; openChat: () => void; openAgent?: (agentId: string) => void }) {
|
|
482
|
+
export function ContextAnswer({ theme, compact, request, waiting, agent, openChat, openAgent }: { theme: Theme; compact: boolean; request: ContextRequest; waiting: boolean; agent: string; openChat: () => void; openAgent?: (agentId: string) => void }) {
|
|
459
483
|
const c = theme.colors; const t = text(c, compact);
|
|
460
484
|
const who = request.target === "overseer" ? "Overseer" : agent === "the agent" ? "The agent" : agent;
|
|
461
485
|
const asking = request.state === "asking";
|
|
@@ -497,7 +521,7 @@ function BriefAsk({ s, theme, compact, deps }: { s: DeckCard["s"]; theme: Theme;
|
|
|
497
521
|
* the card's workspace's main agent, the one that can answer on the card (an-ask-goes-only-to-an-agent-that-can-answer-
|
|
498
522
|
* it). It may wake, because the developer asked. The deck moves on and this workspace comes back when the answer is ready.
|
|
499
523
|
*/
|
|
500
|
-
function MorePanel({ theme, compact, onClose, onAsk }: { theme: Theme; compact: boolean; onClose: () => void; onAsk: (words: string) => Promise<void> }) {
|
|
524
|
+
export function MorePanel({ theme, compact, onClose, onAsk }: { theme: Theme; compact: boolean; onClose: () => void; onAsk: (words: string) => Promise<void> }) {
|
|
501
525
|
const c = theme.colors; const t = text(c, compact);
|
|
502
526
|
const [words, setWords] = useState<string>(CONTEXT_ASKS[0].text);
|
|
503
527
|
const [picked, setPicked] = useState<string>(CONTEXT_ASKS[0].id);
|
|
@@ -535,7 +559,7 @@ function MorePanel({ theme, compact, onClose, onAsk }: { theme: Theme; compact:
|
|
|
535
559
|
</View>;
|
|
536
560
|
}
|
|
537
561
|
|
|
538
|
-
function Finished({ theme, compact, stats, empty, onHome, onSkipped }: { theme: Theme; compact: boolean; stats: ReturnType<typeof statsOf>; empty: boolean; onHome: () => void; onSkipped: () => void }) {
|
|
562
|
+
export function Finished({ theme, compact, stats, empty, onHome, onSkipped }: { theme: Theme; compact: boolean; stats: ReturnType<typeof statsOf>; empty: boolean; onHome: () => void; onSkipped: () => void }) {
|
|
539
563
|
const c = theme.colors; const t = text(c, compact);
|
|
540
564
|
// "All caught up" only when it is true: a skipped or waiting card means the developer is not, so the end says so.
|
|
541
565
|
const caughtUp = !stats.skipped && !stats.waiting;
|
|
@@ -567,7 +591,7 @@ export function KeysSheet({ theme, onClose }: { theme: Theme; onClose: () => voi
|
|
|
567
591
|
const section = (title: string, keys: readonly typeof CATCH_UP_KEYS[number][]) => <View style={{ gap: 6 }}>
|
|
568
592
|
<Text style={[t.small, { fontWeight: "600" }]}>{title}</Text>{keys.map(row)}
|
|
569
593
|
</View>;
|
|
570
|
-
return <View
|
|
594
|
+
return <View role="dialog" accessibilityLabel="Catch up keys" style={{ position: "absolute", zIndex: 10, right: 20, top: 8, width: 300, padding: 16, gap: 12, borderRadius: 10, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface1, shadowColor: "#000", shadowOpacity: 0.25, shadowRadius: 12 }}>
|
|
571
595
|
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
572
596
|
<Text style={[t.label, { flex: 1, fontWeight: "600" }]}>Keys</Text>
|
|
573
597
|
<IconButton theme={theme} compact={false} icon="X" label="Close the keys (S)" tooltip onPress={onClose} />
|
package/client/follow-up-icon.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { PluginSvgIcon } from "@getpaseo/plugin/client";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Follow-up's own mark: a
|
|
4
|
+
* Follow-up's own mark: a cursive l that runs on from a start ring to a filled dot (the work, followed until it's done).
|
|
5
5
|
* One 24-unit glyph in `currentColor`, so the host `Icon` colours it with the theme. It is the brand icon on every
|
|
6
6
|
* surface that stands for Follow-up itself (sidebar row, header button, panel tab, Settings, the open command, the
|
|
7
7
|
* large view's empty state). Pull requests keep lucide GitPullRequest. assets/icon.svg is the same mark on the app tile.
|
|
8
8
|
* tests/follow-up-icon.test.ts checks it with the SDK's validator and that no brand surface falls back to GitPullRequest.
|
|
9
9
|
*/
|
|
10
10
|
export const FOLLOW_UP_ICON: PluginSvgIcon = {
|
|
11
|
-
svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="
|
|
11
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.95 19.21C7.25 19.11 8.19 18.91 8.75 18.59C9.3 18.27 9.7 18 10.29 17.29C10.89 16.58 11.8 15.23 12.34 14.32C12.87 13.41 13.14 12.75 13.51 11.84C13.88 10.93 14.29 9.96 14.57 8.87C14.84 7.78 15.17 6.23 15.18 5.28C15.2 4.33 14.88 3.61 14.63 3.18C14.38 2.74 14.04 2.66 13.7 2.68C13.36 2.7 12.92 2.85 12.58 3.3C12.25 3.75 11.93 4.48 11.72 5.4C11.5 6.33 11.32 7.8 11.29 8.87C11.25 9.94 11.36 10.93 11.53 11.84C11.71 12.75 11.97 13.58 12.34 14.32C12.71 15.06 13.23 15.8 13.76 16.3C14.29 16.79 14.98 17.03 15.49 17.29C16.01 17.55 16.63 17.75 16.86 17.85" fill="none" stroke="currentColor" stroke-width="1.42" stroke-linecap="round" stroke-linejoin="round"/><circle cx="4.85" cy="19.15" r="2.14" fill="none" stroke="currentColor" stroke-width="1.42"/><circle cx="20.01" cy="18.03" r="1.92" fill="currentColor"/></svg>`,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
/** Where the end dot sits, as a fraction of the icon box: the header button's Needs-you badge covers it. */
|
|
15
|
-
export const FOLLOW_UP_DOT = { x:
|
|
15
|
+
export const FOLLOW_UP_DOT = { x: 20.01 / 24, y: 18.03 / 24 };
|
|
16
16
|
|
|
17
17
|
/** The header button's Needs-you dot, in px. */
|
|
18
18
|
export const NEED_DOT = 7;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.2.0-beta.
|
|
4
|
+
"version": "2.2.0-beta.5",
|
|
5
5
|
"description": "A Paseo plugin that follows every workspace until the work is done: one Home for what needs you, questions you answer anywhere, and repairs that send themselves.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@types/react": "~19.2.0",
|
|
54
54
|
"react": "19.1.0",
|
|
55
55
|
"react-native": "0.81.5",
|
|
56
|
+
"react-test-renderer": "19.1.0",
|
|
56
57
|
"tsx": "^4.20.0",
|
|
57
58
|
"typescript": "^5.9.3",
|
|
58
59
|
"zod": "^4.4.3"
|
package/server/graphite.ts
CHANGED
|
@@ -14,10 +14,22 @@ export function mergeScheduling(status: unknown): Scheduling {
|
|
|
14
14
|
export class GraphiteWriteError extends Error {
|
|
15
15
|
constructor(message: string, readonly uncertain: boolean) { super(message); }
|
|
16
16
|
}
|
|
17
|
+
/** Shared by sign-in detection and API requests. Never surface config contents or parse errors. */
|
|
18
|
+
export async function graphiteAuthToken(environment: NodeJS.ProcessEnv = process.env): Promise<string | null> {
|
|
19
|
+
const home = environment.HOME ?? homedir();
|
|
20
|
+
const config = environment.XDG_CONFIG_HOME ?? join(home, ".config");
|
|
21
|
+
for (const path of [join(config, "graphite", "user_config"), join(config, "graphite", "auth"), join(home, ".graphite_user_config")]) {
|
|
22
|
+
try {
|
|
23
|
+
const authToken: unknown = JSON.parse(await readFile(path, "utf8"))?.authToken;
|
|
24
|
+
if (typeof authToken === "string" && authToken.length > 0) return authToken;
|
|
25
|
+
} catch { /* Missing, unreadable or invalid files don't prevent checking older locations. */ }
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
async function requestGraphite(route: "mergeability-status" | "merge", body: Record<string, unknown>): Promise<unknown> {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
if (typeof authToken !== "string" || !authToken) throw new GraphiteWriteError("Graphite authentication unavailable.", false);
|
|
31
|
+
const authToken = await graphiteAuthToken();
|
|
32
|
+
if (!authToken) throw new GraphiteWriteError("Graphite CLI authentication is unavailable.", false);
|
|
21
33
|
const controller = new AbortController();
|
|
22
34
|
const timeout = setTimeout(() => controller.abort(), 8_000);
|
|
23
35
|
try {
|
package/server/pr-workflow.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { access, constants, readFile, stat } from "node:fs/promises";
|
|
2
2
|
import { delimiter, isAbsolute, join, resolve } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
|
+
import { graphiteAuthToken } from "./graphite";
|
|
4
5
|
import { WriteBehind } from "./write-behind";
|
|
5
6
|
import { repoKey } from "../shared/reviewers";
|
|
6
7
|
import {
|
|
@@ -26,9 +27,7 @@ export const fsProbe = (environment: NodeJS.ProcessEnv = process.env): Probe =>
|
|
|
26
27
|
return false;
|
|
27
28
|
},
|
|
28
29
|
async signedIn() {
|
|
29
|
-
|
|
30
|
-
try { const { authToken } = JSON.parse(await readFile(join(config, "graphite", "auth"), "utf8")); return typeof authToken === "string" && authToken.length > 0; }
|
|
31
|
-
catch { return false; }
|
|
30
|
+
return (await graphiteAuthToken(environment)) !== null;
|
|
32
31
|
},
|
|
33
32
|
async initialised(path) {
|
|
34
33
|
const common = await gitCommonDir(path);
|
package/shared/catch-up.ts
CHANGED
|
@@ -124,17 +124,24 @@ export function swipeLock(dx: number, dy: number): "x" | "y" | null {
|
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* A released drag: past `SWIPE_COMMIT` of the card's width, or flung faster than `SWIPE_FLING` px/ms the same way, left
|
|
127
|
-
* skips the
|
|
127
|
+
* skips the workspace and right goes Back (when there is a card to go back to); anything else springs back. Left is the
|
|
128
|
+
* workspace, not the card (Tom, 2.2.0-beta.4: "it makes more sense for the drag left to skip the whole workspace"); the
|
|
129
|
+
* bar's Skip stays the way to skip one card. With one card left in the workspace the two are the same.
|
|
128
130
|
*/
|
|
129
131
|
export const SWIPE_COMMIT = 0.35;
|
|
130
132
|
export const SWIPE_FLING = 0.5;
|
|
131
|
-
export
|
|
133
|
+
export type SwipeOutcome = "skip-workspace" | "back" | "stay";
|
|
134
|
+
export function swipeOutcome(g: { dx: number; vx: number; width: number; canBack: boolean }): SwipeOutcome {
|
|
132
135
|
const far = Math.abs(g.dx) > SWIPE_COMMIT * g.width;
|
|
133
136
|
const fling = Math.abs(g.vx) > SWIPE_FLING && Math.sign(g.vx) === Math.sign(g.dx);
|
|
134
137
|
if (!far && !fling) return "stay";
|
|
135
|
-
if (g.dx < 0) return "skip";
|
|
138
|
+
if (g.dx < 0) return "skip-workspace";
|
|
136
139
|
return g.canBack && g.dx > 0 ? "back" : "stay";
|
|
137
140
|
}
|
|
141
|
+
/** What a released drag does to the session: the screen and the tests run this one function. */
|
|
142
|
+
export function applySwipe(s: Session, out: SwipeOutcome): Session {
|
|
143
|
+
return out === "skip-workspace" ? skipWorkspace(s) : out === "back" ? { ...s, pos: prevPos(s) } : s;
|
|
144
|
+
}
|
|
138
145
|
|
|
139
146
|
/** Records what happened to the card on screen and moves on. */
|
|
140
147
|
export function settle(s: Session, outcome: Outcome, key = s.order[s.pos]): Session {
|