paseo-follow-up 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/client/release-notes.tsx +98 -123
- package/client/tasks.tsx +38 -8
- package/client/updates.tsx +6 -6
- package/index.server.ts +17 -4
- package/package.json +1 -1
- package/server/agent-hook.mjs +1 -1
- package/server/agent-parity.ts +2 -2
- package/server/engine.ts +6 -2
- package/server/hook-source.ts +1 -1
- package/server/mcp-source.ts +3 -3
- package/server/mcp.mjs +3 -3
- package/server/obligations.ts +7 -5
- package/server/release-notes.ts +5 -5
- package/server/scheduled-tasks.ts +92 -0
- package/shared/attention.ts +4 -0
- package/shared/changelog.ts +33 -0
- package/shared/contracts.ts +4 -4
- package/shared/queue.ts +1 -1
- package/shared/task-due.ts +3 -1
- package/shared/task-trigger.ts +125 -1
- package/skills/follow-up/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of Follow-up, newest first. Follow-up shows "What's new" after an update that brings new release notes: the curated part of each stable release since you last looked (betas install quietly; Settings → General can turn it off), and every version's notes from Home's version line.
|
|
4
4
|
|
|
5
|
+
## 2.5.0 (2026-11-26)
|
|
6
|
+
|
|
7
|
+
Send a task at the time you pick, and read every release in one scroll.
|
|
8
|
+
|
|
9
|
+
- **Tasks can go out at a set time.** Pick At a time in Send on a schedule, or let an agent set its own check-back. The task reaches the agent once at that time, even with Auto-send off.
|
|
10
|
+
- **What's new is one scroll, like Paseo's.** Every version newest first, with its date and an Installed tag on yours. Nothing to open, and each version's full changelog is one click away on GitHub.
|
|
11
|
+
|
|
12
|
+
<details><summary>Full changelog since 2.4.2</summary>
|
|
13
|
+
|
|
14
|
+
### Repairs and PRs
|
|
15
|
+
|
|
16
|
+
- A task can be sent to its agent at a time: pick At a time in Send on a schedule, or let an agent set its own check-back. It arrives once at that time, even with Auto-send off.
|
|
17
|
+
|
|
18
|
+
### Setup, Settings and updates
|
|
19
|
+
|
|
20
|
+
- What's new is one scroll: every version's changes, newest first, with its date and an Installed tag on yours. Nothing to open, and each version's full changelog is one click away on GitHub.
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
5
24
|
## 2.4.2 (2026-11-26)
|
|
6
25
|
|
|
7
26
|
A shorter, current plugin page.
|
package/client/release-notes.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useMemo, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
|
|
2
2
|
import { Image, Platform, Modal as RNModal, View, useWindowDimensions, type ScrollView as NativeScrollView, type StyleProp, type ViewStyle } from "react-native";
|
|
3
3
|
import { Pressable, Text } from "./text";
|
|
4
|
-
import { useRpc } from "@getpaseo/plugin/client";
|
|
4
|
+
import { openExternalUrl, 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, inlineRuns,
|
|
8
|
+
import { LAST_SEEN_KEY, deviceSeenFrom, inlineRuns, notesFeed, plainInline, whatsNew, type FeedNote, 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";
|
|
@@ -15,27 +15,22 @@ import { NOTES_SCROLL_ATTR, notesScrollbarCss } from "../shared/notes-scrollbar"
|
|
|
15
15
|
import { ImageViewer, ImageViewerContext, refocus, useImageViewer, viewerInline, type ViewedImage } from "./image-viewer";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Release notes on the client: What's new
|
|
19
|
-
* come from the installed package's CHANGELOG.md through
|
|
18
|
+
* Release notes on the client: What's new, one scroll of every stable version's notes, shown after an update and from
|
|
19
|
+
* Home's version line and Settings. The notes come from the installed package's CHANGELOG.md through
|
|
20
|
+
* `follow.release-notes`, read once per app session.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
export const releaseNotesKey = ["follow-up", "release-notes"];
|
|
24
|
+
/** The updater's view (`client/updates.tsx` reads it); here only for its pending notes. */
|
|
25
|
+
export const updatesKey = ["follow-up", "updates"];
|
|
23
26
|
export function useReleaseNotes() {
|
|
24
27
|
const read = useRpc(releaseNotesRpc);
|
|
25
28
|
return useQuery({ queryKey: releaseNotesKey, queryFn: () => read({}), staleTime: Infinity, retry: 1 });
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
/** A version's date in full, as Paseo's notes write it: "November 26, 2026". */
|
|
32
|
+
const fmtDate = (iso: string | null) => iso ? new Date(`${iso}T12:00:00`).toLocaleDateString(undefined, { day: "numeric", month: "long", year: "numeric" }) : null;
|
|
29
33
|
|
|
30
|
-
/** Hidden from screen readers: a visual separator only. */
|
|
31
|
-
const Dot = ({ style }: { style: object }) => <Text style={style} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" aria-hidden>·</Text>;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The text measure in the wide dialog: text lines stop here (about 75 characters) while screenshots use the full
|
|
35
|
-
* width. Unset (no cap) in the host's 520px dialog, on phones and in Settings' inline notes.
|
|
36
|
-
*/
|
|
37
|
-
const MeasureContext = createContext<number | undefined>(undefined);
|
|
38
|
-
const useMeasure = () => { const m = useContext(MeasureContext); return m ? { maxWidth: m } : null; };
|
|
39
34
|
|
|
40
35
|
/** A line's text with its bold runs semibold (the weight headings use), or the plain text when nothing is bold. */
|
|
41
36
|
const inline = (line: string, runs?: InlineRun[]): ReactNode =>
|
|
@@ -44,7 +39,7 @@ const inline = (line: string, runs?: InlineRun[]): ReactNode =>
|
|
|
44
39
|
/** One bullet: a small dot and its text. */
|
|
45
40
|
function Bullet({ text: line, runs, theme, compact }: { text: string; runs?: InlineRun[]; theme: Theme; compact: boolean }) {
|
|
46
41
|
const c = theme.colors; const t = text(c, compact);
|
|
47
|
-
return <View style={
|
|
42
|
+
return <View style={{ flexDirection: "row", gap: 8 }}>
|
|
48
43
|
<View style={{ width: 4, height: 4, borderRadius: 2, marginTop: compact ? 8 : 7, backgroundColor: c.foregroundMuted }} />
|
|
49
44
|
<Text style={[t.body, { flex: 1 }]}>{inline(line, runs)}</Text>
|
|
50
45
|
</View>;
|
|
@@ -79,32 +74,32 @@ function NoteImage({ block, theme, compact }: { block: Extract<NoteBlock, { kind
|
|
|
79
74
|
}
|
|
80
75
|
|
|
81
76
|
/**
|
|
82
|
-
* One version's notes. Shared by What's new
|
|
83
|
-
* and images, like 2.0.0) reads in full as written
|
|
84
|
-
*
|
|
77
|
+
* One version's notes. Shared by What's new and Settings' update card. A curated section (an intro, headings,
|
|
78
|
+
* paragraphs and images, like 2.0.0) reads in full as written, its intro as the first paragraph; whatever follows a
|
|
79
|
+
* `---` rule (the credits) reads as a quiet footnote. Every bullet shows: only a caller that previews a version
|
|
80
|
+
* (Settings' "What's in X", `max`) folds a long list behind "Show all N".
|
|
85
81
|
*/
|
|
86
|
-
export function VersionNotes({ note, theme, compact = false, max =
|
|
82
|
+
export function VersionNotes({ note, theme, compact = false, max = Infinity }: { note: ReleaseNote; theme: Theme; compact?: boolean; max?: number }) {
|
|
87
83
|
const c = theme.colors; const t = text(c, compact);
|
|
88
84
|
const [all, setAll] = useState(false);
|
|
89
|
-
const measure = useMeasure();
|
|
90
85
|
if (note.blocks?.length) {
|
|
91
|
-
const lead: object = { fontSize: compact ? 16 : 15, lineHeight: compact ? 24 : 22 };
|
|
92
86
|
const quietFrom = note.blocks.findIndex(b => b.kind === "rule");
|
|
93
87
|
// Headings sit a step above body text and closer to the paragraph they open than to the one before.
|
|
94
|
-
return <View style={{ gap:
|
|
88
|
+
return <View style={{ gap: 8 }}>
|
|
95
89
|
{note.blocks.map((b, i) => {
|
|
96
90
|
const quiet = quietFrom >= 0 && i > quietFrom;
|
|
97
91
|
if (b.kind === "image") return <NoteImage key={i} block={b} theme={theme} compact={compact} />;
|
|
98
92
|
if (b.kind === "rule") return <View key={i} style={{ height: 1, backgroundColor: c.border, marginTop: 16, marginBottom: 4 }} />;
|
|
99
|
-
// Section headings:
|
|
100
|
-
|
|
101
|
-
if (b.kind === "
|
|
93
|
+
// Section headings: body size, semibold (the label role), so in the feed the version number stays the strongest
|
|
94
|
+
// line and a curated section's headings read as its parts, never as versions of their own.
|
|
95
|
+
if (b.kind === "heading") return <Text key={i} accessibilityRole="header" style={[quiet ? [t.meta, { fontWeight: "600" }] : [t.label, { marginTop: i ? 12 : 0 }]]}>{b.text}</Text>;
|
|
96
|
+
if (b.kind === "text") return <Text key={i} style={[quiet ? t.meta : t.body]}>{inline(b.text, b.runs)}</Text>;
|
|
102
97
|
return <Bullet key={i} text={b.text} runs={b.runs} theme={theme} compact={compact} />;
|
|
103
98
|
})}
|
|
104
99
|
</View>;
|
|
105
100
|
}
|
|
106
101
|
const items = all ? note.items : note.items.slice(0, max);
|
|
107
|
-
return <View style={{ gap:
|
|
102
|
+
return <View style={{ gap: 8 }}>
|
|
108
103
|
{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} />; })}
|
|
109
104
|
{!all && note.items.length > max && <Pressable accessibilityRole="button" onPress={() => setAll(true)} hitSlop={compact ? { top: 14, bottom: 14, left: 8, right: 8 } : 6}
|
|
110
105
|
style={{ minHeight: compact ? 44 : undefined, justifyContent: "center", alignSelf: "flex-start" }}>
|
|
@@ -113,53 +108,32 @@ export function VersionNotes({ note, theme, compact = false, max = 8 }: { note:
|
|
|
113
108
|
</View>;
|
|
114
109
|
}
|
|
115
110
|
|
|
116
|
-
/**
|
|
117
|
-
|
|
111
|
+
/**
|
|
112
|
+
* A version's header row, as Paseo's own What's new draws it: the number on the left, an Installed pill on the one
|
|
113
|
+
* this host runs, the date on the right, and a rule under it. A heading for screen readers ("2.4.1, installed,
|
|
114
|
+
* November 25, 2026"), so they can jump version to version.
|
|
115
|
+
*/
|
|
116
|
+
function VersionHeader({ note, theme, compact }: { note: FeedNote; theme: Theme; compact: boolean }) {
|
|
118
117
|
const c = theme.colors; const t = text(c, compact);
|
|
119
118
|
const date = fmtDate(note.date);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<Text style={
|
|
123
|
-
{
|
|
119
|
+
return <View accessibilityRole="header" accessibilityLabel={[note.version, note.installed ? "installed" : null, date].filter(Boolean).join(", ")}
|
|
120
|
+
style={{ flexDirection: "row", alignItems: "center", gap: 10, paddingBottom: compact ? 10 : 12, borderBottomWidth: 1, borderBottomColor: c.border }}>
|
|
121
|
+
<Text style={{ color: c.foreground, fontSize: compact ? 19 : 18, lineHeight: compact ? 25 : 24, fontWeight: "500", fontVariant: ["tabular-nums"] }}>{note.version}</Text>
|
|
122
|
+
{note.installed && <View style={{ paddingHorizontal: 8, paddingVertical: 1, borderRadius: 999, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface2 }}>
|
|
123
|
+
<Text style={[t.meta, { color: c.foregroundMuted }]}>Installed</Text>
|
|
124
|
+
</View>}
|
|
125
|
+
<View style={{ flex: 1 }} />
|
|
126
|
+
{date && <Text numberOfLines={1} style={[t.meta, { flexShrink: 1 }]}>{date}</Text>}
|
|
124
127
|
</View>;
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
/**
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
style={state => ({ flexDirection: "row", alignItems: "center", gap: 8, minHeight: compact ? 48 : 36, paddingVertical: 6, marginHorizontal: -8, paddingHorizontal: 8, borderRadius: 6, backgroundColor: state.pressed ? c.surface2 : !compact && (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
135
|
-
<Icon name={open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted} />
|
|
136
|
-
<Text accessibilityRole="header" style={[t.label, { fontVariant: ["tabular-nums"], flexShrink: 0 }]}>{note.version}</Text>
|
|
137
|
-
{note.date && <Text style={[t.meta, { flexShrink: 0 }]}>{fmtDate(note.date)}</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>}
|
|
139
|
-
</Pressable>
|
|
140
|
-
{open && <View style={{ paddingLeft: 22, paddingBottom: 12 }}><VersionNotes note={note} theme={theme} compact={compact} /></View>}
|
|
141
|
-
</View>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Newest open, the next ones folded, then "and N older versions" past `cap` (a button only when `onMore` shows them).
|
|
146
|
-
* `titled`: the sheet's title already names the newest version, so its header shows just the date.
|
|
147
|
-
*/
|
|
148
|
-
export function NotesList({ notes, theme, compact, cap = 10, onMore, titled = false }: { notes: readonly ReleaseNote[]; theme: Theme; compact: boolean; cap?: number; onMore?: () => void; titled?: boolean }) {
|
|
149
|
-
const c = theme.colors; const t = text(c, compact);
|
|
150
|
-
const [first, ...rest] = notes;
|
|
151
|
-
if (!first) return null;
|
|
152
|
-
const shown = rest.slice(0, cap - 1);
|
|
153
|
-
const hidden = rest.length - shown.length;
|
|
154
|
-
const more = `and ${hidden} older version${hidden === 1 ? "" : "s"}`;
|
|
155
|
-
return <View style={{ gap: 0 }}>
|
|
156
|
-
<View style={{ gap: 8, paddingBottom: 14 }}><VersionHeader note={first} theme={theme} compact={compact} dateOnly={titled} /><VersionNotes note={first} theme={theme} compact={compact} /></View>
|
|
157
|
-
{shown.map(n => <FoldedVersion key={n.version} note={n} theme={theme} compact={compact} />)}
|
|
158
|
-
{hidden > 0 && (onMore
|
|
159
|
-
? <Pressable accessibilityRole="button" onPress={onMore} style={{ borderTopWidth: 1, borderTopColor: c.border, minHeight: compact ? 48 : 36, justifyContent: "center" }}>
|
|
160
|
-
<Text style={[t.meta, { color: c.foreground, fontWeight: "600" }]}>{more}</Text>
|
|
161
|
-
</Pressable>
|
|
162
|
-
: <View style={{ borderTopWidth: 1, borderTopColor: c.border, minHeight: compact ? 48 : 36, justifyContent: "center" }}><Text style={t.meta}>{more}</Text></View>)}
|
|
130
|
+
/** Every version in one scroll, newest first: each one's header and its notes, nothing folded. */
|
|
131
|
+
export function NotesFeed({ feed, theme, compact }: { feed: readonly FeedNote[]; theme: Theme; compact: boolean }) {
|
|
132
|
+
return <View style={{ gap: compact ? 32 : 36 }}>
|
|
133
|
+
{feed.map(n => <View key={n.version} style={{ gap: compact ? 14 : 16 }}>
|
|
134
|
+
<VersionHeader note={n} theme={theme} compact={compact} />
|
|
135
|
+
<VersionNotes note={n} theme={theme} compact={compact} />
|
|
136
|
+
</View>)}
|
|
163
137
|
</View>;
|
|
164
138
|
}
|
|
165
139
|
|
|
@@ -185,39 +159,49 @@ function NotesScroll({ theme, style, contentContainerStyle, children }: { theme:
|
|
|
185
159
|
}
|
|
186
160
|
|
|
187
161
|
/**
|
|
188
|
-
*
|
|
189
|
-
* "Follow-up
|
|
162
|
+
* What's new and the release notes are one view, so one title, naming the plugin from its manifest (the view's
|
|
163
|
+
* `name`): "What's new in Follow-up". Exported for the tests.
|
|
190
164
|
*/
|
|
191
|
-
export const notesTitle = (name: string
|
|
165
|
+
export const notesTitle = (name: string) => `What's new in ${name}`;
|
|
166
|
+
/** The release pages, from the header's open-in-browser icon: the one URL the notes open (a screenshot never does). */
|
|
167
|
+
const openReleases = (url: string) => { void openExternalUrl(url).catch(() => undefined); };
|
|
192
168
|
|
|
193
169
|
/** The host sheet's own inset on the phone, so our body lines up with its title. */
|
|
194
170
|
const SHEET_INSET = 24;
|
|
195
171
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
172
|
+
* Desktop draws the notes in a dialog of our own, so its header can carry the open-in-browser icon beside the X (the
|
|
173
|
+
* host's Modal has a title and nothing else). The dialog is as wide as the reading column plus its inset, and nothing
|
|
174
|
+
* inside caps itself: text, version rules, dates, screenshots, the credits' rule and the header's icons all share one
|
|
175
|
+
* right edge (2026-11-26: an 840px dialog capped only its text at 600px, leaving a dead band right of every line, the
|
|
176
|
+
* rules and icons past it). A screenshot shows larger in the image viewer.
|
|
198
177
|
*/
|
|
199
|
-
const
|
|
178
|
+
const NOTES_COLUMN = 600; const DIALOG_INSET = 24;
|
|
200
179
|
|
|
201
180
|
/**
|
|
202
|
-
* The
|
|
203
|
-
* `onDismiss` is the notes' own close: Esc, the dim and the X all go through it.
|
|
181
|
+
* The desktop dialog, drawn like the host's (same dim, card and X) with Paseo's What's new header: a gift, the title,
|
|
182
|
+
* the release pages and Close. `onDismiss` is the notes' own close: Esc, the dim and the X all go through it.
|
|
204
183
|
*/
|
|
205
|
-
function
|
|
184
|
+
function NotesDialog({ title, open, onDismiss, theme, width, releases, openUrl, children, overlay }: { title: string; open: boolean; onDismiss: () => void; theme: Theme; width: number; releases: string | null; openUrl: (url: string) => void; children: ReactNode; overlay?: ReactNode }) {
|
|
206
185
|
const c = theme.colors;
|
|
207
186
|
const reduced = useReducedMotion();
|
|
208
187
|
const close = useRef<View>(null);
|
|
209
188
|
useEffect(() => { if (open) (close.current as unknown as { focus?: () => void } | null)?.focus?.(); }, [open]);
|
|
189
|
+
const headerButton = (state: { hovered?: boolean }) => ({ padding: 8, borderRadius: 8, backgroundColor: state.hovered ? c.surface1 : "transparent" });
|
|
210
190
|
return <RNModal transparent visible={open} animationType={reduced ? "none" : "fade"} onRequestClose={onDismiss}>
|
|
211
191
|
<View style={{ flex: 1, alignItems: "center", justifyContent: "center", padding: 24, backgroundColor: "rgba(0,0,0,0.55)" }}>
|
|
212
192
|
<Pressable accessible={false} focusable={false} importantForAccessibility="no" onPress={onDismiss} style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }} />
|
|
213
193
|
<View role="dialog" aria-modal aria-label={title} style={{ width, maxHeight: "85%", flexShrink: 1, minHeight: 0, overflow: "hidden", backgroundColor: c.surface0, borderRadius: 12, borderWidth: 1, borderColor: c.surface2 }}>
|
|
214
|
-
<View style={{ flexDirection: "row", alignItems: "center", gap:
|
|
194
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 10, paddingLeft: DIALOG_INSET, paddingRight: DIALOG_INSET - 8, paddingVertical: 14, borderBottomWidth: 1, borderBottomColor: c.surface2 }}>
|
|
195
|
+
<Icon name="Gift" size={16} color={c.foregroundMuted} />
|
|
215
196
|
<Text role="heading" numberOfLines={1} style={{ flex: 1, minWidth: 0, color: c.foreground, fontSize: 14, fontWeight: "500" }}>{title}</Text>
|
|
216
|
-
<Pressable
|
|
197
|
+
{releases && <Pressable accessibilityRole="link" accessibilityLabel="Release notes on GitHub" accessibilityHint="Every version's full changelog, in your browser" onPress={() => openUrl(releases)} style={state => headerButton(state as { hovered?: boolean })}>
|
|
198
|
+
{state => <Icon name="ExternalLink" size={16} color={state.pressed ? c.foreground : c.foregroundMuted} />}
|
|
199
|
+
</Pressable>}
|
|
200
|
+
<Pressable ref={close} accessibilityRole="button" accessibilityLabel="Close" onPress={onDismiss} style={state => headerButton(state as { hovered?: boolean })}>
|
|
217
201
|
{state => <Icon name="X" size={16} color={state.pressed ? c.foreground : c.foregroundMuted} />}
|
|
218
202
|
</Pressable>
|
|
219
203
|
</View>
|
|
220
|
-
<NotesScroll theme={theme} style={{ flexShrink: 1, minHeight: 0 }} contentContainerStyle={{ paddingHorizontal:
|
|
204
|
+
<NotesScroll theme={theme} style={{ flexShrink: 1, minHeight: 0 }} contentContainerStyle={{ paddingHorizontal: DIALOG_INSET, paddingTop: 24, paddingBottom: 32 }}>{children}</NotesScroll>
|
|
221
205
|
</View>
|
|
222
206
|
{overlay}
|
|
223
207
|
</View>
|
|
@@ -225,57 +209,46 @@ function WideDialog({ title, open, onDismiss, theme, width, children, overlay }:
|
|
|
225
209
|
}
|
|
226
210
|
|
|
227
211
|
/**
|
|
228
|
-
* "What's new in X":
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
212
|
+
* "What's new in X": every stable version's notes in one scroll, newest first, like Paseo's own (invariant 120,
|
|
213
|
+
* `notes-read-like-one-feed`). It always opens at the top, the newest version; older ones are a scroll away, never a
|
|
214
|
+
* fold or a second view. Desktop: our dialog, with the release pages (each version's full changelog) behind the
|
|
215
|
+
* header's open-in-browser icon. Phone: the host's sheet with our scroll body and a pinned footer, so Close and the
|
|
216
|
+
* release pages stay in thumb reach however long the notes are. A tapped screenshot opens the image viewer over the
|
|
217
|
+
* notes; Esc or a click closes the viewer first, then the notes.
|
|
232
218
|
*/
|
|
233
|
-
export function WhatsNewSheet({ open, name,
|
|
234
|
-
const c = theme.colors;
|
|
235
|
-
const [full, setFull] = useState(startAll);
|
|
219
|
+
export function WhatsNewSheet({ open, name, feed, releases, theme, compact, onClose, openUrl = openReleases }: { open: boolean; name: string; feed: readonly FeedNote[]; releases: string | null; theme: Theme; compact: boolean; onClose: () => void; openUrl?: (url: string) => void }) {
|
|
220
|
+
const c = theme.colors;
|
|
236
221
|
const [viewing, setViewing] = useState<{ image: ViewedImage; from: unknown } | null>(null);
|
|
237
222
|
const win = useWindowDimensions();
|
|
238
|
-
|
|
239
|
-
const newest = list[0];
|
|
240
|
-
if (!newest) return null;
|
|
241
|
-
const wide = !compact && win.width >= WIDE_FROM;
|
|
223
|
+
if (!feed.length) return null;
|
|
242
224
|
const closeViewer = () => { const from = viewing?.from; setViewing(null); refocus(from); };
|
|
243
225
|
const dismiss = () => { if (viewing) closeViewer(); else onClose(); };
|
|
244
|
-
const meta = !full && list.length > 1 ? `${list.length} versions since you last looked` : null;
|
|
245
|
-
const body = <>
|
|
246
|
-
{meta && <Text style={t.meta}>{meta}</Text>}
|
|
247
|
-
<NotesList notes={list} theme={theme} compact={compact} cap={full ? all.length : 10} onMore={full ? undefined : () => setFull(true)} titled={!full} />
|
|
248
|
-
</>;
|
|
249
|
-
const footer = (pinned: boolean) => <View style={{ borderTopWidth: 1, borderTopColor: c.border, flexDirection: compact ? "column" : "row", alignItems: compact ? "stretch" : "center", justifyContent: full ? "flex-end" : "space-between", gap: compact ? 4 : 8,
|
|
250
|
-
...(pinned ? { backgroundColor: c.surface1, paddingHorizontal: SHEET_INSET - 8, paddingTop: 8, paddingBottom: 12 } : { paddingTop: 12, marginTop: 4 }) }}>
|
|
251
|
-
{!full && all.length > list.length && <Button title="See all release notes" kind="ghost" theme={theme} compact={compact} grow={compact} onPress={() => setFull(true)} />}
|
|
252
|
-
<Button title="Close" kind="secondary" theme={theme} compact={compact} grow={compact} onPress={onClose} />
|
|
253
|
-
</View>;
|
|
254
226
|
const viewer = viewing && <ImageViewer image={viewing.image} inline={viewerInline(compact)} onClose={closeViewer} />;
|
|
255
|
-
const
|
|
256
|
-
<
|
|
227
|
+
const body = <ImageViewerContext.Provider value={(image, from) => setViewing({ image, from })}>
|
|
228
|
+
<NotesFeed feed={feed} theme={theme} compact={compact} />
|
|
257
229
|
</ImageViewerContext.Provider>;
|
|
258
|
-
const title = notesTitle(name
|
|
230
|
+
const title = notesTitle(name);
|
|
259
231
|
// The viewer always sits outside the scroll view: react-native-web's ScrollView sets translateZ(0), which would trap
|
|
260
232
|
// the viewer's fixed position inside the dialog.
|
|
261
|
-
if (
|
|
262
|
-
{
|
|
263
|
-
</WideDialog>;
|
|
233
|
+
if (!compact) return <NotesDialog title={title} open={open} onDismiss={dismiss} theme={theme} releases={releases} openUrl={openUrl}
|
|
234
|
+
width={Math.min(NOTES_COLUMN + 2 * DIALOG_INSET, win.width - 48)} overlay={viewer}>{body}</NotesDialog>;
|
|
264
235
|
return <Modal title={title} open={open} onOpenChange={next => { if (!next) dismiss(); }}>
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<NotesScroll theme={theme} style={{ flex: 1 }} contentContainerStyle={{ paddingHorizontal: 20, paddingTop: 4, paddingBottom: 16, gap: 12 }}>{provide(<>{body}{footer(false)}</>)}</NotesScroll>
|
|
274
|
-
{viewer}
|
|
275
|
-
</Modal.Content>}
|
|
236
|
+
<Modal.Content scrollable={false} contentContainerStyle={{ padding: 0, gap: 0 }} style={{ flex: 1 }}>
|
|
237
|
+
<NotesScroll theme={theme} style={{ flex: 1 }} contentContainerStyle={{ paddingHorizontal: SHEET_INSET, paddingTop: 16, paddingBottom: 24 }}>{body}</NotesScroll>
|
|
238
|
+
<View style={{ borderTopWidth: 1, borderTopColor: c.border, flexDirection: "row", alignItems: "center", gap: 8, backgroundColor: c.surface1, paddingHorizontal: SHEET_INSET - 8, paddingTop: 8, paddingBottom: 12 }}>
|
|
239
|
+
{releases && <Button title="On GitHub" icon="ExternalLink" kind="ghost" theme={theme} compact accessibilityLabel="Release notes on GitHub" accessibilityHint="Every version's full changelog, in your browser" onPress={() => openUrl(releases)} />}
|
|
240
|
+
<Button title="Close" kind="secondary" theme={theme} compact grow onPress={onClose} />
|
|
241
|
+
</View>
|
|
242
|
+
{viewer}
|
|
243
|
+
</Modal.Content>
|
|
276
244
|
</Modal>;
|
|
277
245
|
}
|
|
278
246
|
|
|
247
|
+
/** Notes for versions out but not installed, from the updater's view when it has been read (never fetched for this). */
|
|
248
|
+
function usePendingNotes(): readonly ReleaseNote[] {
|
|
249
|
+
return useQueryClient().getQueryData<{ pendingNotes?: ReleaseNote[] }>(updatesKey)?.pendingNotes ?? [];
|
|
250
|
+
}
|
|
251
|
+
|
|
279
252
|
/**
|
|
280
253
|
* Where "seen" lives: per device, in the device document on 0.16 (the phone included), else localStorage on web and
|
|
281
254
|
* desktop. A native app without either falls back to the host's record: What's new then shows once per host there,
|
|
@@ -304,6 +277,7 @@ export function WhatsNewGate({ surface, theme, compact }: { surface: string; the
|
|
|
304
277
|
const onboarding = ob.isPending || !!ob.data?.show;
|
|
305
278
|
const owner = useSyncExternalStore(subscribeClaim, claimVersion, claimVersion);
|
|
306
279
|
const seen = useRpc(whatsNewSeenRpc); const cache = useQueryClient();
|
|
280
|
+
const pending = usePendingNotes();
|
|
307
281
|
const [closed, setClosed] = useState(false);
|
|
308
282
|
const view = query.data;
|
|
309
283
|
const viewVersion = useViewVersion();
|
|
@@ -322,12 +296,13 @@ export function WhatsNewGate({ surface, theme, compact }: { surface: string; the
|
|
|
322
296
|
deviceStorage.set(LAST_SEEN_KEY, view.version); setClosed(true);
|
|
323
297
|
void seen({ version: view.version }).then(v => cache.setQueryData(releaseNotesKey, v), () => undefined);
|
|
324
298
|
};
|
|
325
|
-
return <WhatsNewSheet open name={view.name}
|
|
299
|
+
return <WhatsNewSheet open name={view.name} feed={notesFeed(view.notes, view.version, pending)} releases={view.releases} theme={theme} compact={compact} onClose={close} />;
|
|
326
300
|
}
|
|
327
301
|
|
|
328
|
-
/** What's new opened by hand (Home's
|
|
329
|
-
export function ReleaseNotesSheet({ theme, compact,
|
|
302
|
+
/** What's new opened by hand (Home's version line, Settings → General): the same scroll, opened at the newest version. */
|
|
303
|
+
export function ReleaseNotesSheet({ theme, compact, onClose }: { theme: Theme; compact: boolean; onClose: () => void }) {
|
|
330
304
|
const view = useReleaseNotes().data;
|
|
305
|
+
const pending = usePendingNotes();
|
|
331
306
|
if (!view) return null;
|
|
332
|
-
return <WhatsNewSheet open name={view.name}
|
|
307
|
+
return <WhatsNewSheet open name={view.name} feed={notesFeed(view.notes, view.version, pending)} releases={view.releases} theme={theme} compact={compact} onClose={onClose} />;
|
|
333
308
|
}
|
package/client/tasks.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Icon, Modal, TextInput, useToast } from "@getpaseo/plugin/client/ui";
|
|
|
5
5
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
6
6
|
import { useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
import type { Obligation, Workspace } from "../shared/model";
|
|
8
|
-
import type
|
|
8
|
+
import { atChoices, atProblem, clockLabel, DIDNT_GO_OUT, localTimeText, parseLocalTime, TRIGGER_HELP, type TaskTrigger } from "../shared/task-trigger";
|
|
9
9
|
import { taskTriggerRpc } from "../shared/contracts";
|
|
10
10
|
import { linkedQuestion, type TaskStatus } from "../shared/task-status";
|
|
11
11
|
import { finishedParts, summaryParts, taskSummary, taskViewRows, type TaskViewRow } from "../shared/task-view";
|
|
@@ -24,28 +24,53 @@ function TriggerEditor({ obligation: o, workspace, theme, compact }: { obligatio
|
|
|
24
24
|
const [event, setEvent] = useState<TaskTrigger["event"] | "manual">(o.enable_follow_up && o.trigger ? o.trigger.event : "manual");
|
|
25
25
|
const [days, setDays] = useState(String(o.trigger?.delayDays ?? 0));
|
|
26
26
|
const [prs, setPrs] = useState(o.afterPrs);
|
|
27
|
+
// At a time: a quick pick or a typed time, on the device's clock (the developer's zone). Opened with a time already
|
|
28
|
+
// set, the field starts there; else in 30 minutes.
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
const choices = atChoices(now);
|
|
31
|
+
const [when, setWhen] = useState(() => localTimeText(o.trigger?.event === "at" && o.trigger.at && Date.parse(o.trigger.at) > now ? Date.parse(o.trigger.at) : choices[0].at));
|
|
32
|
+
const at = parseLocalTime(when, now);
|
|
33
|
+
const timeProblem = event === "at" ? atProblem(at, now) : null;
|
|
34
|
+
// A time that already went out (or couldn't): said once, so a new time reads as sending it again.
|
|
35
|
+
const before = o.trigger?.event === "at" ? o.trigger.notSent ? `${DIDNT_GO_OUT} at ${clockLabel(o.trigger.at ?? "", now)}: ${o.trigger.notSent}.` : o.trigger.sentAt ? `Went out ${clockLabel(o.trigger.sentAt, now)}.` : null : null;
|
|
27
36
|
const rpc = useRpc(taskTriggerRpc); const cache = useQueryClient(); const toast = useToast();
|
|
28
37
|
const gated = event === "merge" || event === "deploy";
|
|
29
|
-
const valid = !gated || prs.length > 0 && /^\d+$/.test(days) && Number(days) <= 3650;
|
|
38
|
+
const valid = event === "at" ? !timeProblem : !gated || prs.length > 0 && /^\d+$/.test(days) && Number(days) <= 3650;
|
|
30
39
|
// Quick action: Save doesn't wait on the server; a toast confirms it, or says what failed with Retry.
|
|
31
40
|
const save = { isPending: false, mutate: () => void runAction({
|
|
32
|
-
label: "Schedule", toast, run: () => rpc({ workspaceId: workspace.id, obligationId: o.id, expectedRevision: o.revision, afterPrs: event === "now" ? [] : prs, trigger: event === "manual" ? null : { event, delayDays: gated ? Number(days) : 0 } }),
|
|
41
|
+
label: "Schedule", toast, run: () => rpc({ workspaceId: workspace.id, obligationId: o.id, expectedRevision: o.revision, afterPrs: event === "now" ? [] : prs, trigger: event === "manual" ? null : event === "at" ? { event, delayDays: 0, at: new Date(at!).toISOString() } : { event, delayDays: gated ? Number(days) : 0 } }),
|
|
33
42
|
success: () => ({ message: "Schedule saved" }), onSuccess: () => { void cache.invalidateQueries(); }, onError: () => { void cache.invalidateQueries(); },
|
|
34
43
|
failure: `Schedule for ${o.title} not saved`,
|
|
35
44
|
}) };
|
|
36
45
|
const busy = save.isPending;
|
|
37
|
-
const options = [["manual", "Not sent"], ["now", "Now"], ["merge", "After merge"], ["deploy", "After deploy"]] as const;
|
|
46
|
+
const options = [["manual", "Not sent"], ["now", "Now"], ["at", "At a time"], ["merge", "After merge"], ["deploy", "After deploy"]] as const;
|
|
47
|
+
const chip = (selected: boolean) => ({ minHeight: compact ? 44 : 30, justifyContent: "center" as const, paddingHorizontal: 11, borderRadius: 999, borderWidth: 1, borderColor: selected ? c.accent : c.border, backgroundColor: selected ? c.accent : "transparent" });
|
|
38
48
|
return <SubmitScope enabled={!busy && valid} onSubmit={() => save.mutate()} style={{ gap: 10 }}>
|
|
39
49
|
<View style={{ gap: 4 }}>
|
|
40
50
|
<Text style={t.label}>Send to the agent</Text>
|
|
41
|
-
<Text style={t.meta}>
|
|
51
|
+
<Text style={t.meta}>{TRIGGER_HELP[event]}</Text>
|
|
42
52
|
</View>
|
|
43
53
|
<View accessibilityRole="radiogroup" accessibilityLabel={`Send trigger for ${o.title}`} style={{ flexDirection: "row", flexWrap: "wrap", gap: 6 }}>
|
|
44
54
|
{options.map(([value, label]) => <Pressable key={value} accessibilityRole="radio" accessibilityLabel={label} aria-checked={event === value} accessibilityState={{ checked: event === value, disabled: busy }} disabled={busy} onPress={() => { setEvent(value); }}
|
|
45
|
-
style={
|
|
55
|
+
style={chip(event === value)}>
|
|
46
56
|
<Text style={{ fontSize: 12, fontWeight: "600", color: event === value ? c.accentForeground : c.foreground }}>{label}</Text>
|
|
47
57
|
</Pressable>)}
|
|
48
58
|
</View>
|
|
59
|
+
{event === "at" && <View style={{ gap: 8 }}>
|
|
60
|
+
{before && <Text style={t.meta}>{before} Pick a new time to send it again.</Text>}
|
|
61
|
+
{/* Quick picks fill the field: small outlined buttons, never a second selected state beside the trigger choice. */}
|
|
62
|
+
<View style={{ flexDirection: "row", flexWrap: "wrap", gap: 6 }}>
|
|
63
|
+
{choices.map(ch => <Pressable key={ch.label} accessibilityRole="button" accessibilityLabel={`${ch.label}: fill in ${localTimeText(ch.at)}`} disabled={busy} hitSlop={compact ? 0 : 6} onPress={() => setWhen(localTimeText(ch.at))}
|
|
64
|
+
style={state => ({ minHeight: compact ? 44 : 26, justifyContent: "center", paddingHorizontal: 9, borderRadius: 6, borderWidth: 1, borderColor: c.border, opacity: state.pressed ? 0.6 : 1 })}>
|
|
65
|
+
<Text style={{ fontSize: 12, color: c.foreground, fontVariant: ["tabular-nums"] }}>{ch.label}</Text>
|
|
66
|
+
</Pressable>)}
|
|
67
|
+
</View>
|
|
68
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" }}>
|
|
69
|
+
<TextInput accessibilityLabel="Send at, date and time" value={when} editable={!busy} onChangeText={setWhen} autoCapitalize="none" autoCorrect={false}
|
|
70
|
+
style={{ width: 150, minHeight: compact ? 44 : 32, paddingHorizontal: 10, borderRadius: 6, borderWidth: 1, borderColor: timeProblem ? c.statusDanger : c.border, color: c.foreground, backgroundColor: c.surface1, fontSize: 13, fontVariant: ["tabular-nums"] }} />
|
|
71
|
+
<Text style={[t.meta, timeProblem ? { color: c.statusDanger } : null]}>{timeProblem ?? `Sends ${clockLabel(new Date(at!).toISOString(), Date.now())}, your time`}</Text>
|
|
72
|
+
</View>
|
|
73
|
+
</View>}
|
|
49
74
|
{gated && <>
|
|
50
75
|
<View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
51
76
|
<Text style={t.meta}>Wait</Text>
|
|
@@ -91,7 +116,12 @@ function TaskGlyph({ row, w, colors }: { row: TaskViewRow; w: Workspace; colors:
|
|
|
91
116
|
case "blocked": return <Icon name="CirclePause" size={14} color={muted} />;
|
|
92
117
|
case "after-pr": return <Icon name="GitPullRequest" size={14} color={muted} />;
|
|
93
118
|
case "recheck": return <Icon name="CalendarClock" size={14} color={muted} />;
|
|
94
|
-
case "scheduled":
|
|
119
|
+
case "scheduled":
|
|
120
|
+
if (row.status.tone === "queued" || row.status.tone === "sent") return <DeliveryGlyph state={row.status.tone} w={w} colors={colors} />;
|
|
121
|
+
// A time trigger that couldn't go out is the developer's to notice (amber, its own shape); one that went out is a send.
|
|
122
|
+
if (row.o.trigger?.event === "at" && row.o.trigger.notSent) return <Icon name="CircleAlert" size={14} color={staleColor(colors)} />;
|
|
123
|
+
if (row.o.trigger?.event === "at" && row.o.trigger.sentAt) return <Icon name="Send" size={14} color={muted} />;
|
|
124
|
+
return <Icon name="Clock" size={14} color={muted} />;
|
|
95
125
|
case "needs-you": return <Icon name={linkedQuestion(row.o, w)?.need === "action" ? "Hand" : "MessageCircleQuestion"} size={14} color={muted} />;
|
|
96
126
|
default: return <Dot color={muted} />;
|
|
97
127
|
}
|
|
@@ -100,7 +130,7 @@ function TaskGlyph({ row, w, colors }: { row: TaskViewRow; w: Workspace; colors:
|
|
|
100
130
|
/** The meta line: "Stale" in amber, the rest muted; everything else muted. */
|
|
101
131
|
function MetaLine({ row, theme }: { row: TaskViewRow; theme: Theme }) {
|
|
102
132
|
const c = theme.colors; const t = text(c);
|
|
103
|
-
if (row.kind !== "stale") return <Text style={[t.meta, { fontVariant: ["tabular-nums"] }]}>{row.meta}</Text>;
|
|
133
|
+
if (row.kind !== "stale" && !row.meta.startsWith(DIDNT_GO_OUT)) return <Text style={[t.meta, { fontVariant: ["tabular-nums"] }]}>{row.meta}</Text>;
|
|
104
134
|
const [word, ...rest] = row.meta.split(" · ");
|
|
105
135
|
return <Text style={[t.meta, { fontVariant: ["tabular-nums"] }]}><Text style={{ color: staleColor(c), fontWeight: "600" }}>{word}</Text>{rest.length ? ` · ${rest.join(" · ")}` : ""}</Text>;
|
|
106
136
|
}
|
package/client/updates.tsx
CHANGED
|
@@ -14,9 +14,9 @@ import { Spinner } from "./motion";
|
|
|
14
14
|
import { Disclosure } from "./settings-shell";
|
|
15
15
|
import { withAlpha } from "./theme";
|
|
16
16
|
import { OptionCard } from "./questions";
|
|
17
|
-
import { ReleaseNotesSheet, VersionNotes, releaseNotesKey } from "./release-notes";
|
|
17
|
+
import { ReleaseNotesSheet, VersionNotes, releaseNotesKey, updatesKey } from "./release-notes";
|
|
18
18
|
|
|
19
|
-
export
|
|
19
|
+
export { updatesKey };
|
|
20
20
|
|
|
21
21
|
/** The server's updates view. Reading it never asks the registry; `check` does (rate-limited on the server). */
|
|
22
22
|
export function useUpdates(check?: "settings") {
|
|
@@ -140,8 +140,8 @@ export function UpdatesSections({ theme, compact }: { theme: Theme; compact: boo
|
|
|
140
140
|
const c = theme.colors; const t = text(c);
|
|
141
141
|
const query = useUpdates("settings");
|
|
142
142
|
const write = useRpc(setUpdatesRpc); const cache = useQueryClient(); const toast = useToast();
|
|
143
|
-
//
|
|
144
|
-
const [sheet, setSheet] = useState
|
|
143
|
+
// What's new: every version in one scroll, opened at the newest, from the status card or Release notes.
|
|
144
|
+
const [sheet, setSheet] = useState(false);
|
|
145
145
|
// The What's new gate reads the switch from the release notes view, so a change refreshes that too.
|
|
146
146
|
const save = useMutation({ mutationFn: (input: UpdatesChange) => write(input), onSuccess: (v, input) => { cache.setQueryData(updatesKey, v); if (input.enable_whats_new != null) void cache.invalidateQueries({ queryKey: releaseNotesKey }); }, onError: e => toast.error(errorText(e)) });
|
|
147
147
|
const view = query.data;
|
|
@@ -149,7 +149,7 @@ export function UpdatesSections({ theme, compact }: { theme: Theme; compact: boo
|
|
|
149
149
|
if (!view) return <SettingsSection title="Updates"><Text accessibilityRole="alert" style={{ color: c.statusDanger }}>{query.error ? errorText(query.error) : "Couldn't load updates."}</Text></SettingsSection>;
|
|
150
150
|
return <View style={{ gap: 18 }}>
|
|
151
151
|
<SettingsSection title="Updates">
|
|
152
|
-
<StatusCard view={view} theme={theme} compact={compact} onWhatsNew={() => setSheet(
|
|
152
|
+
<StatusCard view={view} theme={theme} compact={compact} onWhatsNew={() => setSheet(true)} />
|
|
153
153
|
<MoveLine view={view} theme={theme} compact={compact} />
|
|
154
154
|
</SettingsSection>
|
|
155
155
|
<SettingsSection title={view.installKind === "npm" ? "How Follow-up updates" : "Release notes"}>
|
|
@@ -171,7 +171,7 @@ export function UpdatesSections({ theme, compact }: { theme: Theme; compact: boo
|
|
|
171
171
|
{h.reason && <Text style={t.small}>{h.reason}</Text>}
|
|
172
172
|
</View>)}
|
|
173
173
|
</Disclosure>}
|
|
174
|
-
{sheet
|
|
174
|
+
{sheet && <ReleaseNotesSheet theme={theme} compact={compact} onClose={() => setSheet(false)} />}
|
|
175
175
|
</View>;
|
|
176
176
|
}
|
|
177
177
|
|
package/index.server.ts
CHANGED
|
@@ -109,6 +109,7 @@ import { newWorkspaceTarget, sendReport, type ReportSendDeps } from "./server/re
|
|
|
109
109
|
type ServerInfoClient = { getLastServerInfoMessage?: () => ServerInfo };
|
|
110
110
|
import { inboxAnswer } from "./server/etag";
|
|
111
111
|
import { CheckWatches } from "./server/check-watches";
|
|
112
|
+
import { ScheduledTasks } from "./server/scheduled-tasks";
|
|
112
113
|
import { githubOffChecksAnswer, waitForChecksAnswer } from "./server/wait-for-checks";
|
|
113
114
|
import { jobAgentRunner, type JobPaseo } from "./server/job-agent";
|
|
114
115
|
import { AiJobs } from "./server/ai-jobs";
|
|
@@ -265,6 +266,17 @@ export default function contribute(server: PluginServerContext) {
|
|
|
265
266
|
},
|
|
266
267
|
});
|
|
267
268
|
engine.checkWatches = checkWatches;
|
|
269
|
+
// Scheduled tasks (a-scheduled-task-arrives-once-at-its-time): a task's time trigger goes out once, at its time,
|
|
270
|
+
// Auto-send or not; the agent is read the same way as for a checks verdict (no load).
|
|
271
|
+
const scheduledTasks = new ScheduledTasks({
|
|
272
|
+
snapshot: () => store.snapshot(),
|
|
273
|
+
mutateWorkspace: (id, work) => store.mutateWorkspace(id, work),
|
|
274
|
+
agent: async id => {
|
|
275
|
+
const a = gateway.directory.cached(id) ?? (await gateway.directory.read({ fresh: "agents" })).agents.find(r => r.agent.id === id)?.agent;
|
|
276
|
+
return a ? { status: a.status, archived: !!a.archivedAt, workspaceId: a.workspaceId ?? null } : null;
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
engine.scheduledTasks = scheduledTasks;
|
|
268
280
|
engine.wording = { reviewFix: repo => commandName(prWorkflow.reviewFix(repo)) };
|
|
269
281
|
actions.settleTasks = w => engine.settleTasks(w);
|
|
270
282
|
const governor = new Governor();
|
|
@@ -379,6 +391,7 @@ export default function contribute(server: PluginServerContext) {
|
|
|
379
391
|
const queue = new MessageQueue(directory, { deliverTo: (target, text, messageId, by, images) => gateway.deliverTo(target, text, messageId, by, images), arrived: (agentId, messageId, since, marker) => gateway.arrivedMessage(agentId, messageId, since, marker), probe: () => gateway.probe() }, { health: writeHealth, images: imageStore });
|
|
380
392
|
engine.attachQueue(queue);
|
|
381
393
|
checkWatches.attachQueue(queue);
|
|
394
|
+
scheduledTasks.attachQueue(queue);
|
|
382
395
|
inbox.attachQueue(queue);
|
|
383
396
|
// Overseer forwards and reports handed to an agent: no record of their own, so the queue item is their status
|
|
384
397
|
// (follow_queue_list). Archived agents cancel, with the reason on the item.
|
|
@@ -1221,21 +1234,21 @@ export default function contribute(server: PluginServerContext) {
|
|
|
1221
1234
|
// What's new and Settings → General. Follow-up's own install comes from Paseo's plugin list, read once per worker.
|
|
1222
1235
|
const versions = new VersionsStore(directory);
|
|
1223
1236
|
const updatesStore = new UpdatesStore(directory);
|
|
1224
|
-
let self: Promise<SelfInstall & { name: string | null; notes: ReleaseNote[] }> | null = null;
|
|
1237
|
+
let self: Promise<SelfInstall & { name: string | null; notes: ReleaseNote[]; releases: string | null }> | null = null;
|
|
1225
1238
|
const selfInstall = () => self ??= withDaemon(async c => describeSelf(await c.listPlugins?.() ?? [])).then(async row => {
|
|
1226
|
-
const pkg = row.path ? await readPackage(row.path) : { version: null, name: null, notes: [] };
|
|
1239
|
+
const pkg = row.path ? await readPackage(row.path) : { version: null, name: null, notes: [], releases: null };
|
|
1227
1240
|
const version = pkg.version ?? row.version;
|
|
1228
1241
|
if (!version) throw new Error("Paseo's plugin list doesn't show Follow-up's version yet.");
|
|
1229
1242
|
// Fresh or existing comes from setup's own record, decided once before anything else wrote state.
|
|
1230
1243
|
const existing = await onboarding.init().then(f => f.install === "existing", () => true);
|
|
1231
1244
|
await versions.started(version, existing).catch(() => undefined);
|
|
1232
|
-
return { ...row, version, name: pkg.name, notes: pkg.notes };
|
|
1245
|
+
return { ...row, version, name: pkg.name, notes: pkg.notes, releases: pkg.releases };
|
|
1233
1246
|
}).catch(error => { self = null; throw error; });
|
|
1234
1247
|
// Record the version at start (in the background), so "Updated to X 2h ago" counts from the reload, not first view.
|
|
1235
1248
|
void ready.then(() => selfInstall()).catch(() => undefined);
|
|
1236
1249
|
const releaseNotesView = async (): Promise<ReleaseNotesView> => {
|
|
1237
1250
|
const [me, file, updates] = await Promise.all([selfInstall(), versions.read(), updatesStore.read()]);
|
|
1238
|
-
return demoOverride(directory, "release-notes", releaseNotesViewSchema, { version: me.version, name: me.name ?? PLUGIN_NAME, installKind: me.installKind, previous: file.previous ?? null, updatedAt: file.startedAt ?? null, hostSeen: file.hostSeen ?? null, enable_whats_new: updates.enable_whats_new !== false, notes: me.notes });
|
|
1251
|
+
return demoOverride(directory, "release-notes", releaseNotesViewSchema, { version: me.version, name: me.name ?? PLUGIN_NAME, installKind: me.installKind, previous: file.previous ?? null, updatedAt: file.startedAt ?? null, hostSeen: file.hostSeen ?? null, enable_whats_new: updates.enable_whats_new !== false, notes: me.notes, releases: me.releases });
|
|
1239
1252
|
};
|
|
1240
1253
|
handle(rpc.releaseNotesRpc, async () => releaseNotesView());
|
|
1241
1254
|
handle(rpc.whatsNewSeenRpc, async ({ version }) => { await versions.seen(version); return releaseNotesView(); });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"description": "Every agent, one inbox. Follow-up brings what all your coding agents need from you into one ranked list, and follows their work through merge, deploy and after.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|