paseo-follow-up 2.5.0 → 2.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OVERVIEW.md +1 -1
- package/README.md +0 -1
- package/client/brief-since.tsx +4 -3
- package/client/catch-up.tsx +56 -15
- package/client/header.tsx +5 -3
- package/client/home-data.ts +3 -1
- package/client/home-list.tsx +19 -11
- package/client/home-view.ts +8 -1
- package/client/home.tsx +29 -10
- package/client/keys.ts +2 -0
- package/client/kit.tsx +5 -2
- package/client/large.tsx +5 -3
- package/client/live.tsx +4 -3
- package/client/merge-button.tsx +3 -2
- package/client/messages.tsx +5 -1
- package/client/more-context.tsx +17 -4
- package/client/morning-brief-settings.tsx +5 -4
- package/client/needs-you.tsx +5 -4
- package/client/new-settings.tsx +8 -7
- package/client/now-lines.tsx +60 -0
- package/client/onboarding.tsx +55 -123
- package/client/paged-list.tsx +115 -0
- package/client/panel.tsx +24 -8
- package/client/pr-stats-settings.tsx +3 -2
- package/client/pr-stats.tsx +10 -10
- package/client/questions.tsx +63 -40
- package/client/release-notes.tsx +10 -9
- package/client/reviewers.tsx +8 -3
- package/client/row-open.ts +28 -0
- package/client/section-search.tsx +5 -3
- package/client/settings.tsx +11 -8
- package/client/setup-dialog.tsx +168 -0
- package/client/setup-gate.tsx +69 -0
- package/client/setup-ui.ts +27 -0
- package/client/shipping.tsx +5 -4
- package/client/stacks.tsx +11 -3
- package/client/tasks.tsx +5 -1
- package/client/your-questions.tsx +375 -0
- package/index.client.tsx +11 -3
- package/index.server.ts +162 -32
- package/package.json +1 -1
- package/server/agent-actions.ts +23 -14
- package/server/agent-hook.mjs +7 -5
- package/server/agent-parity.ts +21 -6
- package/server/ai-jobs.ts +26 -5
- package/server/brief-timeline.ts +47 -0
- package/server/context-requests.ts +90 -21
- package/server/directory.ts +6 -0
- package/server/discovery.ts +2 -0
- package/server/engine.ts +3 -0
- package/server/hook-source.ts +7 -5
- package/server/inbox-classifier.ts +17 -0
- package/server/inbox.ts +9 -3
- package/server/job-agent.ts +13 -2
- package/server/mcp-source.ts +23 -15
- package/server/mcp.mjs +23 -15
- package/server/obligations.ts +4 -1
- package/server/session-prompt.ts +30 -3
- package/server/turn-end.ts +133 -0
- package/server/wait-jobs.ts +18 -2
- package/server/wait.ts +17 -12
- package/shared/activity.ts +2 -1
- package/shared/agent-settings.ts +9 -8
- package/shared/catch-up.ts +65 -20
- package/shared/chat.ts +2 -2
- package/shared/compass.ts +5 -4
- package/shared/contracts.ts +52 -8
- package/shared/history.ts +160 -0
- package/shared/home-keys.ts +1 -0
- package/shared/home.ts +54 -8
- package/shared/job-rows.ts +2 -2
- package/shared/list.ts +4 -1
- package/shared/message-sender.ts +2 -0
- package/shared/model.ts +8 -0
- package/shared/new-name.ts +4 -1
- package/shared/now.ts +228 -0
- package/shared/onboarding.ts +17 -13
- package/shared/paged.ts +96 -0
- package/shared/provider-support.ts +83 -34
- package/shared/recommend.ts +1 -1
- package/shared/settings-nav.ts +3 -1
- package/shared/setup-popup.ts +28 -0
- package/shared/sort.ts +8 -1
- package/shared/status.ts +3 -1
- package/shared/wait.ts +2 -2
- package/shared/your-questions.ts +133 -0
- package/skills/follow-up/SKILL.md +1 -1
package/client/kit.tsx
CHANGED
|
@@ -182,7 +182,9 @@ export function Card({ theme, icon, title, tone = "plain", count, right, childre
|
|
|
182
182
|
const accent = tone === "attention" ? c.statusWarning : tone === "success" ? c.statusSuccess : null;
|
|
183
183
|
const head = { flexDirection: "row", alignItems: "center", gap: compact ? 8 : 7, paddingHorizontal: compact ? 14 : 12, paddingTop: 10, paddingBottom: fold && !fold.open ? 10 : 8, minHeight: compact ? 44 : undefined } as const;
|
|
184
184
|
const inner = <>
|
|
185
|
-
{
|
|
185
|
+
{/* The icon never shrinks: a header whose title, tabs and search run wider than the card (Activity on a narrow
|
|
186
|
+
panel) squeezed it to a sliver, a stray mark before the title. */}
|
|
187
|
+
<View style={{ flexShrink: 0 }}>{typeof icon === "string" ? <Icon name={icon} size={compact ? 16 : 14} color={accent ?? c.foregroundMuted} /> : <Icon icon={icon} size={compact ? 16 : 14} color={accent ?? c.foregroundMuted} />}</View>
|
|
186
188
|
{search ?? <>
|
|
187
189
|
<Text accessibilityRole="header" style={{ color: accent ?? c.foreground, fontSize: compact ? 14 : 13, lineHeight: compact ? 20 : 18, fontWeight: "600" }}>{title}</Text>
|
|
188
190
|
{count !== undefined && count !== "" && <Chip theme={theme} color={accent ?? c.foregroundMuted} label={String(count)} />}
|
|
@@ -191,7 +193,8 @@ export function Card({ theme, icon, title, tone = "plain", count, right, childre
|
|
|
191
193
|
{fold && <Icon name={fold.open ? "ChevronUp" : "ChevronDown"} size={14} color={c.foregroundMuted} />}
|
|
192
194
|
</>}
|
|
193
195
|
</>;
|
|
194
|
-
|
|
196
|
+
// dataSet: a paged list inside turns its page back to this card's header (client/paged-list.tsx, toListStart).
|
|
197
|
+
return <View {...({ dataSet: { pagedTop: "1" } } as object)} style={[{ marginHorizontal: compact ? 16 : 12, marginTop: 12, borderRadius: 8, overflow: "hidden", backgroundColor: c.surface0 },
|
|
195
198
|
accent ? { borderWidth: 1, borderColor: withAlpha(accent, 0.7) } : raised(c), style]}>
|
|
196
199
|
{fold ? <Pressable accessibilityRole="button" aria-expanded={fold.open} accessibilityState={{ expanded: fold.open }} accessibilityLabel={`${title}: ${fold.label}. ${fold.open ? "Hide" : "Show"} them`} onPress={fold.onToggle}
|
|
197
200
|
style={state => ({ ...head, backgroundColor: state.pressed ? c.surface2 : (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>{inner}</Pressable>
|
package/client/large.tsx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { InboxStore } from "./inbox-store";
|
|
1
2
|
import { useEffect } from "react";
|
|
2
3
|
import { Platform, View } from "react-native";
|
|
3
4
|
import { Text } from "./text";
|
|
4
5
|
import { type PluginScreenProps } from "@getpaseo/plugin/client";
|
|
5
6
|
import { useWorkspace } from "./workspace-data";
|
|
6
7
|
import type { LiveStore } from "./live";
|
|
8
|
+
import type { PaseoWorkspaces } from "./home-data";
|
|
7
9
|
import { Button, Card, CardRow, errorText, text } from "./kit";
|
|
8
10
|
import { Skeleton } from "./motion";
|
|
9
11
|
import { FOLLOW_UP_ICON } from "./follow-up-icon";
|
|
@@ -15,7 +17,7 @@ export const LARGE_SCREEN = "follow-up-workspace";
|
|
|
15
17
|
* The panel opened as a Paseo screen: the host supplies the page, header and close button, and the
|
|
16
18
|
* layout switches to two columns. Collapse (or Esc) returns to the workspace, where the panel still is.
|
|
17
19
|
*/
|
|
18
|
-
export function FollowLarge(props: PluginScreenProps & PanelLinks & { live?: LiveStore }) {
|
|
20
|
+
export function FollowLarge(props: PluginScreenProps & PanelLinks & { live?: LiveStore; /** Paseo's workspace list: the running state Your questions shows. */ paseo?: PaseoWorkspaces; inbox?: InboxStore }) {
|
|
19
21
|
const { theme, layout, params, navigation } = props;
|
|
20
22
|
const workspaceId = params.workspaceId ?? "";
|
|
21
23
|
const c = theme.colors;
|
|
@@ -52,9 +54,9 @@ export function FollowLarge(props: PluginScreenProps & PanelLinks & { live?: Liv
|
|
|
52
54
|
</CardRow>
|
|
53
55
|
</Card>
|
|
54
56
|
</View>;
|
|
55
|
-
return <WorkspaceView theme={theme} layout={layout} host={props.host} navigation={navigation} workspace={w} large
|
|
57
|
+
return <WorkspaceView theme={theme} layout={layout} host={props.host} navigation={navigation} workspace={w} large inbox={props.inbox}
|
|
56
58
|
loadError={query.error ? "Refresh failed. Showing the last saved state." : query.loadError}
|
|
57
|
-
openSettings={props.openSettings} openOverview={props.openOverview} folds={folds}
|
|
59
|
+
openSettings={props.openSettings} openOverview={props.openOverview} folds={folds} paseo={props.paseo}
|
|
58
60
|
top={<PanelTop theme={theme} compact={layout.compact} openOverview={props.openOverview} openSettings={props.openSettings} />}
|
|
59
61
|
resize={navigation ? { icon: "Minimize2", label: "Back to the workspace (Esc)", onPress: back } : null} />;
|
|
60
62
|
}
|
package/client/live.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import { useHomeModel, type HomeSources } from "./home-data";
|
|
|
14
14
|
import { onVisible, whileVisible } from "./visibility";
|
|
15
15
|
import { FOLLOW_UP_ICON, NEED_DOT, needDotBox } from "./follow-up-icon";
|
|
16
16
|
import { WhatsNewGate } from "./release-notes";
|
|
17
|
+
import { SetupGate } from "./setup-gate";
|
|
17
18
|
import { ViewSync } from "./view-store";
|
|
18
19
|
import { ToastHost } from "./toasts";
|
|
19
20
|
import { newer, opened } from "./live-copies";
|
|
@@ -113,15 +114,15 @@ export function headerIcon(store: LiveStore) {
|
|
|
113
114
|
* mounted, that view already lists the same agents right below, so the badge hides and the item stays as the
|
|
114
115
|
* way into the full screen.
|
|
115
116
|
*/
|
|
116
|
-
export function sidebarItem(sources: HomeSources, screenId: string) {
|
|
117
|
+
export function sidebarItem(sources: HomeSources, screenId: string, links: { openSettings?: (category?: string) => void } = {}) {
|
|
117
118
|
return function FollowSidebarItem({ currentScreen, openScreen, theme, layout }: PluginSidebarItemProps) {
|
|
118
119
|
// The same counts as Home's status strip and the brief headline.
|
|
119
120
|
const count = homeCounts(useHomeModel(sources)).needs;
|
|
120
121
|
const inSidebarView = useSidebarViewActive();
|
|
121
122
|
const c = theme.colors;
|
|
122
123
|
const shown = count > 0 && !inSidebarView;
|
|
123
|
-
// What's new
|
|
124
|
-
return <><ViewSync /><WhatsNewGate surface="sidebar" theme={theme} compact={layout.compact} /><ToastHost theme={theme} compact={layout.compact} /><SidebarRow icon={FOLLOW_UP_ICON} active={currentScreen?.screenId === screenId} onPress={() => openScreen({ screenId, params: { section: "needs" } })}
|
|
124
|
+
// What's new and setup's popup mount here too (the sidebar is always there), so they show even if you live in agent chats.
|
|
125
|
+
return <><ViewSync /><WhatsNewGate surface="sidebar" theme={theme} compact={layout.compact} /><SetupGate surface="sidebar" theme={theme} compact={layout.compact} deps={{ openSettings: links.openSettings, openHome: () => openScreen({ screenId }) }} /><ToastHost theme={theme} compact={layout.compact} /><SidebarRow icon={FOLLOW_UP_ICON} active={currentScreen?.screenId === screenId} onPress={() => openScreen({ screenId, params: { section: "needs" } })}
|
|
125
126
|
trailing={shown ? <View accessibilityLabel={`${count} need${count === 1 ? "s" : ""} you`} style={{ minWidth: 18, height: 18, paddingHorizontal: 5, borderRadius: 9, alignItems: "center", justifyContent: "center", backgroundColor: c.statusWarning }}>
|
|
126
127
|
<Text style={{ color: c.surface0, fontSize: 11, lineHeight: 14, fontWeight: "700", fontVariant: ["tabular-nums"] }}>{count}</Text>
|
|
127
128
|
</View> : undefined} /></>;
|
package/client/merge-button.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useState, type ReactNode } from "react";
|
|
2
|
+
import { PagedRows } from "./paged-list";
|
|
2
3
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
3
4
|
import { useToast } from "@getpaseo/plugin/client/ui";
|
|
4
5
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
@@ -97,9 +98,9 @@ export function HeldMerges({ workspace: w, theme, compact, now = Date.now(), fra
|
|
|
97
98
|
if (!held.length) return null;
|
|
98
99
|
const c = theme.colors; const t = text(c, compact);
|
|
99
100
|
return <PrLinksProvider prs={prLinksByNumber(w.prs)}><View accessibilityRole="summary" style={framed ? { paddingHorizontal: 12, paddingVertical: 8, borderTopWidth: 1, borderTopColor: c.border, gap: 6 } : { gap: 6 }}>
|
|
100
|
-
{held
|
|
101
|
+
<PagedRows items={held} theme={theme} compact={compact} noun="PRs" row={h => <View key={h.pr.key} style={{ flexDirection: "row", gap: 8 }}>
|
|
101
102
|
<View style={{ paddingTop: 2 }}><Icon name="Clock" size={13} color={c.foregroundMuted} /></View>
|
|
102
103
|
<RichText linkColor={c.foreground} style={[t.meta, { flex: 1 }]}>{h.line}</RichText>
|
|
103
|
-
</View>
|
|
104
|
+
</View>} />
|
|
104
105
|
</View></PrLinksProvider>;
|
|
105
106
|
}
|
package/client/messages.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { controlRpc, sendRpc } from "../shared/contracts";
|
|
|
9
9
|
import { messageStrip, repairRows, shortTitle, type MessageStrip, type RepairRow } from "../shared/task-rows";
|
|
10
10
|
import { SETTLE_REASON } from "../shared/send-decision";
|
|
11
11
|
import { Button, Card, Chip, Switch, text, type Theme } from "./kit";
|
|
12
|
+
import { usePagedList } from "./paged-list";
|
|
12
13
|
import { tint } from "./theme";
|
|
13
14
|
import type { Colors } from "./theme";
|
|
14
15
|
import { RichText } from "./rich-text";
|
|
@@ -153,12 +154,15 @@ export function MessagesCard({ workspace: w, theme, compact, openAgent, now = Da
|
|
|
153
154
|
const [preview, setPreview] = useState(false);
|
|
154
155
|
const strip = messageStrip(w, now);
|
|
155
156
|
const repairs = repairRows(w);
|
|
157
|
+
// A broken stack can hold hundreds of repairs: page them (client/paged-list.tsx), the strip stays on top.
|
|
158
|
+
const page = usePagedList({ items: repairs.open, theme, compact, noun: "repairs" });
|
|
156
159
|
if (!strip && !repairs.open.length) return null;
|
|
157
160
|
const repairRow = repairs.open.find(r => r.task.key === repair) ?? null;
|
|
158
161
|
// The card's title and icon say what it is; the strip under it says to whom, how many, when and why.
|
|
159
162
|
return <Card theme={theme} compact={compact} icon="Send" title="Messages to the agent">
|
|
160
163
|
{strip && <StripRow strip={strip} w={w} theme={theme} compact={compact} onPreview={() => setPreview(true)} openAgent={openAgent} />}
|
|
161
|
-
{
|
|
164
|
+
{page.shown.map(r => <RepairTaskRow key={r.task.key} row={r} w={w} theme={theme} compact={compact} onOpen={() => setRepair(r.task.key)} />)}
|
|
165
|
+
{page.footer}
|
|
162
166
|
<RepairSheet row={repairRow} w={w} strip={strip} theme={theme} compact={compact} onClose={() => setRepair(null)} />
|
|
163
167
|
<PreviewSheet open={preview} w={w} strip={strip} theme={theme} compact={compact} onClose={() => setPreview(false)} />
|
|
164
168
|
</Card>;
|
package/client/more-context.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import { Pressable, Text } from "./text";
|
|
|
10
10
|
import { Icon, TextInput } from "@getpaseo/plugin/client/ui";
|
|
11
11
|
import { CONTEXT_ASKS, askHeadline, contextFor, keyLabel, questionCardKey, type ContextRequest } from "../shared/catch-up";
|
|
12
12
|
import type { RpcInput } from "@getpaseo/plugin";
|
|
13
|
-
import type { contextAskRpc } from "../shared/contracts";
|
|
13
|
+
import type { contextAskRpc, questionActionRpc } from "../shared/contracts";
|
|
14
14
|
import type { ListQuestion, ListWorkspace } from "../shared/list";
|
|
15
15
|
import { errorText } from "../shared/errors";
|
|
16
16
|
import { Button, IconButton, text, type Theme } from "./kit";
|
|
@@ -31,6 +31,8 @@ export type ContextSource = {
|
|
|
31
31
|
context(): ContextRequest[];
|
|
32
32
|
subscribe(listener: () => void): () => void;
|
|
33
33
|
askContext(input: RpcInput<typeof contextAskRpc>): Promise<{ request: ContextRequest }>;
|
|
34
|
+
/** Your questions' acts (follow.question-action): the store takes the result at once. */
|
|
35
|
+
questionAction?(input: RpcInput<typeof questionActionRpc>): Promise<{ request: ContextRequest; reply?: ContextRequest; taskId?: string }>;
|
|
34
36
|
/** Reads the asks once. A 0.15 host has no feed, and the store starts empty, so a fresh panel would miss an ask. */
|
|
35
37
|
refreshContext?(): Promise<void>;
|
|
36
38
|
};
|
|
@@ -42,11 +44,17 @@ export function setContextSource(next: ContextSource | null): void { source = ne
|
|
|
42
44
|
const noAsks: ContextRequest[] = [];
|
|
43
45
|
const idle = () => () => undefined;
|
|
44
46
|
|
|
45
|
-
/** The
|
|
46
|
-
export function
|
|
47
|
+
/** The one store (or null before the client set it), and every question in it, kept current by the home feed. */
|
|
48
|
+
export function useContextStore(): { source: ContextSource | null; requests: ContextRequest[] } {
|
|
47
49
|
const current = useSyncExternalStore(l => { sourceListeners.add(l); return () => { sourceListeners.delete(l); }; }, () => source, () => source);
|
|
48
50
|
const requests = useSyncExternalStore(current?.subscribe ?? idle, current?.context ?? (() => noAsks), current?.context ?? (() => noAsks));
|
|
49
51
|
useEffect(() => { if (current && !read.has(current)) { read.add(current); void current.refreshContext?.().catch(() => undefined); } }, [current]);
|
|
52
|
+
return { source: current, requests };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The newest ask about one question, from any surface, and the way to ask. Null `ask` when no source is set. */
|
|
56
|
+
export function useQuestionContext(workspaceId: string, questionId: string): { request: ContextRequest | null; ask: ((words: string, card: string, agentId: string | null, images?: ImageUpload[]) => Promise<ContextRequest>) | null } {
|
|
57
|
+
const { source: current, requests } = useContextStore();
|
|
50
58
|
const cardKey = questionCardKey(workspaceId, questionId);
|
|
51
59
|
const request = contextFor(requests, { workspaceId, cardKey });
|
|
52
60
|
return {
|
|
@@ -123,7 +131,12 @@ export function ContextAnswer({ theme, compact, request, waiting, agent, openCha
|
|
|
123
131
|
<RichText plain style={[t.small, { flex: 1 }]}>{asking ? `Asked ${who === "Overseer" ? "the Overseer" : who === "The agent" ? "the agent" : who}${waiting ? " · this comes back as the next card when it answers. You can still act on it now" : onQuestion ? " · the answer shows here when it comes. You can still answer now" : ""}` : `${who} · you asked: ${askHeadline(request.ask)}`}</RichText>
|
|
124
132
|
</View>
|
|
125
133
|
{request.state === "answered" && request.answer && <RichText selectable style={t.body}>{request.answer}</RichText>}
|
|
126
|
-
{
|
|
134
|
+
{/* Turn-end capture: the agent ended its turn without context_reply, and its last message after the ask is the answer. */}
|
|
135
|
+
{request.state === "chat" && request.answer && <View style={{ gap: 4 }}>
|
|
136
|
+
<RichText selectable style={t.body}>{request.answer}</RichText>
|
|
137
|
+
<Text style={t.small}>From its chat: the agent answered there, not with a reply here.</Text>
|
|
138
|
+
</View>}
|
|
139
|
+
{request.state === "chat" && !request.answer && <View style={{ gap: 8 }}>
|
|
127
140
|
<Text style={t.body}>{who === "Overseer" ? "The Overseer answered in its own chat, not here: it can't reply on a card." : `${who} answered in its chat.`}</Text>
|
|
128
141
|
{/* A 2.2.0-beta.3 ask of the Overseer: its answer is in the Overseer's chat (an-ask-goes-only-to-an-agent-that-can-answer-it). */}
|
|
129
142
|
<View style={{ flexDirection: "row" }}>{who === "Overseer"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState, type ReactNode } from "react";
|
|
2
|
+
import { PagedRows } from "./paged-list";
|
|
2
3
|
import { ActivityIndicator, TextInput, View } from "react-native";
|
|
3
4
|
import { openExternalUrl, useRpc } from "@getpaseo/plugin/client";
|
|
4
5
|
import { Icon, SettingsAction, SettingsCard, SettingsSection, SettingsSelect, SettingsSwitch, copyText, useToast } from "@getpaseo/plugin/client/ui";
|
|
@@ -100,7 +101,7 @@ function InputRows({ view, sources, theme, compact }: { view: BriefSettingsView;
|
|
|
100
101
|
{used.length > 0 && <View style={{ paddingHorizontal: compact ? 14 : 12, paddingTop: 12, paddingBottom: 2, borderTopWidth: 1, borderTopColor: c.border }}>
|
|
101
102
|
<Text style={[t.meta, { color: c.foreground, fontWeight: "600" }]}>Built in</Text>
|
|
102
103
|
</View>}
|
|
103
|
-
{[...used, ...askable]
|
|
104
|
+
<PagedRows items={[...used, ...askable]} theme={theme} compact={compact} noun="sources" row={(row, i) => <View key={row.id}>
|
|
104
105
|
{i === used.length && <View style={{ paddingHorizontal: compact ? 14 : 12, paddingTop: 12, paddingBottom: 2, borderTopWidth: 1, borderTopColor: c.border, gap: 2 }}>
|
|
105
106
|
<Text style={[t.meta, { color: c.foreground, fontWeight: "600" }]}>Other servers on mcpproxy</Text>
|
|
106
107
|
<Text style={t.meta}>No recipe fits these. Preview one to see what a fast model would pick out for you.</Text>
|
|
@@ -110,7 +111,7 @@ function InputRows({ view, sources, theme, compact }: { view: BriefSettingsView;
|
|
|
110
111
|
previewing={data!.previewing.includes(row.id) || pending?.preview === row.id}
|
|
111
112
|
onToggle={on => change.mutate({ on: { [row.id]: on } })} onRetry={() => change.mutate({ retry: row.id })} onCheck={() => change.mutate({ check: true })} onCopy={toastCopy}
|
|
112
113
|
onPreview={() => change.mutate({ preview: row.id })} />
|
|
113
|
-
</View>
|
|
114
|
+
</View>} />
|
|
114
115
|
</>;
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -135,10 +136,10 @@ function ConnectionsSection({ sources, theme, compact }: { sources: SourcesState
|
|
|
135
136
|
<Text style={t.meta}>{`${notRead.length} more on mcpproxy Follow-up can't read`}</Text>
|
|
136
137
|
<Icon name={showNotRead ? "ChevronUp" : "ChevronDown"} size={13} color={c.foregroundMuted} />
|
|
137
138
|
</Pressable>
|
|
138
|
-
{showNotRead && notRead
|
|
139
|
+
{showNotRead && <PagedRows items={notRead} theme={theme} compact={compact} noun="servers" row={row => <View key={row.id} style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "baseline", columnGap: 6 }}>
|
|
139
140
|
<Text style={[t.meta, MONO, { color: c.foreground }]}>{row.label}</Text>
|
|
140
141
|
<Text style={t.meta}>{row.detail ?? row.adds}</Text>
|
|
141
|
-
</View>
|
|
142
|
+
</View>} />}
|
|
142
143
|
</View>}
|
|
143
144
|
<View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 8 }}>
|
|
144
145
|
<Button title="Check sources again" icon="RotateCcw" theme={theme} compact={compact} loading={checking} onPress={() => change.mutate({ check: true })} />
|
package/client/needs-you.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PagedRows } from "./paged-list";
|
|
1
2
|
import { sendButton } from "../shared/send-words";
|
|
2
3
|
import { FINISH_ASK } from "../shared/status";
|
|
3
4
|
import { View, type StyleProp, type ViewStyle } from "react-native";
|
|
@@ -159,7 +160,7 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
159
160
|
? <Button theme={theme} compact={compact} kind="ghost" icon="RotateCcw" title={compact ? "Hand back" : "Hand back to agent"} accessibilityLabel={`Hand it back to ${agentName(w)}: ${item.title}`} loading={retryTask.isPending} disabled={busy} onPress={() => retryTask.mutate(item.taskKey)} />
|
|
160
161
|
: null;
|
|
161
162
|
return <PrLinksProvider prs={prLinksByNumber(w.prs)}><View>
|
|
162
|
-
{items
|
|
163
|
+
<PagedRows items={items} theme={theme} compact={compact} noun="items" row={(item, index) => {
|
|
163
164
|
const g = glyph(item, c);
|
|
164
165
|
// A row about one PR opens it in one click, beside its action and never instead of it.
|
|
165
166
|
// A person part's own action is Open #N, so it doesn't draw the link a second time.
|
|
@@ -219,7 +220,7 @@ export function NeedsYouList({ workspace: w, theme, compact, actions, now = Date
|
|
|
219
220
|
<View style={{ marginTop: -3, marginRight: flush ? 2 : -5 }}>{x}</View>
|
|
220
221
|
</RevealScope>
|
|
221
222
|
</CardRow>;
|
|
222
|
-
}
|
|
223
|
+
}} />
|
|
223
224
|
</View></PrLinksProvider>;
|
|
224
225
|
}
|
|
225
226
|
|
|
@@ -264,10 +265,10 @@ export function NeedsYouBlock({ workspace: w, theme, compact, actions, now, brie
|
|
|
264
265
|
// In Later the block stays (its moves still work) but reads Later, without the attention border.
|
|
265
266
|
const later = workspaceSnoozed(w, all, now) && w.snooze ? laterLabel(w.snooze.until, now) : null;
|
|
266
267
|
return <Card theme={theme} compact={compact} icon={later ? "AlarmClock" : asked ? "Check" : "CircleAlert"} title={later ? `Later ${later}` : asked ? "Reviewers requested" : "Needs you"} tone={later || !count ? "plain" : "attention"} count={count || undefined} style={style}>
|
|
267
|
-
{block.cards
|
|
268
|
+
<PagedRows items={block.cards} theme={theme} compact={compact} noun="questions" row={card => card.kind === "brief"
|
|
268
269
|
? <View key="brief" style={{ borderTopWidth: 1, borderTopColor: theme.colors.border }}>{briefCard}</View>
|
|
269
270
|
: <QuestionAsk key={card.questionId} workspace={w} questionId={card.questionId} context={card.brief ? brief?.context ?? null : null} theme={theme} compact={compact} now={now} openAgent={actions.openAgent}
|
|
270
|
-
open={openId === undefined ? card.expanded : openId === card.questionId} onToggle={() => setOpenId(id => (id === undefined ? (card.expanded ? card.questionId : null) : id) === card.questionId ? null : card.questionId)} />
|
|
271
|
+
open={openId === undefined ? card.expanded : openId === card.questionId} onToggle={() => setOpenId(id => (id === undefined ? (card.expanded ? card.questionId : null) : id) === card.questionId ? null : card.questionId)} />} />
|
|
271
272
|
<NeedsYouList workspace={w} theme={theme} compact={compact} actions={actions} now={now} rows={block.rows} />
|
|
272
273
|
</Card>;
|
|
273
274
|
}
|
package/client/new-settings.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
+
import { PagedRows } from "./paged-list";
|
|
2
3
|
import { NEW_ROW } from "../shared/new-name";
|
|
3
4
|
import { useNewRowSetting } from "./new-entry";
|
|
4
5
|
import { ActivityIndicator, View } from "react-native";
|
|
@@ -49,7 +50,7 @@ function SidebarSection({ theme, compact }: { theme: Theme; compact: boolean })
|
|
|
49
50
|
const row = useNewRowSetting();
|
|
50
51
|
return <SettingsSection title="Sidebar">
|
|
51
52
|
<SettingsCard>
|
|
52
|
-
<SettingsSwitch label={NEW_ROW.label} hint={NEW_ROW.hint(row.key, isMac() ? "⌘K" : "Ctrl K")} value={row.value ?? true} disabled={row.value === null || row.saving} onValueChange={row.set} />
|
|
53
|
+
<SettingsSwitch label={NEW_ROW.label} hint={compact ? NEW_ROW.hint(null, null) : NEW_ROW.hint(row.key, isMac() ? "⌘K" : "Ctrl K")} value={row.value ?? true} disabled={row.value === null || row.saving} onValueChange={row.set} />
|
|
53
54
|
</SettingsCard>
|
|
54
55
|
{row.value !== false && <Text style={[t.meta, { paddingHorizontal: 4 }]}>{NEW_ROW.paseo}</Text>}
|
|
55
56
|
</SettingsSection>;
|
|
@@ -165,7 +166,7 @@ function WhereSection({ theme, compact }: { theme: Theme; compact: boolean }) {
|
|
|
165
166
|
options={[{ value: "last", label: "The project you used last" }, { value: "ask", label: "Ask which project" }]} onValueChange={noTeam => change.mutate({ noTeam })} />
|
|
166
167
|
</SettingsCard>
|
|
167
168
|
<SettingsCard>
|
|
168
|
-
{view.rules
|
|
169
|
+
<PagedRows items={view.rules} theme={theme} compact={compact} noun="rules" row={rule => <View key={rule.team}>
|
|
169
170
|
<SettingsSelect label={`${rule.team} issues`} hint={rule.project ? undefined : "That project is gone: pick another or remove the rule."}
|
|
170
171
|
value={rule.project ? rule.projectId : PICK} disabled={change.isPending}
|
|
171
172
|
options={[...(rule.project ? [] : [{ value: PICK, label: "Pick a project" }]), ...projectOptions]}
|
|
@@ -179,7 +180,7 @@ function WhereSection({ theme, compact }: { theme: Theme; compact: boolean }) {
|
|
|
179
180
|
</>
|
|
180
181
|
: <Button theme={theme} compact={compact} kind="ghost" title="Remove" accessibilityLabel={`Remove ${rule.team}'s rule`} disabled={change.isPending} onPress={() => setRemoving(rule.team)} />}
|
|
181
182
|
</View>
|
|
182
|
-
</View>
|
|
183
|
+
</View>} />
|
|
183
184
|
{!view.rules.length && <View style={{ paddingHorizontal: 16, paddingVertical: 12 }}><Text style={t.meta}>No team rules yet. {NEW_NAME} learns from where each team's work went; add a rule to fix one.</Text></View>}
|
|
184
185
|
{/* Three native rows, never one row of nested fields: a select squeezed beside an input cuts "Pick a project". */}
|
|
185
186
|
<SettingsRow label="Add a rule" hint="A Linear team's key, like ACME.">
|
|
@@ -189,10 +190,10 @@ function WhereSection({ theme, compact }: { theme: Theme; compact: boolean }) {
|
|
|
189
190
|
<SettingsAction label={!key ? "Type a team key and pick its project" : project === PICK ? `Pick ${key}'s project` : `${key} issues → ${projectOptions.find(o => o.value === project)?.label ?? project}`}
|
|
190
191
|
actionLabel="Add rule" disabled={!key || project === PICK || change.isPending} onPress={add} />
|
|
191
192
|
</SettingsCard>
|
|
192
|
-
{learnedTeams(view)
|
|
193
|
+
<PagedRows items={learnedTeams(view)} theme={theme} compact={compact} noun="teams" row={l => <SettingsCard key={l.team}>
|
|
193
194
|
<SettingsAction label={`${l.team} → ${l.project}`} hint={`Learned: ${l.count} ${l.team} workspaces started there.`} actionLabel="Make it a rule" disabled={change.isPending}
|
|
194
195
|
onPress={() => change.mutate({ rules: { [l.team]: l.projectId } })} />
|
|
195
|
-
</SettingsCard>
|
|
196
|
+
</SettingsCard>} />
|
|
196
197
|
</>}
|
|
197
198
|
</SettingsSection>;
|
|
198
199
|
}
|
|
@@ -213,8 +214,8 @@ function BasesSection({ theme, compact }: { theme: Theme; compact: boolean }) {
|
|
|
213
214
|
const worktrees = view.projects.filter(p => p.worktree);
|
|
214
215
|
return <SettingsSection title="Bases" info="The branch a new worktree starts from. Empty: the repository's default branch. The dialog can change it for one start; that saves it here too.">
|
|
215
216
|
<SettingsCard>
|
|
216
|
-
{worktrees
|
|
217
|
-
onSave={(base, done) => change.mutate({ bases: { [p.id]: base || null } }, { onSuccess: done })} />
|
|
217
|
+
<PagedRows items={worktrees} theme={theme} compact={compact} noun="projects" row={p => <BaseRow key={p.id} theme={theme} compact={compact} name={p.name} saved={view.bases.find(b => b.projectId === p.id)?.base ?? ""} busy={change.isPending}
|
|
218
|
+
onSave={(base, done) => change.mutate({ bases: { [p.id]: base || null } }, { onSuccess: done })} />} />
|
|
218
219
|
{!worktrees.length && <View style={{ paddingHorizontal: 16, paddingVertical: 12 }}><Text style={t.meta}>{`No project here is a git repository, so ${NEW_NAME} opens work in place.`}</Text></View>}
|
|
219
220
|
</SettingsCard>
|
|
220
221
|
</SettingsSection>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { View } from "react-native";
|
|
2
|
+
import { Pressable, Text } from "./text";
|
|
3
|
+
import type { InboxStore } from "./inbox-store";
|
|
4
|
+
import { useInbox } from "./inbox";
|
|
5
|
+
import { focusRing, text, type Theme } from "./kit";
|
|
6
|
+
import { Spinner } from "./motion";
|
|
7
|
+
import { runningColor } from "./theme";
|
|
8
|
+
import type { Workspace } from "../shared/model";
|
|
9
|
+
import { positionText, workspaceNow, type Now } from "../shared/now";
|
|
10
|
+
import type { InboxRow } from "../shared/inbox";
|
|
11
|
+
|
|
12
|
+
const NO_INBOX = { subscribe: () => () => undefined, version: () => 0, rows: () => [] } as unknown as InboxStore;
|
|
13
|
+
const NO_ROWS: readonly InboxRow[] = [];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* What each agent in the workspace is working on now (shared/now.ts), one row per agent, main agent first: the work
|
|
17
|
+
* ("Capping the retry gap", its place "2 of 4" when the agent listed its steps), then who and its state ("Main agent ·
|
|
18
|
+
* working 6m"). Nothing stated: one line, who and the state ("Main agent · working 1h"). No label, no placeholder, no live stream: it reads the
|
|
19
|
+
* record and the inbox rows the panel already has. A row opens that agent's chat.
|
|
20
|
+
*/
|
|
21
|
+
export function AgentLines({ workspace: w, inbox, theme, compact, now, openAgent }: { workspace: Workspace; inbox?: InboxStore; theme: Theme; compact: boolean; now: number; openAgent?: (agentId: string) => void }) {
|
|
22
|
+
const c = theme.colors;
|
|
23
|
+
const rows = useInbox(inbox ?? NO_INBOX, () => inbox?.rows() ?? NO_ROWS);
|
|
24
|
+
// A contributor that has closed has nothing to say here; the main agent always has its row.
|
|
25
|
+
// Nothing known about an agent (no work, an unknown state): no row, never a placeholder.
|
|
26
|
+
const lines = workspaceNow(w, rows, now).filter(n => (n.role === "main" || n.state.kind !== "closed") && (n.work || n.state.text));
|
|
27
|
+
const names = new Map(rows.map(r => [r.agentId, r.title]));
|
|
28
|
+
if (!lines.length) return null;
|
|
29
|
+
return <View style={{ marginHorizontal: compact ? 16 : 12, marginTop: 12, borderRadius: 8, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface1, overflow: "hidden" }}>
|
|
30
|
+
{lines.map((n, i) => <AgentLine key={n.agentId} n={n} who={n.role === "main" ? "Main agent" : names.get(n.agentId)?.trim() || w.taskAgents?.[n.agentId]?.title?.trim() || "Another agent"} first={i === 0} theme={theme} compact={compact} openAgent={openAgent} />)}
|
|
31
|
+
</View>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function AgentLine({ n, who, first, theme, compact, openAgent }: { n: Now; who: string; first: boolean; theme: Theme; compact: boolean; openAgent?: (agentId: string) => void }) {
|
|
35
|
+
const c = theme.colors; const t = text(c, compact);
|
|
36
|
+
// Running is Home's running mark (the spinner in runningColor), never green: green is idle in Paseo's sidebar.
|
|
37
|
+
const running = n.state.kind === "working" || n.state.kind === "compacting";
|
|
38
|
+
const tone = n.state.kind === "permission" || n.state.kind === "asking" ? c.statusWarning : c.foregroundMuted;
|
|
39
|
+
const position = positionText(n.work);
|
|
40
|
+
const state = n.state.text ? n.state.text.charAt(0).toLowerCase() + n.state.text.slice(1) : null;
|
|
41
|
+
// The work leads, with who and the state under it. Nothing stated: the state is the only line ("Main agent · working 1h").
|
|
42
|
+
const head = n.work ? n.work.text : [who, state].filter(Boolean).join(" · ");
|
|
43
|
+
const meta = n.work ? [who, state].filter(Boolean).join(" · ") : null;
|
|
44
|
+
const label = [who, n.work?.text, position, n.state.text].filter(Boolean).join(". ");
|
|
45
|
+
return <Pressable accessibilityRole={openAgent ? "button" : undefined} accessibilityLabel={label} accessibilityHint={openAgent ? "Opens this agent's chat" : undefined} disabled={!openAgent}
|
|
46
|
+
onPress={() => openAgent?.(n.agentId)}
|
|
47
|
+
style={state => ({ ...focusRing((state as { focused?: boolean }).focused, c, true), flexDirection: "row", alignItems: meta ? "flex-start" : "center", gap: 10, paddingHorizontal: compact ? 14 : 12, paddingVertical: compact ? 12 : 9, minHeight: compact ? 56 : 0,
|
|
48
|
+
borderTopWidth: first ? 0 : 1, borderTopColor: c.border, backgroundColor: (state as { hovered?: boolean }).hovered || state.pressed ? c.surface2 : "transparent" })}>
|
|
49
|
+
<View style={{ width: 12, height: compact ? 20 : 18, alignItems: "center", justifyContent: "center" }}>
|
|
50
|
+
{running ? <Spinner color={runningColor(c)} size={12} label="Running" /> : <View style={{ width: 8, height: 8, borderRadius: 4, backgroundColor: tone }} />}
|
|
51
|
+
</View>
|
|
52
|
+
<View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
53
|
+
<View style={{ flexDirection: "row", alignItems: "flex-start", gap: 8 }}>
|
|
54
|
+
<Text numberOfLines={2} style={[t.body, { flex: 1, minWidth: 0 }]}>{head}</Text>
|
|
55
|
+
{position && <Text style={[t.meta, { paddingTop: compact ? 2 : 1 }]}>{position}</Text>}
|
|
56
|
+
</View>
|
|
57
|
+
{meta && <Text numberOfLines={2} style={t.meta}>{meta}</Text>}
|
|
58
|
+
</View>
|
|
59
|
+
</Pressable>;
|
|
60
|
+
}
|