arco-workbench 0.1.5 → 0.1.6
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/CONTRIBUTING.md +9 -0
- package/README.md +11 -4
- package/client/dist/assets/{PhosphorBackdrop-D6cbmLNY.js → PhosphorBackdrop-BR-TgB5x.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-2dyerOi4.js → ThemedBackgroundShaderImpl-DgcFj6JN.js} +1 -1
- package/client/dist/assets/{XtermView-AIwo7O3D.js → XtermView-CflVBQgC.js} +1 -1
- package/client/dist/assets/{galleryEditor-DXAuxS8D.js → galleryEditor-BB-emfmi.js} +1 -1
- package/client/dist/assets/{index-8j6p-pmQ.js → index-B_EqHDz3.js} +242 -240
- package/client/dist/index.html +1 -1
- package/client/src/alerts/desktopAlerts.ts +13 -0
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +28 -5
- package/client/src/components/ClusterRightPanel/MemberRow.tsx +1 -1
- package/client/src/components/ClusterTaskBoardTab.tsx +54 -3
- package/client/src/components/ContextMeter.tsx +7 -0
- package/client/src/components/Home/HomeView.tsx +1 -1
- package/client/src/components/NeedsYouBadge.tsx +31 -16
- package/client/src/components/OperatorQuestionNotice.tsx +10 -1
- package/client/src/components/ProvidersPopover.tsx +23 -12
- package/client/src/components/TabBar.tsx +11 -8
- package/client/src/components/TabStatusChip.tsx +8 -7
- package/client/src/components/clusterNeedsYou.ts +27 -8
- package/client/src/help/content/cluster.tsx +34 -22
- package/client/src/help/content/composer.tsx +8 -1
- package/client/src/help/content/header.tsx +22 -13
- package/client/src/help/content/misc.tsx +8 -0
- package/client/src/help/content/tabbar.tsx +2 -1
- package/client/src/help/manualSections/clusters.tsx +61 -18
- package/client/src/help/manualSections/gettingStarted.tsx +10 -0
- package/client/src/help/manualSections/maintenance.tsx +38 -8
- package/client/src/help/manualSections/providers.tsx +10 -3
- package/client/src/help/manualSections/reference.tsx +1 -1
- package/client/src/help/manualSections/workflows.tsx +13 -0
- package/client/src/help/manualSections/workspace.tsx +7 -1
- package/client/src/questions/waitingQuestion.ts +3 -2
- package/client/src/stores/appStore.ts +1 -1
- package/client/src/stores/appStore.types.ts +1 -0
- package/client/src/stores/notificationStore.ts +2 -0
- package/client/src/utils/activityPresentation.ts +1 -1
- package/client/src/utils/tabStatus.ts +8 -0
- package/client/src/voice/commands.ts +4 -3
- package/client/src/voice/executor.ts +3 -3
- package/client/src/ws/handleServerMessage.ts +22 -2
- package/client/src/ws/operatorQuestions.ts +2 -0
- package/docs/CLIENT.md +3 -3
- package/docs/FEATURES.md +1 -1
- package/docs/GETTING_STARTED.md +11 -5
- package/docs/GLOSSARY.md +6 -2
- package/docs/GOTCHAS.md +17 -5
- package/docs/OPERATIONS.md +184 -5
- package/docs/PERSISTENCE.md +4 -0
- package/docs/PRIMITIVES.md +1 -1
- package/docs/PROTOCOL.md +1 -1
- package/docs/PROTOCOL_CLUSTER.md +9 -5
- package/docs/PROVIDERS.md +10 -5
- package/docs/SETTINGS.md +4 -2
- package/docs/TASK_LEDGER.md +6 -0
- package/docs/VOICE.md +2 -0
- package/native/win32-arm64/manifest.json +1 -1
- package/node_modules/@arco/shared/dist/clusterRolePresets.d.ts +1 -1
- package/node_modules/@arco/shared/dist/clusterRolePresets.js +10 -0
- package/node_modules/@arco/shared/dist/protocol/autoPickup.js +9 -1
- package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +2 -2
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +6 -0
- package/node_modules/@arco/shared/dist/protocol/notifications.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/operatorQuestions.d.ts +12 -0
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +9 -3
- package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +1 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/scripts/packaging/arco.mjs +1 -0
- package/server/dist/attention.d.ts +1 -1
- package/server/dist/attention.js +6 -4
- package/server/dist/capabilities.d.ts +9 -8
- package/server/dist/capabilities.js +71 -102
- package/server/dist/cliUpdateDecision.d.ts +34 -0
- package/server/dist/cliUpdateDecision.js +152 -0
- package/server/dist/clusterDirector.js +1 -0
- package/server/dist/clusterPeerOps.js +2 -2
- package/server/dist/defaults/models.md +1 -1
- package/server/dist/fileAccessPolicy.js +7 -5
- package/server/dist/http/workflowDataRoutes.js +1 -1
- package/server/dist/index.js +5 -1
- package/server/dist/primitives/seedWorker.d.ts +1 -0
- package/server/dist/primitives/seedWorker.js +2 -1
- package/server/dist/providerConversation.d.ts +9 -0
- package/server/dist/providerConversation.js +80 -0
- package/server/dist/providers/claude-native/retainedContext.d.ts +4 -0
- package/server/dist/providers/claude-native/retainedContext.js +20 -0
- package/server/dist/providers/claude-native/worker.d.ts +1 -0
- package/server/dist/providers/claude-native/worker.js +34 -6
- package/server/dist/providers/codex-appserver/operatorQuestions.d.ts +5 -0
- package/server/dist/providers/codex-appserver/operatorQuestions.js +30 -0
- package/server/dist/providers/codex-appserver/worker.js +9 -4
- package/server/dist/providers/ollama.js +2 -3
- package/server/dist/server/broadcast.d.ts +1 -1
- package/server/dist/smartPickupAdapters.d.ts +1 -0
- package/server/dist/smartPickupAdapters.js +18 -5
- package/server/dist/smartPickupObserver.js +45 -8
- package/server/dist/workers/WorkerManager.d.ts +1 -0
- package/server/dist/workers/WorkerManager.js +1 -0
- package/server/dist/workers/limits.js +6 -2
- package/server/dist/workflowMeta.d.ts +11 -1
- package/server/dist/workflowMeta.js +132 -6
- package/server/dist/workflows/types.d.ts +1 -0
- package/server/dist/ws/compactHandlers.d.ts +1 -1
- package/server/dist/ws/compactHandlers.js +11 -4
- package/server/dist/ws/handoffHandlers.js +16 -6
- package/server/dist/ws/operatorQuestionHandlers.d.ts +2 -1
- package/server/dist/ws/operatorQuestionHandlers.js +9 -1
- package/server/dist/ws/turnEngine.d.ts +2 -4
- package/server/dist/ws/turnEngine.js +88 -129
- package/server/package.json +1 -1
- package/server/src/attention.ts +5 -4
- package/server/src/capabilities.ts +70 -111
- package/server/src/cliUpdateDecision.ts +159 -0
- package/server/src/clusterDirector.ts +1 -0
- package/server/src/clusterPeerOps.ts +2 -2
- package/server/src/defaults/models.md +1 -1
- package/server/src/fileAccessPolicy.ts +7 -5
- package/server/src/http/workflowDataRoutes.ts +1 -1
- package/server/src/index.ts +5 -1
- package/server/src/primitives/seedWorker.ts +3 -1
- package/server/src/providerConversation.ts +71 -0
- package/server/src/providers/claude-native/retainedContext.ts +22 -0
- package/server/src/providers/claude-native/worker.ts +33 -5
- package/server/src/providers/codex-appserver/operatorQuestions.ts +24 -0
- package/server/src/providers/codex-appserver/worker.ts +8 -4
- package/server/src/providers/ollama.ts +2 -3
- package/server/src/smartPickupAdapters.ts +19 -5
- package/server/src/smartPickupObserver.ts +31 -6
- package/server/src/workers/WorkerManager.ts +2 -0
- package/server/src/workers/limits.ts +7 -2
- package/server/src/workflowMeta.ts +139 -5
- package/server/src/workflows/types.ts +1 -0
- package/server/src/ws/compactHandlers.ts +9 -3
- package/server/src/ws/handoffHandlers.ts +13 -6
- package/server/src/ws/operatorQuestionHandlers.ts +10 -2
- package/server/src/ws/turnEngine.ts +80 -135
- package/shared/dist/clusterRolePresets.d.ts +1 -1
- package/shared/dist/clusterRolePresets.js +10 -0
- package/shared/dist/protocol/autoPickup.js +9 -1
- package/shared/dist/protocol/clientMessages.d.ts +2 -2
- package/shared/dist/protocol/models.d.ts +6 -0
- package/shared/dist/protocol/notifications.d.ts +4 -0
- package/shared/dist/protocol/operatorQuestions.d.ts +12 -0
- package/shared/dist/protocol/serverMessages.d.ts +9 -3
- package/shared/dist/protocol/workflows.d.ts +1 -0
- package/shared/src/clusterRolePresets.ts +11 -1
- package/shared/src/protocol/autoPickup.ts +9 -1
- package/shared/src/protocol/clientMessages.ts +2 -1
- package/shared/src/protocol/models.ts +5 -2
- package/shared/src/protocol/notifications.ts +5 -0
- package/shared/src/protocol/operatorQuestions.ts +13 -0
- package/shared/src/protocol/serverMessages.ts +12 -2
- package/shared/src/protocol/workflows.ts +4 -0
package/client/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
10
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
11
11
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Share+Tech+Mono&display=swap" rel="stylesheet" />
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-B_EqHDz3.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-DD9kFGsF.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -42,6 +42,15 @@ export function isViewingWorkflow(state: ViewState, workflowId: string): boolean
|
|
|
42
42
|
return !state.activeClusterId && state.activeJobId === workflowId;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
const questionNotifications = new Map<string, Notification>();
|
|
46
|
+
export function clearQuestionAlert(requestId: string): void {
|
|
47
|
+
const id = `question-${requestId}`;
|
|
48
|
+
useNotificationStore.getState().removeNotice(id);
|
|
49
|
+
useAppStore.getState().dismissNotification(id);
|
|
50
|
+
questionNotifications.get(id)?.close();
|
|
51
|
+
questionNotifications.delete(id);
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
// One notification per event: the event id is the tag, so a second browser
|
|
46
55
|
// window on the same computer replaces rather than repeats it.
|
|
47
56
|
export function handleAttentionEvent(msg: AttentionEventMessage): void {
|
|
@@ -60,6 +69,10 @@ export function handleAttentionEvent(msg: AttentionEventMessage): void {
|
|
|
60
69
|
if (!ok) return;
|
|
61
70
|
try {
|
|
62
71
|
const n = new Notification(attentionTitle(msg.workflowName, msg.kind), { body: 'Open Arco to see it.', tag: msg.id });
|
|
72
|
+
if (msg.id.startsWith('question-')) {
|
|
73
|
+
questionNotifications.set(msg.id, n);
|
|
74
|
+
n.onclose = () => { if (questionNotifications.get(msg.id) === n) questionNotifications.delete(msg.id); };
|
|
75
|
+
}
|
|
63
76
|
n.onclick = () => {
|
|
64
77
|
try { window.focus(); } catch { /* ignore */ }
|
|
65
78
|
focusWorkflowTab(msg.workflowId);
|
|
@@ -32,7 +32,7 @@ const MODE_HELP: Record<AutoPickupMode, string> = {
|
|
|
32
32
|
off: 'No automatic worker turns. MAIL ALERTS and NUDGE stay available.',
|
|
33
33
|
rule: 'Recommended: wakes members when mail arrives; skips acknowledgements and stops loops.',
|
|
34
34
|
'smart-observe': 'The chosen evaluator reads an idle member\'s waiting mail and answers wake, wait or ask. Answers are only logged; no turn starts.',
|
|
35
|
-
'smart-auto': '
|
|
35
|
+
'smart-auto': 'A wake answer starts a turn when every limit allows it; an ask answer alerts the operator. An evaluator failure attempts ordinary pickup through the same limits.',
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export function autoPickupStateOf(cluster: ClusterStatePayload): ClusterAutoPickupState {
|
|
@@ -43,14 +43,34 @@ function describeDecision(state: ClusterAutoPickupState): string | null {
|
|
|
43
43
|
const d = state.lastDecision;
|
|
44
44
|
if (!d) return null;
|
|
45
45
|
const when = new Date(d.at).toLocaleTimeString();
|
|
46
|
+
if (d.reason === 'session_expired') return `${when}: Smart session expired. Mail waits until Smart is armed again, Rule-based is chosen, or NUDGE is used. Change Armed session length in AUTO-PICKUP > LIMITS before arming.`;
|
|
46
47
|
const unloaded = /^evaluator_error:model_not_loaded_(lmstudio|llamacpp|strata|deepseek)$/.exec(d.reason);
|
|
47
48
|
const names = { lmstudio: 'LM Studio', llamacpp: 'llama.cpp', strata: 'Strata', deepseek: 'DeepSeek' } as const;
|
|
49
|
+
if (d.outcome.startsWith('fallback_')) {
|
|
50
|
+
const cause = unloaded ? `model not loaded in ${names[unloaded[1] as keyof typeof names]}; load it or choose another`
|
|
51
|
+
: d.reason.replace(/^(evaluator_error|invalid_answer):/, '').replace(/_/g, ' ');
|
|
52
|
+
const outcome = d.outcome === 'fallback_woke' ? 'ordinary pickup started.'
|
|
53
|
+
: d.outcome === 'fallback_observed' ? 'would use ordinary pickup. No turn started.'
|
|
54
|
+
: `ordinary pickup held: ${d.outcome.replace(/^fallback_skipped:/, '').replace(/_/g, ' ')}.`;
|
|
55
|
+
return `${when}: Evaluator failed (${cause}); ${outcome}`;
|
|
56
|
+
}
|
|
48
57
|
const what = d.action ? `answered ${d.action}` : unloaded
|
|
49
58
|
? `model not loaded in ${names[unloaded[1] as keyof typeof names]}; load it or choose another`
|
|
50
59
|
: d.reason.replace(/_/g, ' ');
|
|
51
60
|
return `${when}: ${what}${d.action ? ` (${d.reason.replace(/_/g, ' ')}), ${d.outcome}` : ''}`;
|
|
52
61
|
}
|
|
53
62
|
|
|
63
|
+
function useSessionRemaining(expiresAt?: number): number | null {
|
|
64
|
+
const [now, setNow] = useState(Date.now);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (expiresAt === undefined) return;
|
|
67
|
+
setNow(Date.now());
|
|
68
|
+
const timer = setInterval(() => setNow(Date.now()), 30_000);
|
|
69
|
+
return () => clearInterval(timer);
|
|
70
|
+
}, [expiresAt]);
|
|
71
|
+
return expiresAt === undefined ? null : Math.max(0, Math.ceil((expiresAt - now) / 60_000));
|
|
72
|
+
}
|
|
73
|
+
|
|
54
74
|
export function AutoPickupControl({ cluster }: { cluster: ClusterStatePayload }) {
|
|
55
75
|
const state = autoPickupStateOf(cluster);
|
|
56
76
|
const wsSendRaw = useAppStore((s) => s.wsSendRaw);
|
|
@@ -60,8 +80,9 @@ export function AutoPickupControl({ cluster }: { cluster: ClusterStatePayload })
|
|
|
60
80
|
wsSendRaw?.({ type: 'cluster_auto_pickup_set', clusterId: cluster.clusterId, mode, ...(evaluator ? { evaluator } : {}), ...(limits ? { limits } : {}), ...(ruleLimits ? { ruleLimits } : {}), ...(remindBusy !== undefined ? { remindBusy } : {}) });
|
|
61
81
|
};
|
|
62
82
|
const on = state.mode !== 'off';
|
|
63
|
-
const remaining =
|
|
64
|
-
const
|
|
83
|
+
const remaining = useSessionRemaining(state.session?.expiresAt);
|
|
84
|
+
const decision = describeDecision(state);
|
|
85
|
+
const modeTitle = on
|
|
65
86
|
? `${AUTO_PICKUP_MODE_LABELS[state.mode].label}${remaining !== null ? `, about ${remaining} min left in this session` : ''}. Click to review or change.`
|
|
66
87
|
: 'AUTO-PICKUP is off. Click to choose a mode.';
|
|
67
88
|
return (
|
|
@@ -75,8 +96,9 @@ export function AutoPickupControl({ cluster }: { cluster: ClusterStatePayload })
|
|
|
75
96
|
data-help="cluster.auto-turn"
|
|
76
97
|
aria-haspopup="dialog"
|
|
77
98
|
aria-label={`AUTO-PICKUP: ${AUTO_PICKUP_MODE_LABELS[state.mode].label}`}
|
|
99
|
+
aria-description={decision ?? undefined}
|
|
78
100
|
className="display-font"
|
|
79
|
-
title={
|
|
101
|
+
title={`${modeTitle}${decision ? ` ${decision}` : ''}`}
|
|
80
102
|
style={{
|
|
81
103
|
padding: '3px 8px',
|
|
82
104
|
background: on ? 'var(--color-accent-primary-a06)' : 'transparent',
|
|
@@ -164,6 +186,7 @@ function AutoPickupDialog({ state, onClose, onApply }: {
|
|
|
164
186
|
: null;
|
|
165
187
|
const field: React.CSSProperties = { display: 'block', margin: '4px 0 10px' };
|
|
166
188
|
const decision = describeDecision(state);
|
|
189
|
+
const remaining = useSessionRemaining(state.session?.expiresAt);
|
|
167
190
|
return (
|
|
168
191
|
<div onClick={onClose} style={{ position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.6)', zIndex: 60, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
169
192
|
<div
|
|
@@ -263,7 +286,7 @@ function AutoPickupDialog({ state, onClose, onApply }: {
|
|
|
263
286
|
|
|
264
287
|
{(state.counters || decision) && (
|
|
265
288
|
<section data-help="cluster.auto-pickup-status" aria-label="AUTO-PICKUP status" style={{ borderTop: '1px solid var(--color-border-hairline)', marginTop: '10px', paddingTop: '10px', color: 'var(--color-fg-muted)' }}>
|
|
266
|
-
{state.session && <div>Session ends at {new Date(state.session.expiresAt).toLocaleTimeString()}.</div>}
|
|
289
|
+
{state.session && <div>About {remaining} min remain. Session ends at {new Date(state.session.expiresAt).toLocaleTimeString()}. Change Armed session length under LIMITS before arming.</div>}
|
|
267
290
|
{state.counters && <div>Evaluator requests: {state.counters.callsThisSession} this session, {state.counters.callsLastHour} in the last hour, {state.counters.inFlight} in progress. Automatic wakes: {state.counters.wakesThisSession} of {state.limits.wakesPerSession} this session, {state.counters.wakesLastHour} in the last hour.</div>}
|
|
268
291
|
{decision && <div>Last decision: {decision}</div>}
|
|
269
292
|
</section>
|
|
@@ -32,7 +32,7 @@ export function MemberRow({
|
|
|
32
32
|
onDetach?: (clusterId: string, workflowId: string) => void;
|
|
33
33
|
}) {
|
|
34
34
|
// Two distinct UI modes share the role surface:
|
|
35
|
-
// popoverOpen → preset list (
|
|
35
|
+
// popoverOpen → preset list (8 presets + CLEAR + Custom…) anchored to SET
|
|
36
36
|
// editingCustom → inline text editor (the pre-popover affordance, kept
|
|
37
37
|
// as the "Custom…" escape hatch).
|
|
38
38
|
// Esc / click-outside dismisses the popover. Picking a preset commits +
|
|
@@ -823,6 +823,8 @@ export function ClusterTaskBoardTab({
|
|
|
823
823
|
canEdit={canCreateTask}
|
|
824
824
|
onEditTask={editTask}
|
|
825
825
|
onDeleteTask={deleteTask}
|
|
826
|
+
onQuickDone={taskShowReader && onUpdateTaskStatus ? quickDone : undefined}
|
|
827
|
+
onRecheck={wsSendRaw && recheckSenderFor(selectedTask) ? recheckTask : undefined}
|
|
826
828
|
onUpdateTaskStatus={onUpdateTaskStatus}
|
|
827
829
|
onReassignTask={onReassignTask}
|
|
828
830
|
onReclaimRun={onReclaimRun}
|
|
@@ -1119,6 +1121,8 @@ function TaskDetailDrawer({
|
|
|
1119
1121
|
canEdit,
|
|
1120
1122
|
onEditTask,
|
|
1121
1123
|
onDeleteTask,
|
|
1124
|
+
onQuickDone,
|
|
1125
|
+
onRecheck,
|
|
1122
1126
|
onUpdateTaskStatus,
|
|
1123
1127
|
onReassignTask,
|
|
1124
1128
|
onReclaimRun,
|
|
@@ -1140,6 +1144,8 @@ function TaskDetailDrawer({
|
|
|
1140
1144
|
canEdit: boolean;
|
|
1141
1145
|
onEditTask: (taskId: string, patch: { title?: string; notes?: string; priority?: number; parentIds?: string[]; release?: string }) => void;
|
|
1142
1146
|
onDeleteTask: (taskId: string) => void;
|
|
1147
|
+
onQuickDone?: (taskId: string) => void;
|
|
1148
|
+
onRecheck?: (task: WorktreeAwareLedgerTask) => void;
|
|
1143
1149
|
onUpdateTaskStatus?: (workflowId: string, taskId: string, status: LedgerTaskStatus, boardKey?: string) => void;
|
|
1144
1150
|
onReassignTask?: (workflowId: string, taskId: string, assigneeWorkflowId: string | null, boardKey?: string) => void;
|
|
1145
1151
|
onReclaimRun?: (clusterId: string, workflowId: string, taskId: string, runId: string, boardKey?: string) => void;
|
|
@@ -1147,6 +1153,10 @@ function TaskDetailDrawer({
|
|
|
1147
1153
|
onClose: () => void;
|
|
1148
1154
|
}) {
|
|
1149
1155
|
const runs = details?.runs ?? [];
|
|
1156
|
+
const detailScroll = useRef<HTMLDivElement | null>(null);
|
|
1157
|
+
useEffect(() => {
|
|
1158
|
+
if (task.status === 'review' && detailScroll.current) detailScroll.current.scrollTop = 0;
|
|
1159
|
+
}, [task.id, task.status]);
|
|
1150
1160
|
const openRuns = runs.filter(runOpen);
|
|
1151
1161
|
const linkedRefs = details?.referenceDocs?.refs ?? [];
|
|
1152
1162
|
const [openRef, setOpenRef] = useState<{ planId: string; slug: string; exists: boolean } | null>(null);
|
|
@@ -1286,7 +1296,40 @@ function TaskDetailDrawer({
|
|
|
1286
1296
|
CLOSE
|
|
1287
1297
|
</button>
|
|
1288
1298
|
</div>
|
|
1289
|
-
<div style={{ flex: 1, minHeight: 0, overflowY: 'auto', padding: '8px 10px 12px' }}>
|
|
1299
|
+
<div ref={detailScroll} style={{ flex: 1, minHeight: 0, overflowY: 'auto', padding: '8px 10px 12px' }}>
|
|
1300
|
+
{task.status === 'review' && (
|
|
1301
|
+
<DrawerSection title="TO ACCEPT">
|
|
1302
|
+
<InlineBlock
|
|
1303
|
+
label="Director sign-off"
|
|
1304
|
+
body={task.signoff
|
|
1305
|
+
? `${signoffChip(task.signoff).label}\n${task.signoff.byWorkflowId ? `by ${nameFor(task.signoff.byWorkflowId)}` : 'Author not recorded'} · ${formatTime(task.signoff.at)}`
|
|
1306
|
+
: 'No sign-off yet.'}
|
|
1307
|
+
/>
|
|
1308
|
+
{task.signoff?.summary && (
|
|
1309
|
+
<div title={task.signoff.summary} data-testid="review-signoff-summary"
|
|
1310
|
+
style={{ color: 'var(--color-fg)', fontSize: '11px', marginTop: '5px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
1311
|
+
{task.signoff.summary}
|
|
1312
|
+
</div>
|
|
1313
|
+
)}
|
|
1314
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px', marginTop: '8px' }}>
|
|
1315
|
+
<button type="button" className="display-font" data-help="cluster.board-accept"
|
|
1316
|
+
disabled={!onQuickDone} onClick={() => onQuickDone?.(task.id)}
|
|
1317
|
+
title="Accept this task: mark it done."
|
|
1318
|
+
style={{ ...smallButtonStyle(Boolean(onQuickDone)), color: onQuickDone ? '#58a66c' : 'var(--color-fg-muted)' }}>
|
|
1319
|
+
✓ ACCEPT
|
|
1320
|
+
</button>
|
|
1321
|
+
<button type="button" className="display-font" data-help="cluster.board-recheck"
|
|
1322
|
+
disabled={!onRecheck} onClick={() => onRecheck?.(task)}
|
|
1323
|
+
title={onRecheck ? `Ask ${task.signoff?.byWorkflowId ? nameFor(task.signoff.byWorkflowId) : 'the director'} to re-verify this task actually met its target.` : 'No sign-off author is available for re-review.'}
|
|
1324
|
+
style={smallButtonStyle(Boolean(onRecheck))}>
|
|
1325
|
+
↩ RECHECK
|
|
1326
|
+
</button>
|
|
1327
|
+
</div>
|
|
1328
|
+
<p style={{ color: 'var(--color-fg-muted)', fontSize: '11px', margin: '6px 0 0' }}>
|
|
1329
|
+
Accepting is optional; nothing waits on it.
|
|
1330
|
+
</p>
|
|
1331
|
+
</DrawerSection>
|
|
1332
|
+
)}
|
|
1290
1333
|
{loading && (
|
|
1291
1334
|
<div style={{ fontSize: '11px', color: 'var(--color-fg-muted)', marginBottom: '8px' }}>
|
|
1292
1335
|
Loading task details…
|
|
@@ -1347,7 +1390,7 @@ function TaskDetailDrawer({
|
|
|
1347
1390
|
)}
|
|
1348
1391
|
|
|
1349
1392
|
{canEdit && (
|
|
1350
|
-
<DrawerSection title="Edit">
|
|
1393
|
+
<DrawerSection key={task.status === 'review' ? task.id : undefined} title="Edit" collapsed={task.status === 'review'}>
|
|
1351
1394
|
<div
|
|
1352
1395
|
data-help="cluster.task-edit"
|
|
1353
1396
|
style={{
|
|
@@ -1667,7 +1710,15 @@ function TaskDetailDrawer({
|
|
|
1667
1710
|
);
|
|
1668
1711
|
}
|
|
1669
1712
|
|
|
1670
|
-
function DrawerSection({ title, children }: { title: string; children: ReactNode }) {
|
|
1713
|
+
function DrawerSection({ title, children, collapsed = false }: { title: string; children: ReactNode; collapsed?: boolean }) {
|
|
1714
|
+
if (collapsed) return (
|
|
1715
|
+
<details style={{ paddingTop: '8px', marginTop: '8px', borderTop: '1px solid var(--color-border-hairline)' }}>
|
|
1716
|
+
<summary className="display-font" style={{ fontSize: '10px', letterSpacing: '1px', color: 'var(--color-fg-muted)', marginBottom: '6px', cursor: 'pointer' }}>
|
|
1717
|
+
{title}
|
|
1718
|
+
</summary>
|
|
1719
|
+
{children}
|
|
1720
|
+
</details>
|
|
1721
|
+
);
|
|
1671
1722
|
return (
|
|
1672
1723
|
<section style={{ paddingTop: '8px', marginTop: '8px', borderTop: '1px solid var(--color-border-hairline)' }}>
|
|
1673
1724
|
<div className="display-font" style={{ fontSize: '10px', letterSpacing: '1px', color: 'var(--color-fg-muted)', marginBottom: '6px' }}>
|
|
@@ -49,6 +49,13 @@ export function ContextMeter({ job, onRecalibrate }: { job: JobState; onRecalibr
|
|
|
49
49
|
const cu = job.contextUsage;
|
|
50
50
|
const outCumulative = job.totalTokens.output;
|
|
51
51
|
|
|
52
|
+
if (job.providerConversation) {
|
|
53
|
+
const explanation = job.providerConversation === 'unavailable'
|
|
54
|
+
? 'The previous provider conversation cannot be resumed because its saved thread id is unavailable. The next message starts a new conversation. Earlier messages remain in this tab.'
|
|
55
|
+
: 'A new provider conversation has started. Its context reading is not available yet. Earlier usage remains in the conversation history.';
|
|
56
|
+
return <span title={explanation} aria-label={`CTX: unavailable. ${explanation}`} style={{ color: 'var(--color-fg-muted)' }}>CTX: -</span>;
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
if (cu) {
|
|
53
60
|
const fillColor = contextPercentColor(cu.percentOfWindow);
|
|
54
61
|
const estK = compact(cu.estimatedTokens);
|
|
@@ -291,5 +291,5 @@ export function HomeView({ onResume }: { onResume?: (config: WorkflowConfig) =>
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
function HomeWorkStatus({ kind, id, waiting, busy }: { kind: 'job' | 'cluster'; id: string; waiting: boolean; busy: boolean }) {
|
|
294
|
-
return <TabStatusChip status={useTabStatus(kind, id, waiting, busy)} />;
|
|
294
|
+
return <TabStatusChip status={useTabStatus(kind, id, waiting, busy)} busy={busy} />;
|
|
295
295
|
}
|
|
@@ -8,16 +8,10 @@ import type { LedgerTask } from '@arco/shared';
|
|
|
8
8
|
import { useAppStore } from '../stores/appStore';
|
|
9
9
|
import { requestBoardTask } from '../stores/boardTaskRequest';
|
|
10
10
|
import { hasWaitingQuestion } from '../questions/waitingQuestion';
|
|
11
|
-
import { buildNeedsYouItems,
|
|
11
|
+
import { buildNeedsYouItems, needsYouSummary, NEEDS_YOU_KIND, type NeedsYouItem } from './clusterNeedsYou';
|
|
12
12
|
import { useKeepInWindow } from '../layout/keepInWindow';
|
|
13
13
|
|
|
14
14
|
const EMPTY_TASKS: LedgerTask[] = [];
|
|
15
|
-
const KIND_LABEL: Record<NeedsYouItem['kind'], string> = {
|
|
16
|
-
review: 'ACCEPT',
|
|
17
|
-
blocked: 'BLOCKED',
|
|
18
|
-
question: 'QUESTION',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
15
|
export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: string; compact?: boolean }) {
|
|
22
16
|
const cluster = useAppStore((s) => s.clusters[clusterId]);
|
|
23
17
|
const jobs = useAppStore((s) => s.jobs);
|
|
@@ -33,8 +27,18 @@ export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: strin
|
|
|
33
27
|
|
|
34
28
|
const items = useMemo(() => {
|
|
35
29
|
const waitingQuestions = (cluster?.members ?? [])
|
|
36
|
-
.
|
|
37
|
-
|
|
30
|
+
.flatMap((m) => {
|
|
31
|
+
const job = jobs[m.workflowId];
|
|
32
|
+
if (!job || !hasWaitingQuestion(job)) return [];
|
|
33
|
+
const pending = job.messages.flatMap((message) => message.operatorQuestion?.status === 'pending' ? [message.operatorQuestion] : []);
|
|
34
|
+
// Keep member jump targets and count one entry per pending mode.
|
|
35
|
+
// Legacy Native question ids describe a blocking tool question.
|
|
36
|
+
const blocking = (job.claudeNativePendingQuestionIds?.length ?? 0) > 0 || pending.some((question) => question.mode !== 'async');
|
|
37
|
+
return [
|
|
38
|
+
...(blocking ? [{ workflowId: m.workflowId, displayName: m.displayName, mode: 'blocking' as const }] : []),
|
|
39
|
+
...(pending.some((question) => question.mode === 'async') ? [{ workflowId: m.workflowId, displayName: m.displayName, mode: 'async' as const }] : []),
|
|
40
|
+
];
|
|
41
|
+
});
|
|
38
42
|
// Done and archived tasks are never listed: only review and blocked count.
|
|
39
43
|
return buildNeedsYouItems({ tasks, waitingQuestions });
|
|
40
44
|
}, [cluster?.members, jobs, tasks]);
|
|
@@ -58,6 +62,7 @@ export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: strin
|
|
|
58
62
|
useEffect(() => { if (items.length === 0) setOpen(false); }, [items.length]);
|
|
59
63
|
|
|
60
64
|
if (!cluster || items.length === 0) return null;
|
|
65
|
+
const summary = needsYouSummary(items);
|
|
61
66
|
|
|
62
67
|
const toggle = () => {
|
|
63
68
|
const rect = buttonRef.current?.getBoundingClientRect();
|
|
@@ -80,28 +85,37 @@ export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: strin
|
|
|
80
85
|
className="display-font"
|
|
81
86
|
data-help="cluster.needs-you"
|
|
82
87
|
data-testid="cluster-needs-you"
|
|
83
|
-
aria-label={
|
|
88
|
+
aria-label={summary.label}
|
|
84
89
|
aria-haspopup="true"
|
|
85
90
|
aria-expanded={open}
|
|
86
91
|
onClick={toggle}
|
|
87
|
-
title=
|
|
92
|
+
title={summary.title}
|
|
88
93
|
style={{
|
|
89
|
-
flex: '0 0 auto',
|
|
94
|
+
flex: compact ? '0 0 auto' : '0 1 auto',
|
|
90
95
|
marginLeft: compact ? 0 : '6px',
|
|
91
96
|
width: compact ? '32px' : undefined,
|
|
92
97
|
minWidth: 0,
|
|
98
|
+
maxWidth: '100%',
|
|
99
|
+
whiteSpace: compact ? 'nowrap' : 'normal',
|
|
93
100
|
overflow: 'hidden',
|
|
94
101
|
textOverflow: 'ellipsis',
|
|
95
102
|
padding: compact ? '2px' : '2px 7px',
|
|
96
103
|
fontSize: '9px',
|
|
97
104
|
letterSpacing: compact ? 0 : '1px',
|
|
98
|
-
color: '
|
|
105
|
+
color: summary.stopped > 0 ? 'var(--color-warning)' : 'var(--color-fg-muted)',
|
|
99
106
|
background: open ? 'var(--color-accent-primary-a06)' : 'transparent',
|
|
100
107
|
border: '1px solid currentColor',
|
|
101
108
|
cursor: 'pointer',
|
|
102
109
|
}}
|
|
103
110
|
>
|
|
104
|
-
{compact ?
|
|
111
|
+
{compact ? summary.compactLabel : summary.groups.map((group, index) => (
|
|
112
|
+
<span key={group.kind}>
|
|
113
|
+
{index > 0 && <span style={{ color: 'var(--color-fg-muted)' }}> · </span>}
|
|
114
|
+
<span style={{ color: group.stopped ? 'var(--color-warning)' : 'var(--color-fg-muted)', whiteSpace: 'nowrap' }}>
|
|
115
|
+
{group.count} {group.label}
|
|
116
|
+
</span>
|
|
117
|
+
</span>
|
|
118
|
+
))}
|
|
105
119
|
</button>
|
|
106
120
|
{open && anchor && (
|
|
107
121
|
<div
|
|
@@ -129,6 +143,7 @@ export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: strin
|
|
|
129
143
|
key={item.id}
|
|
130
144
|
type="button"
|
|
131
145
|
role="menuitem"
|
|
146
|
+
title={NEEDS_YOU_KIND[item.kind].description}
|
|
132
147
|
onClick={() => pick(item)}
|
|
133
148
|
style={{
|
|
134
149
|
textAlign: 'left',
|
|
@@ -146,8 +161,8 @@ export function NeedsYouBadge({ clusterId, compact = false }: { clusterId: strin
|
|
|
146
161
|
onMouseLeave={(e) => { e.currentTarget.style.borderColor = 'transparent'; }}
|
|
147
162
|
>
|
|
148
163
|
<span style={{ display: 'flex', gap: '6px', alignItems: 'baseline', minWidth: 0 }}>
|
|
149
|
-
<span className="display-font" style={{ fontSize: '9px', letterSpacing: '1px', color: '
|
|
150
|
-
{
|
|
164
|
+
<span className="display-font" style={{ fontSize: '9px', letterSpacing: '1px', color: NEEDS_YOU_KIND[item.kind].stopped ? 'var(--color-warning)' : 'var(--color-fg-muted)', flexShrink: 0 }}>
|
|
165
|
+
{NEEDS_YOU_KIND[item.kind].label}
|
|
151
166
|
</span>
|
|
152
167
|
<span style={{ fontSize: '11px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item.title}</span>
|
|
153
168
|
</span>
|
|
@@ -20,6 +20,12 @@ export function OperatorQuestionNotice({ workflowId, question, error }: { workfl
|
|
|
20
20
|
send!({ type: 'operator_question_reply', workflowId, requestId: question.requestId,
|
|
21
21
|
answers: Object.fromEntries(question.questions.map((q) => [q.id, [answers[q.id]]])) });
|
|
22
22
|
};
|
|
23
|
+
const dismiss = () => {
|
|
24
|
+
if (disabled) return;
|
|
25
|
+
updateMessage(workflowId, `operator-question-${question.requestId}`, { operatorQuestionError: undefined });
|
|
26
|
+
setSending(true);
|
|
27
|
+
send!({ type: 'operator_question_dismiss', workflowId, requestId: question.requestId });
|
|
28
|
+
};
|
|
23
29
|
return <div id={`operator-question-${question.requestId}`} style={{ borderLeft: '2px solid var(--color-accent-secondary)', padding: '10px 12px', background: 'var(--color-bg-sunken)', marginBottom: 12 }}>
|
|
24
30
|
<div className="display-font" style={{ color: 'var(--color-accent-secondary)', fontSize: 11, letterSpacing: 1, marginBottom: 8 }}>
|
|
25
31
|
{question.provider.toUpperCase()} · {pending ? question.mode === 'blocking' ? 'WAITING FOR YOUR ANSWER' : 'QUESTION · AGENT CAN CONTINUE' : question.status.toUpperCase()}
|
|
@@ -39,7 +45,10 @@ export function OperatorQuestionNotice({ workflowId, question, error }: { workfl
|
|
|
39
45
|
style={{ boxSizing: 'border-box', width: '100%', padding: '6px 8px', fontSize: 12, color: 'var(--color-text-primary)', background: 'var(--color-bg-sunken)', border: '1px solid var(--color-border-hairline)', borderRadius: 3 }} />}
|
|
40
46
|
</> : question.status === 'answered' && <div style={{ color: 'var(--color-fg-muted)', fontSize: 12 }}>{q.secret ? 'Answer sent (hidden)' : question.answers?.[q.id]?.join(', ')}</div>}
|
|
41
47
|
</fieldset>)}
|
|
42
|
-
{pending && <
|
|
48
|
+
{pending && <div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
|
|
49
|
+
<button type="submit" disabled={disabled || !ready} className="display-font" style={{ padding: '5px 10px', border: '1px solid var(--color-accent-secondary)', borderRadius: 3, background: 'transparent', color: 'var(--color-accent-secondary)', opacity: disabled || !ready ? 0.5 : 1 }}>{sending ? 'SENDING…' : 'SEND ANSWERS'}</button>
|
|
50
|
+
<button type="button" disabled={disabled} onClick={dismiss} data-help="question.dismiss" className="display-font" style={{ padding: '5px 10px', border: '1px solid var(--color-accent-secondary)', borderRadius: 3, background: 'transparent', color: 'var(--color-accent-secondary)', opacity: disabled ? 0.5 : 1 }}>DISMISS</button>
|
|
51
|
+
</div>}
|
|
43
52
|
{pending && !connected && <span style={{ color: 'var(--color-fg-muted)', fontSize: 12 }}> Reconnecting before you can answer…</span>}
|
|
44
53
|
{error && <div role="alert" style={{ color: 'var(--color-danger)', fontSize: 12, marginTop: 6 }}>{error}</div>}
|
|
45
54
|
{question.reason && <div style={{ color: 'var(--color-fg-muted)', fontSize: 12 }}>{question.reason}</div>}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LocalRuntimeRows, enabledLocalRows } from './LocalRuntimeStatus';
|
|
2
2
|
import { compareLlamacppBuild } from '@arco/shared';
|
|
3
|
+
import type { Capabilities, CliUpdateOutcome } from '@arco/shared';
|
|
3
4
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
4
5
|
import { useAppStore } from '../stores/appStore';
|
|
5
6
|
import { FreeVramButton } from './FreeVramButton';
|
|
@@ -62,6 +63,7 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
62
63
|
const [releasesRuntime, setReleasesRuntime] = useState<ReleaseRuntime | null>(null);
|
|
63
64
|
const [checking, setChecking] = useState<CliProvider | null>(null);
|
|
64
65
|
const [checkResult, setCheckResult] = useState<Record<CliProvider, string | null>>({ claude: null, codex: null });
|
|
66
|
+
const [checkOutcome, setCheckOutcome] = useState<Partial<Record<CliProvider, CliUpdateOutcome>>>({});
|
|
65
67
|
// The row's result slot is a narrow right-aligned chip, so the displayed
|
|
66
68
|
// string is truncated hard. Keep the untruncated text for the tooltip —
|
|
67
69
|
// an update failure ("Missing optional dependency @openai/codex-linux-x64…")
|
|
@@ -134,26 +136,32 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
134
136
|
|
|
135
137
|
const checkForUpdates = async (provider: CliProvider) => {
|
|
136
138
|
setChecking(provider);
|
|
139
|
+
setCheckOutcome((prev) => ({ ...prev, [provider]: undefined }));
|
|
137
140
|
setCheckResult((prev) => ({ ...prev, [provider]: null }));
|
|
138
141
|
setCheckDetail((prev) => ({ ...prev, [provider]: null }));
|
|
139
142
|
try {
|
|
140
143
|
const res = await fetch(`/api/check-updates?provider=${provider}`, { method: 'POST' });
|
|
141
|
-
const data = await res.json() as {
|
|
144
|
+
const data = await res.json() as { outcome?: CliUpdateOutcome; currentVersion?: string; message?: string; capabilities?: Capabilities; error?: string; notice?: string };
|
|
145
|
+
const version = data.currentVersion ?? (provider === 'codex' ? capabilities?.codexVersion : capabilities?.cliVersion) ?? 'unknown';
|
|
142
146
|
let msg: string;
|
|
143
|
-
|
|
147
|
+
const detail = data.error ?? data.message ?? data.notice ?? 'The version did not change. Arco could not check whether it is up to date.';
|
|
144
148
|
// A notice means the server did something the version string alone doesn't
|
|
145
149
|
// explain — e.g. upstream tagged a new `latest` whose build for this
|
|
146
150
|
// platform isn't published yet, so it installed the newest one that runs.
|
|
147
151
|
// Mark the row so the operator knows to hover, and keep it pinned.
|
|
148
|
-
if (data.error
|
|
149
|
-
else if (data.notice) msg = `v${
|
|
150
|
-
else if (data.updated) msg = `→ v${
|
|
151
|
-
else msg = `v${
|
|
152
|
+
if (data.error || data.outcome === 'failed') msg = 'FAILED';
|
|
153
|
+
else if (data.notice) msg = `v${version} (!)`;
|
|
154
|
+
else if (data.outcome === 'updated') msg = `→ v${version}`;
|
|
155
|
+
else if (data.outcome === 'current') msg = `v${version} (latest)`;
|
|
156
|
+
else msg = `v${version} (!)`;
|
|
157
|
+
setCheckOutcome((prev) => ({ ...prev, [provider]: msg === 'FAILED' ? 'failed' : msg.endsWith('(!)') ? 'deferred' : data.outcome }));
|
|
158
|
+
if (data.capabilities) useAppStore.getState().setCapabilities(data.capabilities);
|
|
152
159
|
setCheckResult((prev) => ({ ...prev, [provider]: msg }));
|
|
153
|
-
setCheckDetail((prev) => ({ ...prev, [provider]: detail }));
|
|
160
|
+
setCheckDetail((prev) => ({ ...prev, [provider]: msg === 'FAILED' || msg.endsWith('(!)') ? detail : null }));
|
|
154
161
|
} catch (e) {
|
|
155
162
|
const detail = e instanceof Error ? e.message : 'unknown';
|
|
156
163
|
setCheckResult((prev) => ({ ...prev, [provider]: 'FAILED' }));
|
|
164
|
+
setCheckOutcome((prev) => ({ ...prev, [provider]: 'failed' }));
|
|
157
165
|
setCheckDetail((prev) => ({ ...prev, [provider]: detail }));
|
|
158
166
|
} finally {
|
|
159
167
|
setChecking(null);
|
|
@@ -207,7 +215,9 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
207
215
|
// CLI has no parseable version either, so skip the compare rather than let
|
|
208
216
|
// compareSemver read 'broken' as 0.0.0 and call it outdated.
|
|
209
217
|
const latest = r.provider === 'cursor' || broken ? undefined : r.provider === 'deepseek' ? capabilities?.latestVersions?.xolotl : capabilities?.latestVersions?.[r.provider];
|
|
210
|
-
const outdated =
|
|
218
|
+
const outdated = r.provider === 'codex' && capabilities?.codexUpdate
|
|
219
|
+
? capabilities.codexUpdate.updateAvailable
|
|
220
|
+
: !!latest && (r.provider === 'deepseek' ? r.version !== latest : r.provider === 'llamacpp' ? (compareLlamacppBuild(r.version, latest) ?? 0) < 0 : compareSemver(r.version, latest) < 0);
|
|
211
221
|
return { ...r, latest, outdated, broken };
|
|
212
222
|
});
|
|
213
223
|
|
|
@@ -292,12 +302,13 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
292
302
|
const busy = isCli && checking === (provider as CliProvider);
|
|
293
303
|
const result = isCli ? checkResult[provider as CliProvider] : null;
|
|
294
304
|
const detail = isCli ? checkDetail[provider as CliProvider] : null;
|
|
295
|
-
const
|
|
305
|
+
const outcome = isCli ? checkOutcome[provider as CliProvider] : undefined;
|
|
306
|
+
const versionColor = (broken || outcome === 'failed') ? 'var(--color-danger)' : outdated || outcome === 'manual' || outcome === 'deferred' ? 'var(--color-warning)' : 'var(--color-accent-primary-dim)';
|
|
296
307
|
// For llama.cpp the lifecycle manager owns the spawned server, so we
|
|
297
308
|
// know exactly which model is in VRAM — surface it on the row.
|
|
298
309
|
const llamacppLoadedAlias = isLlamacpp ? (llamacppLive?.loadedModel ?? null) : null;
|
|
299
310
|
const baseTitle = broken
|
|
300
|
-
? `${label} is installed but is not responding to --version: click
|
|
311
|
+
? `${label} is installed but is not responding to --version: click for update options and the error`
|
|
301
312
|
: isDeepSeek
|
|
302
313
|
? `Xolotl checkout ${version}${outdated ? ' · upstream revision differs' : ''}. Click for source changes inside Arco. This does not update or rebuild the engine.`
|
|
303
314
|
: isStrata
|
|
@@ -314,7 +325,7 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
314
325
|
? `cursor-agent ${version} (self-updating: click for changelog)`
|
|
315
326
|
: outdated
|
|
316
327
|
? `${label} CLI outdated: v${version} → v${latest} (click to install)`
|
|
317
|
-
: `${label} CLI v${version} (
|
|
328
|
+
: `${label} CLI v${version} (click to check for updates)`;
|
|
318
329
|
const onClick = isDeepSeek
|
|
319
330
|
? () => setReleasesRuntime('xolotl')
|
|
320
331
|
: isStrata
|
|
@@ -357,7 +368,7 @@ export function ProvidersPopover({ open: controlledOpen, onOpenChange }: { open?
|
|
|
357
368
|
}}
|
|
358
369
|
>
|
|
359
370
|
<span style={{ fontSize: '9px', letterSpacing: '1.5px', color: 'var(--color-fg-muted)', whiteSpace: 'nowrap' }}>{label}</span>
|
|
360
|
-
<span style={{ fontSize: '10px', color: versionColor
|
|
371
|
+
<span style={{ fontSize: '10px', color: versionColor }}>{versionDisplay}</span>
|
|
361
372
|
</button>
|
|
362
373
|
</span>
|
|
363
374
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { confirmationSurfaceSize, WorkSurfaceControls } from './workSurface/WorkSurfaceControls';
|
|
2
2
|
import { hasWaitingQuestion } from '../questions/waitingQuestion';
|
|
3
3
|
import { TabStatusChip, useTabStatus } from './TabStatusChip';
|
|
4
|
-
import { clusterHasIdleMail,
|
|
4
|
+
import { clusterHasIdleMail, tabStatusPresentation } from '../utils/tabStatus';
|
|
5
5
|
import { layoutPoint } from '../utils/pointer';
|
|
6
6
|
import { useMemo, useRef, useState } from 'react';
|
|
7
7
|
import {
|
|
@@ -503,7 +503,9 @@ function SortableWorkflowTab({ job, isActive, onActivate, onClose, onContextMenu
|
|
|
503
503
|
const isBusy = activeWorkers > 0 || hasStreaming;
|
|
504
504
|
const accountBadge = accountBadgeForJob(job, settings);
|
|
505
505
|
const waitingNames = hasWaitingQuestion(job) ? [job.config.name || job.id.slice(0, 8)] : [];
|
|
506
|
-
const
|
|
506
|
+
const busy = isBusy || !!job.busy;
|
|
507
|
+
const status = useTabStatus('job', job.id, waitingNames.length > 0, busy);
|
|
508
|
+
const statusLabel = tabStatusPresentation(status, busy).label;
|
|
507
509
|
|
|
508
510
|
return (
|
|
509
511
|
<div
|
|
@@ -526,8 +528,8 @@ function SortableWorkflowTab({ job, isActive, onActivate, onClose, onContextMenu
|
|
|
526
528
|
>
|
|
527
529
|
<button
|
|
528
530
|
onClick={onActivate}
|
|
529
|
-
title={
|
|
530
|
-
aria-label={`${job.config.name || job.id.slice(0, 8)}${accountBadge ? `, ${accountBadge}` : ''}: ${
|
|
531
|
+
title={statusLabel}
|
|
532
|
+
aria-label={`${job.config.name || job.id.slice(0, 8)}${accountBadge ? `, ${accountBadge}` : ''}: ${statusLabel}`}
|
|
531
533
|
className="display-font"
|
|
532
534
|
style={{
|
|
533
535
|
padding: '8px 4px 8px 16px',
|
|
@@ -545,7 +547,7 @@ function SortableWorkflowTab({ job, isActive, onActivate, onClose, onContextMenu
|
|
|
545
547
|
>
|
|
546
548
|
{(job.config.name || job.id.slice(0, 8)).toUpperCase()}
|
|
547
549
|
{accountBadge && <AccountBadge label={accountBadge} />}
|
|
548
|
-
<TabStatusChip status={status} compact />
|
|
550
|
+
<TabStatusChip status={status} busy={busy} compact />
|
|
549
551
|
</button>
|
|
550
552
|
<QuestionMark names={waitingNames} />
|
|
551
553
|
<button
|
|
@@ -590,6 +592,7 @@ function SortableClusterTab({ cluster, isActive, onActivate, onClose }: ClusterT
|
|
|
590
592
|
const anyBusy = cluster.members.some((m) => m.status === 'busy' || jobs[m.workflowId]?.busy);
|
|
591
593
|
const status = useTabStatus('cluster', cluster.clusterId, waitingNames.length > 0 || clusterHasIdleMail(cluster, jobs), anyBusy);
|
|
592
594
|
const label = clusterDisplayName(cluster);
|
|
595
|
+
const statusLabel = tabStatusPresentation(status, anyBusy).label;
|
|
593
596
|
return (
|
|
594
597
|
<div
|
|
595
598
|
ref={setNodeRef}
|
|
@@ -610,8 +613,8 @@ function SortableClusterTab({ cluster, isActive, onActivate, onClose }: ClusterT
|
|
|
610
613
|
>
|
|
611
614
|
<button
|
|
612
615
|
onClick={onActivate}
|
|
613
|
-
title={
|
|
614
|
-
aria-label={`${label}: ${
|
|
616
|
+
title={statusLabel}
|
|
617
|
+
aria-label={`${label}: ${statusLabel}`}
|
|
615
618
|
className="display-font"
|
|
616
619
|
style={{
|
|
617
620
|
padding: '8px 4px 8px 16px',
|
|
@@ -629,7 +632,7 @@ function SortableClusterTab({ cluster, isActive, onActivate, onClose }: ClusterT
|
|
|
629
632
|
>
|
|
630
633
|
{label.toUpperCase()}
|
|
631
634
|
<span style={{ color: 'var(--color-fg-muted)', fontSize: '10px' }}>[{cluster.members.length}]</span>
|
|
632
|
-
<TabStatusChip status={status} compact />
|
|
635
|
+
<TabStatusChip status={status} busy={anyBusy} compact />
|
|
633
636
|
</button>
|
|
634
637
|
<QuestionMark names={waitingNames} />
|
|
635
638
|
<button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTabStatusStore, tabKey } from '../stores/tabStatusStore';
|
|
2
|
-
import { tabStatus, TAB_STATUS_HINT,
|
|
2
|
+
import { tabStatus, TAB_STATUS_HINT, tabStatusPresentation, type TabStatus } from '../utils/tabStatus';
|
|
3
3
|
|
|
4
4
|
const COLOR: Record<TabStatus, string> = {
|
|
5
5
|
'needs-you': 'var(--color-warning)',
|
|
@@ -14,7 +14,8 @@ export function useTabStatus(kind: 'job' | 'cluster', id: string, waiting: boole
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/** The one status word for a tab or card. Text is always present, never colour alone. */
|
|
17
|
-
export function TabStatusChip({ status, compact = false }: { status: TabStatus; compact?: boolean }) {
|
|
17
|
+
export function TabStatusChip({ status, busy = status === 'working', compact = false }: { status: TabStatus; busy?: boolean; compact?: boolean }) {
|
|
18
|
+
const { label, pulsing } = tabStatusPresentation(status, busy);
|
|
18
19
|
if (compact) {
|
|
19
20
|
// Tab strip: the colored dot only; the word is the hover text and the accessible name.
|
|
20
21
|
// Idle shows nothing (the empty marker keeps the status readable by tests and tools).
|
|
@@ -23,7 +24,7 @@ export function TabStatusChip({ status, compact = false }: { status: TabStatus;
|
|
|
23
24
|
<span
|
|
24
25
|
data-help="tabbar.status"
|
|
25
26
|
data-tab-status={status}
|
|
26
|
-
{...(shown ? { role: 'img', 'aria-label':
|
|
27
|
+
{...(shown ? { role: 'img', 'aria-label': label, title: label } : { 'aria-hidden': true })}
|
|
27
28
|
style={{
|
|
28
29
|
display: 'inline-block',
|
|
29
30
|
flexShrink: 0,
|
|
@@ -32,7 +33,7 @@ export function TabStatusChip({ status, compact = false }: { status: TabStatus;
|
|
|
32
33
|
borderRadius: '50%',
|
|
33
34
|
background: shown ? COLOR[status] : 'transparent',
|
|
34
35
|
opacity: status === 'new-reply' ? 0.6 : 1,
|
|
35
|
-
animation:
|
|
36
|
+
animation: pulsing ? 'pulse-glow 1.5s ease-in-out infinite' : undefined,
|
|
36
37
|
}}
|
|
37
38
|
/>
|
|
38
39
|
);
|
|
@@ -41,7 +42,7 @@ export function TabStatusChip({ status, compact = false }: { status: TabStatus;
|
|
|
41
42
|
<span
|
|
42
43
|
data-help="tabbar.status"
|
|
43
44
|
data-tab-status={status}
|
|
44
|
-
title={TAB_STATUS_HINT[status]}
|
|
45
|
+
title={status === 'needs-you' && busy ? 'Needs you - still working.' : TAB_STATUS_HINT[status]}
|
|
45
46
|
style={{
|
|
46
47
|
display: 'inline-flex',
|
|
47
48
|
alignItems: 'center',
|
|
@@ -62,10 +63,10 @@ export function TabStatusChip({ status, compact = false }: { status: TabStatus;
|
|
|
62
63
|
borderRadius: '50%',
|
|
63
64
|
background: status === 'idle' ? 'transparent' : COLOR[status],
|
|
64
65
|
border: `1px solid ${COLOR[status]}`,
|
|
65
|
-
animation:
|
|
66
|
+
animation: pulsing ? 'pulse-glow 1.5s ease-in-out infinite' : undefined,
|
|
66
67
|
}}
|
|
67
68
|
/>
|
|
68
|
-
{
|
|
69
|
+
{label}
|
|
69
70
|
</span>
|
|
70
71
|
);
|
|
71
72
|
}
|