paseo-follow-up 2.7.0-beta.0 → 2.7.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/client/brief.tsx +8 -3
- package/client/catch-up.tsx +5 -2
- package/client/home-chrome.tsx +3 -3
- package/client/home-data.ts +14 -2
- package/client/home-list.tsx +76 -31
- package/client/home.tsx +9 -8
- package/client/live.tsx +3 -4
- package/client/needs-you.tsx +1 -1
- package/client/panel.tsx +3 -2
- package/client/pill.tsx +3 -1
- package/client/sidebar-view.tsx +3 -3
- package/client/turn-view.tsx +2 -2
- package/client/view-r.tsx +30 -15
- package/package.json +1 -1
- package/server/agent-actions.ts +7 -3
- package/server/overseer.ts +3 -2
- package/shared/attention.ts +5 -1
- package/shared/brief.ts +11 -0
- package/shared/catch-up.ts +29 -10
- package/shared/headline.ts +21 -6
- package/shared/home-arrange.ts +2 -2
- package/shared/home.ts +126 -22
- package/shared/inbox.ts +19 -2
- package/shared/list-entries.ts +24 -5
- package/shared/needs-block.ts +11 -5
- package/shared/row-chips.ts +8 -3
- package/shared/status-invariants.ts +24 -1
- package/shared/status.ts +13 -0
- package/shared/turn.ts +6 -0
- package/shared/view-r.ts +48 -13
package/client/brief.tsx
CHANGED
|
@@ -399,7 +399,12 @@ function Past({ b, c, now, compact, height, pending = false, onResend, resending
|
|
|
399
399
|
</View>;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
/**
|
|
402
|
+
/**
|
|
403
|
+
* `embedded`: inside a pane with its own reply box (Home's detail pane, Catch up, the Overseer's pane): "Reply below.",
|
|
404
|
+
* no outer margin. It never takes the card's moves: one ask has the same buttons on every surface (invariant 249).
|
|
405
|
+
* 2026-12-03: Home's pane and Catch up passed `embedded`, left from before Home drew the workspace view, and dropped every
|
|
406
|
+
* move: an Action card there had no Done while the tab's and the chat's had one.
|
|
407
|
+
*/
|
|
403
408
|
/** `snoozed`: the row is in Later, so the card wears the row's muted tone and says "Later" instead of "Needs you". */
|
|
404
409
|
/** `bare`: a section of the Needs you block (client/needs-you.tsx), whose frame says "Needs you": no border, margin or second label. */
|
|
405
410
|
type BriefCardProps = PluginTimelineItemProps<Brief> & { deps: BriefDeps; embedded?: boolean; snoozed?: boolean; bare?: boolean; /** After its x is pressed (Catch up moves on). */ onDismissed?: () => void };
|
|
@@ -575,7 +580,7 @@ function BriefCardBody({ item, theme, layout, agentId, deps, embedded = false, s
|
|
|
575
580
|
<View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", columnGap: 10, rowGap: 8 }}>
|
|
576
581
|
<RichText numberOfLines={3} tooltip={askText}
|
|
577
582
|
style={{ flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, color: acts ? c.foreground : c.foregroundMuted, fontSize: 14, lineHeight: 20, fontWeight: acts ? "600" : "400" }}>{askText}</RichText>
|
|
578
|
-
{
|
|
583
|
+
{moves.map(m => <Btn key={m.kind} label={moveLabel(m)} icon={moveIcon(m)} disabled={moveOff(m)} onPress={() => press(m)} c={c} compact={compact} hint={MOVE_HINT[m.kind]} />)}
|
|
579
584
|
</View>
|
|
580
585
|
{!!error && <Text accessibilityRole="alert" style={{ color: c.statusDanger, fontSize: 13, lineHeight: 18 }}>{error}</Text>}
|
|
581
586
|
{!!mergeWhy && <Text accessibilityRole="alert" style={{ color: c.statusWarning, fontSize: 13, lineHeight: 18 }}>{mergeWhy}</Text>}
|
|
@@ -669,7 +674,7 @@ function BriefCardBody({ item, theme, layout, agentId, deps, embedded = false, s
|
|
|
669
674
|
|
|
670
675
|
{multi && <SendBar b={b} picks={sendable} noted={notedCount(sendable, openNotes)} busy={busy} error={error} onSend={sendAll} c={c} compact={compact} />}
|
|
671
676
|
|
|
672
|
-
{
|
|
677
|
+
{moves.length > 0 && <View style={{ flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 8, columnGap: 14 }}>
|
|
673
678
|
{moves.map((m, i) => <Btn key={m.kind} shortcut={m === doneMove} label={moveLabel(m)} icon={moveIcon(m)} primary={i === 0 && !multi} disabled={moveOff(m)} onPress={() => press(m)} c={c} compact={compact} hint={MOVE_HINT[m.kind]} />)}
|
|
674
679
|
{/* one-done-button: the quiet choices sit beside Done, never above the context, away from it. */}
|
|
675
680
|
{doneQ && !notesOpen[doneQ.id] && !isOther(picks[doneQ.id]) && <NoteLink icon="MessageSquarePlus" label="Add note" a11y="Add a note, sent with Done" disabled={!!busy} onPress={() => setDraft(keyOf(doneQ.id), { noteOpen: true })} c={c} compact={compact} />}
|
package/client/catch-up.tsx
CHANGED
|
@@ -28,7 +28,7 @@ import type { Workspace } from "../shared/model";
|
|
|
28
28
|
import type { ListWorkspace } from "../shared/list";
|
|
29
29
|
import { bottomInset, Button, errorText, focusSoon, IconButton, SubmitScope, text, type Theme } from "./kit";
|
|
30
30
|
import { glyphColor } from "./home-list";
|
|
31
|
-
import { useHomeModel, type HomeSources } from "./home-data";
|
|
31
|
+
import { useArranged, useHomeModel, type HomeSources } from "./home-data";
|
|
32
32
|
import { useInbox } from "./inbox";
|
|
33
33
|
import { QuestionBody, QuestionDismissX, type SendReady } from "./questions";
|
|
34
34
|
import { DismissReveal, useDismiss } from "./dismiss";
|
|
@@ -106,7 +106,10 @@ const askFor = (context: readonly ContextRequest[], card: DeckCard) => contextFo
|
|
|
106
106
|
export function CatchUp({ theme, compact, deps, navigation, onExit }: { theme: Theme; compact: boolean; deps: CatchUpDeps; navigation: Nav; onExit: () => void }) {
|
|
107
107
|
const c = theme.colors; const t = text(c, compact);
|
|
108
108
|
const { inbox, live, extras } = deps.sources;
|
|
109
|
-
const
|
|
109
|
+
const homeModel = useHomeModel(deps.sources);
|
|
110
|
+
// The deck deals the rows Home's strip counts: Display's filters applied (useArranged, invariant 249).
|
|
111
|
+
const { arranged } = useArranged(deps.sources, homeModel);
|
|
112
|
+
const model = useMemo(() => ({ ...homeModel, groups: arranged.byGroup }), [homeModel, arranged]);
|
|
110
113
|
const rows = useInbox(inbox, () => inbox.rows());
|
|
111
114
|
const version = useSyncExternalStore(live.subscribe, live.version, live.version);
|
|
112
115
|
const context = useSyncExternalStore(extras.subscribe, extras.context, extras.context);
|
package/client/home-chrome.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { AttachImageButton, ImageField, useImageAttachments, type ImageAttachmen
|
|
|
6
6
|
import { OVERSEER_ASK_KEY } from "./unsent-images";
|
|
7
7
|
import { Pressable, Text } from "./text";
|
|
8
8
|
import { Icon, ScrollView, useToast } from "@getpaseo/plugin/client/ui";
|
|
9
|
-
import { HOME_GROUPS,
|
|
9
|
+
import { HOME_GROUPS, type HomeCounts, type HomeGroupId, type HomeModel } from "../shared/home";
|
|
10
10
|
import { filterStop, layoutHint, homeSearchDocs, homeSearchResults, indexDocs, defaultActive, type OmniboxItem, type OmniboxProvider } from "../shared/search";
|
|
11
11
|
import { LayoutCapture, type LayoutKey } from "../shared/layout-swap";
|
|
12
12
|
import { fullPlaceholder, type Placeholder } from "../shared/placeholder-fit";
|
|
@@ -427,10 +427,10 @@ const STRIP: { id: HomeGroupId; label: string }[] = [
|
|
|
427
427
|
* tapping it (or "All") goes back. Zero counts are muted, never hidden, so the line doesn't jump.
|
|
428
428
|
*/
|
|
429
429
|
export function StatusStrip({ theme, model, counts: given, filter, onFilter, touch, dense }: { theme: Theme; model: HomeModel;
|
|
430
|
-
/** The counts as the list shows them (
|
|
430
|
+
/** The counts as the list shows them (useHomeCounts, invariant 249). */ counts: HomeCounts;
|
|
431
431
|
filter: HomeGroupId | null; onFilter: (g: HomeGroupId | null) => void; touch: boolean; dense: boolean }) {
|
|
432
432
|
const c = theme.colors;
|
|
433
|
-
const counts = given
|
|
433
|
+
const counts = given;
|
|
434
434
|
const chip = (key: string, label: string, n: number | null, selected: boolean, onPress: () => void, tone?: string) => {
|
|
435
435
|
const muted = n === 0;
|
|
436
436
|
const color = selected ? c.foreground : muted ? withAlpha(c.foregroundMuted, 0.6) : tone ?? c.foreground;
|
package/client/home-data.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { autoSendHold } from "../shared/sending";
|
|
2
2
|
import { useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import type { PluginClientContext } from "@getpaseo/plugin/client";
|
|
4
|
-
import { buildHome, type HomeModel, type PaseoWorkspaceLite } from "../shared/home";
|
|
5
|
-
import { arrangeHome, type ArrangedHome, type HomeView } from "../shared/home-arrange";
|
|
4
|
+
import { buildHome, type HomeCounts, type HomeModel, type PaseoWorkspaceLite } from "../shared/home";
|
|
5
|
+
import { arrangeHome, arrangedCounts, type ArrangedHome, type HomeView } from "../shared/home-arrange";
|
|
6
6
|
import type { ArchiveFacts } from "../shared/row-menu";
|
|
7
7
|
import type { InboxStore } from "./inbox-store";
|
|
8
8
|
import type { LiveStore } from "./live";
|
|
@@ -112,6 +112,18 @@ export function useHomeModel(sources: HomeSources): HomeModel {
|
|
|
112
112
|
return useMemo(() => sharedHome(deps, () => buildHome({ rows: inbox.rows(), tracked: live.all(), paseo: paseo.all(), now: Date.now(), sort, priorities, hidden: overseer ? [overseer] : [], hold, compass, raised, questions })), deps);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Home's status counts (one-needs-you-count, invariant 249): Display's filters applied, pinned rows in their group,
|
|
117
|
+
* "Nobody's on it" rows in Needs you (arrangedCounts). Home's strip and group header, its brief line, the sidebar view's
|
|
118
|
+
* badges, the sidebar item's badge and "Done while you were away" all read this, so every Needs-you number is one.
|
|
119
|
+
*/
|
|
120
|
+
export function useHomeCounts(sources: HomeSources, model?: HomeModel): HomeCounts {
|
|
121
|
+
const own = useHomeModel(sources);
|
|
122
|
+
const m = model ?? own;
|
|
123
|
+
const { arranged } = useArranged(sources, m);
|
|
124
|
+
return useMemo(() => arrangedCounts(m, arranged), [m, arranged]);
|
|
125
|
+
}
|
|
126
|
+
|
|
115
127
|
/**
|
|
116
128
|
* The Display arrangement over a model (shared/home-arrange.ts): Home and the sidebar view call this with the model
|
|
117
129
|
* they draw, so both show the same Pinned, grouping and filters. `facts` reads Paseo's descriptor (pins, labels).
|
package/client/home-list.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo, useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
|
2
2
|
import { NEW_NAME } from "../shared/new-name";
|
|
3
|
-
import { View, type FlatList as NativeFlatList } from "react-native";
|
|
3
|
+
import { Platform, View, type FlatList as NativeFlatList } from "react-native";
|
|
4
4
|
import { Pressable, Text } from "./text";
|
|
5
5
|
import { Icon, FlatList } from "@getpaseo/plugin/client/ui";
|
|
6
|
-
import { type Badge, type HomeGroupId, type HomeModel, type Workstream, blocksOn, lineBasis, lineWidth, prChipSpoken, railChips, railKeeps, runningMark } from "../shared/home";
|
|
6
|
+
import { type Badge, type HomeGroupId, type HomeModel, type Workstream, blocksOn, hiddenChips, lineBasis, LINE_SHOWS, lineFloor, lineFloorCss, markFloorCss, titleMaxCss, lineWidth, rowReserve, titleFloor, prChipSpoken, prLabelText, railChips, railKeeps, runningMark } from "../shared/home";
|
|
7
7
|
import { ASK_KEY, excerpt, FIELD_LABEL, type OmniboxItem, type Range, type RowHit, type SearchHit, sameHit } from "../shared/search";
|
|
8
8
|
import { AskRow, PriorityLine } from "./home-chrome";
|
|
9
9
|
import { age, wakeLabel, wakeShort } from "../shared/inbox";
|
|
@@ -19,7 +19,7 @@ import { ChipLine, heldKey, isHeld, useHeldVersion, type ChipRow } from "./row-c
|
|
|
19
19
|
import { keepInPlace } from "../shared/keep-in-place";
|
|
20
20
|
import type { RowChip } from "../shared/row-chips";
|
|
21
21
|
import { walkOrder } from "../shared/list-keys";
|
|
22
|
-
import { BRIEF_KEY, OVERSEER_KEY, QUIET_PAGE, listEntries, type Entry } from "../shared/list-entries";
|
|
22
|
+
import { BACKLOG_KEY, BRIEF_KEY, OVERSEER_KEY, QUIET_PAGE, backlogLine, backlogTitle, listEntries, type Entry } from "../shared/list-entries";
|
|
23
23
|
import { RowMenu, useRowMenuTrigger, type OpenRowMenu, type RowMenuOpen } from "./row-menu";
|
|
24
24
|
import type { RowMenuItem, RowMenuSection } from "../shared/row-menu";
|
|
25
25
|
import { homeGroupOpen, writeHomeGroupOpen } from "../shared/settings-nav";
|
|
@@ -192,6 +192,18 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
|
|
|
192
192
|
case "brief": return <BriefRow theme={theme} line={briefLine ?? ""} selected={!touch && (selectedKey === null || selectedKey === BRIEF_KEY)} touch={touch} onSelect={onSelect} />;
|
|
193
193
|
case "overseer": return overseer ? <OverseerRow theme={theme} o={overseer} pinned={!!item.pinned} selected={selectedKey === OVERSEER_KEY || (overseerActive && !touch)} touch={touch} stacked={stackOverseer} onSelect={onSelect} selectedBg={selectedKey === OVERSEER_KEY ? selectedBg : activeBg} /> : null;
|
|
194
194
|
case "header": return <GroupHeader theme={theme} title={item.title} count={item.count} open={item.open} tone={item.group === "needs" && item.count ? c.statusWarning : undefined} dense={dense} touch={touch} folds={item.group === "older" || item.group === "quiet"} onPress={() => toggle(item.group)} />;
|
|
195
|
+
// invariant 249: a fresh install's backlog is one Needs-you line; it opens to the workspaces, each with its own Send.
|
|
196
|
+
case "backlog": return <Pressable testID="follow-up-backlog" accessibilityRole="button" aria-expanded={item.open} accessibilityState={{ expanded: item.open }}
|
|
197
|
+
accessibilityLabel={`${backlogTitle(item.repairs)}. ${backlogLine(item.workspaces)}. ${item.open ? "Collapse" : "Show them"}`} onPress={() => toggleProject(BACKLOG_KEY)}
|
|
198
|
+
style={state => ({ flexDirection: "row", alignItems: "flex-start", gap: touch ? 10 : dense ? 8 : 10, minHeight: touch ? 56 : dense ? 36 : 38, paddingHorizontal: touch ? 14 : dense ? 8 : 16, paddingVertical: touch ? 12 : 6,
|
|
199
|
+
...(touch ? { borderBottomWidth: 1, borderBottomColor: withAlpha(c.border, 0.6) } : {}), backgroundColor: (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
200
|
+
<View style={{ width: touch ? 18 : 16, alignItems: "center", paddingTop: touch ? 2 : 1 }}><Icon name="Send" size={touch ? 17 : 15} color={c.statusWarning} /></View>
|
|
201
|
+
<View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
202
|
+
<Text numberOfLines={touch ? 2 : 1} style={{ color: c.foreground, fontSize: touch ? 15 : 13, lineHeight: touch ? 20 : 18, fontWeight: "500" }}>{backlogTitle(item.repairs)}</Text>
|
|
203
|
+
<Text numberOfLines={2} style={{ color: c.foregroundMuted, fontSize: touch ? 13 : 12, lineHeight: touch ? 18 : 16 }}>{backlogLine(item.workspaces)}</Text>
|
|
204
|
+
</View>
|
|
205
|
+
<View style={{ paddingTop: touch ? 2 : 1 }}><Icon name={item.open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted} /></View>
|
|
206
|
+
</Pressable>;
|
|
195
207
|
case "fold": return <Pressable accessibilityRole="button" aria-expanded={item.open} accessibilityState={{ expanded: item.open }} accessibilityLabel={`${item.project}, ${item.count}. ${item.open ? "Collapse" : "Expand"}`} onPress={() => toggleProject(item.project)}
|
|
196
208
|
style={state => ({ flexDirection: "row", alignItems: "center", gap: 8, minHeight: touch ? 44 : dense ? 28 : 34, paddingHorizontal: dense ? 8 : 16, backgroundColor: (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
197
209
|
<Icon name={item.open ? "ChevronDown" : "ChevronRight"} size={13} color={c.foregroundMuted} />
|
|
@@ -325,7 +337,7 @@ const badgeColor = (b: Badge, c: Colors) => b.tone === "danger" ? c.statusDanger
|
|
|
325
337
|
|
|
326
338
|
export function BadgeView({ b, c }: { b: Badge; c: Colors }) {
|
|
327
339
|
const col = badgeColor(b, c);
|
|
328
|
-
return <View testID="follow-up-row-chip" style={{ flexShrink:
|
|
340
|
+
return <View testID="follow-up-row-chip" style={{ flexShrink: 0, paddingHorizontal: 6, height: 20, justifyContent: "center", borderRadius: 4, backgroundColor: b.tone === "muted" ? c.surface2 : tint(col, c) }}>
|
|
329
341
|
<Text numberOfLines={1} style={{ color: col, fontSize: 11, lineHeight: 14, fontWeight: "500" }}>{b.text}</Text>
|
|
330
342
|
</View>;
|
|
331
343
|
}
|
|
@@ -333,9 +345,9 @@ export function BadgeView({ b, c }: { b: Badge; c: Colors }) {
|
|
|
333
345
|
export function PrChipView({ s, c }: { s: Workstream; c: Colors }) {
|
|
334
346
|
if (!s.pr) return null;
|
|
335
347
|
const checks = s.pr.checks;
|
|
336
|
-
return <View testID="follow-up-row-chip" role="img" aria-label={prChipSpoken(s.pr)} style={{ flexShrink:
|
|
348
|
+
return <View testID="follow-up-row-chip" role="img" aria-label={prChipSpoken(s.pr)} style={{ flexShrink: 0, flexDirection: "row", alignItems: "center", gap: 4, paddingHorizontal: 6, height: 20, borderRadius: 4, borderWidth: 1, borderColor: c.border }}>
|
|
337
349
|
<Icon name="GitPullRequest" size={11} color={toneColor(c, s.pr.tone)} />
|
|
338
|
-
<Text numberOfLines={1} style={{ flexShrink: 0, color: c.foreground, fontSize: 11, lineHeight: 14, fontVariant: ["tabular-nums"] }}>{s.pr.label}</Text>
|
|
350
|
+
<Text numberOfLines={1} style={{ flexShrink: 0, color: c.foreground, fontSize: 11, lineHeight: 14, fontVariant: ["tabular-nums"] }}>{prLabelText(s.pr.label)}</Text>
|
|
339
351
|
{checks && <Text numberOfLines={1} style={{ flexShrink: 1, minWidth: 0, color: checks.tone === "muted" ? c.foregroundMuted : badgeColor({ text: "", tone: checks.tone }, c), fontSize: 11, lineHeight: 14 }}>{checks.text}</Text>}
|
|
340
352
|
</View>;
|
|
341
353
|
}
|
|
@@ -344,7 +356,7 @@ export function PrChipView({ s, c }: { s: Workstream; c: Colors }) {
|
|
|
344
356
|
export function PrSummaryText({ s, c, lead = "" }: { s: Workstream; c: Colors; lead?: string }) {
|
|
345
357
|
if (!s.pr) return null;
|
|
346
358
|
const checks = s.pr.checks;
|
|
347
|
-
return <Text>{lead}<Text style={{ color: c.foreground }}>{s.pr.label
|
|
359
|
+
return <Text>{lead}<Text style={{ color: c.foreground }}>{prLabelText(s.pr.label)}</Text>
|
|
348
360
|
{checks && <Text style={{ color: checks.tone === "muted" ? c.foregroundMuted : badgeColor({ text: "", tone: checks.tone }, c) }}>{` ${checks.text}`}</Text>}</Text>;
|
|
349
361
|
}
|
|
350
362
|
|
|
@@ -366,19 +378,35 @@ const RowTime = memo(function RowTime({ s, c, size, top = 0 }: { s: Workstream;
|
|
|
366
378
|
}, (a, b) => a.s.sig === b.s.sig && a.c === b.c && a.size === b.size && a.top === b.top);
|
|
367
379
|
|
|
368
380
|
/**
|
|
369
|
-
* row-chips-never-cover-the-time: a desktop row's badges and PR chip, in
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
381
|
+
* row-chips-never-cover-the-time, a-row-never-clips-a-chip (invariants 34, 176): a desktop row's badges and PR chip, in
|
|
382
|
+
* priority order (most telling first). The time column never moves. The line keeps its reserve first; the first chip
|
|
383
|
+
* takes its width from the line down to LINE_FLOOR (the line shrinks a thousand times faster than the rail); a chip
|
|
384
|
+
* that doesn't fit whole wraps onto a hidden line, or sticks out of a rail narrower than it, and is then not drawn:
|
|
385
|
+
* the rail says "+N" for it (measured from the chips' laid-out boxes, `hiddenChips`). Never a sliver. Guarded by
|
|
386
|
+
* `scripts/screenshots.mjs --only rowchips` and tests/row-chips.test.ts.
|
|
373
387
|
*/
|
|
388
|
+
/** The rail's least width once it says "+N": the gap and the count whole, so it never runs onto the time. */
|
|
389
|
+
const morePx = (n: number): number => 6 + 8 * (1 + String(n).length) + 2;
|
|
374
390
|
const ChipRail = memo(function ChipRail({ s, c, dim = false }: { s: Workstream; c: Colors; /** An Older row: chips at 60 %, like its glyph. */ dim?: boolean }) {
|
|
375
391
|
chipRails++;
|
|
376
392
|
const chips = railChips(s);
|
|
393
|
+
// Laid-out sizes live in refs: a rail re-renders only when the set of chips it hides changes (invariant 200's cost).
|
|
394
|
+
const width = useRef<number | null>(null);
|
|
395
|
+
const boxes = useRef<({ x: number; y: number; width: number } | null)[]>([]);
|
|
396
|
+
const [hiddenKey, setHiddenKey] = useState("");
|
|
397
|
+
const refit = useCallback(() => setHiddenKey([...hiddenChips(chips.map((_, i) => boxes.current[i] ?? null), width.current)].join(",")), [chips.length]);
|
|
398
|
+
const box = useCallback((i: number, b: { x: number; y: number; width: number }) => { boxes.current[i] = { x: b.x, y: b.y, width: b.width }; refit(); }, [refit]);
|
|
377
399
|
if (chips.length === 0) return null;
|
|
378
|
-
|
|
379
|
-
//
|
|
380
|
-
return <View testID="follow-up-row-chips" style={{ ...(dim ? { opacity: 0.6 } : {}), flexGrow: 1, flexShrink:
|
|
381
|
-
{
|
|
400
|
+
const hidden = new Set(hiddenKey ? hiddenKey.split(",").map(Number) : []);
|
|
401
|
+
// the-rail-starts-at-its-first-chip: its basis is its first chip, whole; spare room goes to the line first.
|
|
402
|
+
return <View testID="follow-up-row-chips" style={{ ...(dim ? { opacity: 0.6 } : {}), flexGrow: 1, flexShrink: 10000, flexBasis: railKeeps(s), minWidth: hidden.size > 0 ? morePx(hidden.size) : 0, flexDirection: "row", alignItems: "center", justifyContent: "flex-end", columnGap: 6 }}>
|
|
403
|
+
<View onLayout={e => { width.current = e.nativeEvent.layout.width; refit(); }} style={{ flexShrink: 1, minWidth: 0, height: 20, overflow: "hidden", flexDirection: "row", flexWrap: "wrap", justifyContent: "flex-end", columnGap: 10, rowGap: 4 }}>
|
|
404
|
+
{chips.map((ch, i) => <View key={ch.kind === "badge" ? ch.badge.text : "pr"} testID={hidden.has(i) ? "follow-up-row-chip-hidden" : undefined} onLayout={e => box(i, e.nativeEvent.layout)}
|
|
405
|
+
style={{ opacity: hidden.has(i) ? 0 : 1 }} aria-hidden={hidden.has(i) || undefined}>
|
|
406
|
+
{ch.kind === "badge" ? <BadgeView b={ch.badge} c={c} /> : <PrChipView s={s} c={c} />}
|
|
407
|
+
</View>)}
|
|
408
|
+
</View>
|
|
409
|
+
{hidden.size > 0 && <Text testID="follow-up-row-chips-more" style={{ flexShrink: 0, color: c.foregroundMuted, fontSize: 11 }}>+{hidden.size}</Text>}
|
|
382
410
|
</View>;
|
|
383
411
|
// Show › Pull request off hands the rail a copy without the PR and the same sig, so the PR's presence counts too.
|
|
384
412
|
}, (a, b) => a.s.sig === b.s.sig && !!a.s.pr === !!b.s.pr && a.c === b.c && a.dim === b.dim);
|
|
@@ -466,6 +494,7 @@ const Row = memo(function Row({ s: raw, theme, dense, touch, selected, onSelect,
|
|
|
466
494
|
const lead = s.lead ? <><Text style={{ color: muted ? c.foregroundMuted : c.foreground }}>{s.lead.text}</Text>{s.lead.position ? `\u00a0${s.lead.position}` : ""}{s.line ? " · " : ""}</> : null;
|
|
467
495
|
const line: ReactNode = s.word && s.group !== "needs" ? (s.line ? <>{s.word} · {lead}{shownLine}</> : s.word) : <>{lead}{shownLine}</>;
|
|
468
496
|
const via = hit?.via ? (() => { const e = excerpt(hit.via.text, hit.via.ranges, touch ? 90 : dense ? 90 : 44); return <>{FIELD_LABEL[hit.via.field]} · {marks(e.text, e.ranges, c)}</>; })() : null;
|
|
497
|
+
const titleText = s.title + (s.agent ? ` › ${s.agent}` : "");
|
|
469
498
|
const title = <>{marks(s.title, hit?.titleRanges, c)}{s.agent ? <Text style={{ color: c.foregroundMuted, fontWeight: "400" }}>{" › "}{marks(s.agent, hit?.agentRanges, c)}</Text> : null}</>;
|
|
470
499
|
// Phones: "Working" under every row of a "Working 9" group says nothing the header didn't; one line per row instead.
|
|
471
500
|
const generic = touch && !s.word && !s.lead && s.line === "Working";
|
|
@@ -519,21 +548,31 @@ const Row = memo(function Row({ s: raw, theme, dense, touch, selected, onSelect,
|
|
|
519
548
|
{detail?.meta && <MetaLine s={s} d={detail} c={c} touch={false} dim={older} />}
|
|
520
549
|
{chips && <ChipLine s={s} theme={theme} layout="dense" onChip={onChip!} anchor={anchor} top={4} />}
|
|
521
550
|
</View> : <View style={{ flex: 1, minWidth: 0, gap: 1, paddingVertical: why ? 4 : 0, ...(chips ? { paddingTop: 6, paddingBottom: 5 } : {}) }}><View style={{ flexDirection: "row", alignItems: "center", gap: 10 }}>
|
|
522
|
-
{/* The title keeps its width (up to 55 %) and the chips yield;
|
|
523
|
-
|
|
551
|
+
{/* The title keeps its width (up to 55 %) and the chips yield; beside Send now, which can't, it shrinks. It also
|
|
552
|
+
gives way last, once the line is at its floor and the rail is down to "+N", so nothing runs onto the time. Its
|
|
553
|
+
title never flex-shrinks (beside Send now it does): its max-width is the room the rest of the row leaves
|
|
554
|
+
(titleMaxCss), since any shrink factor loses it a pixel and an ellipsis. The line (100000) gives way before the
|
|
555
|
+
rail (10000), and the running mark keeps its whole width until the row lacks room (markFloorCss). */}
|
|
556
|
+
<Text numberOfLines={1} style={{ flexShrink: sendNow ? 1 : 0, minWidth: titleFloor(titleText), maxWidth: Platform.OS === "web" ? titleMaxCss(titleText, 10 + (!via && s.group === "needs" && s.word ? s.word.length * 7 + 10 : 0) + lineFloor(lineText(s, hit)) + (runningMark(s) ? runningMark(s)!.length * 7 + 31 : 0) + (railChips(rail).length > 0 ? 40 : 0) + (sendNow ? 100 : 0)) as unknown as number : "55%", color: muted ? c.foregroundMuted : c.foreground, fontSize: 13, fontWeight: muted ? "400" : "500" }}>{title}</Text>
|
|
524
557
|
{/* A Needs-you row's word (Permission, Question…) is why it's there: it keeps its place, the chips yield first. */}
|
|
525
558
|
{!via && s.word && s.group === "needs" ? <Text numberOfLines={1} style={{ flexShrink: 0, color, fontSize: 12 }}>{s.word}</Text> : null}
|
|
526
559
|
{/* -10 takes back the row gap and the separator opens with a no-break space (a leading plain space is trimmed), so
|
|
527
560
|
"Permission · Accept…" reads as one line, and the dot goes with the line when there's no room for it. */}
|
|
528
|
-
{/* the-line-wins-the-width: the line starts at its own width up to LINE_KEEPS (never flex: 1's 0)
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
spare room goes to the line first (flexGrow 1000)
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
561
|
+
{/* the-line-wins-the-width: the line starts at its own width up to LINE_KEEPS (never flex: 1's 0); chips past the
|
|
562
|
+
first drop whole into "+N" before it is cut. The rail's first chip (the-rail-keeps-its-first-chip) takes width
|
|
563
|
+
from the line, which shrinks first, down to LINE_FLOOR; below that the first chip drops into "+N" too. With
|
|
564
|
+
room the line grows, never past its own text: the rest goes to the rail (flexGrow 1), so a chip never drops
|
|
565
|
+
beside blank line; spare room goes to the line first (flexGrow 1000). */}
|
|
566
|
+
{/* Squeezed below LINE_SHOWS, the line shows nothing rather than a lone "·" or "· …": its words sit after a
|
|
567
|
+
zero-width spacer in a one-line-high wrapping box, so they wrap onto the hidden second line instead. */}
|
|
568
|
+
<View testID="follow-up-row-line" style={{ flexGrow: 1000, flexShrink: 100000, flexBasis: lineBasis(lineText(s, hit)), maxWidth: lineWidth(lineText(s, hit)), minWidth: Platform.OS === "web" ? lineFloorCss(lineText(s, hit), rowReserve({ title: titleText, word: !via && s.group === "needs" ? s.word : null, mark: via ? null : runningMark(s), rail: railChips(rail).length > 0, sendNow: !!sendNow })) as unknown as number : lineFloor(lineText(s, hit)), marginLeft: !via && s.word && s.group === "needs" ? -10 : 0,
|
|
569
|
+
flexDirection: "row", flexWrap: "wrap", alignContent: "flex-start", height: 16, overflow: "hidden" }}>
|
|
570
|
+
<View style={{ width: 0, height: 16 }} />
|
|
571
|
+
<Text numberOfLines={1} style={{ flexGrow: 1, flexShrink: 1, flexBasis: LINE_SHOWS, minWidth: LINE_SHOWS, lineHeight: 16, color: c.foregroundMuted, fontSize: 12 }}>
|
|
572
|
+
{via ?? <>{s.word && s.group === "needs" && s.line ? "\u00a0· " : ""}{line}</>}
|
|
573
|
+
</Text>
|
|
574
|
+
</View>
|
|
575
|
+
{!via && <RunningMark s={s} c={c} size={12} lineHeight={16} tight reserve={rowReserve({ title: titleText, word: s.group === "needs" ? s.word : null, mark: null, rail: railChips(rail).length > 0, sendNow: !!sendNow })} />}
|
|
537
576
|
<ChipRail s={rail} c={c} dim={older} />
|
|
538
577
|
{sendNow}
|
|
539
578
|
</View>{!!why && <View style={{ paddingRight: 40 }}><PriorityLine reason={why.reason} source={why.source} c={c} /></View>}
|
|
@@ -552,13 +591,19 @@ function Marked({ s, c, size, lineHeight, align, children }: { s: Workstream; c:
|
|
|
552
591
|
if (!runningMark(s)) return <>{children}</>;
|
|
553
592
|
return <View style={{ flexDirection: "row", alignItems: align, minWidth: 0 }}>{children}<RunningMark s={s} c={c} size={size} lineHeight={lineHeight} /></View>;
|
|
554
593
|
}
|
|
555
|
-
function RunningMark({ s, c, size, lineHeight, tight = false }: { s: Workstream; c: Colors; size: number; lineHeight: number; /** Wide rows: take back the row gap. */ tight?: boolean }) {
|
|
594
|
+
function RunningMark({ s, c, size, lineHeight, tight = false, reserve = 0 }: { s: Workstream; c: Colors; size: number; lineHeight: number; /** Wide rows: take back the row gap. */ tight?: boolean; /** Wide rows: what the rest of the row needs beside the mark (markFloorCss). */ reserve?: number }) {
|
|
556
595
|
const text = runningMark(s);
|
|
557
596
|
if (!text) return null;
|
|
558
|
-
|
|
559
|
-
|
|
597
|
+
// Wide rows: the mark stays whole while the row has its `reserve`; in a list too narrow for the word, the mark and
|
|
598
|
+
// "+N" (320 px) its words give way, down to its spinner ("· ◌"; the row's label still says "N running"), so nothing
|
|
599
|
+
// runs onto the time (invariant 34). Off the web the mark never shrinks.
|
|
600
|
+
// Its words show whole or not at all ("· ◌ 1." read as a typo): they wrap onto a hidden second line, never cut.
|
|
601
|
+
const web = tight && Platform.OS === "web";
|
|
602
|
+
return <View style={{ flexShrink: web ? 1 : 0, minWidth: web ? markFloorCss(text, size, reserve) as unknown as number : undefined, flexDirection: "row", alignItems: "center", gap: 4, height: lineHeight, marginLeft: tight ? -6 : 0,
|
|
603
|
+
...(web ? { flexWrap: "wrap" as const, alignContent: "flex-start" as const, overflow: "hidden" as const } : {}) }}>
|
|
604
|
+
<Text style={{ flexShrink: 0, color: c.foregroundMuted, fontSize: size, lineHeight }}>{"\u00a0·"}</Text>
|
|
560
605
|
<Spinner color={runningColor(c)} size={size - 1} label="Working" />
|
|
561
|
-
<Text numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: size, lineHeight, fontVariant: ["tabular-nums"] }}>{text}</Text>
|
|
606
|
+
<Text testID="follow-up-row-running-text" numberOfLines={1} style={{ flexShrink: web ? 0 : 1, minWidth: 0, color: c.foregroundMuted, fontSize: size, lineHeight, fontVariant: ["tabular-nums"] }}>{text}</Text>
|
|
562
607
|
</View>;
|
|
563
608
|
}
|
|
564
609
|
|
|
@@ -574,7 +619,7 @@ function MetaLine({ s, d, c, touch, dim }: { s: Workstream; d: RowDetail; c: Col
|
|
|
574
619
|
if (d.project) parts.push(<View key="p" style={{ flexDirection: "row", alignItems: "center", gap: 3, flexShrink: 1, minWidth: 0 }}><Icon name="Folder" size={glyph} color={c.foregroundMuted} /><Text numberOfLines={1} style={{ flexShrink: 1, color: c.foregroundMuted, fontSize: size }}>{d.project}</Text></View>);
|
|
575
620
|
if (d.pr && s.pr) parts.push(<View key="r" style={{ flexDirection: "row", alignItems: "center", gap: 3, flexShrink: 0 }}>
|
|
576
621
|
<Icon name="GitPullRequest" size={glyph} color={toneColor(c, s.pr.tone)} />
|
|
577
|
-
<Text numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: size, fontVariant: ["tabular-nums"] }}>{s.pr.label}</Text>
|
|
622
|
+
<Text numberOfLines={1} style={{ color: c.foregroundMuted, fontSize: size, fontVariant: ["tabular-nums"] }}>{prLabelText(s.pr.label)}</Text>
|
|
578
623
|
{checks && <Text numberOfLines={1} style={{ color: checks.tone === "muted" ? c.foregroundMuted : badgeColor({ text: "", tone: checks.tone }, c), fontSize: size }}>{checks.text}</Text>}
|
|
579
624
|
</View>);
|
|
580
625
|
for (const l of d.labels) parts.push(<View key={`l:${l}`} style={{ flexDirection: "row", alignItems: "center", gap: 4, flexShrink: 1, minWidth: 0 }}><View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: c.foregroundMuted }} /><Text numberOfLines={1} style={{ flexShrink: 1, color: c.foregroundMuted, fontSize: size }}>{l}</Text></View>);
|
package/client/home.tsx
CHANGED
|
@@ -51,8 +51,8 @@ import { overseerRowState } from "../shared/overseer";
|
|
|
51
51
|
import { echoed, turnSource } from "../shared/turn";
|
|
52
52
|
import type { OmniboxItem } from "../shared/search";
|
|
53
53
|
import { DisplayMenu, FilterLine, LayoutNotice, ListTop, SearchField, StatusStrip, UsageMeters, useOmnibox, useSlashToFocus } from "./home-chrome";
|
|
54
|
-
import {
|
|
55
|
-
import { useArranged, useHomeModel, useTick, type HomeSources } from "./home-data";
|
|
54
|
+
import { homeViewFiltered } from "../shared/home-arrange";
|
|
55
|
+
import { useArranged, useHomeCounts, useHomeModel, useTick, type HomeSources } from "./home-data";
|
|
56
56
|
import { laterLabel, useInbox, UndoBar, useNextRelay, useSidebarViewActive } from "./inbox";
|
|
57
57
|
import { livePeekQuestion, useRowChipActions, type ChipRow } from "./row-chips";
|
|
58
58
|
import { Spinner } from "./motion";
|
|
@@ -163,7 +163,7 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
163
163
|
// Display's Pinned, grouping and filters: the same arrangement the sidebar view draws (shared/home-arrange.ts).
|
|
164
164
|
const { arranged, view, facts } = useArranged(deps.sources, model);
|
|
165
165
|
// The strip counts what its tap lists: Display's filters applied, pinned rows in their group (arrangedCounts).
|
|
166
|
-
const stripCounts =
|
|
166
|
+
const stripCounts = useHomeCounts(deps.sources, model);
|
|
167
167
|
// The setup row: an existing install's offer, or Finish setup once Close has put setup's popup away.
|
|
168
168
|
useViewVersion();
|
|
169
169
|
const setupRow = !!props.onboarding?.offer || !!finishSetupLine(props.onboarding, setupClosed());
|
|
@@ -202,11 +202,11 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
202
202
|
const current = resolve(selected);
|
|
203
203
|
const tracked = useSyncExternalStore(deps.sources.live.subscribe, deps.sources.live.version, deps.sources.live.version);
|
|
204
204
|
const rows = useInbox(inbox, () => inbox.rows());
|
|
205
|
-
//
|
|
205
|
+
// Catch up's count is its cards, one per Needs-you row the strip counts (arranged, invariant 249), the deck it opens on.
|
|
206
206
|
// Your questions: each unread answer is a card too (shared deckCards), so the button counts what Catch up deals.
|
|
207
207
|
const questions = useSyncExternalStore(deps.sources.extras.subscribe, deps.sources.extras.context, deps.sources.extras.context);
|
|
208
|
-
const deckSize = useMemo(() => { const unread = questionsByWorkspace(questions); return deckCards({ model, rows, items: id => { const w = deps.sources.live.get(id); return w ? needsYou(w as never) : []; }, answers: id => unread.get(id)?.unread ?? [] }).length; }, [
|
|
209
|
-
const pane = useMemo(() => briefPane({ model, rows, tracked: deps.sources.live.all(), now: Date.now() }), [model, rows, tracked, deps.sources.live]);
|
|
208
|
+
const deckSize = useMemo(() => { const unread = questionsByWorkspace(questions); return deckCards({ model: { groups: arranged.byGroup }, rows, items: id => { const w = deps.sources.live.get(id); return w ? needsYou(w as never) : []; }, answers: id => unread.get(id)?.unread ?? [] }).length; }, [arranged, rows, tracked, deps.sources.live, questions]);
|
|
209
|
+
const pane = useMemo(() => briefPane({ model, rows, tracked: deps.sources.live.all(), now: Date.now(), counts: stripCounts }), [model, rows, tracked, deps.sources.live, stripCounts]);
|
|
210
210
|
const rank = useSyncExternalStore(deps.sources.extras.subscribe, deps.sources.extras.rank, deps.sources.extras.rank);
|
|
211
211
|
// The daily brief (invariant 197): Home's live model plus the morning read's meetings, re-read when a ranking or the queue moves.
|
|
212
212
|
const day = useDailyMeetings(`${queue.revision ?? ""}|${rank?.lastRunAt ?? ""}`);
|
|
@@ -559,7 +559,8 @@ function DetailPane({ s, model, theme, compact, deps, openFull, signOffNext, ask
|
|
|
559
559
|
const flagged = !!row?.needs;
|
|
560
560
|
// one-done-button: while an action card waits here, Done tells the agent and Sign off doesn't, so Sign off yields:
|
|
561
561
|
// never the primary, and the row's ✕ instead of a ✓ that would read as Done.
|
|
562
|
-
|
|
562
|
+
// A bare Action brief (no task card) has the card's own Done now too (invariant 249), so it counts.
|
|
563
|
+
const actionOpen = !!w && asks.some(i => i.kind === "question" && allQuestions(w).some(q => q.id === i.questionId && isDoneOnly(q))) || (!!b && b.kind === "action" && briefAsks(b, row));
|
|
563
564
|
const signOffIcon = actionOpen ? "X" : "Check";
|
|
564
565
|
const planned = paneButtons({ permissions: agent.permissions.length, decisions: !!b?.decisions.some(d => d.options.length), items, flagged, hasAgent: !!s.agentId });
|
|
565
566
|
const plan = actionOpen && planned.primary === "sign_off" ? { ...planned, primary: "item" as const } : planned;
|
|
@@ -1052,7 +1053,7 @@ function LogView({ theme, compact, sources, onHome, onOpen }: { theme: Theme; co
|
|
|
1052
1053
|
const [days, setDays] = useState(0);
|
|
1053
1054
|
const since = useMemo(() => days ? Date.now() - days * 86_400_000 : lastWorkdayEnd(Date.now()), [days]);
|
|
1054
1055
|
const lines = useMemo(() => followUpLog(sources.live.all(), since), [version, since, sources.live]);
|
|
1055
|
-
const needs = sources
|
|
1056
|
+
const needs = useHomeCounts(sources).needs;
|
|
1056
1057
|
// A week of a busy host is hundreds of lines: pages (client/paged-list.tsx), a new window starts at page 1.
|
|
1057
1058
|
const page = usePagedList({ items: lines, resetKey: String(days), theme, compact, noun: "lines" });
|
|
1058
1059
|
return <ScrollView style={{ flex: 1, backgroundColor: c.surface0 }} contentContainerStyle={{ padding: compact ? 16 : 28, gap: 12, maxWidth: 820, width: "100%", alignSelf: "center" }}>
|
package/client/live.tsx
CHANGED
|
@@ -10,8 +10,7 @@ import { isArchivedEntry, listEntry, listEntrySchema, splitReadStamps, withReadS
|
|
|
10
10
|
import type { Workspace } from "../shared/model";
|
|
11
11
|
import { activeNeeds, needsYou } from "../shared/attention";
|
|
12
12
|
import { useSidebarViewActive } from "./inbox";
|
|
13
|
-
import {
|
|
14
|
-
import { useHomeModel, type HomeSources } from "./home-data";
|
|
13
|
+
import { useHomeCounts, type HomeSources } from "./home-data";
|
|
15
14
|
import { onVisible, whileVisible } from "./visibility";
|
|
16
15
|
import { FOLLOW_UP_ICON, NEED_DOT, needDotBox } from "./follow-up-icon";
|
|
17
16
|
import { WhatsNewGate } from "./release-notes";
|
|
@@ -167,8 +166,8 @@ export function headerIcon(store: LiveStore) {
|
|
|
167
166
|
*/
|
|
168
167
|
export function sidebarItem(sources: HomeSources, screenId: string, links: { openSettings?: (category?: string) => void } = {}) {
|
|
169
168
|
return function FollowSidebarItem({ currentScreen, openScreen, theme, layout }: PluginSidebarItemProps) {
|
|
170
|
-
// The same
|
|
171
|
-
const count =
|
|
169
|
+
// The same count as Home's status strip, group header and brief line (useHomeCounts, invariant 249).
|
|
170
|
+
const count = useHomeCounts(sources).needs;
|
|
172
171
|
const inSidebarView = useSidebarViewActive();
|
|
173
172
|
const c = theme.colors;
|
|
174
173
|
const shown = count > 0 && !inSidebarView;
|
package/client/needs-you.tsx
CHANGED
|
@@ -256,7 +256,7 @@ function QuestionState({ workspace: w, questionId, theme }: { workspace: Workspa
|
|
|
256
256
|
*/
|
|
257
257
|
export function NeedsYouBlock({ workspace: w, theme, compact, actions, now, brief = null, briefCard = null, style, fold = false, permissions = null }: {
|
|
258
258
|
workspace: Workspace; theme: Theme; compact: boolean; actions: NeedActions; now: number;
|
|
259
|
-
/** The agent's open brief this surface shows, or null. */ brief?: Pick<Brief, "questionIds" | "context" | "kind" | "moves"> | null;
|
|
259
|
+
/** The agent's open brief this surface shows, or null. */ brief?: Pick<Brief, "questionIds" | "context" | "kind" | "moves" | "source" | "factsPr" | "ask"> | null;
|
|
260
260
|
/** That brief's own card, drawn when it points at no open question. */ briefCard?: ReactNode; style?: StyleProp<ViewStyle>;
|
|
261
261
|
/** The workspace panel's section: it folds (client/fold.tsx), and folded its header names the first ask. */ fold?: boolean;
|
|
262
262
|
/** The agents' pending permissions with Allow and Deny (client/agent-card.tsx), first in the block and in its count. */
|
package/client/panel.tsx
CHANGED
|
@@ -41,6 +41,7 @@ import { ViewR } from "./view-r";
|
|
|
41
41
|
import { HeadMore, ViewRHeader } from "./view-r-header";
|
|
42
42
|
import { useNewView } from "./display";
|
|
43
43
|
import { needsCount } from "../shared/view-r";
|
|
44
|
+
import { allQuestions } from "../shared/outside-run";
|
|
44
45
|
import { useLinkedSheets } from "./linked";
|
|
45
46
|
import { PanelMore } from "./panel-menu";
|
|
46
47
|
import { openRowChat, type StepOpeners } from "./open-steps";
|
|
@@ -599,7 +600,7 @@ function WorkspaceViewBody({ theme, layout, workspace: w, navigation, loadError,
|
|
|
599
600
|
if (newView) {
|
|
600
601
|
const wideR = width >= 760 && !compact;
|
|
601
602
|
// one-needs-you-count (invariant 224): the header's "N need you" is the index's Needs-you count.
|
|
602
|
-
const needsN = needsCount(needsYou(w, now), { permissions: permissions?.count ?? 0, brief:
|
|
603
|
+
const needsN = needsCount(needsYou(w, now), { permissions: permissions?.count ?? 0, brief: ask?.card ? ask.brief : null, questions: allQuestions(w) });
|
|
603
604
|
const rHead = <ViewRHeader workspace={w} theme={theme} compact={compact} now={now} needs={needsN} wide={wideR} width={width} onHome={place === "home" ? undefined : openOverview}
|
|
604
605
|
titleLead={head?.lead} titleTail={head?.tail} actions={head?.actions} resize={resize} onRefresh={() => update.mutate()} refreshing={update.isPending}
|
|
605
606
|
onAuto={next => auto.mutate(next)} autoPending={auto.isPending} notice={loadError ?? null} moves={moves?.(lay)} onOpenPr={openPr} onPart={to => setJump({ to, at: Date.now() })}
|
|
@@ -611,7 +612,7 @@ function WorkspaceViewBody({ theme, layout, workspace: w, navigation, loadError,
|
|
|
611
612
|
<ViewR workspace={w} theme={theme} compact={compact} now={now} place={place} wide={wideR} width={width} header={rHead} top={place === "home" ? top : undefined} jump={jump} rows={rows} openAgent={openAgent}
|
|
612
613
|
browserReady={browser.data?.ready ?? false}
|
|
613
614
|
parts={{ messages: guard("messages", <MessagesCard workspace={w} theme={theme} compact={compact} openAgent={openAgent} now={now} />), permissions: permissions?.node ?? null, permissionCount: permissions?.count ?? 0,
|
|
614
|
-
brief: ask?.card ? { title: mainBrief?.ask || "The main agent asks", card: guard("brief", ask.card) } : null, editLinks: linkSheets.open }} />
|
|
615
|
+
brief: ask?.card ? { title: mainBrief?.ask || "The main agent asks", card: guard("brief", ask.card), ask: ask.brief } : null, editLinks: linkSheets.open }} />
|
|
615
616
|
</PeekHost>
|
|
616
617
|
{guard("pr-sheet", <PrSheet workspace={w} prKey={detailPending ? null : sheet?.key ?? null} intent={sheet?.intent ?? null} theme={theme} compact={compact} browserReady={browser.data?.ready ?? false} onClose={() => setSheet(null)} />)}
|
|
617
618
|
{guard("question-sheet", <QuestionSheet workspace={w} questionId={detailPending ? null : question} fallback={oldQuestion} theme={theme} compact={compact} openAgent={openAgent} onClose={() => setQuestion(null)} />)}
|
package/client/pill.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import { Icon } from "@getpaseo/plugin/client/ui";
|
|
|
12
12
|
import { browserStatusRpc } from "../shared/contracts";
|
|
13
13
|
import { activeNeeds, needsYou, type NeedItem } from "../shared/attention";
|
|
14
14
|
import { briefQuestionIds, echoedItems, HEADLINE_ICON, todoLine, HEADLINE_TONE, pillState, todoLabel, withoutBriefQuestions, type PillState } from "../shared/headline";
|
|
15
|
+
import { finishLine } from "../shared/status";
|
|
15
16
|
import { snoozeUntil, type InboxRow } from "../shared/inbox";
|
|
16
17
|
import { laterChoices } from "../shared/row-menu";
|
|
17
18
|
import { isOpen as questionOpen } from "../shared/questions";
|
|
@@ -53,7 +54,8 @@ export function targets(rows: InboxRow[], workspaces: ListWorkspace[], now: numb
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
const stateFor = (t: Target | undefined, recent: { agentIds: string[]; at: number; kind?: "sign_off" | "later" | "later_ws" } | null, now: number, done = false): PillState =>
|
|
56
|
-
t ? pillState({ row: t.row, items: t.items, recent, done, now, run: t.workspace?.mainAgentId === t.agentId ? t.workspace.outsideRun : null
|
|
57
|
+
t ? pillState({ row: t.row, items: t.items, recent, done, now, run: t.workspace?.mainAgentId === t.agentId ? t.workspace.outsideRun : null,
|
|
58
|
+
doneLine: t.workspace?.mainAgentId === t.agentId ? finishLine(t.workspace, now) : null }) : null;
|
|
57
59
|
|
|
58
60
|
function useTarget(deps: Deps, agentId: string, workspaceId: string) {
|
|
59
61
|
useReviewerSettings();
|
package/client/sidebar-view.tsx
CHANGED
|
@@ -13,9 +13,9 @@ import { HomeList, OVERSEER_KEY, type OverseerRowState } from "./home-list";
|
|
|
13
13
|
import { sidebarSelected, withAlpha } from "./theme";
|
|
14
14
|
import { DisplayMenu, FilterAgainLine, FilterField, filterKey, FilterLine, LayoutNotice, OVERSEER_FIRST, StatusBadges, useListFilter } from "./home-chrome";
|
|
15
15
|
import { searchFooter } from "../shared/search";
|
|
16
|
-
import {
|
|
16
|
+
import { homeViewFiltered } from "../shared/home-arrange";
|
|
17
17
|
import type { HomeGroupId } from "../shared/home";
|
|
18
|
-
import { useArranged, useHomeModel, type HomeSources } from "./home-data";
|
|
18
|
+
import { useArranged, useHomeCounts, useHomeModel, type HomeSources } from "./home-data";
|
|
19
19
|
import { useRowMenu } from "./row-actions";
|
|
20
20
|
import { RenameHost } from "./rename";
|
|
21
21
|
import { resortHome, type Workstream } from "../shared/home";
|
|
@@ -86,7 +86,7 @@ export function inboxSidebarView(sources: HomeSources, openOverseerHome: () => v
|
|
|
86
86
|
const { arranged, view: display, facts } = useArranged(sources, model);
|
|
87
87
|
// The status badges: counts as the list shows them, and the one-group filter Home's strip sets.
|
|
88
88
|
const [status, setStatus] = useState<HomeGroupId | null>(null);
|
|
89
|
-
const counts =
|
|
89
|
+
const counts = useHomeCounts(sources, model);
|
|
90
90
|
const rank = useSyncExternalStore(sources.extras.subscribe, sources.extras.rank, sources.extras.rank);
|
|
91
91
|
const agents = refs.useAgents({});
|
|
92
92
|
const workspaces = refs.useWorkspaces({});
|
package/client/turn-view.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import { isLoaded, type LoadSignals } from "../shared/agent-load";
|
|
|
15
15
|
import { errorText } from "../shared/errors";
|
|
16
16
|
import { answerLine } from "../shared/overseer";
|
|
17
17
|
import { since } from "../shared/now";
|
|
18
|
-
import { fitTurn, foldTurn, runLabel, runSteps, turnSource, type Turn, type TurnItem, type TurnRow, type TurnSource, type TurnStep } from "../shared/turn";
|
|
18
|
+
import { fitTurn, foldTurn, messageHead, runLabel, runSteps, turnSource, type Turn, type TurnItem, type TurnRow, type TurnSource, type TurnStep } from "../shared/turn";
|
|
19
19
|
import { CLAMP, overflows } from "../shared/turn-clamp";
|
|
20
20
|
import { PEEK_CLOSED, peekStep, peekWait, pointerWhere, questionOfPeek, questionPeekAllowed, timelineOnScreen, type PeekEvent } from "../shared/peek";
|
|
21
21
|
import { QuestionBody } from "./questions";
|
|
@@ -181,7 +181,7 @@ function RowView({ r, c, compact, full = false }: { r: TurnRow; c: Colors; compa
|
|
|
181
181
|
{full ? <Clamped text={answerLine(r.text) ?? r.text} lines={CLAMP.message} c={c} style={bubble} /> : <RichText markdown={c} numberOfLines={2} style={bubble}>{answerLine(r.text) ?? r.text}</RichText>}
|
|
182
182
|
</View>;
|
|
183
183
|
case "message": return <View style={{ alignSelf: "flex-end", maxWidth: "88%", gap: 2, alignItems: "flex-end" }}>
|
|
184
|
-
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{
|
|
184
|
+
<Text style={{ color: c.foregroundMuted, fontSize: 12, lineHeight: 16 }}>{messageHead(r)}</Text>
|
|
185
185
|
<View style={{ backgroundColor: c.surface2, borderRadius: 14, borderTopRightRadius: 4, paddingHorizontal: 10, paddingVertical: 6 }}>
|
|
186
186
|
{full ? <Clamped text={r.text} lines={CLAMP.message} c={c} style={bubble} /> : <RichText markdown={c} numberOfLines={2} style={bubble}>{r.text}</RichText>}
|
|
187
187
|
</View>
|