@koinzhang/paseo-plugin-activity 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -1
- package/README.md +18 -11
- package/client/activity-heatmap.tsx +115 -74
- package/client/agent-creations.tsx +100 -90
- package/client/attention-pill.tsx +17 -6
- package/client/attention-popover.tsx +19 -23
- package/client/design-tokens.test.ts +39 -0
- package/client/design-tokens.ts +180 -0
- package/client/formatted-time.tsx +4 -4
- package/client/global-surface.tsx +243 -268
- package/client/header-button.ts +136 -0
- package/client/hourly-activity-timeline.tsx +153 -103
- package/client/panel-visibility.test.ts +25 -0
- package/client/panel-visibility.ts +45 -0
- package/client/panel.tsx +94 -111
- package/client/pill.tsx +1 -1
- package/client/provider-dropdown.tsx +134 -0
- package/client/provider-filter.test.ts +17 -13
- package/client/provider-filter.ts +5 -7
- package/client/rank-color.ts +3 -3
- package/client/ranking-bars.tsx +294 -0
- package/client/sidebar-item.tsx +15 -0
- package/client/ui.tsx +351 -0
- package/client/usage-popover.tsx +72 -137
- package/client/usage-stats.tsx +29 -11
- package/client/use-agent-turn-end.ts +2 -1
- package/client/use-app-language.ts +17 -0
- package/client/web.ts +73 -18
- package/client/workspace/agent-row.tsx +28 -28
- package/client/workspace/agents-section.tsx +42 -57
- package/client/workspace/constants.ts +8 -6
- package/client/workspace/display-menu.tsx +6 -5
- package/client/workspace/filters.test.ts +1 -1
- package/client/workspace/filters.ts +4 -2
- package/client/workspace/panel.tsx +96 -104
- package/client/workspace/rank-section.tsx +40 -65
- package/client/workspace/running-indicator.tsx +1 -1
- package/client/workspace/terminals-section.tsx +24 -12
- package/index.client.tsx +53 -31
- package/index.server.ts +55 -73
- package/package.json +3 -3
- package/paseo-plugin.json +2 -1
- package/server/agents.ts +20 -2
- package/server/background-sync.ts +34 -4
- package/server/handlers-query.test.ts +27 -1
- package/server/handlers.ts +75 -31
- package/server/host-types.ts +6 -6
- package/server/ingest.test.ts +8 -0
- package/server/messages.test.ts +96 -1
- package/server/prompt-dedupe.ts +52 -0
- package/server/rpc-cache.test.ts +74 -0
- package/server/rpc-cache.ts +48 -0
- package/server/store.test.ts +122 -0
- package/server/store.ts +313 -19
- package/server/ttl-cache.ts +3 -0
- package/server/turn-ingest.test.ts +180 -0
- package/server/turn-ingest.ts +71 -0
- package/shared/activity.test.ts +36 -0
- package/shared/activity.ts +37 -0
- package/shared/classify.test.ts +1 -10
- package/shared/classify.ts +3 -10
- package/shared/format.ts +10 -7
- package/shared/i18n.test.ts +34 -0
- package/shared/i18n.ts +363 -0
- package/shared/insights.test.ts +120 -81
- package/shared/insights.ts +125 -64
- package/shared/usage.test.ts +121 -0
- package/shared/usage.ts +191 -2
|
@@ -4,18 +4,17 @@ import {
|
|
|
4
4
|
useRpc,
|
|
5
5
|
useSettings,
|
|
6
6
|
} from "@getpaseo/plugin/client";
|
|
7
|
-
import { useToast } from "@getpaseo/plugin/client/
|
|
7
|
+
import { useToast } from "@getpaseo/plugin/client/ui";
|
|
8
8
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
9
9
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { useRegisterOpenAgent } from "../open-agent.ts";
|
|
11
|
+
import { usePanelPresenceReport } from "../panel-visibility.ts";
|
|
11
12
|
import { useWorkspaceAgentStatuses } from "../use-workspace-agent-statuses.ts";
|
|
12
13
|
import {
|
|
13
|
-
ActivityIndicator,
|
|
14
14
|
Dimensions,
|
|
15
15
|
Platform,
|
|
16
16
|
Pressable,
|
|
17
17
|
ScrollView,
|
|
18
|
-
Text,
|
|
19
18
|
View,
|
|
20
19
|
} from "react-native";
|
|
21
20
|
import { ACTIVITY_LIST_LIMIT } from "../../shared/insights.ts";
|
|
@@ -36,6 +35,8 @@ import {
|
|
|
36
35
|
usageSummaryRpc,
|
|
37
36
|
} from "../../shared/usage.ts";
|
|
38
37
|
import { useAppLanguage } from "../use-app-language.ts";
|
|
38
|
+
import { messagesFor } from "../../shared/i18n.ts";
|
|
39
|
+
import { ErrorState, InlineEmpty, LoadingState } from "../ui.tsx";
|
|
39
40
|
import { useWorkspaceActivityRefresh } from "../use-agent-turn-end.ts";
|
|
40
41
|
import { UsageStats } from "../usage-stats.tsx";
|
|
41
42
|
import { AgentsSection } from "./agents-section.tsx";
|
|
@@ -51,8 +52,8 @@ import {
|
|
|
51
52
|
STATUS_FILTER_OPTIONS,
|
|
52
53
|
TERMINAL_REFETCH_MS,
|
|
53
54
|
agentUpdatedAt,
|
|
55
|
+
localizeOptions,
|
|
54
56
|
matchesAgentFilters,
|
|
55
|
-
optionLabel,
|
|
56
57
|
type AgentGroup,
|
|
57
58
|
type AgentLifecycleFilter,
|
|
58
59
|
type AgentShowField,
|
|
@@ -65,11 +66,22 @@ import { MenuOptionList, MenuSubTrigger } from "./display-menu.tsx";
|
|
|
65
66
|
import { matchesAgentTitle } from "./filters.ts";
|
|
66
67
|
import { RankSection } from "./rank-section.tsx";
|
|
67
68
|
import { TerminalsSection, type TerminalListItem } from "./terminals-section.tsx";
|
|
69
|
+
import {
|
|
70
|
+
CONTROL,
|
|
71
|
+
FONT_WEIGHT,
|
|
72
|
+
ICON_SIZE,
|
|
73
|
+
RADIUS,
|
|
74
|
+
ROW_PADDING,
|
|
75
|
+
TEXT,
|
|
76
|
+
iconButton,
|
|
77
|
+
pageLayout,
|
|
78
|
+
pillRadius,
|
|
79
|
+
sectionTitle,
|
|
80
|
+
titleGap,
|
|
81
|
+
} from "../design-tokens.ts";
|
|
68
82
|
|
|
69
83
|
type RankKind = "skills" | "mcp";
|
|
70
84
|
|
|
71
|
-
const MONO = Platform.select({ ios: "Menlo", default: "monospace" });
|
|
72
|
-
|
|
73
85
|
/** Workspace-scoped Activity for the Explorer (024 / 031). */
|
|
74
86
|
export function WorkspaceActivityPanel({
|
|
75
87
|
theme,
|
|
@@ -104,12 +116,14 @@ export function WorkspaceActivityPanel({
|
|
|
104
116
|
const [rankKind, setRankKind] = useState<RankKind>("skills");
|
|
105
117
|
const [busyAgentId, setBusyAgentId] = useState<string | null>(null);
|
|
106
118
|
const [busyTerminalId, setBusyTerminalId] = useState<string | null>(null);
|
|
107
|
-
const
|
|
119
|
+
const page = pageLayout("panel", layout.compact);
|
|
108
120
|
const locale = useAppLanguage();
|
|
121
|
+
const m = messagesFor(locale);
|
|
109
122
|
const toast = useToast();
|
|
110
123
|
const queryClient = useQueryClient();
|
|
111
124
|
const openAgent = navigation?.openAgent;
|
|
112
125
|
useRegisterOpenAgent(openAgent);
|
|
126
|
+
usePanelPresenceReport(workspaceId);
|
|
113
127
|
const rootRef = useRef<View>(null);
|
|
114
128
|
const triggerRef = useRef<View>(null);
|
|
115
129
|
|
|
@@ -297,14 +311,16 @@ export function WorkspaceActivityPanel({
|
|
|
297
311
|
recentMcpCalls.error;
|
|
298
312
|
|
|
299
313
|
const kpi = [
|
|
300
|
-
{ label:
|
|
301
|
-
{ label:
|
|
302
|
-
{ label:
|
|
303
|
-
{
|
|
304
|
-
label: "Messages",
|
|
305
|
-
value: (summary.data?.messageCount ?? 0).toLocaleString(),
|
|
306
|
-
},
|
|
314
|
+
{ label: m.kpi.shellCalls, value: (summary.data?.shellCalls ?? 0).toLocaleString(locale) },
|
|
315
|
+
{ label: m.kpi.fileReads, value: (summary.data?.fileReads ?? 0).toLocaleString(locale) },
|
|
316
|
+
{ label: m.kpi.fileWrites, value: (summary.data?.fileWrites ?? 0).toLocaleString(locale) },
|
|
317
|
+
{ label: m.kpi.prompts, value: (summary.data?.messageCount ?? 0).toLocaleString(locale) },
|
|
307
318
|
];
|
|
319
|
+
const retry = () => {
|
|
320
|
+
for (const query of [summary, agents, skills, recentSkillCalls, mcp, recentMcpCalls]) {
|
|
321
|
+
if (query.error) void query.refetch();
|
|
322
|
+
}
|
|
323
|
+
};
|
|
308
324
|
|
|
309
325
|
const terminalItems = terminals.data?.entries ?? [];
|
|
310
326
|
const showAgents = agentItems.length > 0;
|
|
@@ -331,7 +347,7 @@ export function WorkspaceActivityPanel({
|
|
|
331
347
|
minHeight: 0,
|
|
332
348
|
minWidth: 0,
|
|
333
349
|
overflow: "hidden" as const,
|
|
334
|
-
backgroundColor:
|
|
350
|
+
backgroundColor: "transparent",
|
|
335
351
|
},
|
|
336
352
|
scroll: {
|
|
337
353
|
flex: 1,
|
|
@@ -342,9 +358,9 @@ export function WorkspaceActivityPanel({
|
|
|
342
358
|
: null),
|
|
343
359
|
},
|
|
344
360
|
content: {
|
|
345
|
-
padding,
|
|
346
|
-
paddingBottom: padding + 24,
|
|
347
|
-
gap:
|
|
361
|
+
padding: page.padding,
|
|
362
|
+
paddingBottom: page.padding + 24,
|
|
363
|
+
gap: page.gap,
|
|
348
364
|
maxWidth: 1000,
|
|
349
365
|
width: "100%" as const,
|
|
350
366
|
alignSelf: "center" as const,
|
|
@@ -367,14 +383,7 @@ export function WorkspaceActivityPanel({
|
|
|
367
383
|
justifyContent: "flex-end" as const,
|
|
368
384
|
overflow: "hidden" as const,
|
|
369
385
|
},
|
|
370
|
-
titleAction:
|
|
371
|
-
width: 24,
|
|
372
|
-
height: 24,
|
|
373
|
-
alignItems: "center" as const,
|
|
374
|
-
justifyContent: "center" as const,
|
|
375
|
-
borderRadius: 6,
|
|
376
|
-
flexShrink: 0,
|
|
377
|
-
},
|
|
386
|
+
titleAction: iconButton,
|
|
378
387
|
headerActions: {
|
|
379
388
|
flexDirection: "row" as const,
|
|
380
389
|
alignItems: "center" as const,
|
|
@@ -388,7 +397,7 @@ export function WorkspaceActivityPanel({
|
|
|
388
397
|
gap: 6,
|
|
389
398
|
height: AGENT_HEADER_HEIGHT,
|
|
390
399
|
paddingHorizontal: 10,
|
|
391
|
-
borderRadius: AGENT_HEADER_HEIGHT
|
|
400
|
+
borderRadius: pillRadius(AGENT_HEADER_HEIGHT),
|
|
392
401
|
borderWidth: 1,
|
|
393
402
|
borderColor: theme.colors.border,
|
|
394
403
|
backgroundColor: theme.colors.surface1,
|
|
@@ -399,17 +408,15 @@ export function WorkspaceActivityPanel({
|
|
|
399
408
|
minWidth: 0,
|
|
400
409
|
padding: 0,
|
|
401
410
|
margin: 0,
|
|
411
|
+
...TEXT.small,
|
|
402
412
|
color: theme.colors.foreground,
|
|
403
|
-
fontSize: 13,
|
|
404
413
|
lineHeight: 18,
|
|
405
414
|
...(Platform.OS === "web" ? ({ outlineStyle: "none" } as object) : null),
|
|
406
415
|
},
|
|
407
416
|
sectionTitle: {
|
|
417
|
+
...sectionTitle(layout.compact),
|
|
408
418
|
color: theme.colors.foreground,
|
|
409
|
-
fontSize: 16,
|
|
410
|
-
fontWeight: "600" as const,
|
|
411
419
|
flexShrink: 0,
|
|
412
|
-
letterSpacing: -0.3,
|
|
413
420
|
lineHeight: AGENT_HEADER_HEIGHT,
|
|
414
421
|
},
|
|
415
422
|
panel: {
|
|
@@ -420,7 +427,10 @@ export function WorkspaceActivityPanel({
|
|
|
420
427
|
flexDirection: "row" as const,
|
|
421
428
|
alignItems: "center" as const,
|
|
422
429
|
gap: 12,
|
|
423
|
-
paddingVertical:
|
|
430
|
+
paddingVertical: ROW_PADDING.dense,
|
|
431
|
+
},
|
|
432
|
+
listRowPressed: {
|
|
433
|
+
backgroundColor: theme.colors.surface2,
|
|
424
434
|
},
|
|
425
435
|
timelineMarker: {
|
|
426
436
|
width: 18,
|
|
@@ -446,17 +456,17 @@ export function WorkspaceActivityPanel({
|
|
|
446
456
|
zIndex: 1,
|
|
447
457
|
width: 7,
|
|
448
458
|
height: 7,
|
|
449
|
-
borderRadius:
|
|
459
|
+
borderRadius: pillRadius(7),
|
|
450
460
|
},
|
|
451
461
|
agentListRow: {
|
|
452
462
|
flexDirection: "row" as const,
|
|
453
463
|
alignItems: "center" as const,
|
|
454
464
|
gap: 10,
|
|
455
|
-
paddingVertical:
|
|
465
|
+
paddingVertical: ROW_PADDING.dense,
|
|
456
466
|
},
|
|
457
467
|
agentIconWrap: {
|
|
458
|
-
width:
|
|
459
|
-
height:
|
|
468
|
+
width: ICON_SIZE.leading,
|
|
469
|
+
height: ICON_SIZE.leading,
|
|
460
470
|
alignItems: "center" as const,
|
|
461
471
|
justifyContent: "center" as const,
|
|
462
472
|
},
|
|
@@ -466,7 +476,7 @@ export function WorkspaceActivityPanel({
|
|
|
466
476
|
bottom: -4,
|
|
467
477
|
width: 13,
|
|
468
478
|
height: 13,
|
|
469
|
-
borderRadius:
|
|
479
|
+
borderRadius: pillRadius(13),
|
|
470
480
|
alignItems: "center" as const,
|
|
471
481
|
justifyContent: "center" as const,
|
|
472
482
|
backgroundColor: theme.colors.surface0,
|
|
@@ -478,7 +488,7 @@ export function WorkspaceActivityPanel({
|
|
|
478
488
|
minWidth: 14,
|
|
479
489
|
height: 14,
|
|
480
490
|
paddingHorizontal: 3,
|
|
481
|
-
borderRadius:
|
|
491
|
+
borderRadius: pillRadius(14),
|
|
482
492
|
alignItems: "center" as const,
|
|
483
493
|
justifyContent: "center" as const,
|
|
484
494
|
backgroundColor: theme.colors.surface0,
|
|
@@ -486,11 +496,8 @@ export function WorkspaceActivityPanel({
|
|
|
486
496
|
borderColor: theme.colors.border,
|
|
487
497
|
},
|
|
488
498
|
subAgentBadgeText: {
|
|
499
|
+
...TEXT.iconBadge,
|
|
489
500
|
color: theme.colors.foregroundMuted,
|
|
490
|
-
fontSize: 9,
|
|
491
|
-
fontWeight: "700" as const,
|
|
492
|
-
fontVariant: ["tabular-nums" as const],
|
|
493
|
-
lineHeight: 11,
|
|
494
501
|
},
|
|
495
502
|
listMain: {
|
|
496
503
|
flex: 1,
|
|
@@ -498,76 +505,72 @@ export function WorkspaceActivityPanel({
|
|
|
498
505
|
gap: 3,
|
|
499
506
|
},
|
|
500
507
|
listTitle: {
|
|
508
|
+
...TEXT.rowTitle,
|
|
501
509
|
color: theme.colors.foreground,
|
|
502
|
-
fontSize: 14,
|
|
503
|
-
fontWeight: "500" as const,
|
|
504
510
|
},
|
|
505
511
|
listLink: {
|
|
512
|
+
...TEXT.rowTitle,
|
|
506
513
|
color: theme.colors.foreground,
|
|
507
|
-
fontSize: 14,
|
|
508
|
-
fontWeight: "500" as const,
|
|
509
514
|
},
|
|
510
515
|
listMeta: {
|
|
516
|
+
...TEXT.meta,
|
|
511
517
|
color: theme.colors.foregroundMuted,
|
|
512
|
-
fontSize: 12,
|
|
513
518
|
},
|
|
514
519
|
permissionBadge: {
|
|
515
520
|
flexDirection: "row" as const,
|
|
516
521
|
alignItems: "center" as const,
|
|
517
522
|
gap: 3,
|
|
518
|
-
height:
|
|
523
|
+
height: CONTROL.pillBadgeHeight,
|
|
519
524
|
paddingHorizontal: 5,
|
|
520
|
-
borderRadius:
|
|
525
|
+
borderRadius: pillRadius(CONTROL.pillBadgeHeight),
|
|
521
526
|
borderWidth: 1,
|
|
522
527
|
borderColor: theme.colors.border,
|
|
523
528
|
backgroundColor: theme.colors.surface1,
|
|
524
529
|
flexShrink: 0,
|
|
525
530
|
},
|
|
526
531
|
permissionBadgeText: {
|
|
532
|
+
...TEXT.pillBadge,
|
|
527
533
|
color: theme.colors.statusWarning,
|
|
528
|
-
fontSize: 11,
|
|
529
|
-
fontWeight: "600" as const,
|
|
530
|
-
fontVariant: ["tabular-nums" as const],
|
|
531
534
|
},
|
|
532
535
|
terminalRow: {
|
|
533
536
|
flexDirection: "row" as const,
|
|
534
537
|
alignItems: "center" as const,
|
|
535
538
|
gap: 10,
|
|
536
|
-
paddingVertical:
|
|
539
|
+
paddingVertical: ROW_PADDING.dense,
|
|
540
|
+
},
|
|
541
|
+
terminalRowPressed: {
|
|
542
|
+
backgroundColor: theme.colors.surface2,
|
|
537
543
|
},
|
|
538
544
|
terminalPreview: {
|
|
539
545
|
marginLeft: 28,
|
|
540
546
|
marginBottom: 4,
|
|
541
547
|
paddingVertical: 8,
|
|
542
548
|
paddingHorizontal: 10,
|
|
543
|
-
borderRadius:
|
|
549
|
+
borderRadius: RADIUS.control,
|
|
544
550
|
backgroundColor: theme.colors.surface1,
|
|
545
551
|
gap: 2,
|
|
546
552
|
},
|
|
547
553
|
terminalLine: {
|
|
554
|
+
...TEXT.terminal,
|
|
548
555
|
color: theme.colors.foregroundMuted,
|
|
549
|
-
fontFamily: MONO,
|
|
550
|
-
fontSize: 11,
|
|
551
|
-
lineHeight: 15,
|
|
552
556
|
},
|
|
553
557
|
countText: {
|
|
558
|
+
...TEXT.count,
|
|
554
559
|
color: theme.colors.foregroundMuted,
|
|
555
|
-
fontSize: 13,
|
|
556
|
-
fontVariant: ["tabular-nums" as const],
|
|
557
560
|
minWidth: 24,
|
|
558
561
|
textAlign: "right" as const,
|
|
559
562
|
},
|
|
560
563
|
empty: {
|
|
564
|
+
...TEXT.small,
|
|
561
565
|
color: theme.colors.foregroundMuted,
|
|
562
|
-
fontSize: 13,
|
|
563
566
|
},
|
|
564
567
|
agentGroup: {
|
|
565
568
|
gap: 4,
|
|
566
569
|
},
|
|
567
570
|
groupLabel: {
|
|
571
|
+
...TEXT.meta,
|
|
568
572
|
color: theme.colors.foregroundMuted,
|
|
569
|
-
|
|
570
|
-
fontWeight: "600" as const,
|
|
573
|
+
fontWeight: FONT_WEIGHT.semibold,
|
|
571
574
|
paddingTop: 12,
|
|
572
575
|
paddingBottom: 2,
|
|
573
576
|
},
|
|
@@ -579,20 +582,13 @@ export function WorkspaceActivityPanel({
|
|
|
579
582
|
paddingTop: 8,
|
|
580
583
|
paddingBottom: 4,
|
|
581
584
|
},
|
|
582
|
-
pagerButton:
|
|
583
|
-
width: 28,
|
|
584
|
-
height: 28,
|
|
585
|
-
alignItems: "center" as const,
|
|
586
|
-
justifyContent: "center" as const,
|
|
587
|
-
borderRadius: 6,
|
|
588
|
-
},
|
|
585
|
+
pagerButton: iconButton,
|
|
589
586
|
pagerButtonDisabled: {
|
|
590
587
|
opacity: 0.35,
|
|
591
588
|
},
|
|
592
589
|
pagerLabel: {
|
|
590
|
+
...TEXT.tabularMeta,
|
|
593
591
|
color: theme.colors.foregroundMuted,
|
|
594
|
-
fontSize: 12,
|
|
595
|
-
fontVariant: ["tabular-nums" as const],
|
|
596
592
|
},
|
|
597
593
|
menuPage: {
|
|
598
594
|
paddingVertical: 4,
|
|
@@ -607,7 +603,7 @@ export function WorkspaceActivityPanel({
|
|
|
607
603
|
paddingVertical: 4,
|
|
608
604
|
borderWidth: 1,
|
|
609
605
|
borderColor: "transparent",
|
|
610
|
-
borderRadius:
|
|
606
|
+
borderRadius: RADIUS.control,
|
|
611
607
|
},
|
|
612
608
|
menuRowHighlighted: {
|
|
613
609
|
backgroundColor: theme.colors.surface2,
|
|
@@ -615,15 +611,12 @@ export function WorkspaceActivityPanel({
|
|
|
615
611
|
menuLabel: {
|
|
616
612
|
flexShrink: 1,
|
|
617
613
|
minWidth: 0,
|
|
614
|
+
...TEXT.menu,
|
|
618
615
|
color: theme.colors.foreground,
|
|
619
|
-
fontSize: 14,
|
|
620
|
-
lineHeight: 18,
|
|
621
|
-
fontWeight: "normal" as const,
|
|
622
616
|
},
|
|
623
617
|
menuValue: {
|
|
618
|
+
...TEXT.menu,
|
|
624
619
|
color: theme.colors.foregroundMuted,
|
|
625
|
-
fontSize: 14,
|
|
626
|
-
lineHeight: 18,
|
|
627
620
|
flexShrink: 1,
|
|
628
621
|
},
|
|
629
622
|
menuTrailing: {
|
|
@@ -643,23 +636,24 @@ export function WorkspaceActivityPanel({
|
|
|
643
636
|
paddingVertical: 4,
|
|
644
637
|
borderWidth: 1,
|
|
645
638
|
borderColor: "transparent",
|
|
646
|
-
borderRadius:
|
|
639
|
+
borderRadius: RADIUS.control,
|
|
647
640
|
},
|
|
648
641
|
menuOptionLabel: {
|
|
649
642
|
flexShrink: 1,
|
|
650
643
|
minWidth: 0,
|
|
644
|
+
...TEXT.menu,
|
|
651
645
|
color: theme.colors.foreground,
|
|
652
|
-
fontSize: 14,
|
|
653
|
-
lineHeight: 18,
|
|
654
|
-
fontWeight: "normal" as const,
|
|
655
646
|
},
|
|
656
647
|
menuLeadingSlot: {
|
|
657
648
|
width: 16,
|
|
658
649
|
alignItems: "center" as const,
|
|
659
650
|
justifyContent: "center" as const,
|
|
660
651
|
},
|
|
652
|
+
section: {
|
|
653
|
+
gap: titleGap(layout.compact),
|
|
654
|
+
},
|
|
661
655
|
agentsSection: {
|
|
662
|
-
gap:
|
|
656
|
+
gap: titleGap(layout.compact),
|
|
663
657
|
position: "relative" as const,
|
|
664
658
|
},
|
|
665
659
|
agentsHeaderWrap: {
|
|
@@ -675,7 +669,7 @@ export function WorkspaceActivityPanel({
|
|
|
675
669
|
},
|
|
676
670
|
menuSurface: {
|
|
677
671
|
width: MENU_WIDTH,
|
|
678
|
-
borderRadius:
|
|
672
|
+
borderRadius: RADIUS.overlay,
|
|
679
673
|
borderWidth: 1,
|
|
680
674
|
borderColor: theme.colors.border,
|
|
681
675
|
backgroundColor: theme.colors.surface1,
|
|
@@ -701,7 +695,7 @@ export function WorkspaceActivityPanel({
|
|
|
701
695
|
backgroundColor: theme.colors.border,
|
|
702
696
|
},
|
|
703
697
|
}),
|
|
704
|
-
[theme, layout.compact, padding],
|
|
698
|
+
[theme, layout.compact, page.padding, page.gap],
|
|
705
699
|
);
|
|
706
700
|
|
|
707
701
|
const rowHeight = layout.compact ? 40 : 28;
|
|
@@ -712,15 +706,15 @@ export function WorkspaceActivityPanel({
|
|
|
712
706
|
: 0;
|
|
713
707
|
const flyoutOptions: ReadonlyArray<MenuOption> =
|
|
714
708
|
menuFlyout === "sort"
|
|
715
|
-
? SORT_OPTIONS
|
|
709
|
+
? localizeOptions(SORT_OPTIONS, m.workspace.options.sort)
|
|
716
710
|
: menuFlyout === "group"
|
|
717
|
-
? GROUP_OPTIONS
|
|
711
|
+
? localizeOptions(GROUP_OPTIONS, m.workspace.options.group)
|
|
718
712
|
: menuFlyout === "show"
|
|
719
|
-
? SHOW_FIELD_OPTIONS
|
|
713
|
+
? localizeOptions(SHOW_FIELD_OPTIONS, m.workspace.options.show)
|
|
720
714
|
: menuFlyout === "status"
|
|
721
|
-
? STATUS_FILTER_OPTIONS
|
|
715
|
+
? localizeOptions(STATUS_FILTER_OPTIONS, m.workspace.options.status)
|
|
722
716
|
: menuFlyout === "lifecycle"
|
|
723
|
-
? LIFECYCLE_FILTER_OPTIONS
|
|
717
|
+
? localizeOptions(LIFECYCLE_FILTER_OPTIONS, m.workspace.options.lifecycle)
|
|
724
718
|
: [];
|
|
725
719
|
const flyoutSelectedId: string | undefined =
|
|
726
720
|
menuFlyout === "sort"
|
|
@@ -900,15 +894,11 @@ export function WorkspaceActivityPanel({
|
|
|
900
894
|
showsVerticalScrollIndicator={false}
|
|
901
895
|
showsHorizontalScrollIndicator={false}
|
|
902
896
|
>
|
|
903
|
-
{loading ? <
|
|
904
|
-
{error ?
|
|
905
|
-
<Text style={{ color: theme.colors.statusDanger }}>
|
|
906
|
-
{error instanceof Error ? error.message : String(error)}
|
|
907
|
-
</Text>
|
|
908
|
-
) : null}
|
|
897
|
+
{loading ? <LoadingState color={theme.colors.accent} /> : null}
|
|
898
|
+
{error ? <ErrorState error={error} onRetry={retry} colors={theme.colors} /> : null}
|
|
909
899
|
|
|
910
900
|
{!loading && !error && !showContent ? (
|
|
911
|
-
<
|
|
901
|
+
<InlineEmpty text={m.workspace.empty} color={theme.colors.foregroundMuted} />
|
|
912
902
|
) : null}
|
|
913
903
|
|
|
914
904
|
{!loading && !error && showContent ? (
|
|
@@ -982,6 +972,8 @@ export function WorkspaceActivityPanel({
|
|
|
982
972
|
activeAgentColor={theme.colors.accent}
|
|
983
973
|
archivedAgentColor={theme.colors.foregroundMuted}
|
|
984
974
|
mutedColor={theme.colors.foregroundMuted}
|
|
975
|
+
activeTitleColor={theme.colors.foreground}
|
|
976
|
+
compact={layout.compact}
|
|
985
977
|
styles={styles}
|
|
986
978
|
/>
|
|
987
979
|
) : null}
|
|
@@ -991,7 +983,7 @@ export function WorkspaceActivityPanel({
|
|
|
991
983
|
{menuOpen ? (
|
|
992
984
|
<Pressable
|
|
993
985
|
accessibilityRole="button"
|
|
994
|
-
accessibilityLabel=
|
|
986
|
+
accessibilityLabel={m.workspace.closeDisplayOptions}
|
|
995
987
|
onPress={closeMenu}
|
|
996
988
|
style={styles.menuBackdrop}
|
|
997
989
|
/>
|
|
@@ -1005,23 +997,23 @@ export function WorkspaceActivityPanel({
|
|
|
1005
997
|
<View style={styles.menuSurface}>
|
|
1006
998
|
<View style={styles.menuPage}>
|
|
1007
999
|
<MenuSubTrigger
|
|
1008
|
-
label=
|
|
1009
|
-
value={
|
|
1000
|
+
label={m.workspace.menu.sort}
|
|
1001
|
+
value={m.workspace.options.sort[agentSort]}
|
|
1010
1002
|
active={menuFlyout === "sort"}
|
|
1011
1003
|
onOpen={() => setMenuFlyout("sort")}
|
|
1012
1004
|
styles={styles}
|
|
1013
1005
|
chevronColor={theme.colors.foregroundMuted}
|
|
1014
1006
|
/>
|
|
1015
1007
|
<MenuSubTrigger
|
|
1016
|
-
label=
|
|
1017
|
-
value={
|
|
1008
|
+
label={m.workspace.menu.group}
|
|
1009
|
+
value={m.workspace.options.group[agentGroup]}
|
|
1018
1010
|
active={menuFlyout === "group"}
|
|
1019
1011
|
onOpen={() => setMenuFlyout("group")}
|
|
1020
1012
|
styles={styles}
|
|
1021
1013
|
chevronColor={theme.colors.foregroundMuted}
|
|
1022
1014
|
/>
|
|
1023
1015
|
<MenuSubTrigger
|
|
1024
|
-
label=
|
|
1016
|
+
label={m.workspace.menu.show}
|
|
1025
1017
|
active={menuFlyout === "show"}
|
|
1026
1018
|
onOpen={() => setMenuFlyout("show")}
|
|
1027
1019
|
styles={styles}
|
|
@@ -1029,14 +1021,14 @@ export function WorkspaceActivityPanel({
|
|
|
1029
1021
|
/>
|
|
1030
1022
|
<View style={styles.menuSeparator} />
|
|
1031
1023
|
<MenuSubTrigger
|
|
1032
|
-
label=
|
|
1024
|
+
label={m.workspace.menu.status}
|
|
1033
1025
|
active={menuFlyout === "status"}
|
|
1034
1026
|
onOpen={() => setMenuFlyout("status")}
|
|
1035
1027
|
styles={styles}
|
|
1036
1028
|
chevronColor={theme.colors.foregroundMuted}
|
|
1037
1029
|
/>
|
|
1038
1030
|
<MenuSubTrigger
|
|
1039
|
-
label=
|
|
1031
|
+
label={m.workspace.menu.lifecycle}
|
|
1040
1032
|
active={menuFlyout === "lifecycle"}
|
|
1041
1033
|
onOpen={() => setMenuFlyout("lifecycle")}
|
|
1042
1034
|
styles={styles}
|