@1agh/maude 2.0.3 → 2.0.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/README.md +6 -5
- package/apps/hub/src/project-transactions/kernel.mjs +10 -1
- package/apps/studio/access/filters.ts +12 -5
- package/apps/studio/access/known-canvases.ts +24 -1
- package/apps/studio/access/refused-inputs.ts +89 -0
- package/apps/studio/access/request.ts +0 -1
- package/apps/studio/acp/adapter-stderr.ts +43 -13
- package/apps/studio/acp/background-tasks.ts +155 -0
- package/apps/studio/acp/bridge.ts +44 -5
- package/apps/studio/acp/connected-fact.ts +15 -4
- package/apps/studio/acp/index.ts +14 -5
- package/apps/studio/actions/agents.ts +10 -0
- package/apps/studio/actions/defs/app.ts +12 -0
- package/apps/studio/actions/defs/view.ts +12 -0
- package/apps/studio/actions.manifest.json +25 -1
- package/apps/studio/actions.parity.json +13 -1
- package/apps/studio/annotations/ui/element-node.tsx +139 -54
- package/apps/studio/annotations/ui/lod.tsx +1 -1
- package/apps/studio/annotations/ui/text-style.ts +1 -1
- package/apps/studio/annotations-layer.tsx +0 -12
- package/apps/studio/api.ts +73 -24
- package/apps/studio/artboard-live-gate.tsx +267 -0
- package/apps/studio/artboard-live.ts +336 -0
- package/apps/studio/artboard-webgl.ts +668 -0
- package/apps/studio/bin/_agent-browser-bin.mjs +8 -0
- package/apps/studio/bin/_agent-browser-safe.mjs +2 -1
- package/apps/studio/bin/_canvas-reasons.mjs +34 -0
- package/apps/studio/bin/_ds-check-live.mjs +37 -0
- package/apps/studio/bin/_ds-check.mjs +4 -1
- package/apps/studio/bin/_ds-prove-judge.mjs +167 -0
- package/apps/studio/bin/_ds-prove-playwright.mjs +183 -105
- package/apps/studio/bin/_import-asset.mjs +2 -1
- package/apps/studio/bin/_perf-probe.mjs +2 -1
- package/apps/studio/bin/_png-playwright.mjs +10 -1
- package/apps/studio/bin/_pw-launch.mjs +14 -0
- package/apps/studio/bin/_studio-verb.mjs +24 -3
- package/apps/studio/bin/_thumb-blank.mjs +70 -0
- package/apps/studio/bin/_thumb-cover.mjs +35 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +93 -13
- package/apps/studio/bin/ds-check.sh +5 -1
- package/apps/studio/bin/perf.sh +11 -1
- package/apps/studio/bin/server-up.sh +7 -2
- package/apps/studio/bin/smoke.sh +19 -0
- package/apps/studio/boot-progress.ts +31 -0
- package/apps/studio/canvas-build-sandbox.ts +275 -42
- package/apps/studio/canvas-build-worker.ts +10 -0
- package/apps/studio/canvas-create.ts +24 -0
- package/apps/studio/canvas-lib.tsx +131 -12
- package/apps/studio/canvas-module-cache.ts +93 -0
- package/apps/studio/canvas-source/errors.ts +39 -0
- package/apps/studio/canvas-source/waiting.ts +290 -0
- package/apps/studio/client/actions/shell-key-handlers.js +5 -0
- package/apps/studio/client/app.jsx +19 -9
- package/apps/studio/client/canvas-url.js +13 -0
- package/apps/studio/client/github.js +23 -3
- package/apps/studio/client/home/HomeAccounts.jsx +262 -0
- package/apps/studio/client/home/Shelves.jsx +4 -3
- package/apps/studio/client/home/home-accounts-model.js +121 -0
- package/apps/studio/client/home/home-api.js +36 -19
- package/apps/studio/client/home/home-app.jsx +141 -40
- package/apps/studio/client/home/home-model.js +172 -6
- package/apps/studio/client/home/home.css +169 -5
- package/apps/studio/client/home/shell-mode.js +8 -1
- package/apps/studio/client/hooks/use-git-actions.jsx +2 -1
- package/apps/studio/client/hooks/use-project-data.jsx +2 -0
- package/apps/studio/client/hooks/use-shell-core.jsx +3 -0
- package/apps/studio/client/hooks/use-tabs.jsx +64 -35
- package/apps/studio/client/index-loader.ts +23 -3
- package/apps/studio/client/panels/ChatPanel.jsx +49 -57
- package/apps/studio/client/panels/CreateProject.jsx +19 -5
- package/apps/studio/client/panels/DiffView.jsx +314 -248
- package/apps/studio/client/panels/TeamProjects.jsx +119 -69
- package/apps/studio/client/panels/acp-runtime.js +25 -0
- package/apps/studio/client/panels/caps-cache.js +46 -0
- package/apps/studio/client/panels/chat-finish.js +66 -0
- package/apps/studio/client/shell/frame-cap.js +53 -0
- package/apps/studio/client/shell/viewport.jsx +45 -8
- package/apps/studio/client/styles/_index.css +2 -0
- package/apps/studio/client/tree/tree.jsx +48 -21
- package/apps/studio/client/v2/access/access-client.js +2 -0
- package/apps/studio/client/v2/access/access-host.jsx +12 -1
- package/apps/studio/client/v2/access/trashed-banner.jsx +6 -3
- package/apps/studio/client/v2/ai/Advanced.jsx +12 -0
- package/apps/studio/client/v2/ai/BackgroundStrip.jsx +120 -0
- package/apps/studio/client/v2/ai/Composer.jsx +27 -10
- package/apps/studio/client/v2/ai/StoppedDivider.jsx +2 -1
- package/apps/studio/client/v2/ai/ai-run.css +87 -3
- package/apps/studio/client/v2/ai/background-model.js +113 -0
- package/apps/studio/client/v2/ai/needs-you-store.js +2 -1
- package/apps/studio/client/v2/ai/run-api.js +7 -3
- package/apps/studio/client/v2/ai/runs-store.js +2 -1
- package/apps/studio/client/v2/annotations/vote-store.js +11 -5
- package/apps/studio/client/v2/assets/asset-state-lane.js +6 -3
- package/apps/studio/client/v2/assets/assets-bus.js +10 -8
- package/apps/studio/client/v2/assets/browse-view.jsx +2 -0
- package/apps/studio/client/v2/assets/ds-library-view.jsx +47 -0
- package/apps/studio/client/v2/assets/spotlight-model.js +75 -0
- package/apps/studio/client/v2/assets/spotlight.css +153 -0
- package/apps/studio/client/v2/assets/spotlight.jsx +199 -0
- package/apps/studio/client/v2/assets/tile-menu.jsx +3 -1
- package/apps/studio/client/v2/assets/tile.jsx +3 -0
- package/apps/studio/client/v2/assets/use-assets.js +2 -1
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +13 -2
- package/apps/studio/client/v2/canvases/covers.js +11 -5
- package/apps/studio/client/v2/canvases/folder-ask.js +139 -0
- package/apps/studio/client/v2/canvases/folder-dialogs.jsx +150 -0
- package/apps/studio/client/v2/canvases/trash-canvas.js +10 -2
- package/apps/studio/client/v2/canvases/trash-queue.js +152 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +42 -18
- package/apps/studio/client/v2/canvases/use-pins.js +2 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +70 -5
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +15 -14
- package/apps/studio/client/v2/code/canvas-imports-words.js +44 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +128 -0
- package/apps/studio/client/v2/code/canvas-waiting.js +164 -0
- package/apps/studio/client/v2/code/code-bus.js +5 -0
- package/apps/studio/client/v2/code/code.css +67 -0
- package/apps/studio/client/v2/code/use-canvas-source.js +19 -4
- package/apps/studio/client/v2/create/NameDialog.jsx +4 -2
- package/apps/studio/client/v2/create/name-dialog.css +10 -0
- package/apps/studio/client/v2/ds/advanced-host.jsx +11 -23
- package/apps/studio/client/v2/ds/ds-refresh.js +161 -0
- package/apps/studio/client/v2/ds/library-host.jsx +45 -45
- package/apps/studio/client/v2/ds/make-host.jsx +13 -12
- package/apps/studio/client/v2/ds/off-system-host.jsx +18 -16
- package/apps/studio/client/v2/ds/review-host.jsx +7 -1
- package/apps/studio/client/v2/ds/truth-host.jsx +15 -14
- package/apps/studio/client/v2/ds/upgrade-host.jsx +26 -10
- package/apps/studio/client/v2/empty/arriving.jsx +29 -12
- package/apps/studio/client/v2/empty/empty-host.jsx +8 -2
- package/apps/studio/client/v2/empty/not-local.jsx +31 -1
- package/apps/studio/client/v2/empty/use-empty-canvas.js +10 -1
- package/apps/studio/client/v2/export/last-finished.js +2 -1
- package/apps/studio/client/v2/history/branch-actions.js +13 -9
- package/apps/studio/client/v2/history/git-advanced.jsx +8 -1
- package/apps/studio/client/v2/history/git-model.js +21 -5
- package/apps/studio/client/v2/history/git-parts.jsx +76 -43
- package/apps/studio/client/v2/history/history.css +6 -0
- package/apps/studio/client/v2/left-panel/assets-panel.jsx +87 -10
- package/apps/studio/client/v2/left-panel/use-trash.js +2 -1
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +100 -33
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +51 -83
- package/apps/studio/client/v2/onboarding/onboarding-model.js +10 -6
- package/apps/studio/client/v2/presence/faces.jsx +42 -14
- package/apps/studio/client/v2/present/order-notes-artboards.js +2 -1
- package/apps/studio/client/v2/search/search-recent.js +3 -1
- package/apps/studio/client/v2/search/search-remote.js +6 -4
- package/apps/studio/client/v2/settings/connections-model.js +1 -1
- package/apps/studio/client/v2/shell/account-card.jsx +10 -4
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +137 -0
- package/apps/studio/client/v2/shell/github-signin-host.jsx +42 -0
- package/apps/studio/client/v2/shell/menu-runner.js +12 -0
- package/apps/studio/client/v2/shell/occlusion-insets.js +14 -2
- package/apps/studio/client/v2/shell/project-account-card.jsx +203 -0
- package/apps/studio/client/v2/shell/project-account-model.js +182 -0
- package/apps/studio/client/v2/shell/recovery-store.js +2 -1
- package/apps/studio/client/v2/shell/served-routes.js +120 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +139 -11
- package/apps/studio/client/v2/shell/share-cluster.css +58 -0
- package/apps/studio/client/v2/shell/share-cluster.jsx +26 -7
- package/apps/studio/client/v2/shell/shell-activity.js +19 -0
- package/apps/studio/client/v2/shell/team-switch.js +94 -0
- package/apps/studio/client/v2/shell/too-heavy-card.jsx +38 -0
- package/apps/studio/client/v2/shell/use-account.js +8 -1
- package/apps/studio/client/v2/shell/use-occluded-insets.js +3 -0
- package/apps/studio/client/v2/sync-states/conflict-card.jsx +7 -2
- package/apps/studio/client/v2/undo/use-undo-projection.jsx +3 -1
- package/apps/studio/cloud/endpoints.ts +23 -1
- package/apps/studio/collab/persistence.ts +9 -1
- package/apps/studio/collab/registry.ts +32 -0
- package/apps/studio/collab/room.ts +8 -0
- package/apps/studio/config-reload-wire.ts +53 -0
- package/apps/studio/dist/client.bundle.js +1098 -1102
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/specimen.tsx +12 -1
- package/apps/studio/ds/canvas-cli.ts +58 -2
- package/apps/studio/ds/check.ts +26 -1
- package/apps/studio/ds/cli.ts +7 -3
- package/apps/studio/ds/convert.ts +34 -6
- package/apps/studio/ds/ds-verb.ts +13 -0
- package/apps/studio/ds/post-build.ts +38 -0
- package/apps/studio/ds/upgrade-apply.ts +27 -5
- package/apps/studio/ds/upgrade-cli.ts +22 -2
- package/apps/studio/ds/upgrade-prove.ts +198 -15
- package/apps/studio/ds/upgrade-stage.ts +4 -1
- package/apps/studio/editing/minimap-context.tsx +3 -3
- package/apps/studio/editing/page-activity.ts +251 -0
- package/apps/studio/editing/rotate-handle.tsx +9 -5
- package/apps/studio/editing/sticky-name.tsx +4 -4
- package/apps/studio/history/restore-artboard-action.ts +40 -0
- package/apps/studio/history/trash.ts +6 -0
- package/apps/studio/home/accounts.ts +87 -0
- package/apps/studio/home/hub.ts +77 -175
- package/apps/studio/home/index-reader.ts +24 -2
- package/apps/studio/home/routes.ts +66 -8
- package/apps/studio/http.ts +131 -68
- package/apps/studio/index-flight.ts +40 -0
- package/apps/studio/managed-projects.ts +52 -24
- package/apps/studio/migrate/hub.ts +7 -1
- package/apps/studio/routes/canvas-source.ts +44 -2
- package/apps/studio/routes/ds-convert.ts +18 -0
- package/apps/studio/routes/history.ts +28 -5
- package/apps/studio/routes/hub-signin.ts +115 -0
- package/apps/studio/routes/index.ts +4 -0
- package/apps/studio/routes/table.ts +7 -0
- package/apps/studio/routes/trash.ts +19 -1
- package/apps/studio/server.ts +19 -10
- package/apps/studio/sync/accepted-cold-start.ts +54 -16
- package/apps/studio/sync/accepted-link.ts +9 -4
- package/apps/studio/sync/asset-push.ts +146 -23
- package/apps/studio/sync/asset-state.ts +3 -2
- package/apps/studio/sync/code-module-consent.ts +74 -0
- package/apps/studio/sync/file-ledger.ts +35 -0
- package/apps/studio/sync/file-membership.ts +28 -3
- package/apps/studio/sync/file-plane.ts +483 -86
- package/apps/studio/sync/file-pull.ts +304 -33
- package/apps/studio/sync/hub-browser-signin.ts +377 -0
- package/apps/studio/sync/hub-link.ts +1 -2
- package/apps/studio/sync/hub-text-undo.ts +30 -10
- package/apps/studio/sync/index.ts +381 -161
- package/apps/studio/sync/journal-client.ts +94 -5
- package/apps/studio/sync/pending-deletes.ts +100 -0
- package/apps/studio/sync/projection.ts +121 -14
- package/apps/studio/sync/pull-pacer.ts +160 -0
- package/apps/studio/sync/pull-priority.ts +119 -0
- package/apps/studio/sync/seed-progress.ts +58 -3
- package/apps/studio/sync/status.ts +3 -1
- package/apps/studio/sync/transaction-client.ts +71 -6
- package/apps/studio/sync/workspace-signin.ts +6 -256
- package/apps/studio/sync/writer-registry.ts +5 -1
- package/apps/studio/thumbs/service.ts +12 -2
- package/apps/studio/thumbs/validate.ts +7 -0
- package/apps/studio/ui-prefs-migrate.ts +4 -0
- package/apps/studio/video-comp.tsx +23 -0
- package/apps/studio/video-links-overlay.tsx +3 -2
- package/apps/studio/whats-new.json +126 -0
- package/cli/lib/bash-guard.mjs +13 -1
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-hook.mjs +20 -0
- package/cli/lib/studio-locate.mjs +35 -10
- package/cli/lib/workspace-plan.mjs +14 -0
- package/package.json +8 -8
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
UserMessage,
|
|
45
45
|
} from '../v2/ai/Feed.jsx';
|
|
46
46
|
import { RunSurface } from '../v2/ai/RunSurface.jsx';
|
|
47
|
+
import { BackgroundStrip } from '../v2/ai/BackgroundStrip.jsx';
|
|
47
48
|
import { useChatRuns } from '../v2/ai/use-chat-runs.js';
|
|
48
49
|
import { cleanChatTitle, runTitleFor, shownChatTitle } from '../v2/ai/chat-list-model.js';
|
|
49
50
|
import { useAiRuns } from '../v2/ai/runs-store.js';
|
|
@@ -60,6 +61,8 @@ import { WaitingCards } from '../v2/ai/WaitingCard.jsx';
|
|
|
60
61
|
import { useAttachments } from '../v2/ai/use-attachments.js';
|
|
61
62
|
import { notify } from '../../notifications.tsx';
|
|
62
63
|
import { DEFAULT_TRANSCRIPT_VIEW, TRANSCRIPT_VIEWS } from './transcript-view.js';
|
|
64
|
+
import { createFinishTracker } from './chat-finish.js';
|
|
65
|
+
import { capsKeyFor, isEmptyCaps, loadCachedCaps, saveCachedCaps } from './caps-cache.js';
|
|
63
66
|
|
|
64
67
|
// DDR-185 — shared "did a genuinely new item arrive" check for the
|
|
65
68
|
// permission/elicitation effects below: both need the identical shape (diff
|
|
@@ -191,32 +194,37 @@ function ChatThread({
|
|
|
191
194
|
unavailable = false,
|
|
192
195
|
viewer = false,
|
|
193
196
|
onConnected,
|
|
197
|
+
projectName = '',
|
|
194
198
|
}) {
|
|
195
199
|
// Live session capabilities (feature-acp-panel-dynamic-claude-code-
|
|
196
200
|
// capabilities) — `caps` is THIS chat's own connection's mode roster +
|
|
197
201
|
// config-option set, sourced entirely from the ACP session. Never a
|
|
198
202
|
// hardcoded list; re-renders on every `caps` frame (a model switch can
|
|
199
203
|
// change which OTHER options — effort, fast — are even offered).
|
|
200
|
-
|
|
201
|
-
|
|
204
|
+
//
|
|
205
|
+
// 2.0.5 - nothing starts Claude until the person engages, so a fresh load has no live roster. The last one this
|
|
206
|
+
// project saw is shown straight away (`caps-cache.js`) and the first live frame replaces it. A cached roster is
|
|
207
|
+
// only DRAWN: the one-time reconcile below waits for a live one, so it never sends anything on its own.
|
|
208
|
+
const capsKey = capsKeyFor(projectName || designRel);
|
|
209
|
+
const [caps, setCaps] = useState(
|
|
210
|
+
() => loadCachedCaps(capsKey) ?? { modes: null, configOptions: [] }
|
|
211
|
+
);
|
|
212
|
+
const [capsLive, setCapsLive] = useState(false);
|
|
213
|
+
useEffect(
|
|
214
|
+
() =>
|
|
215
|
+
conn.onCaps((next) => {
|
|
216
|
+
if (isEmptyCaps(next)) return; // the replay of "nothing yet" must not wipe the cached roster
|
|
217
|
+
setCaps(next);
|
|
218
|
+
setCapsLive(true);
|
|
219
|
+
saveCachedCaps(capsKey, next);
|
|
220
|
+
}),
|
|
221
|
+
[conn, capsKey]
|
|
222
|
+
);
|
|
202
223
|
const parsedOptions = useMemo(() => parseConfigOptions(caps.configOptions), [caps.configOptions]);
|
|
203
224
|
|
|
204
|
-
//
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
// still below) left the model/effort/mode row completely EMPTY until then —
|
|
208
|
-
// read as "I lost the picker" in dogfooding, a real regression. Fires once
|
|
209
|
-
// per chat; a chat that's opened but never viewed still doesn't spawn
|
|
210
|
-
// `claude`, so a background/hidden chat keeps some of DDR-123's "opening
|
|
211
|
-
// the panel costs nothing" intent — only the chat actually on screen warms.
|
|
212
|
-
const warmedOnVisibleRef = useRef(false);
|
|
213
|
-
useEffect(() => {
|
|
214
|
-
// S5.13: nothing to warm while Claude Code is not ready; the effect runs again when it is.
|
|
215
|
-
if (hidden || unavailable || warmedOnVisibleRef.current) return;
|
|
216
|
-
warmedOnVisibleRef.current = true;
|
|
217
|
-
const p = picksRef.current;
|
|
218
|
-
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
219
|
-
}, [hidden, unavailable, conn, chatId, picksRef]);
|
|
225
|
+
// No `warm` here (2.0.5). This effect used to spawn the claude adapter whenever a chat was on screen, so every
|
|
226
|
+
// webview reload started another process. The composer (v2/ai/Composer.jsx) warms it when the person focuses or
|
|
227
|
+
// types in it; a send spawns it itself.
|
|
220
228
|
|
|
221
229
|
// One-time reconciliation: if the user's persisted pick (from a DIFFERENT
|
|
222
230
|
// chat, or an earlier session) isn't what THIS freshly-established session
|
|
@@ -227,7 +235,7 @@ function ChatThread({
|
|
|
227
235
|
// it can never loop.
|
|
228
236
|
const reconciledRef = useRef(false);
|
|
229
237
|
useEffect(() => {
|
|
230
|
-
if (reconciledRef.current) return;
|
|
238
|
+
if (reconciledRef.current || !capsLive) return;
|
|
231
239
|
const hasModes = (caps.modes?.availableModes?.length ?? 0) > 0;
|
|
232
240
|
const hasOptions = caps.configOptions.length > 0;
|
|
233
241
|
if (!hasModes && !hasOptions) return; // nothing to reconcile against yet
|
|
@@ -254,7 +262,7 @@ function ChatThread({
|
|
|
254
262
|
if (resolved !== caps.modes.currentModeId) conn.setMode(chatId, resolved);
|
|
255
263
|
}
|
|
256
264
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
257
|
-
}, [caps, parsedOptions]);
|
|
265
|
+
}, [caps, capsLive, parsedOptions]);
|
|
258
266
|
|
|
259
267
|
const onSetMode = useCallback(
|
|
260
268
|
(modeId) => {
|
|
@@ -472,6 +480,8 @@ function ChatThread({
|
|
|
472
480
|
<StoppedDivider chatId={chatId} hidden={hidden} />
|
|
473
481
|
<JumpToLatest hidden={hidden} />
|
|
474
482
|
</ThreadPrimitive.Viewport>
|
|
483
|
+
{/* Issue #177 — subagents and commands AI left running after its reply, with their time. */}
|
|
484
|
+
<BackgroundStrip conn={conn} />
|
|
475
485
|
<WaitingCards chatId={chatId} designRel={designRel} />
|
|
476
486
|
{/* S5.13 — the open question, a failure, or the kept prompt's line (client/v2/ai/NeedsYouSlot.jsx):
|
|
477
487
|
a permission waits here, inline, never modal. */}
|
|
@@ -703,44 +713,25 @@ export default function ChatPanel({
|
|
|
703
713
|
// (claude-agent-acp #773). Track live tool activity so the menubar
|
|
704
714
|
// badge/dot + the "finished" ping reflect TRUE quiescence, not the
|
|
705
715
|
// premature turn-end. (RCA issue-acp-subagent-activity-invisible.)
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
cbRef.current.onFinished?.();
|
|
722
|
-
refreshChats();
|
|
723
|
-
}
|
|
724
|
-
});
|
|
725
|
-
conn.onBusy((busy) => {
|
|
726
|
-
busyNow = busy;
|
|
727
|
-
syncAggregate();
|
|
728
|
-
if (busy) {
|
|
729
|
-
deferredFinish = false; // a new turn supersedes any pending drain ping
|
|
730
|
-
setBusyChats((prev) => ({ ...prev, [chatId]: true })); // reactive dot
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
// Turn ended. If background work is still draining, keep the dot lit and
|
|
734
|
-
// hold the "finished" ping until the activity list empties (onActivity).
|
|
735
|
-
if (bgActive) {
|
|
736
|
-
deferredFinish = true;
|
|
737
|
-
refreshChats();
|
|
738
|
-
} else {
|
|
739
|
-
setBusyChats((prev) => ({ ...prev, [chatId]: false }));
|
|
740
|
-
cbRef.current.onFinished?.();
|
|
741
|
-
refreshChats();
|
|
742
|
-
}
|
|
716
|
+
// Issue #177 — and the background tasks Claude Code reports (a subagent, a command left
|
|
717
|
+
// running), which outlive even their own tool call: they keep the dot lit and hold the ping too.
|
|
718
|
+
// When the chat counts as finished lives in chat-finish.js: only a busy → not-busy change is
|
|
719
|
+
// the end of a turn (the subscribe-time replay of an idle chat is not), and background work
|
|
720
|
+
// holds the ping until it drains.
|
|
721
|
+
const finish = createFinishTracker({
|
|
722
|
+
aggregate: (busy) => {
|
|
723
|
+
const wasAny = [...busyRef.current.values()].some(Boolean);
|
|
724
|
+
busyRef.current.set(chatId, busy);
|
|
725
|
+
const nowAny = [...busyRef.current.values()].some(Boolean);
|
|
726
|
+
if (wasAny !== nowAny) cbRef.current.onBusyChange?.(nowAny);
|
|
727
|
+
},
|
|
728
|
+
dot: (on) => setBusyChats((prev) => ({ ...prev, [chatId]: on })),
|
|
729
|
+
finished: () => cbRef.current.onFinished?.(),
|
|
730
|
+
refresh: () => refreshChats(),
|
|
743
731
|
});
|
|
732
|
+
conn.onActivity((activeTools) => finish.activity(activeTools));
|
|
733
|
+
conn.onBackgroundTasks((tasks) => finish.tasks(tasks));
|
|
734
|
+
conn.onBusy((busy) => finish.busy(busy));
|
|
744
735
|
return conn;
|
|
745
736
|
},
|
|
746
737
|
[refreshChats]
|
|
@@ -1019,6 +1010,7 @@ export default function ChatPanel({
|
|
|
1019
1010
|
chatId={id}
|
|
1020
1011
|
initialMessages={hydratedRef.current.get(id) || []}
|
|
1021
1012
|
hidden={id !== activeChatId}
|
|
1013
|
+
projectName={projectName}
|
|
1022
1014
|
picksRef={picksRef}
|
|
1023
1015
|
setPick={setPick}
|
|
1024
1016
|
activeCanvas={activeCanvas}
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
pickDirectory,
|
|
24
24
|
} from '../github.js';
|
|
25
25
|
import { reasonProps } from '../v2/access/disabled-reason.js';
|
|
26
|
+
import { menuRunner } from '../v2/shell/menu-runner.js';
|
|
26
27
|
|
|
27
28
|
function Icon({ name, size = 16 }) {
|
|
28
29
|
const p = {
|
|
@@ -206,11 +207,24 @@ function NewView({ identity, signedIn, onClose }) {
|
|
|
206
207
|
</button>
|
|
207
208
|
</div>
|
|
208
209
|
<span className="cp-field-help">
|
|
209
|
-
{local
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
{local ? (
|
|
211
|
+
'A local git repo on your computer — no GitHub, no remote. You can publish it later.'
|
|
212
|
+
) : signedIn ? (
|
|
213
|
+
'A repo on your GitHub account, cloned to your computer.'
|
|
214
|
+
) : (
|
|
215
|
+
<>
|
|
216
|
+
{/* 2.0.5 W4 — the line is a button (account.github-signin); the rail it pointed at is gone */}
|
|
217
|
+
<button
|
|
218
|
+
type="button"
|
|
219
|
+
className="btn btn--sm"
|
|
220
|
+
data-testid="cp-github-signin"
|
|
221
|
+
onClick={() => menuRunner.run('account.github-signin')}
|
|
222
|
+
>
|
|
223
|
+
Sign in with GitHub…
|
|
224
|
+
</button>{' '}
|
|
225
|
+
to publish. For now you can create a local project.
|
|
226
|
+
</>
|
|
227
|
+
)}
|
|
214
228
|
</span>
|
|
215
229
|
</div>
|
|
216
230
|
<label className="cp-field">
|