paseo-follow-up 2.6.0-beta.10 → 2.6.0-beta.12
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/THIRD_PARTY_NOTICES.md +4 -0
- package/client/action-row.tsx +16 -9
- package/client/agent-card.tsx +130 -27
- package/client/agents.tsx +46 -3
- package/client/brief.tsx +10 -7
- package/client/card-blocks.tsx +622 -0
- package/client/card-data.ts +118 -0
- package/client/card-viewer.tsx +106 -0
- package/client/catch-up.tsx +36 -14
- package/client/chat-seen.tsx +56 -0
- package/client/chat.tsx +2 -2
- package/client/composers.ts +40 -0
- package/client/dialog-frame.tsx +41 -0
- package/client/dismiss.tsx +2 -1
- package/client/draft-text.ts +39 -0
- package/client/grow.ts +46 -0
- package/client/header.tsx +7 -9
- package/client/hint.tsx +10 -5
- package/client/home-chrome.tsx +86 -21
- package/client/home-list.tsx +59 -26
- package/client/home-view.ts +10 -2
- package/client/home.tsx +98 -111
- package/client/image-attach.tsx +24 -6
- package/client/kept.ts +47 -0
- package/client/kit.tsx +30 -14
- package/client/linked.tsx +5 -2
- package/client/live.tsx +3 -0
- package/client/messages.tsx +10 -3
- package/client/more-context.tsx +18 -9
- package/client/morning-brief-settings.tsx +3 -1
- package/client/motion.tsx +12 -0
- package/client/needs-you.tsx +28 -12
- package/client/new.tsx +81 -42
- package/client/now-lines.tsx +8 -6
- package/client/on-screen.tsx +1 -1
- package/client/onboarding.tsx +1 -1
- package/client/open-steps.ts +9 -0
- package/client/panel-menu.tsx +6 -3
- package/client/panel.tsx +59 -33
- package/client/pill.tsx +40 -27
- package/client/pr-sheet.tsx +11 -8
- package/client/pr-stats-settings.tsx +9 -8
- package/client/pr-stats.tsx +2 -1
- package/client/question-context.tsx +9 -3
- package/client/questions.tsx +15 -11
- package/client/rename.tsx +20 -17
- package/client/reply-draft.ts +93 -0
- package/client/report-issue.tsx +31 -20
- package/client/reviewers.tsx +2 -2
- package/client/rich-text.tsx +188 -7
- package/client/row-actions.ts +31 -3
- package/client/settings-screens.ts +28 -2
- package/client/settings.tsx +8 -6
- package/client/shown-cards.tsx +254 -0
- package/client/sidebar-view.tsx +47 -24
- package/client/slash-commands.tsx +194 -0
- package/client/spec.tsx +7 -4
- package/client/stacks.tsx +6 -5
- package/client/tasks.tsx +14 -3
- package/client/text-image.tsx +146 -0
- package/client/theme.ts +11 -0
- package/client/turn-view.tsx +92 -20
- package/client/updates.tsx +56 -3
- package/client/visibility.ts +6 -0
- package/client/workspace-data.ts +22 -5
- package/client/your-questions.tsx +92 -33
- package/index.client.tsx +16 -4
- package/index.server.ts +197 -37
- package/package.json +6 -5
- package/server/agent-actions.ts +17 -5
- package/server/agent-commands.ts +96 -0
- package/server/agent-hook.mjs +60 -12
- package/server/agent-hooks.ts +11 -0
- package/server/agent-parity.ts +19 -3
- package/server/agent-settings.ts +15 -0
- package/server/cards.ts +287 -0
- package/server/check-watches.ts +20 -1
- package/server/codex-hooks.ts +142 -0
- package/server/context-requests.ts +45 -2
- package/server/daemon.ts +23 -3
- package/server/discovery.ts +2 -2
- package/server/dismiss.ts +5 -2
- package/server/dispatch.ts +7 -4
- package/server/engine.ts +90 -0
- package/server/hook-source.ts +382 -17
- package/server/image-store.ts +35 -2
- package/server/mcp-source.ts +73 -23
- package/server/mcp.mjs +49 -18
- package/server/obligations.ts +2 -3
- package/server/outside-answers.ts +127 -0
- package/server/outside-runs/index.ts +105 -0
- package/server/outside-runs/progress.ts +150 -0
- package/server/outside-runs/turn-print.ts +21 -0
- package/server/pr-owner.ts +4 -3
- package/server/questions.ts +8 -7
- package/server/report-issue/github.ts +40 -2
- package/server/report-issue/index.ts +65 -9
- package/server/rpc-timing.ts +15 -4
- package/server/scopes.ts +26 -4
- package/server/session-prompt.ts +28 -4
- package/server/spec.ts +0 -10
- package/server/transcript.ts +5 -4
- package/server/turn-end.ts +57 -9
- package/shared/activity.ts +8 -2
- package/shared/agent-commands.ts +99 -0
- package/shared/agent-settings.ts +10 -2
- package/shared/agent-text.d.mts +6 -0
- package/shared/agent-text.mjs +24 -5
- package/shared/attention.ts +64 -12
- package/shared/card-md.ts +46 -0
- package/shared/card-view.ts +273 -0
- package/shared/cards.ts +228 -0
- package/shared/catch-up.ts +15 -5
- package/shared/chat.ts +17 -5
- package/shared/compass.ts +2 -2
- package/shared/contracts.ts +43 -12
- package/shared/dialog-fit.ts +18 -0
- package/shared/dispatch.ts +28 -0
- package/shared/display.ts +73 -16
- package/shared/finished.ts +2 -1
- package/shared/grow.ts +15 -0
- package/shared/headline.ts +56 -9
- package/shared/home-arrange.ts +14 -2
- package/shared/home.ts +104 -27
- package/shared/images.ts +25 -0
- package/shared/list-entries.ts +14 -6
- package/shared/list.ts +27 -0
- package/shared/markdown.ts +230 -0
- package/shared/message-sender.ts +1 -1
- package/shared/model.ts +24 -6
- package/shared/new-view.ts +12 -6
- package/shared/now.ts +44 -2
- package/shared/onboarding.ts +14 -4
- package/shared/outside-run.ts +228 -0
- package/shared/overseer.ts +7 -2
- package/shared/peek.ts +11 -1
- package/shared/pr-actions.ts +10 -6
- package/shared/presentation.ts +3 -2
- package/shared/progress-run.d.mts +32 -0
- package/shared/progress-run.mjs +243 -0
- package/shared/provider-support.ts +7 -3
- package/shared/questions.ts +18 -4
- package/shared/reply-draft.ts +38 -0
- package/shared/report-send.ts +1 -1
- package/shared/reviewers.ts +3 -1
- package/shared/row-menu.ts +15 -3
- package/shared/search.ts +25 -12
- package/shared/send-shortcut.ts +35 -0
- package/shared/settings-nav.ts +8 -3
- package/shared/status-invariants.ts +35 -4
- package/shared/task-dup.ts +25 -0
- package/shared/task-rows.ts +25 -5
- package/shared/turn-checks.d.mts +10 -0
- package/shared/turn-checks.mjs +55 -2
- package/shared/turn-clamp.ts +10 -0
- package/shared/turn.ts +50 -13
- package/shared/workspace-layout.ts +4 -4
- package/shared/your-questions.ts +87 -5
- package/skills/follow-up/SKILL.md +1 -1
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
|
|
package/client/action-row.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { Pressable, Text } from "./text";
|
|
|
4
4
|
import { Icon } from "@getpaseo/plugin/client/ui";
|
|
5
5
|
import { isMac } from "../shared/search-key";
|
|
6
6
|
import type { Bar, BarButton } from "../shared/new-view";
|
|
7
|
-
import { withAlpha, type Colors } from "./theme";
|
|
7
|
+
import { disabledPrimary, withAlpha, type Colors } from "./theme";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* New's action row, on its own so any surface can mount it (New's dialog, the Morning brief's queue): the bar from
|
|
@@ -33,29 +33,36 @@ export function Choices<T extends string>({ items, onPick, c, compact }: { items
|
|
|
33
33
|
export const focusRing = (c: Colors, focused: boolean | undefined) => focused && Platform.OS === "web" ? { outlineWidth: 2, outlineStyle: "solid", outlineColor: c.accent, outlineOffset: 2 } as object : {};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* One bar button. Filled when primary
|
|
37
|
-
*
|
|
36
|
+
* One bar button. Filled when primary. Disabled (D-P2-2), nothing about it reads as live: a primary takes the one
|
|
37
|
+
* disabled-primary token (`disabledPrimary`, theme.ts: a faint accent tint and a muted label) inside the same light
|
|
38
|
+
* hairline the outlined ones get, so a dark theme's tint never reads as a live green button; an outlined one goes flat
|
|
39
|
+
* (no fill, the light hairline); every disabled label drops to regular weight, and neither shows its key hint, since the key
|
|
40
|
+
* does nothing then. `trailing` draws its icon after the label (More ▾).
|
|
38
41
|
*/
|
|
39
42
|
/** `small`: a desktop row's own action (32px, DESIGN's desktop control), not a dialog's bar. Phones stay 44. */
|
|
40
43
|
export function BarBtn({ b, primary, c, compact, disabled, onPress, grow, trailing, small }: { b: BarButton | { name: string; icon: string; key: string | null }; primary: boolean; c: Colors; compact: boolean; disabled: boolean; onPress: () => void; grow?: boolean; trailing?: boolean; small?: boolean }) {
|
|
41
44
|
const filled = primary && !disabled;
|
|
42
|
-
const
|
|
45
|
+
const off = primary && disabled ? disabledPrimary(c) : null;
|
|
46
|
+
const fg = filled ? c.accentForeground : off ? off.text : disabled ? c.foregroundMuted : c.foreground;
|
|
43
47
|
const icon = <Icon name={b.icon} size={small && !compact ? 14 : 15} color={fg} />;
|
|
44
48
|
return <Pressable accessibilityRole="button" accessibilityLabel={b.key && Platform.OS === "web" ? `${b.name} (${b.key})` : b.name} accessibilityState={{ disabled }} disabled={disabled} onPress={onPress}
|
|
45
49
|
style={(s: Hover & { focused?: boolean }) => ({ flexDirection: "row", alignItems: "center", justifyContent: "center", gap: small && !compact ? 6 : 8, minHeight: compact ? (primary ? 48 : 44) : small ? 32 : 36, paddingHorizontal: small && !compact ? 10 : 14, borderRadius: 8,
|
|
46
50
|
// A grown button takes the free width but never less than its name: the row wraps instead (an action's name is never cut).
|
|
47
51
|
...(grow ? { flexGrow: 1 } : {}),
|
|
48
52
|
...(filled ? { backgroundColor: s.pressed ? withAlpha(c.accent, 0.85) : s.hovered ? withAlpha(c.accent, 0.92) : c.accent }
|
|
49
|
-
: { borderWidth: 1, borderColor: c.border,
|
|
53
|
+
: off ? { backgroundColor: off.fill, borderWidth: 1, borderColor: withAlpha(c.border, 0.6) }
|
|
54
|
+
: disabled ? { borderWidth: 1, borderColor: withAlpha(c.border, 0.6), backgroundColor: "transparent" }
|
|
55
|
+
: { borderWidth: 1, borderColor: c.border, backgroundColor: s.pressed ? c.surface2 : s.hovered ? c.surface1 : c.surface0 }),
|
|
50
56
|
...focusRing(c, s.focused) })}>
|
|
51
57
|
{!trailing && icon}
|
|
52
|
-
<Text numberOfLines={1} style={{ color: fg, fontSize: compact ? 15 : small ? 12 : 13, fontWeight: "600", flexShrink: 0 }}>{b.name}</Text>
|
|
58
|
+
<Text numberOfLines={1} style={{ color: fg, fontSize: compact ? 15 : small ? 12 : 13, fontWeight: disabled ? "500" : "600", flexShrink: 0 }}>{b.name}</Text>
|
|
53
59
|
{trailing && icon}
|
|
54
|
-
{b.key && !compact && Platform.OS === "web" && <Text style={{ color: fg, opacity: 0.75, fontSize: 12 }}>{b.key === "⌥↵" && !isMac() ? "Alt ↵" : b.key}</Text>}
|
|
60
|
+
{b.key && !disabled && !compact && Platform.OS === "web" && <Text style={{ color: fg, opacity: 0.75, fontSize: 12 }}>{b.key === "⌥↵" && !isMac() ? "Alt ↵" : b.key}</Text>}
|
|
55
61
|
</Pressable>;
|
|
56
62
|
}
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
/** `reason: false` drops the "why disabled" line when the caller already asks the question above the row (New's phone dock). */
|
|
65
|
+
export function ActionRow({ bar, c, compact, onAction, onOpen, more: moreProp, setMore: setMoreProp, reason = true }: { bar: Bar; c: Colors; compact: boolean; onAction: (id: string) => void; onOpen: (workspaceId: string) => void; more?: boolean; setMore?: (v: boolean) => void; reason?: boolean }) {
|
|
59
66
|
const [ownMore, setOwnMore] = useState(false);
|
|
60
67
|
const more = moreProp ?? ownMore; const setMore = setMoreProp ?? setOwnMore;
|
|
61
68
|
if (bar.kind === "existing") {
|
|
@@ -80,7 +87,7 @@ export function ActionRow({ bar, c, compact, onAction, onOpen, more: moreProp, s
|
|
|
80
87
|
const moreBtn = bar.more.length > 0 && <BarBtn c={c} compact={compact} primary={false} disabled={disabled} trailing b={{ name: "More", icon: more ? "ChevronUp" : "ChevronDown", key: null }} onPress={() => setMore(!more)} />;
|
|
81
88
|
return <View style={{ gap: 8 }}>
|
|
82
89
|
{more && !disabled && <Choices c={c} compact={compact} items={bar.more.map(b => ({ id: b.id, label: b.name }))} onPick={id => { setMore(false); onAction(id); }} />}
|
|
83
|
-
{bar.disabled && <Text style={{ color: c.foregroundMuted, fontSize: 12 }}>{bar.disabled}</Text>}
|
|
90
|
+
{bar.disabled && reason && <Text style={{ color: c.foregroundMuted, fontSize: 12 }}>{bar.disabled}</Text>}
|
|
84
91
|
{compact ? <>
|
|
85
92
|
{bar.primary && <BarBtn c={c} compact primary disabled={disabled} b={bar.primary} onPress={() => onAction(bar.primary!.id)} />}
|
|
86
93
|
<View style={{ flexDirection: "row", flexWrap: "wrap", gap: 8 }}>
|
package/client/agent-card.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
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";
|
|
3
4
|
import { usePaseo } from "@getpaseo/plugin/client";
|
|
4
|
-
import { Text } from "./text";
|
|
5
|
+
import { Pressable, Text } from "./text";
|
|
5
6
|
import type { InboxStore } from "./inbox-store";
|
|
6
7
|
import { useInbox } from "./inbox";
|
|
7
8
|
import { AgentLines } from "./now-lines";
|
|
@@ -13,11 +14,13 @@ import { useMarkTimelineOnScreen } from "./on-screen";
|
|
|
13
14
|
import { Spinner } from "./motion";
|
|
14
15
|
import { PrLinksProvider } from "./rich-text";
|
|
15
16
|
import { prLinksByNumber } from "../shared/presentation";
|
|
16
|
-
import { raised, runningColor } from "./theme";
|
|
17
|
+
import { raised, runningColor, type Colors } from "./theme";
|
|
17
18
|
import type { Theme } from "./kit";
|
|
18
19
|
import type { Workspace } from "../shared/model";
|
|
19
20
|
import type { InboxRow } from "../shared/inbox";
|
|
20
|
-
import { turnSource } from "../shared/turn";
|
|
21
|
+
import { MAX_TURNS, turnSource, type Turn } from "../shared/turn";
|
|
22
|
+
import { useChatBeside } from "./composers";
|
|
23
|
+
import { IconButton } from "./kit";
|
|
21
24
|
|
|
22
25
|
/** Where the workspace view is mounted. Only two things differ by place: the head's own controls and the reply box. */
|
|
23
26
|
export type ViewPlace = "home" | "panel" | "tab";
|
|
@@ -25,15 +28,15 @@ export type ViewPlace = "home" | "panel" | "tab";
|
|
|
25
28
|
const NO_INBOX = { subscribe: () => () => undefined, version: () => 0, rows: () => [] } as unknown as InboxStore;
|
|
26
29
|
const NO_ROWS: readonly InboxRow[] = [];
|
|
27
30
|
|
|
28
|
-
export const STEPS_HINT = "
|
|
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.";
|
|
29
32
|
const HOME_REPLY_HINT = " Sending clears Needs you; Sign off & next moves on without a reply.";
|
|
30
33
|
|
|
31
34
|
/**
|
|
32
|
-
* The agent card (docs/client.md#the-workspace-view): one row per agent (client/now-lines.tsx), then
|
|
35
|
+
* The agent card (docs/client.md#the-workspace-view): one row per agent (client/now-lines.tsx), then the Chat section (the
|
|
33
36
|
* peek's rows, client/turn-view.tsx: the developer's messages, the agent's replies, steps grouped) and the reply box
|
|
34
37
|
* right under them, so reading and replying are one place. A row switches the steps and the box to its agent; Cmd/Ctrl
|
|
35
|
-
* opens its chat.
|
|
36
|
-
* it (invariant 1). Its fold (the arrow on the
|
|
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.
|
|
37
40
|
*
|
|
38
41
|
* The side panel (`place` "panel") sits beside the workspace's chat, so it never draws the reply box and its Recent
|
|
39
42
|
* steps start folded; the developer's own fold choice wins everywhere (invariant 132). Home's pane and the main tab mark
|
|
@@ -46,7 +49,7 @@ export function AgentCard({ workspace: w, inbox, theme, compact, steps, now, pla
|
|
|
46
49
|
openAgent?: (agentId: string) => void;
|
|
47
50
|
/** After a reply went out (Home refreshes its inbox rows). */
|
|
48
51
|
onSent?: () => void;
|
|
49
|
-
/** Draw the reply box under
|
|
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. */
|
|
50
53
|
reply: boolean;
|
|
51
54
|
}) {
|
|
52
55
|
const c = theme.colors;
|
|
@@ -57,57 +60,157 @@ export function AgentCard({ workspace: w, inbox, theme, compact, steps, now, pla
|
|
|
57
60
|
const name = selected === w.mainAgentId ? "the main agent" : rows.find(r => r.agentId === selected)?.title?.trim() || w.taskAgents?.[selected]?.title?.trim() || "the agent";
|
|
58
61
|
const pick = (agentId: string, chat: boolean) => { if (chat && openAgent) openAgent(agentId); else setSelected(agentId); };
|
|
59
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);
|
|
60
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)]}>
|
|
61
67
|
<AgentLines workspace={w} inbox={inbox} theme={theme} compact={compact} now={now} openAgent={openAgent} peek={place === "panel"} bare selected={selected} onSelect={pick} />
|
|
62
|
-
<View style={{ borderTopWidth: 1, borderTopColor: c.border }}>
|
|
63
|
-
<RecentSteps agentId={selected} name={name} theme={theme} compact={compact} steps={steps} place={place} reply={reply} prs={w.prs} onSent={onSent} onHint={setHintOpen} />
|
|
64
|
-
</View>
|
|
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>}
|
|
65
71
|
</View>;
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
/**
|
|
69
|
-
*
|
|
75
|
+
* The Chat section for one agent, with its fold, its ? hint and (when `reply`) the reply box under it: the agent card's
|
|
70
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.
|
|
71
77
|
*/
|
|
72
|
-
export function RecentSteps({ agentId, name, theme, compact, steps, place, reply, prs = [], onSent, onHint, empty }: {
|
|
78
|
+
export function RecentSteps({ agentId, name, theme, compact, steps, place, reply, prs = [], onSent, onHint, empty, openAgent }: {
|
|
73
79
|
agentId: string | null; name: string; theme: Theme; compact: boolean; steps: number; place: ViewPlace; reply: boolean;
|
|
74
80
|
prs?: Workspace["prs"]; onSent?: () => void;
|
|
75
81
|
/** The ? hint opened or closed (the card lets it draw past its edge). */
|
|
76
82
|
onHint?: (open: boolean) => void;
|
|
77
83
|
/** What an empty turn says; the default points at the reply box or the chat. */
|
|
78
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;
|
|
79
87
|
}) {
|
|
80
88
|
const c = theme.colors;
|
|
81
89
|
const fold = useFold(PANEL_FOLDS.steps, place !== "panel");
|
|
82
90
|
const open = fold.open;
|
|
83
91
|
useMarkTimelineOnScreen(place !== "panel" && open ? agentId : null);
|
|
84
|
-
|
|
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); };
|
|
85
97
|
const paseo = usePaseo();
|
|
86
98
|
const [hintOpen, setHintOpen] = useState(false);
|
|
87
99
|
const help = useHint(next => { setHintOpen(next); onHint?.(next); });
|
|
88
|
-
|
|
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);
|
|
89
103
|
const hint = STEPS_HINT + (place === "home" && reply ? HOME_REPLY_HINT : "");
|
|
90
104
|
return <View style={{ zIndex: hintOpen ? 30 : undefined }}>
|
|
91
105
|
<View style={{ zIndex: hintOpen ? 30 : undefined, flexDirection: "row", alignItems: "center" }}>
|
|
92
|
-
<FoldButton open={open} onToggle={fold.toggle} label={caption ? `
|
|
106
|
+
<FoldButton open={open} onToggle={fold.toggle} label={caption ? `Chat, ${caption}` : "Chat"} theme={theme} chevron="end"
|
|
93
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" })}>
|
|
94
|
-
<Text numberOfLines={1} style={{ flexShrink: 0, color: c.foreground, fontSize: compact ? 13 : 12, fontWeight: "600" }}>
|
|
108
|
+
<Text numberOfLines={1} style={{ flexShrink: 0, color: c.foreground, fontSize: compact ? 13 : 12, fontWeight: "600" }}>Chat</Text>
|
|
95
109
|
<HintIcon hint={help} text={hint} theme={theme} compact={compact} />
|
|
96
110
|
<View style={{ flex: 1, minWidth: 0, flexDirection: "row", justifyContent: "flex-end", alignItems: "center", gap: 5 }}>
|
|
97
|
-
{turn.running && <View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: runningColor(c) }} />}
|
|
111
|
+
{turn.running && !stale && <View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: runningColor(c) }} />}
|
|
98
112
|
{!!caption && <Text numberOfLines={1} style={{ flexShrink: 1, color: c.foregroundMuted, fontSize: 12 }}>{caption}</Text>}
|
|
99
113
|
</View>
|
|
100
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>}
|
|
101
118
|
<HintBubble hint={help} text={hint} theme={theme} />
|
|
102
119
|
</View>
|
|
103
|
-
{open && <View style={{ paddingHorizontal: compact ? 14 : 12, paddingBottom: reply ? 0 : 12
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
: turn.turn.empty ? <Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 17 }}>{empty ?? (reply ? "No messages yet. Write to the agent below, or open its chat." : "No messages yet. Open its chat to write to it.")}</Text>
|
|
108
|
-
: <PrLinksProvider prs={prLinksByNumber(prs)}><TurnView turn={turn.turn} theme={theme} maxRows={steps} /></PrLinksProvider>}
|
|
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} />
|
|
109
124
|
</View>}
|
|
110
|
-
{open && reply && agentId && <ReplyBox theme={theme} compact={compact} agentName={name} hint={null} placeholder={`Reply to ${name}`} target={{ kind: "agent", agentId }}
|
|
125
|
+
{open && reply && agentId && <ReplyBox theme={theme} compact={compact} agentName={name} hint={null} placeholder={`Reply to ${name}`} target={{ kind: "agent", agentId }} draft={agentId}
|
|
111
126
|
onSend={async (text, images) => { await paseo.agents.ref(agentId).send(text, images?.length ? { images } : undefined); onSent?.(); }} />}
|
|
112
127
|
</View>;
|
|
113
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
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ActivityIndicator, View } from "react-native";
|
|
2
|
-
import { Text } from "./text";
|
|
2
|
+
import { Pressable, Text } from "./text";
|
|
3
|
+
import { OUTSIDE_RUNS_GUIDE, runsSettingsCopy } from "../shared/outside-run";
|
|
4
|
+
import { outsideRunsKey, useOutsideRuns } from "./updates";
|
|
3
5
|
import type { PluginSurfaceProps } from "@getpaseo/plugin/client";
|
|
4
6
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
7
|
+
import { openLink } from "./open-link";
|
|
5
8
|
import { SettingsAction, SettingsCard, SettingsSection, SettingsSelect, SettingsSwitch, useToast } from "@getpaseo/plugin/client/ui";
|
|
6
9
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
|
-
import { agentSettingsRpc, setAgentSettingRpc, setWaitRpc } from "../shared/contracts";
|
|
10
|
+
import { agentSettingsRpc, setAgentSettingRpc, setOutsideRunsRpc, setWaitRpc } from "../shared/contracts";
|
|
8
11
|
import { WAIT_HOST_NOTE, WAIT_NOT_ATTACHED, waitNote, waitSwitchCopy } from "../shared/wait";
|
|
9
12
|
import { hasSame, isJobRole, type AgentRole, type AgentSettingsView, type SavedRole } from "../shared/agent-settings";
|
|
10
13
|
import { NO_PROMPT_MODE, SETTINGS_ORDER, isReset, resetEntry } from "../shared/job-rows";
|
|
@@ -71,13 +74,53 @@ export function WaitSettings({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
|
71
74
|
{wait && <SettingsCard>
|
|
72
75
|
{/* Paseo 0.16 (reason "host"): what the host does comes first and stays whether the switch is on or off; it's
|
|
73
76
|
information, not a problem, so no alert. */}
|
|
74
|
-
{
|
|
77
|
+
{/* A note, not a setting (P3-21): muted meta text, the card's switch below is the setting. */}
|
|
78
|
+
{wait.host && <Text style={[t.meta, { paddingHorizontal: 16, paddingTop: 12, paddingBottom: 4 }]}>{WAIT_HOST_NOTE}</Text>}
|
|
75
79
|
<SettingsSwitch label={copy.title} hint={copy.hint} value={wait.enable_wait} disabled={change.isPending} onValueChange={value => change.mutate(value)} />
|
|
76
80
|
{note && wait.enable_wait && wait.reason !== "host" && <Text accessibilityRole="alert" style={[t.meta, { color: c.statusWarning, paddingHorizontal: 16, paddingBottom: 12 }]}>{`${WAIT_NOT_ATTACHED} ${note}`}</Text>}
|
|
77
81
|
</SettingsCard>}
|
|
78
82
|
</SettingsSection>;
|
|
79
83
|
}
|
|
80
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Settings → Agents → "Show <plugin> runs" (docs/outside-runs.md, docs/progress.md): one switch, on by default, shown only
|
|
87
|
+
* once a run file was seen on this host. Off: Follow-up stops reading it and drops every item and agent line from it; the
|
|
88
|
+
* owner is untouched either way. An unknown format turns the switch off and disabled, and its hint says why. The hint's
|
|
89
|
+
* link opens the guide page. Every word comes from the owner's name (runsSettingsCopy).
|
|
90
|
+
*/
|
|
91
|
+
export function OutsideRunsSettings({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
92
|
+
const c = theme.colors; const t = text(c);
|
|
93
|
+
const read = useRpc(agentSettingsRpc); const write = useRpc(setOutsideRunsRpc); const cache = useQueryClient(); const toast = useToast();
|
|
94
|
+
const query = useQuery({ queryKey: key, queryFn: () => read({ catalog: true }), staleTime: 5 * 60_000 });
|
|
95
|
+
const change = useMutation({
|
|
96
|
+
mutationFn: (progress: boolean) => write({ progress }),
|
|
97
|
+
onSuccess: value => { cache.setQueryData(key, value); cache.setQueryData(outsideRunsKey, value.outsideRuns ?? null);
|
|
98
|
+
if (value.outsideRuns) toast.show(`${runsSettingsCopy(value.outsideRuns).label}: ${value.outsideRuns.enabled ? "on" : "off"}`, { variant: "success" }); },
|
|
99
|
+
onError: error => toast.error(errorText(error)),
|
|
100
|
+
});
|
|
101
|
+
const status = query.data?.outsideRuns;
|
|
102
|
+
if (!status?.seen) return null;
|
|
103
|
+
const copy = runsSettingsCopy(status);
|
|
104
|
+
return <SettingsSection title="Other plugins">
|
|
105
|
+
<SettingsCard>
|
|
106
|
+
<SettingsSwitch label={copy.label} hint={copy.hint} value={status.enabled && !status.unknownFormat} disabled={change.isPending || !!status.unknownFormat} onValueChange={value => change.mutate(value)} />
|
|
107
|
+
<Pressable accessibilityRole="link" accessibilityLabel={`${copy.guide} (opens the guide)`} hitSlop={6} onPress={() => void openLink(OUTSIDE_RUNS_GUIDE).catch(() => toast.error("Couldn't open the link here"))}
|
|
108
|
+
style={{ alignSelf: "flex-start", minHeight: 44, justifyContent: "center", paddingHorizontal: 16, paddingBottom: 4 }}>
|
|
109
|
+
<Text style={[t.small, { color: c.accent }]}>{copy.guide}</Text>
|
|
110
|
+
</Pressable>
|
|
111
|
+
</SettingsCard>
|
|
112
|
+
</SettingsSection>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Under Questions while another plugin's runs show: each plugin's mode governs its own questions, and this says whose. */
|
|
116
|
+
export function OwnerQuestionLine({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
117
|
+
const t = text(theme.colors);
|
|
118
|
+
const line = useOutsideRuns().data;
|
|
119
|
+
const said = line ? runsSettingsCopy(line).questionLine : null;
|
|
120
|
+
if (!said) return null;
|
|
121
|
+
return <Text style={[t.meta, { paddingHorizontal: 16, paddingTop: 10, paddingBottom: 12 }]}>{said}</Text>;
|
|
122
|
+
}
|
|
123
|
+
|
|
81
124
|
/** A row's More in Settings: permissions (Paseo agents), limits and schedule (jobs), and Reset to defaults. */
|
|
82
125
|
function RoleMore({ r, save, busy, theme, compact, invalid }: { r: Role; save: (entry: SavedRole | null) => void; busy: boolean; theme: Theme; compact: boolean; invalid: boolean }) {
|
|
83
126
|
const c = theme.colors; const t = text(c);
|
package/client/brief.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useMemo, useState, useSyncExternalStore, type ReactNode } from "react";
|
|
2
|
+
import { useKept } from "./kept";
|
|
2
3
|
import { LinkWorkspaceProvider, openLinkQuietly } from "./open-link";
|
|
3
4
|
import { browserKey, liveBriefKey, LIVE_BRIEF_POLL_MS, workspaceKey } from "./keys";
|
|
4
5
|
import { Platform, View, useWindowDimensions } from "react-native";
|
|
@@ -29,7 +30,7 @@ import { useReviewerButtons } from "./reviewers-button";
|
|
|
29
30
|
import { prLinksByNumber } from "../shared/presentation";
|
|
30
31
|
import { cardStore } from "./card-store";
|
|
31
32
|
import { PrSheet } from "./pr-sheet";
|
|
32
|
-
import { isLight, withAlpha, type Colors } from "./theme";
|
|
33
|
+
import { disabledPrimary, isLight, withAlpha, type Colors } from "./theme";
|
|
33
34
|
import { dismissToast, notice, runAction, runUndoable } from "./toasts";
|
|
34
35
|
import { DismissX, RevealScope, useDismiss } from "./dismiss";
|
|
35
36
|
import { clearPendingAnswer, confirmPendingAnswer, failPendingAnswer, markSentHere, setPendingAnswer } from "./pending-answers";
|
|
@@ -69,14 +70,16 @@ const ring = (focused: boolean | undefined, c: Colors) => focusRing(focused, c);
|
|
|
69
70
|
const letters = (d: BriefDecision) => { const l = d.options.map(o => o.letter); return l.length > 1 ? `${l.slice(0, -1).join(", ")} or ${l.at(-1)}` : l[0] ?? ""; };
|
|
70
71
|
|
|
71
72
|
function Btn({ label, icon, primary, onPress, c, compact, disabled, shortcut = false, hint }: { label: string; icon?: string; primary?: boolean; onPress: () => void; c: Colors; compact: boolean; disabled?: boolean; shortcut?: boolean; hint?: string }) {
|
|
72
|
-
|
|
73
|
+
// A disabled primary is neutral (disabledPrimary), the same as kit's Button: no faded accent, no key hint.
|
|
74
|
+
const off = primary && disabled ? disabledPrimary(c) : null;
|
|
75
|
+
const fg = off ? off.text : primary ? c.accentForeground : c.foreground;
|
|
73
76
|
return <Pressable accessibilityRole="button" accessibilityLabel={label} accessibilityHint={hint} accessibilityState={{ disabled }} disabled={disabled} onPress={onPress}
|
|
74
|
-
style={({ hovered, pressed, focused }: { hovered?: boolean; pressed: boolean; focused?: boolean }) => ({ ...ring(focused, c), minHeight: compact ? 44 : 32, paddingHorizontal: compact ? 14 : 12, borderRadius: 6, flexDirection: "row", alignItems: "center", gap: 6, justifyContent: "center", opacity: disabled ? 0.5 : 1,
|
|
75
|
-
backgroundColor: primary ? (pressed ? withAlpha(c.accent, 0.85) : hovered ? withAlpha(c.accent, 0.92) : c.accent) : pressed || hovered ? c.surface2 : "transparent",
|
|
77
|
+
style={({ hovered, pressed, focused }: { hovered?: boolean; pressed: boolean; focused?: boolean }) => ({ ...ring(focused, c), minHeight: compact ? 44 : 32, paddingHorizontal: compact ? 14 : 12, borderRadius: 6, flexDirection: "row", alignItems: "center", gap: 6, justifyContent: "center", opacity: disabled && !off ? 0.5 : 1,
|
|
78
|
+
backgroundColor: off ? off.fill : primary ? (pressed ? withAlpha(c.accent, 0.85) : hovered ? withAlpha(c.accent, 0.92) : c.accent) : pressed || hovered ? c.surface2 : "transparent",
|
|
76
79
|
borderWidth: primary ? 0 : 1, borderColor: c.border, flexGrow: compact ? 1 : 0 })}>
|
|
77
80
|
{icon ? <Icon name={icon} size={compact ? 16 : 14} color={fg} /> : null}
|
|
78
81
|
<Text numberOfLines={1} style={{ color: fg, fontSize: compact ? 14 : 13, lineHeight: compact ? 19 : 17, fontWeight: "600" }}>{label}</Text>
|
|
79
|
-
{shortcut && !compact && Platform.OS === "web" && <Text accessibilityElementsHidden importantForAccessibility="no" style={{ color: fg, opacity: 0.6, fontSize: 11, lineHeight: 16, fontWeight: "500" }}>{submitHint()}</Text>}
|
|
82
|
+
{shortcut && !disabled && !compact && Platform.OS === "web" && <Text accessibilityElementsHidden importantForAccessibility="no" style={{ color: fg, opacity: 0.6, fontSize: 11, lineHeight: 16, fontWeight: "500" }}>{submitHint()}</Text>}
|
|
80
83
|
</Pressable>;
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -444,7 +447,7 @@ function BriefCardBody({ item, theme, layout, agentId, deps, embedded = false, s
|
|
|
444
447
|
const words = useWords(b.id);
|
|
445
448
|
const notes = useNotes(b.id);
|
|
446
449
|
const notesOpen = useNotesOpen(b.id);
|
|
447
|
-
const [sheet, setSheet] =
|
|
450
|
+
const [sheet, setSheet] = useKept<{ key: string; intent: "merge" | "reviewers" } | null>(`brief:${b.id}:sheet`, null);
|
|
448
451
|
// The PR sheet draws review and deploy detail the list form leaves out: one read of the full workspace while it's open.
|
|
449
452
|
const detail = useWorkspace(undefined, row.workspaceId ?? "", { enabled: !!sheet });
|
|
450
453
|
useDetailGate(detail.failure, !!sheet, () => setSheet(null));
|
|
@@ -617,7 +620,7 @@ function BriefCardBody({ item, theme, layout, agentId, deps, embedded = false, s
|
|
|
617
620
|
const sendOther = (decisionId: string) => { const text = words[decisionId]?.trim(); if (text) void run(`${decisionId}:${OTHER}`, async answerId => { await answer([{ decisionId, choice: OTHER, words: text }], answerId); clearCard(b.id); }); };
|
|
618
621
|
return <RevealScope accessibilityRole="summary" accessibilityLabel={`${acts ? "Needs you" : flaggedAct ? "Later" : word(b.kind)}: ${askText}`}
|
|
619
622
|
style={[{ marginVertical: embedded ? 0 : 10, borderRadius: 12, borderWidth: 1, borderColor: border, backgroundColor: c.surface1, overflow: "hidden" }, bare && BARE]}>
|
|
620
|
-
<SubmitScope enabled={!!keySend && !busy} onSubmit={() => keySend?.()} style={{ paddingHorizontal: pad, paddingTop: compact ? 12 : 14, paddingBottom: 14, gap: tight ? 10 : 12 }}>
|
|
623
|
+
<SubmitScope message compact={compact} enabled={!!keySend && !busy} onSubmit={() => keySend?.()} style={{ paddingHorizontal: pad, paddingTop: compact ? 12 : 14, paddingBottom: 14, gap: tight ? 10 : 12 }}>
|
|
621
624
|
<View style={{ gap: 4 }}>
|
|
622
625
|
<View style={{ flexDirection: "row", alignItems: "center", gap: 7 }}>
|
|
623
626
|
<Icon name={ICON[b.kind]} size={14} color={tone} />
|