@1agh/maude 2.0.4 → 2.0.8
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/apps/hub/src/project-transactions/kernel.mjs +10 -1
- package/apps/studio/access/closure.ts +156 -16
- package/apps/studio/access/filters.ts +39 -5
- package/apps/studio/access/known-canvases.ts +24 -1
- package/apps/studio/access/refused-inputs.ts +89 -0
- package/apps/studio/actions/agents.ts +59 -0
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/app.ts +12 -0
- package/apps/studio/actions/defs/sync.ts +13 -0
- package/apps/studio/actions/defs/view.ts +59 -3
- package/apps/studio/actions/keymap.gen.ts +35 -0
- package/apps/studio/actions/menu.ts +2 -0
- package/apps/studio/actions/types.ts +3 -1
- package/apps/studio/actions.manifest.json +148 -1
- package/apps/studio/actions.parity.json +31 -1
- package/apps/studio/annotations/ui/ai-seen.tsx +4 -3
- package/apps/studio/annotations/ui/element-node.tsx +139 -54
- package/apps/studio/annotations/ui/lod.tsx +1 -1
- package/apps/studio/annotations/ui/ride.ts +2 -1
- package/apps/studio/annotations/ui/text-style.ts +1 -1
- package/apps/studio/annotations-context-toolbar.tsx +5 -4
- package/apps/studio/annotations-layer.tsx +4 -15
- package/apps/studio/api.ts +425 -128
- package/apps/studio/artboard-activity-overlay.tsx +4 -4
- package/apps/studio/artboard-ai-copies.tsx +4 -4
- package/apps/studio/artboard-freeze.ts +108 -0
- package/apps/studio/artboard-live-gate.tsx +636 -0
- package/apps/studio/artboard-live.ts +831 -0
- package/apps/studio/artboard-placeholder.ts +197 -0
- package/apps/studio/artboard-still-raster.ts +485 -0
- package/apps/studio/artboard-still-warmup.ts +221 -0
- package/apps/studio/artboard-still.ts +1188 -0
- package/apps/studio/artboard-webgl.ts +669 -0
- package/apps/studio/asset-placeholder.tsx +237 -132
- package/apps/studio/asset-upload-bars.tsx +4 -4
- 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-open.mjs +364 -0
- package/apps/studio/bin/_perf-probe.mjs +2 -1
- package/apps/studio/bin/_perf-shared.mjs +12 -7
- package/apps/studio/bin/_pw-launch.mjs +26 -1
- 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 +89 -12
- package/apps/studio/bin/ds-check.sh +5 -1
- package/apps/studio/bin/perf.sh +30 -1
- package/apps/studio/bin/server-up.sh +7 -2
- package/apps/studio/bin/smoke.sh +19 -0
- package/apps/studio/bridge/dgn-protocol.ts +35 -0
- package/apps/studio/canvas-build-sandbox.ts +69 -13
- package/apps/studio/canvas-camera.ts +90 -0
- package/apps/studio/canvas-comment-mount.tsx +9 -9
- package/apps/studio/canvas-lib.tsx +289 -44
- package/apps/studio/canvas-pages-view.tsx +465 -0
- package/apps/studio/canvas-pages.ts +305 -0
- package/apps/studio/canvas-rows.ts +62 -0
- package/apps/studio/canvas-shell.tsx +62 -16
- package/apps/studio/canvas-theme-icons.tsx +41 -0
- package/apps/studio/canvas-theme-pill.tsx +15 -6
- package/apps/studio/canvas-theme.ts +12 -11
- package/apps/studio/client/app.jsx +7 -0
- package/apps/studio/client/canvas-url.js +36 -1
- 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 +6 -0
- 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/canvas-origin-probe.js +34 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +3 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +1 -1
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +23 -6
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +16 -8
- package/apps/studio/client/hooks/use-project-data.jsx +13 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +19 -9
- package/apps/studio/client/index-loader.ts +41 -21
- package/apps/studio/client/inspector/inspector-panel.jsx +35 -14
- package/apps/studio/client/panels/ChatPanel.jsx +27 -20
- package/apps/studio/client/panels/CreateProject.jsx +19 -5
- package/apps/studio/client/panels/caps-cache.js +46 -0
- package/apps/studio/client/shell/viewport.jsx +66 -22
- package/apps/studio/client/tree/tree.jsx +17 -0
- 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/Composer.jsx +27 -10
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +24 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +24 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +14 -2
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +19 -14
- package/apps/studio/client/v2/code/canvas-imports-words.js +60 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +59 -5
- package/apps/studio/client/v2/code/canvas-waiting.js +18 -1
- package/apps/studio/client/v2/code/code-bus.js +5 -0
- package/apps/studio/client/v2/code/code-consent-sheet.jsx +87 -0
- package/apps/studio/client/v2/code/code-consent.js +67 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +62 -10
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +314 -5
- package/apps/studio/client/v2/ds/advanced-host.jsx +11 -26
- 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 -15
- package/apps/studio/client/v2/ds/off-system-host.jsx +18 -19
- package/apps/studio/client/v2/ds/review-host.jsx +7 -1
- package/apps/studio/client/v2/ds/truth-host.jsx +15 -17
- package/apps/studio/client/v2/ds/upgrade-host.jsx +26 -10
- 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 +3 -1
- package/apps/studio/client/v2/history/git-parts.jsx +16 -1
- package/apps/studio/client/v2/layers/artboard-layers.jsx +24 -5
- package/apps/studio/client/v2/layers/layers-request.js +49 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +93 -3
- package/apps/studio/client/v2/left-panel/ds-boards.js +39 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +13 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +24 -0
- package/apps/studio/client/v2/presence/faces.jsx +42 -14
- package/apps/studio/client/v2/shell/account-card.jsx +10 -4
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +172 -0
- package/apps/studio/client/v2/shell/canvas-mode.js +17 -1
- package/apps/studio/client/v2/shell/floating-panels.css +37 -1
- package/apps/studio/client/v2/shell/github-signin-host.jsx +42 -0
- package/apps/studio/client/v2/shell/menu-runner.js +11 -0
- package/apps/studio/client/v2/shell/mode-switch.jsx +14 -3
- package/apps/studio/client/v2/shell/opening-skeleton.js +118 -0
- package/apps/studio/client/v2/shell/opening-skeleton.jsx +103 -0
- package/apps/studio/client/v2/shell/pages-pick.js +49 -0
- 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/project-menu-model.js +3 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +140 -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-parity.json +8 -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-canvas-mode-lane.js +30 -0
- 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/comments-overlay.tsx +12 -11
- package/apps/studio/config-reload-wire.ts +56 -0
- package/apps/studio/config.schema.json +6 -0
- package/apps/studio/context.ts +37 -1
- package/apps/studio/dist/client.bundle.js +1198 -1198
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/board.css +6 -0
- package/apps/studio/ds/board/ds-bar.tsx +21 -3
- package/apps/studio/ds/board/specimen.tsx +16 -2
- package/apps/studio/ds/board/template.ts +39 -19
- package/apps/studio/ds/canvas-cli.ts +58 -2
- package/apps/studio/ds/check.ts +26 -1
- package/apps/studio/ds/cli.ts +14 -4
- package/apps/studio/ds/component-list.ts +2 -1
- package/apps/studio/ds/convert.ts +34 -6
- package/apps/studio/ds/default.ts +6 -1
- package/apps/studio/ds/ds-resolver.ts +58 -8
- package/apps/studio/ds/ds-verb.ts +13 -0
- package/apps/studio/ds/engine.ts +3 -1
- package/apps/studio/ds/folder-systems.ts +199 -0
- package/apps/studio/ds/pairing-css.ts +2 -1
- package/apps/studio/ds/post-build.ts +38 -0
- package/apps/studio/ds/rename.ts +10 -3
- package/apps/studio/ds/shell-fallbacks.ts +2 -1
- 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 +10 -3
- package/apps/studio/editing/ai-point-ring.tsx +4 -4
- package/apps/studio/editing/ai-scope-outline.tsx +4 -4
- package/apps/studio/editing/align-bar.tsx +4 -4
- package/apps/studio/editing/anchor-report.ts +3 -2
- package/apps/studio/editing/artboard-handles.tsx +4 -4
- package/apps/studio/editing/corner-dots.tsx +4 -4
- package/apps/studio/editing/crop-mode.tsx +4 -4
- package/apps/studio/editing/drop-chip.tsx +4 -4
- package/apps/studio/editing/empty-report.ts +3 -2
- package/apps/studio/editing/focus-model.tsx +4 -4
- package/apps/studio/editing/gap-bands.tsx +3 -3
- package/apps/studio/editing/hold-rings.tsx +4 -4
- package/apps/studio/editing/lock-badge.tsx +3 -3
- package/apps/studio/editing/long-page.ts +23 -1
- package/apps/studio/editing/nudge.tsx +2 -2
- package/apps/studio/editing/page-activity.ts +4 -3
- package/apps/studio/editing/paste-bar.tsx +4 -4
- package/apps/studio/editing/pen/overlay.tsx +4 -3
- package/apps/studio/editing/place-freely.tsx +3 -3
- package/apps/studio/editing/reorder-slot.tsx +3 -3
- package/apps/studio/editing/selection.tsx +4 -4
- package/apps/studio/editing/size-ghost.tsx +4 -4
- package/apps/studio/editing/tab-order.tsx +4 -4
- package/apps/studio/editing/text-in-place.tsx +4 -4
- package/apps/studio/editing/undo-preview.tsx +3 -3
- package/apps/studio/equal-spacing-handles.tsx +3 -3
- package/apps/studio/frame-clock.ts +89 -0
- package/apps/studio/history/trash.ts +6 -0
- package/apps/studio/home/accounts.ts +87 -0
- package/apps/studio/home/index-reader.ts +24 -2
- package/apps/studio/home/routes.ts +19 -0
- package/apps/studio/http.ts +80 -34
- package/apps/studio/index/ds-usage.ts +4 -1
- package/apps/studio/index-cache.ts +272 -0
- package/apps/studio/inspect-overlay.tsx +4 -3
- package/apps/studio/inspect.ts +7 -2
- package/apps/studio/link-chip-overlay.tsx +4 -3
- package/apps/studio/measure-overlay.tsx +4 -3
- package/apps/studio/present/pointer-dot.tsx +3 -2
- package/apps/studio/present/present-media.ts +6 -2
- package/apps/studio/present/present-stage.tsx +3 -2
- package/apps/studio/preview/preview-camera.tsx +3 -2
- package/apps/studio/routes/ds-convert.ts +18 -0
- package/apps/studio/routes/sync.ts +176 -0
- package/apps/studio/routes/trash.ts +16 -1
- package/apps/studio/safe-zones-overlay.tsx +3 -2
- package/apps/studio/server.ts +8 -10
- package/apps/studio/skip-dirs.ts +103 -47
- package/apps/studio/studio-page-host.ts +70 -0
- package/apps/studio/sync/accepted-cold-start.ts +28 -13
- 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 +86 -0
- package/apps/studio/sync/file-ledger.ts +24 -0
- package/apps/studio/sync/file-membership.ts +28 -3
- package/apps/studio/sync/file-plane.ts +497 -61
- package/apps/studio/sync/file-pull.ts +304 -33
- package/apps/studio/sync/held-deletes.ts +230 -0
- package/apps/studio/sync/hub-link.ts +1 -2
- package/apps/studio/sync/hubs-config.ts +59 -2
- package/apps/studio/sync/index.ts +405 -163
- package/apps/studio/sync/journal-client.ts +94 -5
- package/apps/studio/sync/pending-deletes.ts +100 -0
- package/apps/studio/sync/projection.ts +77 -12
- package/apps/studio/sync/seed-progress.ts +104 -3
- package/apps/studio/sync/settings.ts +36 -1
- package/apps/studio/sync/status.ts +17 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/text-caret.ts +5 -3
- package/apps/studio/thumbs/service.ts +12 -2
- package/apps/studio/thumbs/validate.ts +7 -0
- package/apps/studio/toolbars/toolbar-rect.ts +3 -2
- package/apps/studio/ui-prefs-migrate.ts +4 -0
- package/apps/studio/use-annotation-resize.tsx +4 -3
- package/apps/studio/use-artboard-drag.tsx +3 -2
- package/apps/studio/use-element-resize.tsx +7 -6
- package/apps/studio/use-grid-track-handles.tsx +5 -4
- package/apps/studio/use-selection-set.tsx +64 -4
- package/apps/studio/use-spacing-handles.tsx +7 -6
- package/apps/studio/video-comp.tsx +75 -39
- package/apps/studio/video-play-overlay.tsx +4 -3
- package/apps/studio/whats-new.json +99 -0
- package/cli/commands/design.mjs +5 -2
- package/cli/commands/hub.mjs +10 -1
- package/cli/lib/bash-guard.mjs +27 -1
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-hook.mjs +20 -0
- package/cli/lib/design-link.mjs +42 -17
- package/cli/lib/hub-purge.mjs +183 -0
- package/cli/lib/studio-locate.mjs +35 -10
- package/package.json +8 -8
- package/plugins/design/templates/_shell.html +164 -1
|
@@ -20,7 +20,7 @@ import { isFilterKind } from '../v2/kinds/kind-filter-model.js';
|
|
|
20
20
|
import { useKindFilter } from '../v2/kinds/kind-filter-store.js';
|
|
21
21
|
import { artboardCounts } from '../v2/kinds/layers-kind-model.js';
|
|
22
22
|
import { LayersAdvanced } from '../v2/left-panel/layers-advanced.jsx';
|
|
23
|
-
import { ArtboardLayers, currentBoard } from '../v2/layers/artboard-layers.jsx';
|
|
23
|
+
import { ArtboardLayers, currentBoard, treeOfBoard } from '../v2/layers/artboard-layers.jsx';
|
|
24
24
|
import { timelineSelectionElement, useTimelineSelection } from '../v2/timeline/selection.js';
|
|
25
25
|
import '../v2/inspector/sections/index.js'; // S2.3: the Position · Size · Layout bodies register themselves
|
|
26
26
|
|
|
@@ -161,6 +161,9 @@ export function InspectorPanel({
|
|
|
161
161
|
// gate-b-polish3 — the open canvas's artboards ({ id, label, kind }), its name, and how a row selects one
|
|
162
162
|
layersBoards = null,
|
|
163
163
|
layersCanvasName = '',
|
|
164
|
+
// 2.0.7 fix (decision `v2-207-layers-current`) — the artboard the person is on (`artboardInView`: the page in
|
|
165
|
+
// Pages, else the selection's artboard on this canvas); Layers marks it and draws only its tree under it
|
|
166
|
+
layersArtboard = null,
|
|
164
167
|
onSelectArtboard,
|
|
165
168
|
// S11.9 — Layers › Advanced › Select by selector: posts `select-by-selector {selector}` to the open canvas.
|
|
166
169
|
onSelectBySelector,
|
|
@@ -551,16 +554,27 @@ export function InspectorPanel({
|
|
|
551
554
|
const el = Array.isArray(selected) ? selected[0] : selected;
|
|
552
555
|
// gate-b-polish3 (08 · ak-mixed-fit / 14) — the Layers tab by artboard: every artboard a row (kind glyph +
|
|
553
556
|
// label), the tree of the one you are in nested under it. No artboard list known → the tree alone.
|
|
557
|
+
// 2.0.7 fix (decision `v2-207-layers-current`): the marked row is the artboard you are on, and only THAT artboard's
|
|
558
|
+
// tree is drawn under it — a tree that is late or for another artboard leaves the row busy until its own lands.
|
|
559
|
+
const markedBoard = currentBoard({
|
|
560
|
+
boards: layersBoards ?? [],
|
|
561
|
+
onBoard: layersArtboard,
|
|
562
|
+
selectedArtboard: el?.artboardId ?? null,
|
|
563
|
+
treeArtboard: layersTree?.artboardId ?? emptyBoard?.artboardId ?? null,
|
|
564
|
+
});
|
|
565
|
+
const layersShown = treeOfBoard(layersTree, markedBoard);
|
|
566
|
+
const layersPending = !!markedBoard && !layersShown;
|
|
567
|
+
// 2.0.7 (decision `v2-207-pages-stale-selection`) — the selection's own layer path (the fallback for an empty
|
|
568
|
+
// tree) may be drawn under the marked row only when the selection is on that artboard: under "NOVÝ v3 · A1" it
|
|
569
|
+
// drew a path ending in another artboard (`article[data-dc-screen="spine-home-entry"]`).
|
|
570
|
+
const selOnMarked = !markedBoard || el?.artboardId === markedBoard;
|
|
554
571
|
const byArtboard = (inner) => (
|
|
555
572
|
<ArtboardLayers
|
|
556
573
|
boards={layersBoards}
|
|
557
574
|
canvasName={layersCanvasName}
|
|
558
575
|
count={artboardCount}
|
|
559
|
-
current={
|
|
560
|
-
|
|
561
|
-
treeArtboard: layersTree?.artboardId ?? emptyBoard?.artboardId ?? null,
|
|
562
|
-
selectedArtboard: el?.artboardId ?? null,
|
|
563
|
-
})}
|
|
576
|
+
current={markedBoard}
|
|
577
|
+
pending={layersPending}
|
|
564
578
|
onPick={onSelectArtboard}
|
|
565
579
|
>
|
|
566
580
|
{inner}
|
|
@@ -721,16 +735,23 @@ export function InspectorPanel({
|
|
|
721
735
|
</div>
|
|
722
736
|
) : effTab === 'layers' &&
|
|
723
737
|
emptyBoard &&
|
|
724
|
-
|
|
725
|
-
!
|
|
738
|
+
layersShown?.artboardId === emptyBoard.artboardId &&
|
|
739
|
+
!layersShown?.nodes?.length ? (
|
|
726
740
|
byArtboard(<LayersEmpty artboard={emptyBoard.label} />)
|
|
727
|
-
) : effTab === 'layers' &&
|
|
741
|
+
) : effTab === 'layers' && layersPending ? (
|
|
742
|
+
// the artboard you are on is marked; its own tree is on its way (never another artboard's in its place)
|
|
728
743
|
byArtboard(null)
|
|
729
|
-
) :
|
|
744
|
+
) : effTab === 'layers' &&
|
|
745
|
+
layersBoards?.length &&
|
|
746
|
+
(!el || !selOnMarked) &&
|
|
747
|
+
!layersShown?.nodes?.length ? (
|
|
748
|
+
// the marked artboard's tree is empty: nothing under its row (never another artboard's path in its place)
|
|
749
|
+
byArtboard(null)
|
|
750
|
+
) : !el && !(effTab === 'layers' && layersShown?.nodes?.length) && (dsTruth || dsSystem) ? (
|
|
730
751
|
// c7 · 13 truth shots: a waiting review is the whole empty place — the system block (Which way changes flow,
|
|
731
752
|
// Advanced) is what it shows when nothing else is waiting (advanced.jsx header)
|
|
732
753
|
<>{dsTruth || dsSystem}</>
|
|
733
|
-
) : !el && !(effTab === 'layers' &&
|
|
754
|
+
) : !el && !(effTab === 'layers' && layersShown?.nodes?.length) ? (
|
|
734
755
|
<div className="sh-rp-empty">
|
|
735
756
|
{/* <p> wrapper — sh-rp-empty is a flex column, bare text nodes +
|
|
736
757
|
kbd would stack as stretched flex items. */}
|
|
@@ -738,7 +759,7 @@ export function InspectorPanel({
|
|
|
738
759
|
</div>
|
|
739
760
|
) : effTab === 'layers' ? (
|
|
740
761
|
byArtboard(
|
|
741
|
-
|
|
762
|
+
layersShown?.nodes?.length ? (
|
|
742
763
|
<>
|
|
743
764
|
{/* gate-b-polish3 — the key strip is no longer default chrome (README: no dev chrome in the
|
|
744
765
|
default view); the same words ride on the tree as its tooltip and its accessible description. */}
|
|
@@ -753,7 +774,7 @@ export function InspectorPanel({
|
|
|
753
774
|
ref={layerTreeRef}
|
|
754
775
|
onKeyDown={onTreeKeyDown}
|
|
755
776
|
>
|
|
756
|
-
{withSlot(
|
|
777
|
+
{withSlot(layersShown.nodes, layersSlot).map((n, ni) => (
|
|
757
778
|
<LayerRow
|
|
758
779
|
key={`${n.id}:${n.index}`}
|
|
759
780
|
node={n}
|
|
@@ -795,7 +816,7 @@ export function InspectorPanel({
|
|
|
795
816
|
{reorderMsg}
|
|
796
817
|
</div>
|
|
797
818
|
</>
|
|
798
|
-
) : el && Array.isArray(el.dom_path) && el.dom_path.length ? (
|
|
819
|
+
) : el && selOnMarked && Array.isArray(el.dom_path) && el.dom_path.length ? (
|
|
799
820
|
el.dom_path.map((node, i) => (
|
|
800
821
|
<div
|
|
801
822
|
key={i}
|
|
@@ -62,6 +62,7 @@ import { useAttachments } from '../v2/ai/use-attachments.js';
|
|
|
62
62
|
import { notify } from '../../notifications.tsx';
|
|
63
63
|
import { DEFAULT_TRANSCRIPT_VIEW, TRANSCRIPT_VIEWS } from './transcript-view.js';
|
|
64
64
|
import { createFinishTracker } from './chat-finish.js';
|
|
65
|
+
import { capsKeyFor, isEmptyCaps, loadCachedCaps, saveCachedCaps } from './caps-cache.js';
|
|
65
66
|
|
|
66
67
|
// DDR-185 — shared "did a genuinely new item arrive" check for the
|
|
67
68
|
// permission/elicitation effects below: both need the identical shape (diff
|
|
@@ -193,32 +194,37 @@ function ChatThread({
|
|
|
193
194
|
unavailable = false,
|
|
194
195
|
viewer = false,
|
|
195
196
|
onConnected,
|
|
197
|
+
projectName = '',
|
|
196
198
|
}) {
|
|
197
199
|
// Live session capabilities (feature-acp-panel-dynamic-claude-code-
|
|
198
200
|
// capabilities) — `caps` is THIS chat's own connection's mode roster +
|
|
199
201
|
// config-option set, sourced entirely from the ACP session. Never a
|
|
200
202
|
// hardcoded list; re-renders on every `caps` frame (a model switch can
|
|
201
203
|
// change which OTHER options — effort, fast — are even offered).
|
|
202
|
-
|
|
203
|
-
|
|
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
|
+
);
|
|
204
223
|
const parsedOptions = useMemo(() => parseConfigOptions(caps.configOptions), [caps.configOptions]);
|
|
205
224
|
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
// still below) left the model/effort/mode row completely EMPTY until then —
|
|
210
|
-
// read as "I lost the picker" in dogfooding, a real regression. Fires once
|
|
211
|
-
// per chat; a chat that's opened but never viewed still doesn't spawn
|
|
212
|
-
// `claude`, so a background/hidden chat keeps some of DDR-123's "opening
|
|
213
|
-
// the panel costs nothing" intent — only the chat actually on screen warms.
|
|
214
|
-
const warmedOnVisibleRef = useRef(false);
|
|
215
|
-
useEffect(() => {
|
|
216
|
-
// S5.13: nothing to warm while Claude Code is not ready; the effect runs again when it is.
|
|
217
|
-
if (hidden || unavailable || warmedOnVisibleRef.current) return;
|
|
218
|
-
warmedOnVisibleRef.current = true;
|
|
219
|
-
const p = picksRef.current;
|
|
220
|
-
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
221
|
-
}, [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.
|
|
222
228
|
|
|
223
229
|
// One-time reconciliation: if the user's persisted pick (from a DIFFERENT
|
|
224
230
|
// chat, or an earlier session) isn't what THIS freshly-established session
|
|
@@ -229,7 +235,7 @@ function ChatThread({
|
|
|
229
235
|
// it can never loop.
|
|
230
236
|
const reconciledRef = useRef(false);
|
|
231
237
|
useEffect(() => {
|
|
232
|
-
if (reconciledRef.current) return;
|
|
238
|
+
if (reconciledRef.current || !capsLive) return;
|
|
233
239
|
const hasModes = (caps.modes?.availableModes?.length ?? 0) > 0;
|
|
234
240
|
const hasOptions = caps.configOptions.length > 0;
|
|
235
241
|
if (!hasModes && !hasOptions) return; // nothing to reconcile against yet
|
|
@@ -256,7 +262,7 @@ function ChatThread({
|
|
|
256
262
|
if (resolved !== caps.modes.currentModeId) conn.setMode(chatId, resolved);
|
|
257
263
|
}
|
|
258
264
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
259
|
-
}, [caps, parsedOptions]);
|
|
265
|
+
}, [caps, capsLive, parsedOptions]);
|
|
260
266
|
|
|
261
267
|
const onSetMode = useCallback(
|
|
262
268
|
(modeId) => {
|
|
@@ -1004,6 +1010,7 @@ export default function ChatPanel({
|
|
|
1004
1010
|
chatId={id}
|
|
1005
1011
|
initialMessages={hydratedRef.current.get(id) || []}
|
|
1006
1012
|
hidden={id !== activeChatId}
|
|
1013
|
+
projectName={projectName}
|
|
1007
1014
|
picksRef={picksRef}
|
|
1008
1015
|
setPick={setPick}
|
|
1009
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">
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// 2.0.5 - the last capability set (`{modes, configOptions}`: model, effort, permissions...) the AI answered with,
|
|
2
|
+
// kept per project so the Advanced fold can draw its rows on a fresh load WITHOUT starting Claude (a panel that
|
|
3
|
+
// only opened must not spawn the adapter - ChatPanel sends no `warm` on mount). The first live `caps` frame
|
|
4
|
+
// replaces it and refreshes the cache; a cached set is only ever shown, never acted on (no reconcile, no send).
|
|
5
|
+
|
|
6
|
+
const PREFIX = 'maude-acp-caps';
|
|
7
|
+
|
|
8
|
+
/** @param {string} scope the project's name (or its design folder when the name is not known yet) */
|
|
9
|
+
export function capsKeyFor(scope) {
|
|
10
|
+
return `${PREFIX}:${scope || ''}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** @param {{modes?: any, configOptions?: any[]}|null|undefined} caps */
|
|
14
|
+
export function isEmptyCaps(caps) {
|
|
15
|
+
const modes = caps?.modes?.availableModes;
|
|
16
|
+
const opts = caps?.configOptions;
|
|
17
|
+
return !(Array.isArray(modes) && modes.length) && !(Array.isArray(opts) && opts.length);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** @returns {{modes: any, configOptions: any[]}|null} the cached set, or null (none, corrupt, or empty) */
|
|
21
|
+
export function loadCachedCaps(key, storage = globalThis.localStorage) {
|
|
22
|
+
try {
|
|
23
|
+
const raw = storage?.getItem(key);
|
|
24
|
+
if (!raw) return null;
|
|
25
|
+
const parsed = JSON.parse(raw);
|
|
26
|
+
const caps = {
|
|
27
|
+
modes: parsed?.modes && typeof parsed.modes === 'object' ? parsed.modes : null,
|
|
28
|
+
configOptions: Array.isArray(parsed?.configOptions) ? parsed.configOptions : [],
|
|
29
|
+
};
|
|
30
|
+
return isEmptyCaps(caps) ? null : caps;
|
|
31
|
+
} catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function saveCachedCaps(key, caps, storage = globalThis.localStorage) {
|
|
37
|
+
if (isEmptyCaps(caps)) return;
|
|
38
|
+
try {
|
|
39
|
+
storage?.setItem(
|
|
40
|
+
key,
|
|
41
|
+
JSON.stringify({ modes: caps.modes ?? null, configOptions: caps.configOptions })
|
|
42
|
+
);
|
|
43
|
+
} catch {
|
|
44
|
+
/* private mode / unavailable - non-fatal */
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// shell/viewport.jsx — moved verbatim out of client/app.jsx (Maude v2 plan V2-0.2, move-only split).
|
|
2
2
|
|
|
3
3
|
import { useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
canvasFrameCfg,
|
|
6
|
+
canvasImportsOf,
|
|
7
|
+
canvasMissingOf,
|
|
8
|
+
canvasRefusedOf,
|
|
9
|
+
canvasUrl,
|
|
10
|
+
} from '../canvas-url.js';
|
|
5
11
|
import { CompareHost } from '../v2/history/compare-view.jsx';
|
|
6
12
|
import { useDsPreviewTarget, withDsPreview } from '../v2/ds/preview-mode.js';
|
|
7
13
|
import { useViewing } from '../v2/history/history-host.jsx';
|
|
@@ -28,6 +34,9 @@ import { normalizeOpenPath } from '../share-link.js';
|
|
|
28
34
|
import { framesIsolated, sessionRole } from '../v2/access/access-client.js';
|
|
29
35
|
import { CanvasDropCatcher, catcherReadOnly } from '../v2/assets/canvas-drop-catcher.jsx';
|
|
30
36
|
import { framesToMount, noteShown } from './frame-cap.js';
|
|
37
|
+
import { crashGuard, subscribeCrashGuard } from '../v2/shell/canvas-crash-guard.js';
|
|
38
|
+
import { TooHeavyCanvas } from '../v2/shell/too-heavy-card.jsx';
|
|
39
|
+
import { OpeningSkeleton } from '../v2/shell/opening-skeleton.jsx';
|
|
31
40
|
|
|
32
41
|
export function Viewport({
|
|
33
42
|
tabs,
|
|
@@ -113,9 +122,14 @@ export function Viewport({
|
|
|
113
122
|
// S6.12 (C5) — what the open canvases say about drawing: one listener for every frame. The card is below.
|
|
114
123
|
const wsSend = useContext(ShellStoreContext)?.local?.wsSend;
|
|
115
124
|
const renderSignal = useRenderSignal({ cfg, wsSend, viewingPath: viewing?.path ?? null });
|
|
125
|
+
// 2.0.5 — a canvas that crashed the page twice is not reopened in a loop (canvas-crash-guard.js).
|
|
126
|
+
const guard = useMemo(() => crashGuard(), []);
|
|
127
|
+
const [, bumpGuard] = useState(0);
|
|
128
|
+
useEffect(() => subscribeCrashGuard(() => bumpGuard((n) => n + 1)), []);
|
|
116
129
|
const stableSrc = (path) => {
|
|
117
130
|
const held = viewing?.path === path ? { viewing: viewing.at } : undefined;
|
|
118
|
-
const
|
|
131
|
+
const base = withDsPreview(held, dsPreview);
|
|
132
|
+
const opts = guard.isLight(path) ? { ...(base || {}), light: true } : base;
|
|
119
133
|
// A frame that changes between now and a past version is a new frame: the entry it comes back to is
|
|
120
134
|
// built afresh, so it carries the capability that is live THEN, not the one of the first open.
|
|
121
135
|
// The same holds for a frame entering or leaving a design-system preview, or stepping to another system.
|
|
@@ -144,6 +158,11 @@ export function Viewport({
|
|
|
144
158
|
const canvasTab = activePath && activePath !== SYSTEM_TAB ? activePath : null;
|
|
145
159
|
const availability = useCanvasAvailability(canvasTab, { stamp: canvasReloadNonce });
|
|
146
160
|
const notLocal = !!canvasTab && availability === 'not-local';
|
|
161
|
+
const tooHeavy = !!canvasTab && guard.tooHeavy(canvasTab);
|
|
162
|
+
// The mark the next boot reads: this canvas is framed now (none while its card stands in).
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
guard.noteOpen(tooHeavy ? null : canvasTab);
|
|
165
|
+
}, [guard, canvasTab, tooHeavy]);
|
|
147
166
|
// Still coming down (Q13 fallback): the "<name> is on its way." card, same stand-in for the frame.
|
|
148
167
|
const arriving = !!canvasTab && availability === 'arriving';
|
|
149
168
|
const canvasState =
|
|
@@ -225,6 +244,20 @@ export function Viewport({
|
|
|
225
244
|
<NotLocalCanvas name={basename(t.path).replace(/\.(tsx|html)$/i, '')} />
|
|
226
245
|
</div>
|
|
227
246
|
);
|
|
247
|
+
if (tooHeavy && t.path === activePath)
|
|
248
|
+
return (
|
|
249
|
+
<div
|
|
250
|
+
key={`${t.path}#too-heavy`}
|
|
251
|
+
className="sh-not-local active"
|
|
252
|
+
style={{ '--es-cx': freeCx }}
|
|
253
|
+
>
|
|
254
|
+
<TooHeavyCanvas
|
|
255
|
+
name={basename(t.path).replace(/\.(tsx|html)$/i, '')}
|
|
256
|
+
onLight={() => guard.chooseLight(t.path)}
|
|
257
|
+
onAll={() => guard.forgive(t.path)}
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
);
|
|
228
261
|
if (arriving && t.path === activePath)
|
|
229
262
|
return (
|
|
230
263
|
<div
|
|
@@ -267,7 +300,7 @@ export function Viewport({
|
|
|
267
300
|
/>
|
|
268
301
|
);
|
|
269
302
|
})}
|
|
270
|
-
{canvasTab && !notLocal && !arriving && (
|
|
303
|
+
{canvasTab && !notLocal && !arriving && !tooHeavy && (
|
|
271
304
|
// r3 — an Assets tile dragged over the canvas: the shell takes the drop (WebKit gives the canvas origin no
|
|
272
305
|
// event of a drag the shell started) and places the picture on what the canvas says lies under it
|
|
273
306
|
<CanvasDropCatcher
|
|
@@ -294,7 +327,7 @@ export function Viewport({
|
|
|
294
327
|
onClose={() => setCodeReq(null)}
|
|
295
328
|
/>
|
|
296
329
|
)}
|
|
297
|
-
{loadingPath && loadingPath === activePath && !notLocal && !arriving && (
|
|
330
|
+
{loadingPath && loadingPath === activePath && !notLocal && !arriving && !tooHeavy && (
|
|
298
331
|
// DS skeletons recipe — calm .skel pulse while the canvas-shell compiles
|
|
299
332
|
// the TSX. Cleared by the iframe's dgn:'loaded' message (or the onLoad
|
|
300
333
|
// fallback timer for legacy .html canvases that never post it).
|
|
@@ -305,7 +338,7 @@ export function Viewport({
|
|
|
305
338
|
// a fresh card on every re-render while opening, so the card never left (fix-opening-hang).
|
|
306
339
|
<CanvasLoading key={`${loadingPath}#loading`} path={loadingPath} cloud={!!cfg?.cloud} />
|
|
307
340
|
)}
|
|
308
|
-
{canvasError && canvasError.path === activePath && !notLocal && !arriving && (
|
|
341
|
+
{canvasError && canvasError.path === activePath && !notLocal && !arriving && !tooHeavy && (
|
|
309
342
|
// issue #115 — what the blank pane used to be. Names which of the two
|
|
310
343
|
// failures happened and offers the recovery that used to require
|
|
311
344
|
// quitting the app (or knowing that switching projects and back
|
|
@@ -331,12 +364,17 @@ export function Viewport({
|
|
|
331
364
|
Reload canvas
|
|
332
365
|
</button>
|
|
333
366
|
</div>
|
|
334
|
-
) : canvasImportsOf(cfg, canvasError.path)
|
|
367
|
+
) : canvasImportsOf(cfg, canvasError.path) ||
|
|
368
|
+
canvasRefusedOf(cfg, canvasError.path) ||
|
|
369
|
+
canvasMissingOf(cfg, canvasError.path) ? (
|
|
335
370
|
// gate-b-c4j — it imports another canvas, so its frame refused the module: say that, not "can't
|
|
336
|
-
// be drawn" (v2/code/canvas-imports-card.jsx).
|
|
371
|
+
// be drawn" (v2/code/canvas-imports-card.jsx). 2.0.5 (#205): or its built module inlined a file
|
|
372
|
+
// another canvas owns — the card names that file too.
|
|
337
373
|
<CanvasImportsCard
|
|
338
374
|
key={`${canvasError.path}#imports`}
|
|
339
375
|
imports={canvasImportsOf(cfg, canvasError.path)}
|
|
376
|
+
refused={canvasRefusedOf(cfg, canvasError.path)}
|
|
377
|
+
missing={canvasMissingOf(cfg, canvasError.path)}
|
|
340
378
|
componentDir={cfg?.newComponentDir}
|
|
341
379
|
/>
|
|
342
380
|
) : (
|
|
@@ -352,11 +390,12 @@ export function Viewport({
|
|
|
352
390
|
onAskAi={(text) => dispatchCanvasOp('ask-ai-fix', canvasError.path, text)}
|
|
353
391
|
onReload={() => onRetryCanvasLoad?.(canvasError.path)}
|
|
354
392
|
onNotify={(msg, ok) => shellToast(msg, ok)}
|
|
393
|
+
loadReason={canvasError.reason}
|
|
355
394
|
/>
|
|
356
395
|
)}
|
|
357
396
|
</div>
|
|
358
397
|
)}
|
|
359
|
-
{canvasTab && !notLocal && !arriving && (
|
|
398
|
+
{canvasTab && !notLocal && !arriving && !tooHeavy && (
|
|
360
399
|
// S6.12 — the code compiles and then throws while drawing: S11.7's card over the dimmed last good
|
|
361
400
|
// render, with Go back to 14:05. Silent while this Mac's own AI run draws on it.
|
|
362
401
|
<RenderErrorHost
|
|
@@ -391,27 +430,32 @@ export function CanvasLoading({ path, cloud }) {
|
|
|
391
430
|
return () => clearTimeout(t);
|
|
392
431
|
}, []);
|
|
393
432
|
const name = sanitizeDisplayText(basename(path || '').replace(/\.(tsx|jsx|html?)$/i, ''));
|
|
433
|
+
const hint = cloud
|
|
434
|
+
? 'Still working — the first open of a canvas fetches its images and fonts from cloud storage. It is quicker next time.'
|
|
435
|
+
: 'Still working — large canvases take a moment to build.';
|
|
436
|
+
// 2.0.7 (B1) — every artboard at once, as a skeleton at its final place and size, while the canvas builds
|
|
437
|
+
// and renders (v2/shell/opening-skeleton.js); the card below only while that layout is not known.
|
|
438
|
+
const card = (
|
|
439
|
+
<div className="sh-skel-card">
|
|
440
|
+
<div className="sh-canvas-loading-head">
|
|
441
|
+
<span className="sh-canvas-loading-spinner" aria-hidden="true" />
|
|
442
|
+
<span className="sh-canvas-loading-title">Opening {name}…</span>
|
|
443
|
+
</div>
|
|
444
|
+
<span className="skel sh-skel-thumb" aria-hidden="true" />
|
|
445
|
+
<span className="skel sh-skel-line" style={{ width: '72%' }} aria-hidden="true" />
|
|
446
|
+
<span className="skel sh-skel-line" style={{ width: '46%' }} aria-hidden="true" />
|
|
447
|
+
<div className={'sh-canvas-loading-hint' + (slow ? ' is-shown' : '')}>{hint}</div>
|
|
448
|
+
</div>
|
|
449
|
+
);
|
|
394
450
|
return (
|
|
395
451
|
<div
|
|
396
452
|
className="sh-canvas-loading"
|
|
397
453
|
role="status"
|
|
398
454
|
aria-live="polite"
|
|
455
|
+
aria-label={`Opening ${name}…`}
|
|
399
456
|
data-testid="canvas-loading"
|
|
400
457
|
>
|
|
401
|
-
<
|
|
402
|
-
<div className="sh-canvas-loading-head">
|
|
403
|
-
<span className="sh-canvas-loading-spinner" aria-hidden="true" />
|
|
404
|
-
<span className="sh-canvas-loading-title">Opening {name}…</span>
|
|
405
|
-
</div>
|
|
406
|
-
<span className="skel sh-skel-thumb" aria-hidden="true" />
|
|
407
|
-
<span className="skel sh-skel-line" style={{ width: '72%' }} aria-hidden="true" />
|
|
408
|
-
<span className="skel sh-skel-line" style={{ width: '46%' }} aria-hidden="true" />
|
|
409
|
-
<div className={'sh-canvas-loading-hint' + (slow ? ' is-shown' : '')}>
|
|
410
|
-
{cloud
|
|
411
|
-
? 'Still working — the first open of a canvas fetches its images and fonts from cloud storage. It is quicker next time.'
|
|
412
|
-
: 'Still working — large canvases take a moment to build.'}
|
|
413
|
-
</div>
|
|
414
|
-
</div>
|
|
458
|
+
<OpeningSkeleton path={path} fallback={card} note={slow ? hint : null} />
|
|
415
459
|
</div>
|
|
416
460
|
);
|
|
417
461
|
}
|
|
@@ -26,6 +26,8 @@ import { CanvasesAdvanced, useAdvancedOpen } from '../v2/left-panel/canvases-adv
|
|
|
26
26
|
import { DsPinnedRows, NewCanvasRow, TrashRow } from '../v2/left-panel/canvases-pinned.jsx';
|
|
27
27
|
import { OPEN_TRASH_EVENT, takeTrashRequest } from '../v2/left-panel/left-panel-bus.js';
|
|
28
28
|
import { dsPinnedModel, trashRowCount } from '../v2/left-panel/left-panel-model.js';
|
|
29
|
+
import { dsBoardLists } from '../v2/left-panel/ds-boards.js';
|
|
30
|
+
import { useIndexSnapshotNow } from '../v2/canvases/use-canvas-index.js';
|
|
29
31
|
import { openNewCanvasDialog } from '../v2/create/new-canvas.js';
|
|
30
32
|
import { systemMenuItems } from '../v2/ds/system-menu.jsx';
|
|
31
33
|
import { trashedTokenItems } from '../v2/ds/door-write.js';
|
|
@@ -914,6 +916,18 @@ export function Sidebar({
|
|
|
914
916
|
[groups, dsCfg, dsDesignRel, dsState, onDsAction, readOnly]
|
|
915
917
|
);
|
|
916
918
|
const pinnedDs = dsModel.rows;
|
|
919
|
+
// 2.0.7 (B3) — each system row's Design system canvas artboards, from the index the Canvases panel read
|
|
920
|
+
const indexSnap = useIndexSnapshotNow();
|
|
921
|
+
const dsBoards = useMemo(
|
|
922
|
+
() =>
|
|
923
|
+
dsBoardLists(pinnedDs, {
|
|
924
|
+
snapshot: indexSnap,
|
|
925
|
+
designRel: dsDesignRel,
|
|
926
|
+
systems: dsCfg?.designSystems ?? [],
|
|
927
|
+
groups,
|
|
928
|
+
}),
|
|
929
|
+
[pinnedDs, indexSnap, dsDesignRel, dsCfg, groups]
|
|
930
|
+
);
|
|
917
931
|
// p8-v1-drop — the systems below Conformant are offered "Bring it up" in ⌘K too (client/v2/ds/upgrade-offers.js)
|
|
918
932
|
useEffect(() => {
|
|
919
933
|
if (!onDsAction || readOnly) return undefined;
|
|
@@ -1405,6 +1419,9 @@ export function Sidebar({
|
|
|
1405
1419
|
renaming={renamingDs}
|
|
1406
1420
|
onRename={(row, label) => onDsAction?.('ds.rename', { ds: row.dsName, label })}
|
|
1407
1421
|
onRenameDone={() => setRenamingDs(null)}
|
|
1422
|
+
boards={dsBoards}
|
|
1423
|
+
activePath={activePath}
|
|
1424
|
+
activeArtboard={activeArtboard}
|
|
1408
1425
|
/>
|
|
1409
1426
|
)}
|
|
1410
1427
|
{/* S1.1 — the canvases, virtualised: Pinned, the project row with Sort, folders with counts.
|
|
@@ -182,6 +182,8 @@ export const WORDS = Object.freeze({
|
|
|
182
182
|
// decision v2-lead-trashed-while-open-stops-writes: writes stop; what was not sent yet is parked with it
|
|
183
183
|
trashedLine: 'You can keep looking. Your unsent changes stay with it.',
|
|
184
184
|
restore: 'Restore',
|
|
185
|
+
// the restore never writes over a canvas made at the old place meanwhile: it comes back beside it
|
|
186
|
+
restoredAs: (canvas) => `Restored as ${canvas}. A canvas with the old name already exists.`,
|
|
185
187
|
sharedWithYou: (role) => `Shared with you · ${accessWord(role)}`,
|
|
186
188
|
onlyOne: (canvas) => `Only ${canvas} was shared with you.`,
|
|
187
189
|
onlyMany: (n) => `Only these ${n} canvases were shared with you.`,
|
|
@@ -306,7 +306,18 @@ export function AccessHost({
|
|
|
306
306
|
const open = (tabs || []).map((t) => canvasRel(t?.path, designRel)).filter(Boolean);
|
|
307
307
|
useTrashGhosts(items, open, onOpenTab, rel);
|
|
308
308
|
|
|
309
|
-
const onRestored = useCallback(
|
|
309
|
+
const onRestored = useCallback(
|
|
310
|
+
(path, o) => {
|
|
311
|
+
void reload();
|
|
312
|
+
// A canvas was made at that place meanwhile: the restore never overwrites it, it comes back beside it.
|
|
313
|
+
if (o?.renamed)
|
|
314
|
+
toast?.({
|
|
315
|
+
title: WORDS.restoredAs(canvasName(path)),
|
|
316
|
+
kind: 'info',
|
|
317
|
+
});
|
|
318
|
+
},
|
|
319
|
+
[reload, toast]
|
|
320
|
+
);
|
|
310
321
|
const onError = useCallback((m) => toast?.({ title: m, kind: 'error' }), [toast]);
|
|
311
322
|
|
|
312
323
|
return (
|
|
@@ -16,10 +16,13 @@ import { commentTime } from '../comments/comments-model.js';
|
|
|
16
16
|
import { restoreItem } from '../left-panel/use-trash.js';
|
|
17
17
|
import { canvasName, WORDS } from './access-client.js';
|
|
18
18
|
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The shared Trash's canvas item for the open canvas (designRoot-relative `rel`), or null. An item a live
|
|
21
|
+
* canvas holds the path of (`liveAtPath`, GET /_api/trash) is an OLDER copy: the open canvas was not trashed.
|
|
22
|
+
*/
|
|
20
23
|
export function trashedWhileOpen(items, rel) {
|
|
21
24
|
if (!rel || !Array.isArray(items)) return null;
|
|
22
|
-
return items.find((i) => i?.kind === 'canvas' && i.path === rel) ?? null;
|
|
25
|
+
return items.find((i) => i?.kind === 'canvas' && i.path === rel && i.liveAtPath !== true) ?? null;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
/** Every open tab whose canvas is in the trash → the panel's ghost rows. `open` = designRoot-relative paths. */
|
|
@@ -73,7 +76,7 @@ export function TrashedBanner({ item, canRestore = true, now, fetchImpl, onResto
|
|
|
73
76
|
try {
|
|
74
77
|
const r = await restoreItem(item.id, fetchImpl);
|
|
75
78
|
if (r.status >= 200 && r.status < 300 && r.body?.ok !== false)
|
|
76
|
-
onRestored?.(r.body?.path ?? item.path);
|
|
79
|
+
onRestored?.(r.body?.path ?? item.path, { renamed: r.body?.renamed === true });
|
|
77
80
|
else
|
|
78
81
|
onError?.(
|
|
79
82
|
typeof r.body?.error === 'string' ? r.body.error : 'Could not restore it. Try again.'
|
|
@@ -401,6 +401,18 @@ export function ChatAdvanced({
|
|
|
401
401
|
Connecting…
|
|
402
402
|
</p>
|
|
403
403
|
) : null}
|
|
404
|
+
{/* 2.0.5 - AI starts when you do, so a first run has no roster yet: the rows sit in their resting
|
|
405
|
+
state (same labels) instead of leaving the fold empty; they fill in once AI answers. */}
|
|
406
|
+
{noCaps && !connecting ? (
|
|
407
|
+
<div data-testid="chat-caps-placeholder">
|
|
408
|
+
{['Model', 'Effort', 'Permissions'].map((label) => (
|
|
409
|
+
<div className="ai-adv-row" key={label} data-adv-row={`placeholder-${label}`}>
|
|
410
|
+
<span className="ai-adv-k">{label}</span>
|
|
411
|
+
<span className="ai-adv-hint">Set when AI starts</span>
|
|
412
|
+
</div>
|
|
413
|
+
))}
|
|
414
|
+
</div>
|
|
415
|
+
) : null}
|
|
404
416
|
{parsed.model ? (
|
|
405
417
|
<OptionSelect row="model" label="Model" opt={parsed.model} onChange={onSetConfig} />
|
|
406
418
|
) : null}
|
|
@@ -308,7 +308,15 @@ export function CommandPopover({ items, activeIndex, onPick, onHover }) {
|
|
|
308
308
|
// but ONLY when that token is a command that exists (the badge gate). The mirror
|
|
309
309
|
// MUST match the textarea's box model exactly (see .chat-input / .chat-input-mirror
|
|
310
310
|
// in v2/ai/chat.css) or the pill drifts off the text.
|
|
311
|
-
function HighlightedInput({
|
|
311
|
+
function HighlightedInput({
|
|
312
|
+
existsSet,
|
|
313
|
+
attachmentsRef,
|
|
314
|
+
onAttachChange,
|
|
315
|
+
attach,
|
|
316
|
+
multi,
|
|
317
|
+
onMulti,
|
|
318
|
+
onEngage,
|
|
319
|
+
}) {
|
|
312
320
|
const text = useComposer((c) => c.text);
|
|
313
321
|
const mirrorRef = useRef(null);
|
|
314
322
|
const wrapRef = useRef(null);
|
|
@@ -420,6 +428,9 @@ function HighlightedInput({ existsSet, attachmentsRef, onAttachChange, attach, m
|
|
|
420
428
|
placeholder="Ask AI…"
|
|
421
429
|
aria-label="Message to AI"
|
|
422
430
|
onPaste={onPaste}
|
|
431
|
+
// 2.0.5 - the person is here: the first focus or keystroke wakes the adapter (once, in Composer)
|
|
432
|
+
onFocus={onEngage}
|
|
433
|
+
onInput={onEngage}
|
|
423
434
|
onScroll={(e) => {
|
|
424
435
|
if (mirrorRef.current) mirrorRef.current.scrollTop = e.currentTarget.scrollTop;
|
|
425
436
|
}}
|
|
@@ -498,19 +509,24 @@ export function Composer({
|
|
|
498
509
|
setMoreOpen(false);
|
|
499
510
|
}, [match?.token]);
|
|
500
511
|
|
|
501
|
-
// Warm the adapter the first time the
|
|
502
|
-
//
|
|
512
|
+
// Warm the adapter the first time the person ENGAGES: focuses the field, starts typing (a slash command included),
|
|
513
|
+
// or sends (a prompt spawns it itself). Never on mount or reload - a panel that only re-opened used to send `warm`
|
|
514
|
+
// from ChatPanel, and every webview reload started another `claude` (2.0.5). Focus is early enough that the
|
|
515
|
+
// capability row and the slash catalogue are usually there before the first word. Once per mount; not while Claude
|
|
516
|
+
// Code is not ready (S5.13) or for a viewer (the field is read-only).
|
|
503
517
|
// model/effort/mode are the user's PERSISTED picks (read live off the ref so
|
|
504
|
-
// this
|
|
518
|
+
// this callback doesn't need to change when they change) - applied once, live,
|
|
505
519
|
// by the bridge right after the session establishes.
|
|
506
520
|
const warmedRef = useRef(false);
|
|
521
|
+
const warmOnce = useCallback(() => {
|
|
522
|
+
if (warmedRef.current || unavailable || viewer) return;
|
|
523
|
+
warmedRef.current = true;
|
|
524
|
+
const p = picksRef.current;
|
|
525
|
+
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
526
|
+
}, [conn, chatId, picksRef, unavailable, viewer]);
|
|
507
527
|
useEffect(() => {
|
|
508
|
-
if (menuOpen
|
|
509
|
-
|
|
510
|
-
const p = picksRef.current;
|
|
511
|
-
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
512
|
-
}
|
|
513
|
-
}, [menuOpen, conn, chatId, picksRef]);
|
|
528
|
+
if (menuOpen) warmOnce();
|
|
529
|
+
}, [menuOpen, warmOnce]);
|
|
514
530
|
|
|
515
531
|
// V2-4.6 — ⌘K "Ask AI": the query lands in the composer; the person still sends it. S10.16c: the DS hosts'
|
|
516
532
|
// `askAI(text, { send: true, origin: 'ds-…' })` is the one ask that also sends (use-ask-ai.js; this file never does).
|
|
@@ -612,6 +628,7 @@ export function Composer({
|
|
|
612
628
|
attach={attach}
|
|
613
629
|
multi={multi}
|
|
614
630
|
onMulti={setMulti}
|
|
631
|
+
onEngage={warmOnce}
|
|
615
632
|
/>
|
|
616
633
|
{/* S5.12 — the model / effort / mode pickers and the info button moved to the panel's
|
|
617
634
|
Advanced fold (Advanced.jsx); the field keeps only what 03 draws: the text and send
|