paseo-follow-up 2.4.0-beta.9 → 2.4.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/OVERVIEW.md +1 -1
  3. package/README.md +81 -22
  4. package/client/agents.tsx +8 -26
  5. package/client/brief-since.tsx +4 -3
  6. package/client/compass-settings.tsx +156 -87
  7. package/client/display.tsx +2 -1
  8. package/client/header.tsx +2 -2
  9. package/client/home-chrome.tsx +24 -13
  10. package/client/home-data.ts +1 -1
  11. package/client/home-list.tsx +2 -1
  12. package/client/home-view.ts +7 -9
  13. package/client/home.tsx +9 -4
  14. package/client/job-rows.tsx +56 -7
  15. package/client/list-keys.ts +2 -1
  16. package/client/morning-brief-settings.tsx +11 -1
  17. package/client/new-entry.tsx +42 -2
  18. package/client/new-settings.tsx +29 -13
  19. package/client/new.tsx +89 -43
  20. package/client/onboarding.tsx +75 -29
  21. package/client/release-notes.tsx +11 -7
  22. package/client/reviewers.tsx +1 -1
  23. package/client/row-badges.tsx +37 -0
  24. package/client/search-focus.ts +85 -0
  25. package/client/search-key.ts +6 -12
  26. package/client/stacks.tsx +9 -2
  27. package/docs/screenshots/follow-up-slide-1-cover.png +0 -0
  28. package/docs/screenshots/follow-up-slide-2-decision.png +0 -0
  29. package/docs/screenshots/follow-up-slide-3-overseer.png +0 -0
  30. package/docs/screenshots/follow-up-slide-4-repairs.png +0 -0
  31. package/docs/screenshots/follow-up-slide-5-deploy.png +0 -0
  32. package/docs/screenshots/follow-up-slide-6-catch-up.png +0 -0
  33. package/index.client.tsx +12 -6
  34. package/index.server.ts +89 -25
  35. package/package.json +4 -3
  36. package/paseo-plugin.json +7 -9
  37. package/server/about.ts +4 -1
  38. package/server/agent-hook.mjs +12 -4
  39. package/server/agent-settings.ts +19 -3
  40. package/server/brief-sources.ts +4 -2
  41. package/server/compass.ts +310 -41
  42. package/server/daemon.ts +11 -3
  43. package/server/dispatch.ts +3 -2
  44. package/server/engine.ts +19 -6
  45. package/server/github-api.ts +17 -6
  46. package/server/github-setup.ts +126 -0
  47. package/server/github.ts +28 -0
  48. package/server/hook-source.ts +12 -4
  49. package/server/host-features.ts +21 -1
  50. package/server/linear-issues.ts +4 -3
  51. package/server/linear-queue.ts +3 -0
  52. package/server/mcp-source.ts +5 -3
  53. package/server/mcp.mjs +5 -3
  54. package/server/memory.ts +47 -19
  55. package/server/onboarding.ts +3 -2
  56. package/server/pr-actions.ts +12 -1
  57. package/server/pr-stats-sync.ts +4 -2
  58. package/server/pr-stats.ts +4 -0
  59. package/server/ranker.ts +4 -2
  60. package/server/reviewer-config.ts +3 -1
  61. package/server/session-mcp.ts +3 -2
  62. package/server/session-prompt.ts +34 -8
  63. package/server/wait-for-checks.ts +9 -0
  64. package/shared/agent-settings.ts +17 -9
  65. package/shared/attention.ts +4 -0
  66. package/shared/brief-sources.ts +23 -8
  67. package/shared/changelog.ts +32 -8
  68. package/shared/compass.ts +155 -25
  69. package/shared/contracts.ts +2 -2
  70. package/shared/dispatch.ts +61 -6
  71. package/shared/display.ts +4 -1
  72. package/shared/github-setup.ts +46 -0
  73. package/shared/job-rows.ts +40 -6
  74. package/shared/list-entries.ts +3 -2
  75. package/shared/model.ts +6 -0
  76. package/shared/new-name.ts +27 -0
  77. package/shared/new-view.ts +11 -8
  78. package/shared/onboarding.ts +77 -15
  79. package/shared/provider-support.ts +70 -0
  80. package/shared/recommend.ts +3 -2
  81. package/shared/row-badges.ts +24 -0
  82. package/shared/search-focus.ts +76 -0
  83. package/shared/search-key.ts +3 -2
  84. package/shared/settings-nav.ts +2 -1
  85. package/docs/screenshots/follow-up-home.png +0 -0
  86. package/docs/screenshots/follow-up-linked-items.png +0 -0
  87. package/docs/screenshots/follow-up-notes-home.png +0 -0
  88. package/docs/screenshots/follow-up-notes-panel.png +0 -0
  89. package/docs/screenshots/follow-up-panel.png +0 -0
  90. package/docs/screenshots/follow-up-phone.png +0 -0
  91. package/docs/screenshots/follow-up-pill.png +0 -0
  92. package/docs/screenshots/follow-up-pr-sheet.png +0 -0
  93. package/docs/screenshots/follow-up-questions.png +0 -0
  94. package/docs/screenshots/follow-up-send-to-paseo-dark.png +0 -0
  95. package/docs/screenshots/follow-up-send-to-paseo-light.png +0 -0
  96. package/docs/screenshots/follow-up-setup.png +0 -0
  97. package/docs/screenshots/follow-up-sidebar.png +0 -0
package/client/new.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PriorityLine } from "./home-chrome";
2
- import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
2
+ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
3
3
  import { Platform, View, useWindowDimensions, type ViewStyle } from "react-native";
4
4
  import { Pressable, Text } from "./text";
5
5
  import { useRpc, type PluginHostProps } from "@getpaseo/plugin/client";
@@ -21,6 +21,7 @@ import { Spinner } from "./motion";
21
21
  import { pushToast } from "./toast-store";
22
22
  import { tint, withAlpha, type Colors, type Theme } from "./theme";
23
23
  import { createHostSlot } from "./host-slot";
24
+ import { NEW_NAME, NEW_OF, NEW_WORK } from "../shared/new-name";
24
25
 
25
26
  /**
26
27
  * New (docs/dispatch.md): start work from a Linear issue, a GitHub issue or PR, a link or a sentence. One dialog over
@@ -125,7 +126,7 @@ function SourceCard({ plan, c, compact, images = 0 }: { plan: DispatchPlan; c: C
125
126
 
126
127
  function agentText(plan: DispatchPlan): string {
127
128
  const p = plan.agentPick.picked;
128
- return p?.mode ? `${plan.agent} · ${p.mode}` : plan.agent || "New's default agent";
129
+ return p?.mode ? `${plan.agent} · ${p.mode}` : plan.agent || `${NEW_OF} default agent`;
129
130
  }
130
131
 
131
132
  function Preview({ plan, overrides, setOverrides, c, compact, busy, catalog, loadCatalog, projects, loadProjects, saveBase, instructions, setInstructions, reopen, img }: {
@@ -161,7 +162,7 @@ function Preview({ plan, overrides, setOverrides, c, compact, busy, catalog, loa
161
162
  {plan.where.candidates.length > CHOICES_SHOWN && <Chip c={c} compact={compact} label="Other…" open={open === "project"} accessibilityLabel="Another project" onPress={() => { loadProjects(); toggle("project"); }} />}
162
163
  </View>
163
164
  </View>
164
- : <Field c={c} compact={compact} label="Project" reason={<Text style={{ color: c.foregroundMuted, fontSize: 12 }}>{plan.where.guess ? "Guess: last used project" : plan.where.how === "picked" && plan.source.team ? `Saved for ${plan.source.team} · change it in Settings → New work` : plan.where.reason}</Text>}>
165
+ : <Field c={c} compact={compact} label="Project" reason={<Text style={{ color: c.foregroundMuted, fontSize: 12 }}>{plan.where.guess ? "Guess: last used project" : plan.where.how === "picked" && plan.source.team ? `Saved for ${plan.source.team} · change it in Settings → ${NEW_WORK}` : plan.where.reason}</Text>}>
165
166
  <Chip c={c} compact={compact} icon="Folder" label={plan.where.projectName ?? "Pick"} dashed={plan.where.guess} open={open === "project"} accessibilityLabel={`Project: ${plan.where.projectName}. Change`} onPress={() => { loadProjects(); toggle("project"); }} />
166
167
  </Field>}
167
168
  {open === "project" && <Choices c={c} compact={compact} items={candidates} onPick={id => { set({ projectId: id }); setOpen(null); }} />}
@@ -268,7 +269,6 @@ function ListRow({ row, selected, c, compact, onPress, chevron }: { row: NewRow;
268
269
  if (row.kind === "search") return <Pressable accessibilityRole="button" accessibilityLabel={`Search all of Linear for ${row.query}`} onPress={onPress} style={base}>
269
270
  <Icon name="Search" size={15} color={c.foregroundMuted} />
270
271
  <Text numberOfLines={1} style={{ color: c.foreground, fontSize: compact ? 14 : 13, flex: 1 }}>Search all of Linear for “{row.query}”</Text>
271
- {!compact && <Kbd c={c} label="⇧↵" />}
272
272
  </Pressable>;
273
273
  if (row.kind === "words") return <Pressable accessibilityRole="button" accessibilityState={{ selected }} accessibilityLabel={`Start from your words: ${row.title}`} onPress={onPress} style={base}>
274
274
  <Icon name="Type" size={15} color={c.foregroundMuted} />
@@ -313,30 +313,59 @@ function ListRow({ row, selected, c, compact, onPress, chevron }: { row: NewRow;
313
313
  </Pressable>;
314
314
  }
315
315
 
316
- function SourcesPane({ sources, rows, selected, query, setQuery, onRow, onRefresh, c, compact, error, searching, chevrons, empty, img }: {
317
- /** The dialog's pasted images: a paste or drop on the task field adds them; their thumbnails show under it. */
318
- img: ImageAttachments;
319
- sources: DispatchSources | null; rows: NewRow[]; selected: string | null; query: string; setQuery: (q: string) => void; onRow: (row: NewRow) => void; onRefresh: () => void; empty: string | null;
320
- c: Colors; compact: boolean; error: string | null; searching: string | null; chevrons: boolean;
321
- }) {
322
- const status = sources?.linear.status;
316
+ /** Task field heights: a real task fits, and it grows with what's written up to `max`, then scrolls. */
317
+ /** What the field takes, under it while empty; the phone's fits one line at 390. */
318
+ const FIELD_HINT = { desktop: "A Linear key or link, a GitHub issue or PR, any link, or a sentence", phone: "A Linear key, an issue or PR, a link or a sentence" };
319
+ const FIELD_LINES = { desktop: { min: 96, max: 176 }, phone: { min: 88, max: 160 } };
320
+ /**
321
+ * The task field, Dispatch's main element (2026-11-25, the developer: "the main text area … should be bigger … centered
322
+ * at the top"): multi-line, wide, growing with the words. Desktop: across the top of the dialog, centred, above the
323
+ * list and the preview. Phones: the top of the list screen. Enter still starts the selected action on desktop (the
324
+ * dialog's key listener); pasted text keeps its lines.
325
+ */
326
+ function TaskField({ query, setQuery, img, c, compact }: { query: string; setQuery: (q: string) => void; img: ImageAttachments; c: Colors; compact: boolean }) {
323
327
  // The field opens focused (desktop) and says so: an accent border while it has focus.
324
328
  const [focused, setFocused] = useState(false);
325
- return <View style={{ flex: 1, minHeight: 0 }}>
326
- <View style={{ paddingHorizontal: compact ? 16 : 16, paddingTop: compact ? 12 : 16, paddingBottom: 8 }}>
327
- <ImageField model={img} theme={{ colors: c }} compact={compact} attach="inline">
328
- <View style={{ flexDirection: "row", alignItems: "center", gap: 8, borderWidth: focused ? 2 : 1, borderColor: focused ? c.accent : c.border, borderRadius: 8, paddingLeft: focused ? 9 : 10, paddingRight: focused ? 3 : 4, minHeight: compact ? 48 : 40, backgroundColor: c.surface0 }}>
329
- <Icon name="Clipboard" size={16} color={c.foregroundMuted} />
330
- <TextInput nativeID="follow-up-new-field" value={query} onChangeText={setQuery} autoFocus={!compact} placeholder="Paste a link or describe the task" placeholderTextColor={c.foregroundMuted}
331
- accessibilityLabel="Paste a link or describe the task" autoCorrect={false} autoCapitalize="none" blurOnSubmit={false} onFocus={() => setFocused(true)} onBlur={() => setFocused(false)}
332
- style={{ flex: 1, color: c.foreground, fontSize: compact ? 16 : 14, paddingVertical: 8, ...(Platform.OS === "web" ? { outlineStyle: "none" } as object : {}) }} />
329
+ const size = compact ? FIELD_LINES.phone : FIELD_LINES.desktop;
330
+ const [height, setHeight] = useState(size.min);
331
+ const fit = (h: number) => setHeight(Math.max(size.min, Math.min(size.max, Math.ceil(h))));
332
+ // Web: react-native-web reports no content size for a textarea, so measure it after each change (shrink to fit, read
333
+ // its scroll height). Native: onContentSizeChange below.
334
+ const input = useRef<unknown>(null);
335
+ useLayoutEffect(() => {
336
+ const el = input.current as { style?: { height: string }; scrollHeight?: number } | null;
337
+ if (Platform.OS !== "web" || !el?.style || el.scrollHeight === undefined) return;
338
+ const was = el.style.height; el.style.height = "0px"; const h = el.scrollHeight; el.style.height = was;
339
+ fit(h);
340
+ }, [query, compact]); // eslint-disable-line react-hooks/exhaustive-deps
341
+ return <ImageField model={img} theme={{ colors: c }} compact={compact} attach="inline">
342
+ <View style={{ borderWidth: focused ? 2 : 1, borderColor: focused ? c.accent : c.border, borderRadius: 10, padding: focused ? 0 : 1, backgroundColor: c.surface0 }}>
343
+ <TextInput ref={input as never} nativeID="follow-up-new-field" value={query} onChangeText={setQuery} autoFocus={!compact} multiline placeholder="Describe the task, or paste a link" placeholderTextColor={c.foregroundMuted}
344
+ accessibilityLabel="Task" accessibilityHint={FIELD_HINT.desktop} autoCorrect={false} autoCapitalize="none" blurOnSubmit={false} onFocus={() => setFocused(true)} onBlur={() => setFocused(false)}
345
+ onContentSizeChange={e => { if (Platform.OS !== "web") fit(e.nativeEvent.contentSize.height + 16); }}
346
+ style={{ height, color: c.foreground, fontSize: compact ? 16 : 15, lineHeight: 22, paddingHorizontal: 14, paddingTop: 12, paddingBottom: 4, textAlignVertical: "top", ...(Platform.OS === "web" ? { outlineStyle: "none", resize: "none" } as object : {}) }} />
347
+ <View style={{ flexDirection: "row", alignItems: "center", justifyContent: "flex-end", gap: 4, paddingHorizontal: 6, paddingBottom: 6, minHeight: compact ? 44 : 32 }}>
348
+ <Text numberOfLines={1} style={{ flex: 1, color: c.foregroundMuted, fontSize: 12, paddingLeft: 8 }}>{query ? (compact ? "" : "⇧↵ new line") : FIELD_HINT[compact ? "phone" : "desktop"]}</Text>
333
349
  {/* After ⌘V, the field's own paste hint, so the chip never reads as this button's key. */}
334
350
  {!compact && !query && <Kbd c={c} label={isMac() ? "⌘V" : "Ctrl V"} />}
335
351
  <AttachImageButton model={img} theme={{ colors: c }} compact={compact} />
336
352
  {!!query && <Pressable accessibilityRole="button" accessibilityLabel="Clear" onPress={() => setQuery("")} style={{ width: compact ? 44 : 32, height: compact ? 44 : 32, alignItems: "center", justifyContent: "center" }}><Icon name="X" size={14} color={c.foregroundMuted} /></Pressable>}
337
353
  </View>
338
- </ImageField>
339
354
  </View>
355
+ </ImageField>;
356
+ }
357
+
358
+ function SourcesPane({ sources, rows, selected, query, setQuery, onRow, onRefresh, c, compact, error, searching, chevrons, empty, img, field = true }: {
359
+ /** False on desktop, where the task field sits across the top of the dialog instead. */
360
+ field?: boolean;
361
+ /** The dialog's pasted images: a paste or drop on the task field adds them; their thumbnails show under it. */
362
+ img: ImageAttachments;
363
+ sources: DispatchSources | null; rows: NewRow[]; selected: string | null; query: string; setQuery: (q: string) => void; onRow: (row: NewRow) => void; onRefresh: () => void; empty: string | null;
364
+ c: Colors; compact: boolean; error: string | null; searching: string | null; chevrons: boolean;
365
+ }) {
366
+ const status = sources?.linear.status;
367
+ return <View style={{ flex: 1, minHeight: 0 }}>
368
+ {field && <View style={{ paddingHorizontal: 16, paddingTop: 12, paddingBottom: 8 }}><TaskField query={query} setQuery={setQuery} img={img} c={c} compact={compact} /></View>}
340
369
  <View style={{ flexDirection: "row", alignItems: "center", paddingHorizontal: compact ? 16 : 16, paddingVertical: 6, gap: 6 }}>
341
370
  <Text style={{ color: c.foregroundMuted, fontSize: compact ? 13 : 11, fontWeight: "600", letterSpacing: compact ? 0 : 0.5, textTransform: compact ? "none" : "uppercase" }}>{searching ? "Linear" : status === "missing" ? "Start from" : "My issues"}</Text>
342
371
  <Text numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: 12, flex: 1 }}>{searching ? `· “${searching}”` : status === "missing" ? "· a link or your words" : compact ? "· Linear" : "· Linear · in progress and todo"}</Text>
@@ -359,7 +388,7 @@ function SourcesPane({ sources, rows, selected, query, setQuery, onRow, onRefres
359
388
  {rows.map((row, i) => <View key={row.id} style={compact && i ? { borderTopWidth: 1, borderTopColor: c.border, marginHorizontal: 16 } : undefined}>
360
389
  <View style={compact && i ? { marginHorizontal: -16 } : undefined}><ListRow row={row} selected={row.id === selected} c={c} compact={compact} chevron={chevrons} onPress={() => onRow(row)} /></View>
361
390
  </View>)}
362
- {status === "ok" && !rows.length && !query && <Text style={{ color: c.foregroundMuted, fontSize: 12, paddingHorizontal: 16, paddingVertical: 8 }}>No issues in progress or todo. Paste a link or describe the task.</Text>}
391
+ {status === "ok" && !rows.length && !query && <Text style={{ color: c.foregroundMuted, fontSize: 12, paddingHorizontal: 16, paddingVertical: 8 }}>No issues in progress or todo. Describe the task, or paste a link.</Text>}
363
392
  {!!sources?.recent.length && !query && <View style={{ paddingHorizontal: compact ? 16 : 8, paddingTop: 14, gap: 4 }}>
364
393
  <Text style={{ color: c.foregroundMuted, fontSize: compact ? 13 : 11, fontWeight: "600", letterSpacing: compact ? 0 : 0.5, textTransform: compact ? "none" : "uppercase" }}>Started from here</Text>
365
394
  {sources.recent.map(r => <Text key={r.id} numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: 12 }}>{r.title} · {r.actionName} · {r.state === "created" ? "started" : r.state}</Text>)}
@@ -375,7 +404,7 @@ function SourcesPane({ sources, rows, selected, query, setQuery, onRow, onRefres
375
404
  function TakenPane({ row, rows, c }: { row: Extract<NewRow, { kind: "fold" }>; rows: NewRow[]; c: Colors }) {
376
405
  return <View style={{ padding: 24, gap: 10 }}>
377
406
  <Text style={{ color: c.foreground, fontSize: 14, fontWeight: "600" }}>{row.title}</Text>
378
- <Text style={{ color: c.foregroundMuted, fontSize: 13 }}>They're already being worked on, so New doesn't suggest them. Pick one to open its workspace.</Text>
407
+ <Text style={{ color: c.foregroundMuted, fontSize: 13 }}>They're already being worked on, so {NEW_NAME} doesn't suggest them. Pick one to open its workspace.</Text>
379
408
  {row.open && <View style={{ gap: 4 }}>{rows.filter((r): r is Extract<NewRow, { kind: "issue" }> => r.kind === "issue" && r.taken).map(r =>
380
409
  <Text key={r.id} numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: 12 }}><Text style={{ color: c.foreground }}>{r.key}</Text> {r.route.text}</Text>)}</View>}
381
410
  {Platform.OS === "web" && <View style={{ flexDirection: "row", alignItems: "center", gap: 6 }}><Kbd c={c} label="↵" /><Text style={{ color: c.foregroundMuted, fontSize: 12 }}>{row.open ? "hides them" : "shows them"}</Text></View>}
@@ -387,6 +416,17 @@ function TakenPane({ row, rows, c }: { row: Extract<NewRow, { kind: "fold" }>; r
387
416
  type DomKey = { key: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; repeat: boolean; isComposing?: boolean; target: unknown; preventDefault(): void; stopPropagation(): void };
388
417
  type Phase = { kind: "edit" } | { kind: "sending" } | { kind: "record"; id: string };
389
418
 
419
+ type Shown = { source: string; rowId: string | null; plan: DispatchPlan } | null;
420
+ /** The preview for the selected row: its own, or while its words change, the last one it had. */
421
+ export function steadyPlan(shown: Shown, source: string | null, rowId: string | null): DispatchPlan | null {
422
+ if (!source || !shown) return null;
423
+ return shown.source === source || (rowId !== null && shown.rowId === rowId) ? shown.plan : null;
424
+ }
425
+ /** A preview answer that says what's already on screen keeps the old object, so nothing below it re-renders. */
426
+ export function samePlan(prev: Shown, source: string, rowId: string | null, plan: DispatchPlan): Shown {
427
+ if (prev && prev.rowId === rowId && JSON.stringify(prev.plan) === JSON.stringify(plan)) return prev.source === source ? prev : { ...prev, source };
428
+ return { source, rowId, plan };
429
+ }
390
430
  export function NewDialog({ request, theme, layout, navigation, onClose, openSettings }: { request: NewRequest; theme: Theme; layout: PluginHostProps["layout"]; navigation?: { openWorkspace(i: { workspaceId: string }): void }; onClose: () => void; openSettings?: () => void }) {
391
431
  const c = theme.colors; const compact = layout.compact;
392
432
  // The callers, kept in a ref: effects below must not re-run (and re-read) because a host hands out new functions.
@@ -407,7 +447,7 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
407
447
  const [searched, setSearched] = useState<{ query: string; sources: DispatchSources } | null>(null);
408
448
  const [picked, setPicked] = useState<string | null>(null);
409
449
  const [overrides, setOverrides] = useState<Overrides>({});
410
- const [planFor, setPlanFor] = useState<{ source: string; plan: DispatchPlan } | null>(null);
450
+ const [planFor, setPlanFor] = useState<{ source: string; rowId: string | null; plan: DispatchPlan } | null>(null);
411
451
  const [planError, setPlanError] = useState<string | null>(null);
412
452
  const [phase, setPhase] = useState<Phase>({ kind: "edit" });
413
453
  const [record, setRecord] = useState<DispatchRecord | null>(null);
@@ -435,8 +475,10 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
435
475
  const selected = picked && rows.some(r => r.id === picked) ? picked : preselected;
436
476
  const row = rows.find(r => r.id === selected) ?? null;
437
477
  const source = rowSource(row);
438
- // A new source starts from its own defaults: the overrides belonged to the last one.
439
- useEffect(() => { setOverrides({}); setMore(false); setReopen(null); }, [source]);
478
+ // A new row starts from its own defaults: the overrides belonged to the last one. Typing more words is the same row
479
+ // (the preview stays steady), so a picked project, agent or note survives the next keystroke.
480
+ const rowId = row?.id ?? null;
481
+ useEffect(() => { setOverrides({}); setMore(false); setReopen(null); }, [rowId]);
440
482
  useEffect(() => { setPicked(null); }, [query]);
441
483
 
442
484
  // One preview per selection or change, the newest winning.
@@ -445,14 +487,15 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
445
487
  if (!source) return;
446
488
  const n = ++seq.current;
447
489
  const t = setTimeout(() => {
448
- readPreview({ source, ...overrides, note: overrides.note || undefined }).then(p => { if (n === seq.current) { setPlanFor({ source, plan: p as DispatchPlan }); setPlanError(null); } })
490
+ readPreview({ source, ...overrides, note: overrides.note || undefined }).then(p => { if (n === seq.current) { setPlanFor(prev => samePlan(prev, source, rowId, p as DispatchPlan)); setPlanError(null); } })
449
491
  .catch(e => { if (n === seq.current) setPlanError(errorText(e)); });
450
- }, planFor?.source === source ? 120 : 0);
492
+ }, planFor?.source === source || planFor?.rowId === rowId ? 150 : 0);
451
493
  return () => clearTimeout(t);
452
494
  // eslint-disable-next-line react-hooks/exhaustive-deps
453
495
  }, [source, JSON.stringify(overrides)]);
454
- // The preview on screen is always the selected source's: another row's shows nothing until its own arrives.
455
- const planNow = source && planFor?.source === source ? planFor.plan : null;
496
+ // The preview on screen is the selected row's: another row's shows nothing until its own arrives, and the same row
497
+ // keeps its last preview while the next one loads (typing never blanks it, preview-stays-while-typing).
498
+ const planNow = steadyPlan(planFor, source, rowId);
456
499
  // Pasted images (every-agent-field-takes-images), one model for the task field and the note: they go with the new
457
500
  // agent's first message. Who takes them is the agent this dispatch starts (the Agent chip, else the action's).
458
501
  const imageProvider = overrides.agent?.provider ?? planNow?.agentPick.picked?.provider ?? null;
@@ -511,7 +554,8 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
511
554
  const t = e.target as { tagName?: string; id?: string } | null;
512
555
  const tag = (t?.tagName ?? "").toUpperCase();
513
556
  const editing = (tag === "TEXTAREA" || tag === "INPUT") && t?.id !== "follow-up-new-field";
514
- const k = newKey(e, isMac(), { editing, created: !!live.current.created });
557
+ const field = t?.id === "follow-up-new-field" ? t as { value?: string } : null;
558
+ const k = newKey(e, isMac(), { editing, created: !!live.current.created, lines: !!field?.value?.includes("\n") });
515
559
  if (!k) return;
516
560
  const s = live.current;
517
561
  if (k === "close") { e.preventDefault(); e.stopPropagation(); onClose(); return; }
@@ -521,7 +565,7 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
521
565
  e.preventDefault(); e.stopPropagation();
522
566
  if (k === "down" || k === "up") setPicked(moveSelection(s.rows, s.selected, k === "down" ? 1 : -1));
523
567
  else if (k === "instructions") setInstructions(v => !v);
524
- else if (k === "search" || (k === "primary" && s.row?.kind === "search")) search();
568
+ else if (k === "primary" && s.row?.kind === "search") search();
525
569
  else if (k === "primary" && s.row?.kind === "fold") setFoldOpen(v => !v);
526
570
  else if (k === "primary") { if (s.bar.kind === "existing") openWorkspace(s.bar.workspaceId); else if (s.bar.primary && !s.bar.disabled) void start(s.bar.primary.id); }
527
571
  else if (k === "second" && s.bar.kind === "actions" && s.bar.second && !s.bar.disabled) void start(s.bar.second.id);
@@ -547,8 +591,7 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
547
591
  : source ? <View style={{ padding: 16 }}><Spinner color={c.foregroundMuted} size={14} label="Reading the source" /></View>
548
592
  : row?.kind === "fold" ? <TakenPane row={row} rows={rows} c={c} />
549
593
  : <View style={{ padding: 24, gap: 6 }}>
550
- <Text style={{ color: c.foreground, fontSize: 14, fontWeight: "600" }}>Paste a link or describe the task</Text>
551
- <Text style={{ color: c.foregroundMuted, fontSize: 13 }}>A Linear key or link, a GitHub issue or pull request, any link, or a sentence. The preview shows here before anything starts.</Text>
594
+ <Text style={{ color: c.foregroundMuted, fontSize: 13 }}>Pick an issue or write the task above. What will start shows here first: the project, branch, agent and the agent's first message.</Text>
552
595
  </View>;
553
596
  const recordBar = phase.kind === "record" && record ? <View style={{ flexDirection: compact ? "column" : "row", gap: 8, alignItems: compact ? "stretch" : "center" }}>
554
597
  {created && record.workspaceId && <BarBtn c={c} compact={compact} primary disabled={false} b={{ name: "Open workspace", icon: "ExternalLink", key: isMac() ? "⌘↵" : "Ctrl ↵" }} onPress={() => openWorkspace(record.workspaceId!)} />}
@@ -570,9 +613,9 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
570
613
  {onPreview && phase.kind === "edit" && <Pressable accessibilityRole="button" accessibilityLabel="Back to the list" onPress={() => setScreen("list")} style={{ width: 44, height: 44, alignItems: "center", justifyContent: "center" }}>
571
614
  <Icon name="ChevronLeft" size={22} color={c.foreground} />
572
615
  </Pressable>}
573
- <Text accessibilityRole="header" numberOfLines={1} style={{ color: c.foreground, fontSize: 16, fontWeight: "600", flex: 1 }}>{onPreview && planNow?.source.key ? planNow.source.key : "New"}</Text>
574
- {openSettings && <Pressable accessibilityRole="button" accessibilityLabel="New's actions in Settings" onPress={openSettings} style={{ width: 44, height: 44, alignItems: "center", justifyContent: "center" }}><Icon name="Settings" size={20} color={c.foreground} /></Pressable>}
575
- <Pressable accessibilityRole="button" accessibilityLabel="Close New" onPress={onClose} style={{ width: 44, height: 44, alignItems: "center", justifyContent: "center" }}><Icon name="X" size={20} color={c.foreground} /></Pressable>
616
+ <Text accessibilityRole="header" numberOfLines={1} style={{ color: c.foreground, fontSize: 16, fontWeight: "600", flex: 1 }}>{onPreview && planNow?.source.key ? planNow.source.key : NEW_NAME}</Text>
617
+ {openSettings && <Pressable accessibilityRole="button" accessibilityLabel={`${NEW_OF} actions in Settings`} onPress={openSettings} style={{ width: 44, height: 44, alignItems: "center", justifyContent: "center" }}><Icon name="Settings" size={20} color={c.foreground} /></Pressable>}
618
+ <Pressable accessibilityRole="button" accessibilityLabel={`Close ${NEW_NAME}`} onPress={onClose} style={{ width: 44, height: 44, alignItems: "center", justifyContent: "center" }}><Icon name="X" size={20} color={c.foreground} /></Pressable>
576
619
  </View>
577
620
  {onPreview ? <ScrollView ref={pane as never} style={{ flex: 1 }} contentContainerStyle={{ padding: 16, gap: 12 }} keyboardShouldPersistTaps="handled">{right}{errorLine}</ScrollView>
578
621
  : <SourcesPane sources={shown} rows={rows} selected={selected} query={query} setQuery={setQuery} onRow={onRow} onRefresh={() => load(true)} c={c} compact error={listError} searching={searched && searched.query === query.trim() ? searched.query : null} chevrons empty={empty} img={img} />}
@@ -591,17 +634,20 @@ export function NewDialog({ request, theme, layout, navigation, onClose, openSet
591
634
 
592
635
  return <View style={{ flex: 1, minHeight: 0 }}>
593
636
  <View style={{ flexDirection: "row", alignItems: "center", gap: 8, paddingLeft: 20, paddingRight: 10, height: 52, borderBottomWidth: 1, borderBottomColor: c.border }}>
594
- <Text accessibilityRole="header" style={{ color: c.foreground, fontSize: 16, fontWeight: "600", flex: 1 }}>New</Text>
595
- {openSettings && <Pressable accessibilityRole="button" accessibilityLabel="New's actions in Settings" onPress={openSettings} style={(s: Hover) => ({ flexDirection: "row", alignItems: "center", gap: 6, paddingHorizontal: 8, height: 32, borderRadius: 6, backgroundColor: s.hovered ? c.surface1 : "transparent" })}>
637
+ <Text accessibilityRole="header" style={{ color: c.foreground, fontSize: 16, fontWeight: "600", flex: 1 }}>{NEW_NAME}</Text>
638
+ {openSettings && <Pressable accessibilityRole="button" accessibilityLabel={`${NEW_OF} actions in Settings`} onPress={openSettings} style={(s: Hover) => ({ flexDirection: "row", alignItems: "center", gap: 6, paddingHorizontal: 8, height: 32, borderRadius: 6, backgroundColor: s.hovered ? c.surface1 : "transparent" })}>
596
639
  <Icon name="Settings" size={15} color={c.foregroundMuted} /><Text style={{ color: c.foregroundMuted, fontSize: 13 }}>Actions</Text>
597
640
  </Pressable>}
598
- <Pressable accessibilityRole="button" accessibilityLabel="Close New" onPress={onClose} style={(s: Hover) => ({ width: 32, height: 32, borderRadius: 6, alignItems: "center", justifyContent: "center", backgroundColor: s.hovered ? c.surface1 : "transparent" })}>
641
+ <Pressable accessibilityRole="button" accessibilityLabel={`Close ${NEW_NAME}`} onPress={onClose} style={(s: Hover) => ({ width: 32, height: 32, borderRadius: 6, alignItems: "center", justifyContent: "center", backgroundColor: s.hovered ? c.surface1 : "transparent" })}>
599
642
  <Icon name="X" size={17} color={c.foregroundMuted} />
600
643
  </Pressable>
601
644
  </View>
645
+ <View style={{ alignItems: "center", paddingHorizontal: 24, paddingTop: 20, paddingBottom: 16, borderBottomWidth: 1, borderBottomColor: c.border, opacity: busy ? 0.55 : 1 }} pointerEvents={busy ? "none" : "auto"}>
646
+ <View style={{ width: "100%", maxWidth: 760 }}><TaskField query={query} setQuery={setQuery} img={img} c={c} compact={false} /></View>
647
+ </View>
602
648
  <View style={{ flex: 1, minHeight: 0, flexDirection: "row" }}>
603
- <View style={{ width: 400, borderRightWidth: 1, borderRightColor: c.border, opacity: busy ? 0.55 : 1 }} pointerEvents={busy ? "none" : "auto"}>
604
- <SourcesPane sources={shown} rows={rows} selected={selected} query={query} setQuery={setQuery} onRow={onRow} onRefresh={() => load(true)} c={c} compact={false} error={listError} searching={searched && searched.query === query.trim() ? searched.query : null} chevrons={false} empty={empty} img={img} />
649
+ <View style={{ width: 360, borderRightWidth: 1, borderRightColor: c.border, opacity: busy ? 0.55 : 1 }} pointerEvents={busy ? "none" : "auto"}>
650
+ <SourcesPane field={false} sources={shown} rows={rows} selected={selected} query={query} setQuery={setQuery} onRow={onRow} onRefresh={() => load(true)} c={c} compact={false} error={listError} searching={searched && searched.query === query.trim() ? searched.query : null} chevrons={false} empty={empty} img={img} />
605
651
  </View>
606
652
  <ScrollView ref={pane as never} style={{ flex: 1 }} contentContainerStyle={{ padding: 20, gap: 12 }} keyboardShouldPersistTaps="handled">{right}{errorLine}</ScrollView>
607
653
  </View>
@@ -625,9 +671,9 @@ export function NewHost({ theme, layout, navigation, openSettings }: { theme: Th
625
671
  if (!request) return anchor;
626
672
  const c = theme.colors;
627
673
  const dialog = <NewDialog key={request.token} request={request} theme={theme} layout={layout} navigation={navigation} onClose={closeNew} openSettings={openSettings && (() => { closeNew(); openSettings(); })} />;
628
- if (layout.compact) return <>{anchor}<View role="dialog" aria-modal aria-label="New" style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, zIndex: 50, backgroundColor: c.surface0 }}>{dialog}</View></>;
674
+ if (layout.compact) return <>{anchor}<View role="dialog" aria-modal aria-label={NEW_NAME} style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, zIndex: 50, backgroundColor: c.surface0 }}>{dialog}</View></>;
629
675
  const width = Math.min(1060, win.width - 64), height = Math.min(796, win.height - 64);
630
- return <>{anchor}<View role="dialog" aria-modal aria-label="New" style={{ position: (Platform.OS === "web" ? "fixed" : "absolute") as ViewStyle["position"], top: 0, left: 0, right: 0, bottom: 0, zIndex: 1000, alignItems: "center", justifyContent: "center" }}>
676
+ return <>{anchor}<View role="dialog" aria-modal aria-label={NEW_NAME} style={{ position: (Platform.OS === "web" ? "fixed" : "absolute") as ViewStyle["position"], top: 0, left: 0, right: 0, bottom: 0, zIndex: 1000, alignItems: "center", justifyContent: "center" }}>
631
677
  <Pressable accessible={false} focusable={false} importantForAccessibility="no" onPress={closeNew} style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: "rgba(0,0,0,0.42)" }} />
632
678
  <View style={{ width, height, borderRadius: 12, overflow: "hidden", backgroundColor: c.surface0, borderWidth: 1, borderColor: c.border, boxShadow: "0px 24px 64px rgba(0,0,0,0.28)" } as ViewStyle}>{dialog}</View>
633
679
  </View></>;
@@ -1,19 +1,22 @@
1
1
  import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
2
2
  import { Animated, Easing, Platform, View, type ViewStyle, type ScrollView as NativeScrollView } from "react-native";
3
3
  import { Pressable, Text } from "./text";
4
- import { useRpc, useSettings } from "@getpaseo/plugin/client";
4
+ import { openExternalUrl, useRpc, useSettings } from "@getpaseo/plugin/client";
5
5
  import { Icon, copyText, useToast } from "@getpaseo/plugin/client/ui";
6
6
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
7
- import { followSettingsRpc, onboardingChecksRpc, onboardingRpc, setFollowSettingsRpc, setOnboardingRpc } from "../shared/contracts";
7
+ import { followSettingsRpc, onboardingChecksRpc, onboardingRpc, prWorkflowRpc, setFollowSettingsRpc, setOnboardingRpc } from "../shared/contracts";
8
8
  import { displayPreferences } from "../shared/display";
9
- import { ONBOARDING_STEPS, autoSendWrites, checksSummary, type Check, type OnboardingStep, type OnboardingView } from "../shared/onboarding";
9
+ import { autoSendWrites, checksSummary, providersReady, setupSteps, shownStep, type Check, type Checks, type OnboardingStep, type OnboardingView } from "../shared/onboarding";
10
10
  import { Button, IconButton, errorText, text, type Theme } from "./kit";
11
11
  import { ReviewerSettings } from "./reviewers";
12
12
  import { JobRows } from "./job-rows";
13
13
  import { DockedPane } from "./docked-pane";
14
14
  import { SETUP_ORDER } from "../shared/job-rows";
15
- import { ShippingStep } from "./shipping";
16
- import { UpdatesStep } from "./updates";
15
+ import { ShippingStep, shippingKey } from "./shipping";
16
+ import { useNewRowSetting } from "./new-entry";
17
+ import { isMac } from "../shared/search-key";
18
+ import { NEW_NAME, NEW_ROW } from "../shared/new-name";
19
+ import { UpdatesStep, useUpdates } from "./updates";
17
20
  import { Spinner, useReducedMotion } from "./motion";
18
21
  import { raised, runningColor, tint, withAlpha, type Colors } from "./theme";
19
22
 
@@ -60,24 +63,40 @@ function bottomPad(compact: boolean): ViewStyle {
60
63
  export function Setup({ theme, compact, view, deps }: { theme: Theme; compact: boolean; view: OnboardingView; deps: SetupDeps }) {
61
64
  const c = theme.colors; const t = text(c);
62
65
  const act = useRpc(setOnboardingRpc); const cache = useQueryClient(); const toast = useToast();
63
- const [step, setStep] = useState<OnboardingStep>(view.step);
64
- const index = ONBOARDING_STEPS.indexOf(step);
66
+ const [saved, setStep] = useState<OnboardingStep>(view.step);
65
67
  const scroll = useRef<NativeScrollView>(null);
66
68
  const follow = useFollowSettings();
67
69
  // Checks start on the first frame so step 2 usually opens with its answers in. One cached call, never polled.
68
70
  const checks = useChecks();
71
+ // Which steps this host has something for (setupSteps): GitHub signed in, repositories seen, an npm install. The
72
+ // reads are the ones those steps make anyway, started here so the count is right by the time they come up.
73
+ const readShipping = useRpc(prWorkflowRpc);
74
+ const shipping = useQuery({ queryKey: shippingKey, queryFn: () => readShipping({}), staleTime: 60_000 });
75
+ const updates = useUpdates();
76
+ const gh = checks.data?.checks.find(row => row.id === "gh");
77
+ const live = useMemo(() => setupSteps({
78
+ github: !gh ? null : gh.state === "ok" ? true : gh.state === "off" ? false : null,
79
+ repos: shipping.data ? shipping.data.repos.length : null,
80
+ npm: updates.data ? updates.data.installKind === "npm" : null,
81
+ providers: providersReady(checks.data?.checks),
82
+ }), [gh?.state, shipping.data?.repos.length, updates.data?.installKind, providersReady(checks.data?.checks)]);
83
+ // Once past the checks the list holds still: a late answer never takes away a step the developer is on or has seen.
84
+ const frozen = useRef<OnboardingStep[] | null>(null);
85
+ const steps = frozen.current ?? live;
86
+ const step = shownStep(saved, steps);
87
+ const index = steps.indexOf(step);
69
88
  const move = useMutation({
70
89
  mutationFn: (input: Parameters<typeof act>[0]) => act(input),
71
90
  onSuccess: next => { if (!next.show) cache.setQueryData(onboardingKey, next); },
72
91
  onError: error => toast.error(errorText(error)),
73
92
  });
74
- const go = (next: OnboardingStep) => { setStep(next); scroll.current?.scrollTo({ y: 0, animated: false }); move.mutate({ action: "step", step: next }); };
93
+ const go = (next: OnboardingStep) => { if (step === "checks" && next !== "intro") frozen.current = steps; else if (next === "intro" || next === "checks") frozen.current = null; setStep(next); scroll.current?.scrollTo({ y: 0, animated: false }); move.mutate({ action: "step", step: next }); };
75
94
  const finish = () => move.mutate({ action: "finish" }, { onSuccess: () => {
76
95
  const n = follow.data?.workspaces.filter(w => w.enable_tracking && !w.optedOut).length ?? 0;
77
96
  toast.show(n ? `Set up. Following ${n} workspace${n === 1 ? "" : "s"}.` : "Set up. Follow-up starts with your next workspace.", { variant: "success" });
78
97
  } });
79
98
  const skip = () => move.mutate({ action: "skip" }, { onSuccess: () => toast.show("Setup skipped. Set it up any time from Follow-up settings, General.") });
80
- const last = index === ONBOARDING_STEPS.length - 1;
99
+ const last = index === steps.length - 1;
81
100
  const failing = step === "checks" && checks.data ? checksSummary(checks.data.checks).state === "fail" : false;
82
101
 
83
102
  const body = step === "intro" ? <IntroStep theme={theme} compact={compact} follow={follow.data ?? null} />
@@ -90,32 +109,32 @@ export function Setup({ theme, compact, view, deps }: { theme: Theme; compact: b
90
109
  : <TourStep theme={theme} compact={compact} />;
91
110
  const lead: Record<OnboardingStep, string> = {
92
111
  intro: "It follows your agents' pull requests until the work is done, sends what needs fixing back to them as repairs, and asks you only for decisions.",
93
- checks: "Follow-up reads PRs with the GitHub CLI, and its helper agents run on the providers you pick. Checking is free.",
112
+ checks: "Follow-up works with every agent Paseo runs. On Claude Code and Codex it also reminds agents at the end of each turn and can wait for their background jobs. GitHub is optional: with its CLI, Follow-up also follows your PRs.",
94
113
  defaults: "These are on now. Change anything here; it saves as you go, and Settings has the same switches.",
95
114
  shipping: "Follow-up merges and tracks PRs the way each repository already works. It picked these; change one if it's wrong.",
96
115
  reviewers: "When you press Add reviewers on a PR, Follow-up asks these people. Set a default for all repositories, or a list for one. Until then, PRs without reviewers show in Needs you.",
97
116
  updates: "New versions fix problems and add features. Follow-up can install them for you, at a moment when no agent is using it, and goes back to the old version if something breaks.",
98
117
  helpers: "Follow-up's own agents. They read, summarise and rank. They never change code or message anyone.",
99
- tour: "Four places worth knowing. Everything else is in Settings.",
118
+ tour: "Five places worth knowing. Everything else is in Settings.",
100
119
  };
101
120
  const column: ViewStyle = { width: "100%", maxWidth: 560, alignSelf: "center", paddingHorizontal: compact ? 16 : 24 };
102
121
 
103
122
  return <DockedPane compact={compact} scrollRef={scroll} style={{ backgroundColor: c.surface0 }} contentContainerStyle={{ paddingBottom: 24 }}
104
123
  header={<View style={[column, { flexDirection: "row", alignItems: "center", gap: 12, paddingTop: compact ? 8 : 20, paddingBottom: 8 }]}>
105
- <Progress theme={theme} index={index} onPick={i => i < index && go(ONBOARDING_STEPS[i])} />
124
+ <Progress theme={theme} index={index} steps={steps} onPick={i => i < index && go(steps[i])} />
106
125
  <Button theme={theme} compact={compact} kind="ghost" title="Skip setup" accessibilityHint="Leaves setup. Every setting keeps its current value." onPress={skip} disabled={move.isPending} />
107
126
  </View>}
108
127
  // While typing a reviewer on a phone the bar steps aside, so Continue never sits over the keyboard (DockedPane).
109
128
  dock={({ yields }) => !yields && <View style={[{ borderTopWidth: 1, borderTopColor: c.border, backgroundColor: c.surface0, paddingTop: 12 }, bottomPad(compact)]}>
110
129
  <View style={[column, { flexDirection: "row", alignItems: "center", gap: 8 }]}>
111
130
  {index > 0 && (compact
112
- ? <IconButton theme={theme} compact icon="ChevronLeft" label="Back" onPress={() => go(ONBOARDING_STEPS[index - 1])} />
113
- : <Button theme={theme} kind="ghost" icon="ChevronLeft" title="Back" onPress={() => go(ONBOARDING_STEPS[index - 1])} />)}
131
+ ? <IconButton theme={theme} compact icon="ChevronLeft" label="Back" onPress={() => go(steps[index - 1])} />
132
+ : <Button theme={theme} kind="ghost" icon="ChevronLeft" title="Back" onPress={() => go(steps[index - 1])} />)}
114
133
  {!compact && <View style={{ flex: 1 }} />}
115
- {step === "reviewers" && <Button theme={theme} compact={compact} kind="ghost" title="Skip, set later" onPress={() => go(ONBOARDING_STEPS[index + 1])} />}
134
+ {step === "reviewers" && <Button theme={theme} compact={compact} kind="ghost" title="Skip, set later" onPress={() => go(steps[index + 1])} />}
116
135
  <Button theme={theme} compact={compact} grow={compact} kind="primary" icon={last ? "Check" : undefined}
117
136
  title={last ? "Finish" : failing ? "Continue anyway" : "Continue"} loading={last && move.isPending}
118
- onPress={() => last ? finish() : go(ONBOARDING_STEPS[index + 1])} />
137
+ onPress={() => last ? finish() : go(steps[index + 1])} />
119
138
  </View>
120
139
  </View>}>
121
140
  <StepFade key={step} style={[column, { gap: compact ? 14 : 16, paddingTop: compact ? 8 : 20 }]}>
@@ -129,13 +148,13 @@ export function Setup({ theme, compact, view, deps }: { theme: Theme; compact: b
129
148
  }
130
149
 
131
150
  /** "2 of 5" and one short segment per step, drawn like the stack bar but in neutral ink: progress isn't a PR state. */
132
- function Progress({ theme, index, onPick }: { theme: Theme; index: number; onPick: (i: number) => void }) {
151
+ function Progress({ theme, index, steps, onPick }: { theme: Theme; index: number; steps: readonly OnboardingStep[]; onPick: (i: number) => void }) {
133
152
  const c = theme.colors; const t = text(c);
134
- return <View style={{ flex: 1, flexDirection: "row", alignItems: "center", gap: 10 }} accessibilityRole="progressbar" accessibilityLabel={`Step ${index + 1} of ${ONBOARDING_STEPS.length}`}
135
- accessibilityValue={{ min: 1, max: ONBOARDING_STEPS.length, now: index + 1 }}>
136
- <Text style={[t.small, { minWidth: 34 }]}>{`${index + 1} of ${ONBOARDING_STEPS.length}`}</Text>
153
+ return <View style={{ flex: 1, flexDirection: "row", alignItems: "center", gap: 10 }} accessibilityRole="progressbar" accessibilityLabel={`Step ${index + 1} of ${steps.length}`}
154
+ accessibilityValue={{ min: 1, max: steps.length, now: index + 1 }}>
155
+ <Text style={[t.small, { minWidth: 34 }]}>{`${index + 1} of ${steps.length}`}</Text>
137
156
  <View style={{ flex: 1, maxWidth: 220, flexDirection: "row", gap: 3 }}>
138
- {ONBOARDING_STEPS.map((s, i) => <Pressable key={s} disabled={i >= index} onPress={() => onPick(i)} accessibilityLabel={i < index ? `Back to step ${i + 1}` : undefined}
157
+ {steps.map((s, i) => <Pressable key={s} disabled={i >= index} onPress={() => onPick(i)} accessibilityLabel={i < index ? `Back to step ${i + 1}` : undefined}
139
158
  hitSlop={{ top: 12, bottom: 12 }} style={{ flex: 1, height: 14, justifyContent: "center" }}>
140
159
  <View style={{ height: 3, borderRadius: 2, backgroundColor: i === index ? c.foreground : i < index ? withAlpha(c.foreground, 0.4) : c.border }} />
141
160
  </Pressable>)}
@@ -163,7 +182,15 @@ function useFollowSettings() {
163
182
  }
164
183
  function useChecks() {
165
184
  const read = useRpc(onboardingChecksRpc);
166
- return useQuery({ queryKey: checksKey, queryFn: () => read({}), staleTime: 60_000, refetchOnWindowFocus: false, retry: false });
185
+ const pendingSince = useRef(0);
186
+ // While Paseo is still loading a provider, ask again every few seconds (fresh), at most a minute; never otherwise.
187
+ return useQuery({ queryKey: checksKey, queryFn: () => read(pendingSince.current ? { fresh: true } : {}), staleTime: 60_000, refetchOnWindowFocus: false, retry: false,
188
+ refetchInterval: q => {
189
+ const pending = !!(q.state.data as Checks | undefined)?.checks.some(row => row.state === "pending" && row.id.startsWith("provider-"));
190
+ if (!pending) { pendingSince.current = 0; return false; }
191
+ pendingSince.current ||= Date.now();
192
+ return Date.now() - pendingSince.current < 60_000 ? 3000 : false;
193
+ } });
167
194
  }
168
195
 
169
196
  const Panel = ({ c, children }: { c: Colors; children: ReactNode }) =>
@@ -172,7 +199,7 @@ const Panel = ({ c, children }: { c: Colors; children: ReactNode }) =>
172
199
  // ---------- 1. what it is ----------
173
200
 
174
201
  const EXAMPLE = [
175
- { glyph: "CircleX", tone: "danger", line: "Checks failed on #418", caption: "Follow-up notices" },
202
+ { glyph: "CircleX", tone: "danger", line: "Checks failed on #418", caption: "Follow-up notices the failed checks" },
176
203
  { glyph: "spinner", tone: "running", line: "Repair sent to the agent · 2m", caption: "and sends it as a repair to the agent that made the PR" },
177
204
  { glyph: "CircleCheck", tone: "success", dot: "warning", line: "#418 approved", caption: "then asks you only for the decision" },
178
205
  ] as const;
@@ -261,18 +288,21 @@ function ChecksStep({ theme, compact, checks, deps }: { theme: Theme; compact: b
261
288
  const GLYPH: Record<Check["state"], string> = { ok: "CircleCheck", warn: "CircleAlert", fail: "CircleX", pending: "CircleDashed", off: "CircleMinus" };
262
289
  function CheckRow({ theme, compact, row, first, checking, deps }: { theme: Theme; compact: boolean; row: Check; first: boolean; checking: boolean; deps: SetupDeps }) {
263
290
  const c = theme.colors; const t = text(c); const toast = useToast();
264
- const [open, setOpen] = useState(false);
291
+ // The row that blocks everything (no provider at all) opens with its fix; optional and note rows fold theirs.
292
+ const [open, setOpen] = useState(row.id === "providers");
293
+ const folds = row.state === "warn" || row.state === "off";
265
294
  const color = row.state === "ok" ? c.statusSuccess : row.state === "warn" ? c.statusWarning : row.state === "fail" ? c.statusDanger : c.foregroundMuted;
266
295
  return <View accessibilityLabel={`${row.label}: ${row.detail}`} style={{ flexDirection: "row", gap: 10, paddingHorizontal: compact ? 14 : 16, paddingVertical: 12, borderTopWidth: first ? 0 : 1, borderTopColor: c.border }}>
267
296
  <View style={{ paddingTop: 1 }}>{checking ? <Spinner color={c.foregroundMuted} size={16} /> : <Icon name={GLYPH[row.state]} size={16} color={color} />}</View>
268
297
  <View style={{ flex: 1, minWidth: 0, gap: 3 }}>
269
298
  <Text style={t.label}>{row.label}</Text>
270
299
  <Text style={t.meta}>{row.detail}</Text>
271
- {row.fix && row.state === "warn" && !open && <Pressable accessibilityRole="button" accessibilityState={{ expanded: false }} onPress={() => setOpen(true)} style={{ minHeight: compact ? 44 : 28, justifyContent: "center", alignSelf: "flex-start" }}>
272
- <Text style={[t.meta, { color: c.foreground, textDecorationLine: "underline" }]}>How to fix</Text>
300
+ {row.fix && folds && !open && <Pressable accessibilityRole="button" accessibilityState={{ expanded: false }} onPress={() => setOpen(true)} style={{ minHeight: compact ? 44 : 28, justifyContent: "center", alignSelf: "flex-start" }}>
301
+ <Text style={[t.meta, { color: c.foreground, textDecorationLine: "underline" }]}>{row.state === "off" ? "How to turn it on" : "How to fix"}</Text>
273
302
  </Pressable>}
274
- {row.fix && (row.state !== "warn" || open) && <View style={{ gap: 6, marginTop: 4 }}>
303
+ {row.fix && (!folds || open) && <View style={{ gap: 6, marginTop: 4 }}>
275
304
  <Text style={[t.meta, { color: c.foreground }]}>{row.fix.text}</Text>
305
+ {row.fix.url && <Button theme={theme} compact={compact} kind="ghost" icon="ExternalLink" title="Get the GitHub CLI" accessibilityLabel={`Get the GitHub CLI at ${row.fix.url}`} onPress={() => { void openExternalUrl(row.fix!.url!).catch(() => toast.error("Couldn't open the link here")); }} />}
276
306
  {row.fix.command && <View style={{ flexDirection: "row", alignItems: "center", gap: 6, alignSelf: "flex-start", maxWidth: "100%", paddingLeft: 10, borderRadius: 6, backgroundColor: c.surface2 }}>
277
307
  <Text selectable numberOfLines={1} style={{ flexShrink: 1, color: c.foreground, fontSize: 12, lineHeight: 17, fontFamily: Platform.OS === "ios" ? "Menlo" : "ui-monospace, SFMono-Regular, Menlo, monospace" }}>{row.fix.command}</Text>
278
308
  <IconButton theme={theme} compact={compact} icon="Copy" label={`Copy ${row.fix.command}`} onPress={() => { void copyText(row.fix!.command!).then(() => toast.show("Copied", { variant: "success" }), () => toast.error("Couldn't copy here")); }} />
@@ -326,7 +356,7 @@ function DefaultsStep({ theme, compact, held }: { theme: Theme; compact: boolean
326
356
  return <View style={{ gap: 10 }}>
327
357
  {follow.error && <Text accessibilityRole="alert" style={[t.meta, { color: c.statusDanger }]}>{errorText(follow.error)}</Text>}
328
358
  <Panel c={c}>
329
- <SwitchRow first theme={theme} compact={compact} label="Follow every workspace" hint="New and existing workspaces, except any you turn off below." value={data?.enable_follow_every ?? null} disabled={change.isPending}
359
+ <SwitchRow first theme={theme} compact={compact} label="Follow every workspace" hint={list.length ? "New and existing workspaces, except any you turn off below." : "Every workspace, from the first one you create."} value={data?.enable_follow_every ?? null} disabled={change.isPending}
330
360
  onChange={v => change.mutate([{ enable_follow_every: v }])}>
331
361
  {list.length > 0 && <View style={{ paddingLeft: compact ? 14 : 16, paddingBottom: 6 }}>
332
362
  {shown.map(w => {
@@ -363,7 +393,7 @@ function DefaultsStep({ theme, compact, held }: { theme: Theme; compact: boolean
363
393
  function HelpersStep({ theme, compact, deps }: { theme: Theme; compact: boolean; deps: SetupDeps }) {
364
394
  const c = theme.colors; const t = text(c);
365
395
  return <View style={{ gap: 12 }}>
366
- <Panel c={c}><JobRows theme={theme} compact={compact} order={SETUP_ORDER} preselect /></Panel>
396
+ <Panel c={c}><JobRows theme={theme} compact={compact} order={SETUP_ORDER} preselect brief /></Panel>
367
397
  <View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center" }}>
368
398
  <Text style={t.meta}>Permissions and limits are in </Text>
369
399
  <Pressable accessibilityRole="link" accessibilityLabel="Open Follow-up settings, Agents" onPress={() => deps.openSettings("agents")} hitSlop={8} style={{ minHeight: compact ? 44 : 20, justifyContent: "center" }}>
@@ -381,6 +411,20 @@ function TourStep({ theme, compact }: { theme: Theme; compact: boolean }) {
381
411
  line={compact ? "Tap Follow-up at the top of any workspace: its PRs, tasks and what the agent is doing." : "The Follow-up button in a workspace's header docks its PRs, tasks and what the agent is doing beside the chat."} />
382
412
  <TourRow theme={theme} thumb={<ThumbNeeds c={theme.colors} />} title="Needs you" line="The decisions only you can make, one button each. A pill above the chat shows the same." />
383
413
  <TourRow theme={theme} thumb={<ThumbAbout c={theme.colors} />} title="Summary" line="One sentence under a workspace's title saying what it's for." />
414
+ <TourRow theme={theme} thumb={<ThumbNew c={theme.colors} />} title={NEW_NAME} line="Starts work from an issue, a PR, a link or your words: a workspace and an agent, already briefed." />
415
+ <NewRowChoice theme={theme} compact={compact} />
416
+ </View>;
417
+ }
418
+
419
+ /** The sidebar's Dispatch row (new-row-is-optional): the same switch and tip as Settings → Dispatch. */
420
+ function NewRowChoice({ theme, compact }: { theme: Theme; compact: boolean }) {
421
+ const c = theme.colors; const t = text(c);
422
+ const row = useNewRowSetting();
423
+ return <View style={{ gap: 6, paddingTop: 6 }}>
424
+ <Panel c={c}>
425
+ <SwitchRow first theme={theme} compact={compact} label={NEW_ROW.label} hint={NEW_ROW.hint(row.key, isMac() ? "⌘K" : "Ctrl K")} value={row.value} disabled={row.saving} onChange={row.set} />
426
+ </Panel>
427
+ {row.value !== false && <Text style={t.meta}>{NEW_ROW.paseoShort}</Text>}
384
428
  </View>;
385
429
  }
386
430
 
@@ -398,6 +442,8 @@ const ThumbPanel = ({ c }: { c: Colors }) => <>{bar(c, "55%", c.foregroundMuted)
398
442
  const ThumbNeeds = ({ c }: { c: Colors }) => <View style={{ flex: 1, borderRadius: 4, borderWidth: 1, borderColor: c.statusWarning, padding: 4, gap: 3 }}>{bar(c, "70%")}<View style={{ width: 16, height: 5, borderRadius: 2, backgroundColor: c.accent }} /></View>;
399
443
  // The Summary: the title, then one quiet line under it.
400
444
  const ThumbAbout = ({ c }: { c: Colors }) => <>{bar(c, "60%", c.foregroundMuted, 4)}{bar(c, "90%")}{bar(c, "70%")}</>;
445
+ // New: a + row at the top of a sidebar, then the list under it.
446
+ const ThumbNew = ({ c }: { c: Colors }) => <><View style={{ flexDirection: "row", alignItems: "center", gap: 3 }}><Icon name="Plus" size={8} color={c.foreground} />{bar(c, "45%", c.foregroundMuted, 4)}</View>{bar(c, "80%")}{bar(c, "65%")}</>;
401
447
 
402
448
  // ---------- existing installs ----------
403
449
 
@@ -5,7 +5,7 @@ import { useRpc } from "@getpaseo/plugin/client";
5
5
  import { Icon, Modal, ScrollView } from "@getpaseo/plugin/client/ui";
6
6
  import { useQuery, useQueryClient } from "@tanstack/react-query";
7
7
  import { releaseNotesRpc, whatsNewSeenRpc } from "../shared/contracts";
8
- import { LAST_SEEN_KEY, deviceSeenFrom, recentNotes, whatsNew, type NoteBlock, type ReleaseNote, type ReleaseNotesView } from "../shared/changelog";
8
+ import { LAST_SEEN_KEY, deviceSeenFrom, inlineRuns, plainInline, recentNotes, whatsNew, type InlineRun, type NoteBlock, type ReleaseNote, type ReleaseNotesView } from "../shared/changelog";
9
9
  import { deviceStorage, viewStatus } from "../shared/settings-nav";
10
10
  import { useViewVersion } from "./view-store";
11
11
  import { Button, text, type Theme } from "./kit";
@@ -37,12 +37,16 @@ const Dot = ({ style }: { style: object }) => <Text style={style} accessibilityE
37
37
  const MeasureContext = createContext<number | undefined>(undefined);
38
38
  const useMeasure = () => { const m = useContext(MeasureContext); return m ? { maxWidth: m } : null; };
39
39
 
40
+ /** A line's text with its bold runs semibold (the weight headings use), or the plain text when nothing is bold. */
41
+ const inline = (line: string, runs?: InlineRun[]): ReactNode =>
42
+ runs ? runs.map((r, i) => r.bold ? <Text key={i} style={{ fontWeight: "600" }}>{r.text}</Text> : r.text) : line;
43
+
40
44
  /** One bullet: a small dot and its text. */
41
- function Bullet({ text: line, theme, compact }: { text: string; theme: Theme; compact: boolean }) {
45
+ function Bullet({ text: line, runs, theme, compact }: { text: string; runs?: InlineRun[]; theme: Theme; compact: boolean }) {
42
46
  const c = theme.colors; const t = text(c, compact);
43
47
  return <View style={[{ flexDirection: "row", gap: 8 }, useMeasure()]}>
44
48
  <View style={{ width: 4, height: 4, borderRadius: 2, marginTop: compact ? 8 : 7, backgroundColor: c.foregroundMuted }} />
45
- <Text style={[t.body, { flex: 1 }]}>{line}</Text>
49
+ <Text style={[t.body, { flex: 1 }]}>{inline(line, runs)}</Text>
46
50
  </View>;
47
51
  }
48
52
 
@@ -94,14 +98,14 @@ export function VersionNotes({ note, theme, compact = false, max = 8 }: { note:
94
98
  if (b.kind === "rule") return <View key={i} style={{ height: 1, backgroundColor: c.border, marginTop: 16, marginBottom: 4 }} />;
95
99
  // Section headings: semibold, one step above body (body 13/14, heading 15/17, the title role), clearly headings.
96
100
  if (b.kind === "heading") return <Text key={i} accessibilityRole="header" style={[quiet ? [t.meta, { fontWeight: "600" }] : [t.title, { fontWeight: "600", marginTop: i ? 16 : 0 }], measure]}>{b.text}</Text>;
97
- if (b.kind === "text") return <Text key={i} style={[quiet ? t.meta : i === 0 ? [t.body, lead] : t.body, measure]}>{b.text}</Text>;
98
- return <Bullet key={i} text={b.text} theme={theme} compact={compact} />;
101
+ if (b.kind === "text") return <Text key={i} style={[quiet ? t.meta : i === 0 ? [t.body, lead] : t.body, measure]}>{inline(b.text, b.runs)}</Text>;
102
+ return <Bullet key={i} text={b.text} runs={b.runs} theme={theme} compact={compact} />;
99
103
  })}
100
104
  </View>;
101
105
  }
102
106
  const items = all ? note.items : note.items.slice(0, max);
103
107
  return <View style={{ gap: 6 }}>
104
- {items.map((item, i) => <Bullet key={i} text={item} theme={theme} compact={compact} />)}
108
+ {items.map((item, i) => { const runs = inlineRuns(item); return <Bullet key={i} text={plainInline(item)} runs={runs.some(r => r.bold) ? runs : undefined} theme={theme} compact={compact} />; })}
105
109
  {!all && note.items.length > max && <Pressable accessibilityRole="button" onPress={() => setAll(true)} hitSlop={compact ? { top: 14, bottom: 14, left: 8, right: 8 } : 6}
106
110
  style={{ minHeight: compact ? 44 : undefined, justifyContent: "center", alignSelf: "flex-start" }}>
107
111
  <Text style={[t.label, { color: c.foreground, fontWeight: "600" }]}>{`Show all ${note.items.length}`}</Text>
@@ -131,7 +135,7 @@ function FoldedVersion({ note, theme, compact }: { note: ReleaseNote; theme: The
131
135
  <Icon name={open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted} />
132
136
  <Text accessibilityRole="header" style={[t.label, { fontVariant: ["tabular-nums"], flexShrink: 0 }]}>{note.version}</Text>
133
137
  {note.date && <Text style={[t.meta, { flexShrink: 0 }]}>{fmtDate(note.date)}</Text>}
134
- {!open && <Text numberOfLines={1} style={[t.meta, { flex: 1, minWidth: 0 }]}>{note.items[0] ?? note.blocks?.find(b => b.kind === "text" || b.kind === "bullet")?.text ?? ""}</Text>}
138
+ {!open && <Text numberOfLines={1} style={[t.meta, { flex: 1, minWidth: 0 }]}>{note.items[0] !== undefined ? plainInline(note.items[0]) : note.blocks?.find(b => b.kind === "text" || b.kind === "bullet")?.text ?? ""}</Text>}
135
139
  </Pressable>
136
140
  {open && <View style={{ paddingLeft: 22, paddingBottom: 12 }}><VersionNotes note={note} theme={theme} compact={compact} /></View>}
137
141
  </View>;