paseo-follow-up 2.6.0-beta.1 → 2.6.0-beta.11
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 +14 -0
- package/OVERVIEW.md +1 -5
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/client/agent-card.tsx +216 -0
- package/client/agents.tsx +21 -1
- package/client/brief-since.tsx +6 -4
- package/client/brief.tsx +82 -32
- package/client/catch-up.tsx +82 -24
- package/client/chat-seen.tsx +56 -0
- package/client/chat.tsx +2 -2
- package/client/compass-settings.tsx +11 -9
- package/client/composers.ts +40 -0
- package/client/display.tsx +25 -4
- package/client/dock.ts +31 -0
- package/client/docked-pane.tsx +10 -50
- package/client/draft-text.ts +39 -0
- package/client/field.tsx +83 -0
- package/client/floating-surface.tsx +79 -0
- package/client/fold.tsx +49 -0
- package/client/grow.ts +46 -0
- package/client/header.tsx +22 -9
- package/client/hint.tsx +60 -0
- package/client/home-chrome.tsx +141 -51
- package/client/home-data.ts +45 -2
- package/client/home-list.tsx +142 -42
- package/client/home-view.ts +44 -14
- package/client/home.tsx +124 -47
- package/client/image-attach.tsx +24 -6
- package/client/inbox-store.ts +37 -1
- package/client/keyboard.tsx +159 -0
- package/client/keys.ts +2 -0
- package/client/kit.tsx +51 -20
- package/client/large.tsx +18 -50
- package/client/linked.tsx +6 -4
- package/client/live.tsx +44 -8
- package/client/merge-button.tsx +3 -2
- package/client/messages.tsx +13 -4
- package/client/more-context.tsx +26 -11
- package/client/morning-brief-settings.tsx +14 -11
- package/client/needs-you.tsx +38 -16
- package/client/new-settings.tsx +11 -9
- package/client/new.tsx +13 -18
- package/client/now-lines.tsx +80 -0
- package/client/on-screen.tsx +43 -0
- package/client/onboarding.tsx +8 -7
- package/client/open-link.ts +56 -0
- package/client/paged-list.tsx +115 -0
- package/client/pane-allowlist.ts +0 -2
- package/client/panel.tsx +172 -52
- package/client/pending-answers.ts +74 -14
- package/client/pill.tsx +6 -13
- package/client/pr-sheet.tsx +5 -3
- package/client/pr-stats-settings.tsx +8 -6
- package/client/pr-stats.tsx +10 -10
- package/client/question-context.tsx +64 -0
- package/client/questions.tsx +117 -93
- package/client/release-notes.tsx +13 -11
- package/client/rename.tsx +3 -2
- package/client/reply-draft.ts +93 -0
- package/client/report-issue.tsx +27 -8
- package/client/review-mode.tsx +3 -2
- package/client/reviewers.tsx +14 -7
- package/client/rich-text.tsx +2 -2
- package/client/row-actions.ts +14 -4
- package/client/row-menu.tsx +7 -23
- package/client/row-open.ts +28 -0
- package/client/scroll-allowlist.ts +1 -0
- package/client/search-key.ts +4 -7
- package/client/section-search.tsx +5 -3
- package/client/settings-shell.tsx +9 -15
- package/client/settings.tsx +43 -18
- package/client/shared-read.ts +22 -0
- package/client/shipping.tsx +8 -6
- package/client/sidebar-view.tsx +30 -10
- package/client/spec.tsx +9 -5
- package/client/stacks.tsx +35 -18
- package/client/tasks.tsx +21 -16
- package/client/theme.ts +0 -8
- package/client/toast-store.ts +22 -0
- package/client/turn-view.tsx +503 -0
- package/client/updates.tsx +3 -2
- package/client/visibility.ts +6 -0
- package/client/why-it-matters.tsx +5 -3
- package/client/workspace-data.ts +33 -4
- package/client/your-questions.tsx +431 -0
- package/docs/screenshots/follow-up-slide-1-cover.png +0 -0
- package/docs/screenshots/follow-up-slide-2-decision.png +0 -0
- package/docs/screenshots/follow-up-slide-3-overseer.png +0 -0
- package/docs/screenshots/follow-up-slide-4-repairs.png +0 -0
- package/docs/screenshots/follow-up-slide-5-deploy.png +0 -0
- package/docs/screenshots/follow-up-slide-6-catch-up.png +0 -0
- package/index.client.tsx +39 -21
- package/index.server.ts +286 -71
- package/package.json +12 -6
- package/paseo-plugin.json +1 -1
- package/scripts/build.mjs +5 -2
- package/scripts/inline.mjs +22 -0
- package/server/agent-actions.ts +81 -27
- package/server/agent-hook.mjs +128 -156
- package/server/agent-parity.ts +32 -9
- package/server/agent-settings.ts +15 -0
- package/server/bounded-reply.ts +42 -0
- package/server/brief-timeline.ts +47 -0
- package/server/check-watches.ts +8 -7
- package/server/compass.ts +5 -0
- package/server/context-requests.ts +133 -21
- package/server/daemon.ts +62 -6
- package/server/directory.ts +9 -1
- package/server/discovery.ts +4 -1
- package/server/engine.ts +158 -10
- package/server/feeds.ts +25 -10
- package/server/github.ts +22 -7
- package/server/hook-source.ts +672 -156
- package/server/inbox-classifier.ts +17 -0
- package/server/inbox-directory.ts +1 -1
- package/server/inbox.ts +33 -3
- package/server/list-cache.ts +29 -11
- package/server/mcp-source.ts +332 -73
- package/server/mcp.d.mts +9 -6
- package/server/mcp.mjs +164 -73
- package/server/native-tools.ts +23 -10
- package/server/obligations.ts +10 -7
- package/server/outside-answers.ts +132 -0
- package/server/outside-runs/index.ts +75 -0
- package/server/outside-runs/progress.ts +150 -0
- package/server/outside-runs/turn-print.ts +21 -0
- package/server/overseer-prompt-source.ts +2 -2
- package/server/overseer-prompt.md +2 -2
- package/server/questions.ts +5 -3
- package/server/report-issue/github.ts +40 -2
- package/server/report-issue/index.ts +107 -20
- package/server/report-issue-adapter.ts +125 -5
- package/server/report-send.ts +3 -3
- package/server/rpc-timing.ts +15 -4
- package/server/scheduled-tasks.ts +10 -8
- package/server/scopes.ts +26 -4
- package/server/session-prompt.ts +48 -22
- package/server/tasks.ts +2 -1
- package/server/transcript.ts +70 -1
- package/server/turn-end.ts +52 -32
- package/server/turn-events.ts +8 -3
- package/server/turn-timeline.ts +35 -11
- package/server/wait-jobs.ts +28 -4
- package/server/wait-runner-source.ts +1 -1
- package/server/wait-runner.sh +1 -1
- package/shared/activity.ts +4 -2
- package/shared/agent-settings.ts +10 -2
- package/shared/agent-text.d.mts +34 -0
- package/shared/agent-text.mjs +152 -0
- package/shared/ask-shape.ts +28 -0
- package/shared/attention.ts +28 -9
- package/shared/brief.ts +38 -15
- package/shared/catch-up.ts +68 -20
- package/shared/chat.ts +14 -8
- package/shared/check-watch.ts +18 -3
- package/shared/contracts.ts +80 -15
- package/shared/daemon-url.d.mts +2 -0
- package/shared/daemon-url.mjs +12 -0
- package/shared/dispatch.ts +19 -3
- package/shared/display.ts +84 -14
- package/shared/finished.ts +20 -0
- package/shared/floating.ts +38 -0
- package/shared/follow-up.ts +2 -1
- package/shared/grow.ts +15 -0
- package/shared/headline.ts +17 -1
- package/shared/history.ts +208 -0
- package/shared/home-arrange.ts +99 -0
- package/shared/home-keys.ts +1 -0
- package/shared/home.ts +96 -20
- package/shared/inbox.ts +11 -0
- package/shared/issue-workspace.ts +25 -3
- package/shared/linear-queue.ts +7 -0
- package/shared/link-open.ts +26 -0
- package/shared/list-entries.ts +34 -7
- package/shared/list.ts +67 -3
- package/shared/message-sender.ts +1 -1
- package/shared/model.ts +44 -5
- package/shared/now.ts +274 -0
- package/shared/optimistic-answers.ts +79 -0
- package/shared/outside-run.ts +144 -0
- package/shared/overseer.ts +4 -3
- package/shared/paged.ts +96 -0
- package/shared/peek.ts +131 -0
- package/shared/placeholder-fit.ts +65 -0
- package/shared/pr-actions.ts +2 -1
- package/shared/pr-status.ts +61 -0
- package/shared/presentation.ts +3 -23
- package/shared/progress-run.d.mts +32 -0
- package/shared/progress-run.mjs +243 -0
- package/shared/questions.ts +7 -1
- package/shared/reopen.ts +50 -0
- package/shared/reply-draft.ts +38 -0
- package/shared/report-send.ts +20 -1
- package/shared/row-menu.ts +14 -1
- package/shared/search.ts +13 -0
- package/shared/send-decision.ts +37 -4
- package/shared/settings-nav.ts +17 -0
- package/shared/sort.ts +14 -1
- package/shared/status-invariants.ts +45 -3
- package/shared/status.ts +3 -1
- package/shared/task-due.ts +9 -20
- package/shared/task-dup.ts +27 -1
- package/shared/task-rows.ts +20 -3
- package/shared/task-status.ts +2 -1
- package/shared/turn-checks.d.mts +42 -0
- package/shared/turn-checks.mjs +144 -0
- package/shared/turn-clamp.ts +8 -0
- package/shared/turn.ts +239 -0
- package/shared/workspace-layout.ts +62 -0
- package/shared/your-questions.ts +215 -0
- package/skills/follow-up/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.1 (2026-11-28)
|
|
6
|
+
|
|
7
|
+
One fix for 2.5.0.
|
|
8
|
+
|
|
9
|
+
- **Follow-up keeps working with Tailscale on.** With Tailscale on, Paseo listens on more than one address and Follow-up's tools failed to connect. Follow-up now uses Paseo's main address.
|
|
10
|
+
|
|
11
|
+
<details><summary>Full changelog since 2.5.0</summary>
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- Fixed Follow-up’s tools failing after turning on Tailscale in Paseo. Follow-up now connects to the main address when the host listens on several addresses.
|
|
16
|
+
|
|
17
|
+
</details>
|
|
18
|
+
|
|
5
19
|
## 2.5.0 (2026-11-26)
|
|
6
20
|
|
|
7
21
|
Send a task at the time you pick, and read every release in one scroll.
|
package/OVERVIEW.md
CHANGED
|
@@ -26,11 +26,7 @@ you, in one place, ranked.
|
|
|
26
26
|
|
|
27
27
|
It never merges, requests reviewers, archives, answers a question for you or wakes a resting agent on its own.
|
|
28
28
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
paseo plugin install npm:paseo-follow-up
|
|
33
|
-
```
|
|
29
|
+
## Requirements
|
|
34
30
|
|
|
35
31
|
You need Paseo 0.15 or later and Node 22+ on the machine Paseo runs on. A signed-in GitHub CLI there is optional and
|
|
36
32
|
turns on the PR features. Then open Follow-up in Paseo's sidebar: a two-minute setup walks you through the rest.
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ your attention instead. The work comes to you, in one place, ranked.
|
|
|
14
14
|
|
|
15
15
|
<img alt="Follow-up: Every agent, one inbox. Home lists every workspace by what it needs from you, with an agent's question and its lettered options open beside the list" src="https://raw.githubusercontent.com/tomgrin10/paseo-follow-up/main/docs/screenshots/follow-up-slide-1-cover.png">
|
|
16
16
|
|
|
17
|
-
[](https://cdn.jsdelivr.net/gh/tomgrin10/paseo-follow-up@4b3fc08b7c8176d751c83c37ca471f61db4001ec/docs/screenshots/follow-up-demo-v2.mp4)
|
|
18
18
|
|
|
19
19
|
36 seconds: Home, Catch up, automatic follow-ups, the Overseer.
|
|
20
20
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -8,6 +8,10 @@ options, a recommendation and Copy) and the activity log are adapted from
|
|
|
8
8
|
[Progress](https://github.com/stevecastaneda/paseo-plugins/tree/main/progress) (`@stevecastaneda/paseo-progress`
|
|
9
9
|
1.14.0) by Steve Castaneda.
|
|
10
10
|
|
|
11
|
+
Follow-up's reader of a Progress run (`shared/progress-run.mjs`, docs/outside-runs.md) ports parts of Progress 1.17.1
|
|
12
|
+
under the same license: the run file's line format and event checks, the latest-run and per-workspace rules
|
|
13
|
+
(`latestRun`, `workspaceView`, `folderRunLeftBehind`), the stuck rule and the answer message (`answerMessage`).
|
|
14
|
+
|
|
11
15
|
```
|
|
12
16
|
MIT License
|
|
13
17
|
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { View, type NativeScrollEvent, type NativeSyntheticEvent, type ScrollView as NativeScrollView } from "react-native";
|
|
3
|
+
import { Icon, ScrollView } from "@getpaseo/plugin/client/ui";
|
|
4
|
+
import { usePaseo } from "@getpaseo/plugin/client";
|
|
5
|
+
import { Pressable, Text } from "./text";
|
|
6
|
+
import type { InboxStore } from "./inbox-store";
|
|
7
|
+
import { useInbox } from "./inbox";
|
|
8
|
+
import { AgentLines } from "./now-lines";
|
|
9
|
+
import { FoldButton, PANEL_FOLDS, useFold } from "./fold";
|
|
10
|
+
import { HintBubble, HintIcon, useHint } from "./hint";
|
|
11
|
+
import { ReplyBox } from "./home";
|
|
12
|
+
import { TurnView, useTurn } from "./turn-view";
|
|
13
|
+
import { useMarkTimelineOnScreen } from "./on-screen";
|
|
14
|
+
import { Spinner } from "./motion";
|
|
15
|
+
import { PrLinksProvider } from "./rich-text";
|
|
16
|
+
import { prLinksByNumber } from "../shared/presentation";
|
|
17
|
+
import { raised, runningColor, type Colors } from "./theme";
|
|
18
|
+
import type { Theme } from "./kit";
|
|
19
|
+
import type { Workspace } from "../shared/model";
|
|
20
|
+
import type { InboxRow } from "../shared/inbox";
|
|
21
|
+
import { MAX_TURNS, turnSource, type Turn } from "../shared/turn";
|
|
22
|
+
import { useChatBeside } from "./composers";
|
|
23
|
+
import { IconButton } from "./kit";
|
|
24
|
+
|
|
25
|
+
/** Where the workspace view is mounted. Only two things differ by place: the head's own controls and the reply box. */
|
|
26
|
+
export type ViewPlace = "home" | "panel" | "tab";
|
|
27
|
+
|
|
28
|
+
const NO_INBOX = { subscribe: () => () => undefined, version: () => 0, rows: () => [] } as unknown as InboxStore;
|
|
29
|
+
const NO_ROWS: readonly InboxRow[] = [];
|
|
30
|
+
|
|
31
|
+
export const STEPS_HINT = "The agent's chat: live while it's awake, or its saved chat while it's asleep, so it isn't woken.";
|
|
32
|
+
const HOME_REPLY_HINT = " Sending clears Needs you; Sign off & next moves on without a reply.";
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The agent card (docs/client.md#the-workspace-view): one row per agent (client/now-lines.tsx), then the Chat section (the
|
|
36
|
+
* peek's rows, client/turn-view.tsx: the developer's messages, the agent's replies, steps grouped) and the reply box
|
|
37
|
+
* right under them, so reading and replying are one place. A row switches the steps and the box to its agent; Cmd/Ctrl
|
|
38
|
+
* opens its chat. The Chat section reads live while shown and an unloaded agent's saved transcript otherwise, never waking
|
|
39
|
+
* it (invariant 1). Its fold (the arrow on the Chat section line) folds the steps and the box; the rows stay.
|
|
40
|
+
*
|
|
41
|
+
* The side panel (`place` "panel") sits beside the workspace's chat, so it never draws the reply box and its Recent
|
|
42
|
+
* steps start folded; the developer's own fold choice wins everywhere (invariant 132). Home's pane and the main tab mark
|
|
43
|
+
* the selected agent's timeline as on screen while its steps show, so its status-line peek stays shut.
|
|
44
|
+
*/
|
|
45
|
+
export function AgentCard({ workspace: w, inbox, theme, compact, steps, now, place, openAgent, onSent, reply }: {
|
|
46
|
+
workspace: Workspace; inbox?: InboxStore; theme: Theme; compact: boolean;
|
|
47
|
+
/** How many rows of steps the layout tier shows (shared/workspace-layout.ts). */
|
|
48
|
+
steps: number; now: number; place: ViewPlace;
|
|
49
|
+
openAgent?: (agentId: string) => void;
|
|
50
|
+
/** After a reply went out (Home refreshes its inbox rows). */
|
|
51
|
+
onSent?: () => void;
|
|
52
|
+
/** Draw the reply box under the Chat section: never in the side panel, and not on a phone's Home, whose dock has it. */
|
|
53
|
+
reply: boolean;
|
|
54
|
+
}) {
|
|
55
|
+
const c = theme.colors;
|
|
56
|
+
const rows = useInbox(inbox ?? NO_INBOX, () => inbox?.rows() ?? NO_ROWS);
|
|
57
|
+
const [selected, setSelected] = useState(w.mainAgentId);
|
|
58
|
+
// A new main agent (Make main agent, a claim) moves the card to it.
|
|
59
|
+
useEffect(() => { setSelected(w.mainAgentId); }, [w.mainAgentId]);
|
|
60
|
+
const name = selected === w.mainAgentId ? "the main agent" : rows.find(r => r.agentId === selected)?.title?.trim() || w.taskAgents?.[selected]?.title?.trim() || "the agent";
|
|
61
|
+
const pick = (agentId: string, chat: boolean) => { if (chat && openAgent) openAgent(agentId); else setSelected(agentId); };
|
|
62
|
+
const [hintOpen, setHintOpen] = useState(false);
|
|
63
|
+
// Beside that same agent's chat (the side panel next to Paseo's agent view), Chat would repeat what's on screen, so
|
|
64
|
+
// the card keeps its agent rows and leaves Chat out (a-chat-beside-isn-t-repeated). Another agent's Chat still shows.
|
|
65
|
+
const beside = useChatBeside(place === "panel" ? selected : null);
|
|
66
|
+
return <View style={[{ marginHorizontal: compact ? 16 : 12, marginTop: 12, borderRadius: 8, overflow: hintOpen ? "visible" : "hidden", zIndex: hintOpen ? 30 : undefined, backgroundColor: c.surface0 }, raised(c)]}>
|
|
67
|
+
<AgentLines workspace={w} inbox={inbox} theme={theme} compact={compact} now={now} openAgent={openAgent} peek={place === "panel"} bare selected={selected} onSelect={pick} />
|
|
68
|
+
{!beside && <View style={{ borderTopWidth: 1, borderTopColor: c.border }}>
|
|
69
|
+
<RecentSteps agentId={selected} name={name} theme={theme} compact={compact} steps={steps} place={place} reply={reply} prs={w.prs} onSent={onSent} onHint={setHintOpen} openAgent={openAgent} />
|
|
70
|
+
</View>}
|
|
71
|
+
</View>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The Chat section for one agent, with its fold, its ? hint and (when `reply`) the reply box under it: the agent card's
|
|
76
|
+
* lower half, and on its own in Home's pane for a row with no workspace and for the Overseer. Never wakes the agent.
|
|
77
|
+
*/
|
|
78
|
+
export function RecentSteps({ agentId, name, theme, compact, steps, place, reply, prs = [], onSent, onHint, empty, openAgent }: {
|
|
79
|
+
agentId: string | null; name: string; theme: Theme; compact: boolean; steps: number; place: ViewPlace; reply: boolean;
|
|
80
|
+
prs?: Workspace["prs"]; onSent?: () => void;
|
|
81
|
+
/** The ? hint opened or closed (the card lets it draw past its edge). */
|
|
82
|
+
onHint?: (open: boolean) => void;
|
|
83
|
+
/** What an empty turn says; the default points at the reply box or the chat. */
|
|
84
|
+
empty?: string;
|
|
85
|
+
/** Opens the agent's own chat tab (the header's button); the one way the surface already navigates. */
|
|
86
|
+
openAgent?: (agentId: string) => void;
|
|
87
|
+
}) {
|
|
88
|
+
const c = theme.colors;
|
|
89
|
+
const fold = useFold(PANEL_FOLDS.steps, place !== "panel");
|
|
90
|
+
const open = fold.open;
|
|
91
|
+
useMarkTimelineOnScreen(place !== "panel" && open ? agentId : null);
|
|
92
|
+
// How many turns back it reads (Show earlier messages), per agent for the app session, so a remount keeps it.
|
|
93
|
+
const [turns, setTurns] = useState(() => readBack(agentId));
|
|
94
|
+
useEffect(() => { setTurns(readBack(agentId)); }, [agentId]);
|
|
95
|
+
const turn = useTurn(agentId, open, turns);
|
|
96
|
+
const earlier = () => { if (!agentId) return; const next = Math.min(MAX_TURNS, turns + 1); turnsBack.set(agentId, next); setTurns(next); };
|
|
97
|
+
const paseo = usePaseo();
|
|
98
|
+
const [hintOpen, setHintOpen] = useState(false);
|
|
99
|
+
const help = useHint(next => { setHintOpen(next); onHint?.(next); });
|
|
100
|
+
// A failed refresh keeps the rows it has and says so in the caption; with nothing read yet, the error takes their place.
|
|
101
|
+
const stale = !!turn.error && !!turn.turn;
|
|
102
|
+
const caption = stale ? "couldn't refresh" : turn.running ? "live" : turnSource(turn);
|
|
103
|
+
const hint = STEPS_HINT + (place === "home" && reply ? HOME_REPLY_HINT : "");
|
|
104
|
+
return <View style={{ zIndex: hintOpen ? 30 : undefined }}>
|
|
105
|
+
<View style={{ zIndex: hintOpen ? 30 : undefined, flexDirection: "row", alignItems: "center" }}>
|
|
106
|
+
<FoldButton open={open} onToggle={fold.toggle} label={caption ? `Chat, ${caption}` : "Chat"} theme={theme} chevron="end"
|
|
107
|
+
style={(hovered, pressed) => ({ flex: 1, minWidth: 0, flexDirection: "row", alignItems: "center", gap: 7, paddingHorizontal: compact ? 14 : 12, paddingVertical: 8, minHeight: compact ? 44 : undefined, backgroundColor: pressed ? c.surface2 : hovered ? c.surface1 : "transparent" })}>
|
|
108
|
+
<Text numberOfLines={1} style={{ flexShrink: 0, color: c.foreground, fontSize: compact ? 13 : 12, fontWeight: "600" }}>Chat</Text>
|
|
109
|
+
<HintIcon hint={help} text={hint} theme={theme} compact={compact} />
|
|
110
|
+
<View style={{ flex: 1, minWidth: 0, flexDirection: "row", justifyContent: "flex-end", alignItems: "center", gap: 5 }}>
|
|
111
|
+
{turn.running && !stale && <View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: runningColor(c) }} />}
|
|
112
|
+
{!!caption && <Text numberOfLines={1} style={{ flexShrink: 1, color: c.foregroundMuted, fontSize: 12 }}>{caption}</Text>}
|
|
113
|
+
</View>
|
|
114
|
+
</FoldButton>
|
|
115
|
+
{openAgent && agentId && <View style={{ paddingRight: compact ? 4 : 6 }}>
|
|
116
|
+
<IconButton icon="Maximize2" label={`Open ${name}'s chat`} theme={theme} compact={compact} tooltip onPress={() => openAgent(agentId)} />
|
|
117
|
+
</View>}
|
|
118
|
+
<HintBubble hint={help} text={hint} theme={theme} />
|
|
119
|
+
</View>
|
|
120
|
+
{open && <View style={{ paddingHorizontal: compact ? 14 : 12, paddingBottom: reply ? 0 : 12 }}>
|
|
121
|
+
<StepsBody key={agentId ?? ""} height={stepsHeight(steps, compact)} theme={theme} compact={compact} turn={turn.turn} error={turn.turn ? null : turn.error} waiting={!!agentId && !turn.turn && !turn.error}
|
|
122
|
+
empty={empty ?? (reply ? "No messages yet. Write to the agent below, or open its chat." : "No messages yet. Open its chat to write to it.")}
|
|
123
|
+
prs={prs} turns={turns} onEarlier={earlier} />
|
|
124
|
+
</View>}
|
|
125
|
+
{open && reply && agentId && <ReplyBox theme={theme} compact={compact} agentName={name} hint={null} placeholder={`Reply to ${name}`} target={{ kind: "agent", agentId }} draft={agentId}
|
|
126
|
+
onSend={async (text, images) => { await paseo.agents.ref(agentId).send(text, images?.length ? { images } : undefined); onSent?.(); }} />}
|
|
127
|
+
</View>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Turns read back per agent this app session (Show earlier messages), so a remount or a fold keeps the scroll-back. */
|
|
131
|
+
const turnsBack = new Map<string, number>();
|
|
132
|
+
const readBack = (agentId: string | null) => (agentId && turnsBack.get(agentId)) || 1;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The steps' fixed height: from the layout tier's row count (shared/workspace-layout.ts), so it never jumps with what
|
|
136
|
+
* it holds; the rows scroll inside it. A phone gets a little more, its rows wrap sooner.
|
|
137
|
+
*/
|
|
138
|
+
export function stepsHeight(rows: number, compact: boolean): number {
|
|
139
|
+
return Math.round(Math.min(460, Math.max(compact ? 300 : 260, rows * 50)));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Within this many pixels of the end counts as reading the newest step: new rows keep it pinned. */
|
|
143
|
+
const PIN_SLACK = 24;
|
|
144
|
+
/** A quick read draws nothing; the spinner shows only after this, so a cached or fast read never flashes it. */
|
|
145
|
+
const SPINNER_DELAY_MS = 300;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The Chat section's body (invariant 135): one fixed-height scroll, the same for a live turn and a saved one. It opens at the
|
|
149
|
+
* newest step and stays there as steps arrive, unless the developer scrolled up: then a Latest button takes them
|
|
150
|
+
* down. Show earlier messages at the top reads one more turn back (saved transcript or live tail, never waking), and
|
|
151
|
+
* keeps what was on screen where it was.
|
|
152
|
+
*/
|
|
153
|
+
function StepsBody({ height, theme, compact, turn, error, waiting, empty, prs, turns, onEarlier }: {
|
|
154
|
+
height: number; theme: Theme; compact: boolean; turn: Turn | null; error: string | null; waiting: boolean; empty: string;
|
|
155
|
+
prs: Workspace["prs"]; turns: number; onEarlier: () => void;
|
|
156
|
+
}) {
|
|
157
|
+
const c = theme.colors;
|
|
158
|
+
const ref = useRef<NativeScrollView | null>(null);
|
|
159
|
+
const m = useRef({ y: 0, view: 0, content: 0, pinned: true, anchor: null as null | { content: number; y: number } });
|
|
160
|
+
const [fresh, setFresh] = useState(false);
|
|
161
|
+
const [spin, setSpin] = useState(false);
|
|
162
|
+
// Scrolled off the top: a hairline marks the edge, so a line cut there reads as more above, not a glitch.
|
|
163
|
+
const [under, setUnder] = useState(false);
|
|
164
|
+
useEffect(() => { if (!waiting) { setSpin(false); return; } const t = setTimeout(() => setSpin(true), SPINNER_DELAY_MS); return () => clearTimeout(t); }, [waiting]);
|
|
165
|
+
// A read back lands as a new turn object with more rows; until then the control says it's reading.
|
|
166
|
+
const [asked, setAsked] = useState<Turn | null>(null);
|
|
167
|
+
const loadingEarlier = !!asked && asked === turn;
|
|
168
|
+
useEffect(() => { if (asked && asked !== turn) setAsked(null); }, [turn, asked]);
|
|
169
|
+
const onScroll = (e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
170
|
+
const { contentOffset, layoutMeasurement, contentSize } = e.nativeEvent;
|
|
171
|
+
m.current.y = contentOffset.y; m.current.view = layoutMeasurement.height; m.current.content = contentSize.height;
|
|
172
|
+
m.current.pinned = contentOffset.y + layoutMeasurement.height >= contentSize.height - PIN_SLACK;
|
|
173
|
+
if (m.current.pinned && fresh) setFresh(false);
|
|
174
|
+
if ((contentOffset.y > 2) !== under) setUnder(contentOffset.y > 2);
|
|
175
|
+
};
|
|
176
|
+
const onContent = (_w: number, h: number) => {
|
|
177
|
+
const before = m.current.content; m.current.content = h;
|
|
178
|
+
const anchor = m.current.anchor;
|
|
179
|
+
if (anchor && h > anchor.content) { m.current.anchor = null; ref.current?.scrollTo({ y: anchor.y + (h - anchor.content), animated: false }); return; }
|
|
180
|
+
if (m.current.pinned) ref.current?.scrollToEnd({ animated: false });
|
|
181
|
+
else if (h > before + 1) setFresh(true);
|
|
182
|
+
};
|
|
183
|
+
const toEnd = () => { m.current.pinned = true; setFresh(false); ref.current?.scrollToEnd({ animated: true }); };
|
|
184
|
+
const earlier = () => { m.current.anchor = { content: m.current.content, y: m.current.y }; m.current.pinned = false; setAsked(turn); onEarlier(); };
|
|
185
|
+
const note = (text: string) => <View style={{ height, justifyContent: "center" }}><Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 17 }}>{text}</Text></View>;
|
|
186
|
+
if (error) return note(`Couldn't read the steps: ${error}`);
|
|
187
|
+
if (!turn) return <View style={{ height, justifyContent: "center", alignItems: "flex-start" }}>{spin && <Spinner color={c.foregroundMuted} size={12} label="Reading the agent's steps" />}</View>;
|
|
188
|
+
if (turn.empty) return note(empty);
|
|
189
|
+
const more = !!turn.older && turns < MAX_TURNS;
|
|
190
|
+
return <View style={{ height }}>
|
|
191
|
+
<ScrollView ref={ref} style={{ flex: 1 }} contentContainerStyle={{ paddingTop: more ? 0 : 4, paddingBottom: 8, gap: 8 }} onScroll={onScroll} scrollEventThrottle={32}
|
|
192
|
+
onContentSizeChange={onContent} onLayout={e => { m.current.view = e.nativeEvent.layout.height; if (m.current.pinned) ref.current?.scrollToEnd({ animated: false }); }}
|
|
193
|
+
showsVerticalScrollIndicator nestedScrollEnabled {...({ dataSet: { followSteps: "" } } as object)}>
|
|
194
|
+
{more && <EarlierButton c={c} compact={compact} loading={loadingEarlier} onPress={earlier} />}
|
|
195
|
+
<PrLinksProvider prs={prLinksByNumber(prs)}><TurnView turn={turn} theme={theme} compact={compact} full /></PrLinksProvider>
|
|
196
|
+
</ScrollView>
|
|
197
|
+
{under && <View pointerEvents="none" style={{ position: "absolute", left: 0, right: 0, top: 0, height: 1, backgroundColor: c.border }} />}
|
|
198
|
+
{fresh && <View pointerEvents="box-none" style={{ position: "absolute", left: 0, right: 0, bottom: 10, alignItems: "center" }}>
|
|
199
|
+
<Pressable accessibilityRole="button" accessibilityLabel="Go to the latest steps" onPress={toEnd}
|
|
200
|
+
style={state => ({ flexDirection: "row", alignItems: "center", gap: 5, minHeight: compact ? 36 : 28, paddingHorizontal: 12, borderRadius: 999, borderWidth: 1, borderColor: c.border,
|
|
201
|
+
backgroundColor: (state as { hovered?: boolean }).hovered || state.pressed ? c.surface2 : c.surface1, ...raised(c) })}>
|
|
202
|
+
<Icon name="ArrowDown" size={13} color={c.foreground} />
|
|
203
|
+
<Text style={{ color: c.foreground, fontSize: 12, fontWeight: "500" }}>Latest</Text>
|
|
204
|
+
</Pressable>
|
|
205
|
+
</View>}
|
|
206
|
+
</View>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function EarlierButton({ c, compact, loading, onPress }: { c: Colors; compact: boolean; loading: boolean; onPress: () => void }) {
|
|
210
|
+
return <Pressable accessibilityRole="button" accessibilityLabel="Show earlier messages" disabled={loading} onPress={onPress}
|
|
211
|
+
style={state => ({ flexDirection: "row", alignItems: "center", justifyContent: "center", gap: 6, minHeight: compact ? 40 : 30, borderRadius: 6,
|
|
212
|
+
backgroundColor: (state as { hovered?: boolean }).hovered || state.pressed ? c.surface1 : "transparent" })}>
|
|
213
|
+
{loading ? <Spinner color={c.foregroundMuted} size={12} label="Reading earlier messages" /> : <Icon name="ChevronUp" size={13} color={c.foregroundMuted} />}
|
|
214
|
+
<Text style={{ color: c.foregroundMuted, fontSize: 12, fontWeight: "500" }}>{loading ? "Reading earlier messages" : "Show earlier messages"}</Text>
|
|
215
|
+
</Pressable>;
|
|
216
|
+
}
|
package/client/agents.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import type { PluginSurfaceProps } from "@getpaseo/plugin/client";
|
|
|
4
4
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
5
5
|
import { SettingsAction, SettingsCard, SettingsSection, SettingsSelect, SettingsSwitch, useToast } from "@getpaseo/plugin/client/ui";
|
|
6
6
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
|
-
import { agentSettingsRpc, setAgentSettingRpc, setWaitRpc } from "../shared/contracts";
|
|
7
|
+
import { agentSettingsRpc, setAgentSettingRpc, setOutsideRunsRpc, setWaitRpc } from "../shared/contracts";
|
|
8
8
|
import { WAIT_HOST_NOTE, WAIT_NOT_ATTACHED, waitNote, waitSwitchCopy } from "../shared/wait";
|
|
9
9
|
import { hasSame, isJobRole, type AgentRole, type AgentSettingsView, type SavedRole } from "../shared/agent-settings";
|
|
10
10
|
import { NO_PROMPT_MODE, SETTINGS_ORDER, isReset, resetEntry } from "../shared/job-rows";
|
|
@@ -78,6 +78,26 @@ export function WaitSettings({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
|
78
78
|
</SettingsSection>;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Settings → Agents → Show Progress runs (docs/outside-runs.md): one switch, on by default, shown only once a Progress
|
|
83
|
+
* file was seen on this host. Shares the Agents screen's query. An unknown format says Follow-up stopped reading it.
|
|
84
|
+
*/
|
|
85
|
+
export function OutsideRunsSettings() {
|
|
86
|
+
const read = useRpc(agentSettingsRpc); const write = useRpc(setOutsideRunsRpc); const cache = useQueryClient(); const toast = useToast();
|
|
87
|
+
const query = useQuery({ queryKey: key, queryFn: () => read({ catalog: true }), staleTime: 5 * 60_000 });
|
|
88
|
+
const change = useMutation({
|
|
89
|
+
mutationFn: (progress: boolean) => write({ progress }),
|
|
90
|
+
onSuccess: value => { cache.setQueryData(key, value); toast.show(`Show Progress runs: ${value.outsideRuns?.enabled ? "on" : "off"}`, { variant: "success" }); },
|
|
91
|
+
onError: error => toast.error(errorText(error)),
|
|
92
|
+
});
|
|
93
|
+
const status = query.data?.outsideRuns;
|
|
94
|
+
if (!status?.seen) return null;
|
|
95
|
+
const hint = status.unknownFormat ? "Progress's file format changed, so Follow-up stopped reading it." : "Progress's tickets, questions and stuck items on the agent line and in Needs you. Progress itself is never changed.";
|
|
96
|
+
return <SettingsSection title="Other plugins">
|
|
97
|
+
<SettingsCard><SettingsSwitch label="Show Progress runs" hint={hint} value={status.enabled} disabled={change.isPending} onValueChange={value => change.mutate(value)} /></SettingsCard>
|
|
98
|
+
</SettingsSection>;
|
|
99
|
+
}
|
|
100
|
+
|
|
81
101
|
/** A row's More in Settings: permissions (Paseo agents), limits and schedule (jobs), and Reset to defaults. */
|
|
82
102
|
function RoleMore({ r, save, busy, theme, compact, invalid }: { r: Role; save: (entry: SavedRole | null) => void; busy: boolean; theme: Theme; compact: boolean; invalid: boolean }) {
|
|
83
103
|
const c = theme.colors; const t = text(c);
|
package/client/brief-since.tsx
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { queueMoved } from "../shared/linear-queue";
|
|
1
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { PagedRows } from "./paged-list";
|
|
2
4
|
import { Platform, View } from "react-native";
|
|
3
5
|
import { Pressable, Text } from "./text";
|
|
4
6
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
@@ -119,7 +121,7 @@ export function SinceBlock({ theme, compact, openQueue, onStarted, navigation, r
|
|
|
119
121
|
const { view, error, reload } = useQueueView({ open: true });
|
|
120
122
|
// The home feed's queue revision moved (a sweep ended, or a dismissal): an open brief pane re-reads, no timer.
|
|
121
123
|
const seen = useRef(revision);
|
|
122
|
-
useEffect(() => {
|
|
124
|
+
useEffect(() => { const moved = queueMoved(seen.current, revision); seen.current = revision; if (moved) void reload(); }, [revision, reload]);
|
|
123
125
|
const actions = useActions();
|
|
124
126
|
if (error && !view) return <View style={{ gap: 4, marginTop: 6 }}>
|
|
125
127
|
<Text accessibilityRole="header" style={t.section}>Your Linear queue</Text>
|
|
@@ -261,7 +263,7 @@ export function QueueScreen({ theme, compact, onHome, navigation }: { theme: The
|
|
|
261
263
|
{view && !view.groups.length && <Text style={t.meta}>{filter === "all" ? "Nothing is assigned to you in the queue's states." : filter === "changed" ? "Nothing changed since you last read the brief." : "Every issue in your queue has a workspace."}</Text>}
|
|
262
264
|
{view?.groups.map(g => <View key={g.priority} style={{ gap: 0 }}>
|
|
263
265
|
<Text accessibilityRole="header" style={[t.section, { marginTop: 8 }]}>{g.name} · {g.count}</Text>
|
|
264
|
-
{g.issues
|
|
266
|
+
<PagedRows items={g.issues} resetKey={filter} theme={theme} compact={compact} noun="issues" row={i => <QueueRow key={i.key} i={i} change={changes.get(i.key)} c={c} compact={compact} timeZone={tz} navigation={navigation} />} />
|
|
265
267
|
</View>)}
|
|
266
268
|
</ScrollView>;
|
|
267
269
|
}
|
|
@@ -281,7 +283,7 @@ export function NobodyRows({ theme, compact, data, onDismissed }: { theme: Theme
|
|
|
281
283
|
// pushes the new list on the home feed; without the feed, onDismissed reads it once.
|
|
282
284
|
const dismiss = useDismiss(onDismissed);
|
|
283
285
|
const now = Date.now();
|
|
284
|
-
return
|
|
286
|
+
return <PagedRows items={data.needs} theme={theme} compact={compact} noun="issues" row={r => {
|
|
285
287
|
const row = nobodyRow(r, now, data.timeZone);
|
|
286
288
|
const first = r.reasons[0]!;
|
|
287
289
|
const reason = <PriorityLine reason={first.line} source={first.from === "compass" ? { kind: "compass", label: first.source } : { kind: "linear", label: first.source }} c={c} size={compact ? 12 : 11} lines={compact ? 2 : 1} />;
|
|
@@ -317,5 +319,5 @@ export function NobodyRows({ theme, compact, data, onDismissed }: { theme: Theme
|
|
|
317
319
|
</View>
|
|
318
320
|
</>}
|
|
319
321
|
</RevealScope>;
|
|
320
|
-
}
|
|
322
|
+
}} />;
|
|
321
323
|
}
|