@1agh/maude 2.0.8 → 2.1.1

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.
Files changed (401) hide show
  1. package/README.md +2 -1
  2. package/apps/hub/src/project-transactions/kernel.mjs +13 -7
  3. package/apps/studio/access/closure.ts +86 -10
  4. package/apps/studio/access/filters.ts +18 -1
  5. package/apps/studio/access/request.ts +8 -0
  6. package/apps/studio/acp/design-write-verb.ts +12 -2
  7. package/apps/studio/acp/env.ts +7 -2
  8. package/apps/studio/acp/index.ts +15 -4
  9. package/apps/studio/acp/login-state.ts +22 -5
  10. package/apps/studio/acp/may-scope.ts +38 -1
  11. package/apps/studio/acp/plugin-bootstrap.ts +13 -1
  12. package/apps/studio/acp/probe.ts +11 -4
  13. package/apps/studio/actions/agents.ts +110 -28
  14. package/apps/studio/actions/canvas-keys.ts +4 -2
  15. package/apps/studio/actions/ctx.ts +3 -0
  16. package/apps/studio/actions/defs/annotation.ts +84 -2
  17. package/apps/studio/actions/defs/app.ts +28 -1
  18. package/apps/studio/actions/defs/edit.ts +13 -0
  19. package/apps/studio/actions/defs/export.ts +12 -0
  20. package/apps/studio/actions/defs/sync.ts +18 -0
  21. package/apps/studio/actions/defs/video.ts +9 -0
  22. package/apps/studio/actions/documents.ts +6 -1
  23. package/apps/studio/actions/keymap.gen.ts +147 -9
  24. package/apps/studio/actions/menu.ts +5 -1
  25. package/apps/studio/actions/types.ts +4 -2
  26. package/apps/studio/actions/verbs.ts +9 -0
  27. package/apps/studio/actions.manifest.json +300 -45
  28. package/apps/studio/actions.parity.json +19 -1
  29. package/apps/studio/ai/save-hold.ts +2 -1
  30. package/apps/studio/ai/write-claim-scope.ts +7 -1
  31. package/apps/studio/ai/write-claim.ts +154 -3
  32. package/apps/studio/annotations/ai-read.ts +42 -6
  33. package/apps/studio/annotations/ai-write.ts +145 -2
  34. package/apps/studio/annotations/board-ops.ts +34 -3
  35. package/apps/studio/annotations/checklist-ops.ts +374 -0
  36. package/apps/studio/annotations/elements/checkitem.model.ts +129 -0
  37. package/apps/studio/annotations/elements/sticky.model.ts +54 -2
  38. package/apps/studio/annotations/ops.ts +30 -0
  39. package/apps/studio/annotations/registry.ts +9 -1
  40. package/apps/studio/annotations/templates.ts +4 -2
  41. package/apps/studio/annotations/text-steps.ts +114 -10
  42. package/apps/studio/annotations/ui/checklist-wire.ts +129 -0
  43. package/apps/studio/annotations/ui/checklist.tsx +429 -0
  44. package/apps/studio/annotations/ui/element-node.tsx +48 -2
  45. package/apps/studio/annotations/ui/template-place.ts +11 -1
  46. package/apps/studio/annotations/v1-adapter.ts +22 -3
  47. package/apps/studio/annotations-context-toolbar.tsx +12 -0
  48. package/apps/studio/annotations-layer.tsx +442 -49
  49. package/apps/studio/annotations-model.ts +4 -2
  50. package/apps/studio/api.ts +148 -21
  51. package/apps/studio/artboard-live-gate.tsx +54 -17
  52. package/apps/studio/artboard-still-persist.ts +166 -0
  53. package/apps/studio/artboard-still-raster.ts +6 -2
  54. package/apps/studio/artboard-still.ts +390 -20
  55. package/apps/studio/asset-added.ts +154 -0
  56. package/apps/studio/asset-details.ts +46 -3
  57. package/apps/studio/asset-origins.ts +5 -3
  58. package/apps/studio/asset-trash.ts +6 -1
  59. package/apps/studio/bin/_agent-browser-safe.mjs +3 -4
  60. package/apps/studio/bin/_annotate-post.mjs +14 -5
  61. package/apps/studio/bin/_audio-search.mjs +8 -2
  62. package/apps/studio/bin/_curl-local.mjs +7 -4
  63. package/apps/studio/bin/_desktop-locate.sh +145 -0
  64. package/apps/studio/bin/_ds-check-live.mjs +2 -1
  65. package/apps/studio/bin/_exports.mjs +38 -2
  66. package/apps/studio/bin/_history.mjs +79 -8
  67. package/apps/studio/bin/_import-asset.mjs +14 -9
  68. package/apps/studio/bin/_import-figma.mjs +510 -98
  69. package/apps/studio/bin/_index-cli.mjs +10 -21
  70. package/apps/studio/bin/_ingest-footage.mjs +24 -6
  71. package/apps/studio/bin/_media-probe.mjs +232 -0
  72. package/apps/studio/bin/_perf-probe-open.mjs +6 -0
  73. package/apps/studio/bin/_perf-probe-safari.mjs +6 -0
  74. package/apps/studio/bin/_perf-probe-studio.mjs +6 -1
  75. package/apps/studio/bin/_perf-probe.mjs +8 -3
  76. package/apps/studio/bin/_perf-sweep-shared.mjs +789 -0
  77. package/apps/studio/bin/_perf-sweep.mjs +240 -0
  78. package/apps/studio/bin/_record-shot.sh +33 -8
  79. package/apps/studio/bin/_screenshot-playwright.mjs +45 -2
  80. package/apps/studio/bin/_studio-verb.mjs +8 -3
  81. package/apps/studio/bin/_thumb-route.mjs +21 -0
  82. package/apps/studio/bin/_thumbs-playwright.mjs +83 -1
  83. package/apps/studio/bin/_transcribe.mjs +22 -6
  84. package/apps/studio/bin/_unsynced-refs.mjs +22 -0
  85. package/apps/studio/bin/_url-guard.mjs +120 -5
  86. package/apps/studio/bin/_url-guard.sh +29 -7
  87. package/apps/studio/bin/_video-limits.mjs +104 -0
  88. package/apps/studio/bin/_video-playwright.mjs +119 -19
  89. package/apps/studio/bin/_video-proxy.mjs +130 -0
  90. package/apps/studio/bin/_write-claim.mjs +38 -16
  91. package/apps/studio/bin/annotate.mjs +12 -2
  92. package/apps/studio/bin/canvas-rects.sh +19 -4
  93. package/apps/studio/bin/chat-open.sh +7 -1
  94. package/apps/studio/bin/draw-proof.sh +6 -2
  95. package/apps/studio/bin/generate.sh +32 -10
  96. package/apps/studio/bin/handoff.sh +2 -2
  97. package/apps/studio/bin/perf.sh +96 -15
  98. package/apps/studio/bin/photo-adjust.sh +6 -3
  99. package/apps/studio/bin/photo-bg-remove.sh +2 -2
  100. package/apps/studio/bin/prep.sh +21 -4
  101. package/apps/studio/bin/read-annotations.mjs +3 -0
  102. package/apps/studio/bin/runtime-health.sh +27 -1
  103. package/apps/studio/bin/screenshot.sh +152 -12
  104. package/apps/studio/bin/server-up.sh +64 -6
  105. package/apps/studio/bin/smoke.sh +43 -8
  106. package/apps/studio/bin/to-lottie.sh +3 -2
  107. package/apps/studio/bin/video-proxy.sh +27 -0
  108. package/apps/studio/bin/visual-sanity.sh +3 -1
  109. package/apps/studio/bridge/dgn-protocol.ts +157 -1
  110. package/apps/studio/bridge/mode-shows.ts +8 -6
  111. package/apps/studio/bridge/still-webp.ts +233 -0
  112. package/apps/studio/build.ts +18 -0
  113. package/apps/studio/canvas-build.ts +93 -11
  114. package/apps/studio/canvas-comment-mount.tsx +53 -8
  115. package/apps/studio/canvas-edit.ts +34 -1
  116. package/apps/studio/canvas-lib-module.ts +210 -0
  117. package/apps/studio/canvas-lib.tsx +3 -12
  118. package/apps/studio/canvas-pipeline.ts +111 -5
  119. package/apps/studio/canvas-shell.tsx +8 -11
  120. package/apps/studio/canvas-theme-pill.tsx +5 -3
  121. package/apps/studio/check/index.ts +12 -5
  122. package/apps/studio/check/video.ts +18 -2
  123. package/apps/studio/client/app.jsx +65 -7
  124. package/apps/studio/client/clipboard-relay.ts +193 -16
  125. package/apps/studio/client/comments-overlay.css +18 -0
  126. package/apps/studio/client/export-center.jsx +30 -0
  127. package/apps/studio/client/generate-dialog.jsx +49 -4
  128. package/apps/studio/client/github.js +7 -0
  129. package/apps/studio/client/home/HomeAccountsRow.jsx +221 -0
  130. package/apps/studio/client/home/HomeConnection.jsx +111 -0
  131. package/apps/studio/client/home/home-accounts-model.js +110 -1
  132. package/apps/studio/client/home/home-api.js +9 -2
  133. package/apps/studio/client/home/home-app.jsx +126 -13
  134. package/apps/studio/client/home/home-model.js +69 -1
  135. package/apps/studio/client/home/home-where-model.js +105 -0
  136. package/apps/studio/client/home/home.css +239 -1
  137. package/apps/studio/client/hooks/use-canvas-bridge.jsx +173 -98
  138. package/apps/studio/client/hooks/use-palette-and-panels.jsx +5 -1
  139. package/apps/studio/client/hooks/use-tabs.jsx +11 -4
  140. package/apps/studio/client/panels/DiffView.jsx +7 -1
  141. package/apps/studio/client/panels/TeamProjects.jsx +137 -134
  142. package/apps/studio/client/panels/chat-context.js +2 -0
  143. package/apps/studio/client/panels/slash-commands.gen.js +13 -13
  144. package/apps/studio/client/selection-scope.js +16 -9
  145. package/apps/studio/client/share-link.js +12 -0
  146. package/apps/studio/client/shell/viewport.jsx +11 -1
  147. package/apps/studio/client/shell-events.js +8 -0
  148. package/apps/studio/client/styles/3-kit-maude-v2.css +16 -0
  149. package/apps/studio/client/styles/_index.css +4 -0
  150. package/apps/studio/client/v2/ai/Feed.jsx +1 -1
  151. package/apps/studio/client/v2/ai/OfferCard.jsx +34 -0
  152. package/apps/studio/client/v2/ai/activity-line.js +54 -1
  153. package/apps/studio/client/v2/ai/ai-offer.js +21 -1
  154. package/apps/studio/client/v2/ai/run-model.js +3 -1
  155. package/apps/studio/client/v2/annotations/vote-store.js +28 -4
  156. package/apps/studio/client/v2/assets/asset-drop-session.js +37 -2
  157. package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +7 -5
  158. package/apps/studio/client/v2/assets/details-model.js +1 -1
  159. package/apps/studio/client/v2/assets/details.jsx +5 -0
  160. package/apps/studio/client/v2/assets/tile-drag.js +11 -7
  161. package/apps/studio/client/v2/comments/comments-panel.jsx +22 -3
  162. package/apps/studio/client/v2/create/duplicate-done.js +6 -2
  163. package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
  164. package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
  165. package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
  166. package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
  167. package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +113 -3
  168. package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +343 -6
  169. package/apps/studio/client/v2/diagnostics/sync-details/unsynced-refs.js +55 -0
  170. package/apps/studio/client/v2/ds/review.css +1 -1
  171. package/apps/studio/client/v2/export/exports-model.js +7 -0
  172. package/apps/studio/client/v2/export/exports-panel.jsx +1 -0
  173. package/apps/studio/client/v2/export/job-row.jsx +32 -2
  174. package/apps/studio/client/v2/handoff/ready-card.jsx +1 -1
  175. package/apps/studio/client/v2/history/compare-view.jsx +1 -0
  176. package/apps/studio/client/v2/inspector/css-write.js +6 -1
  177. package/apps/studio/client/v2/inspector/frame.jsx +28 -4
  178. package/apps/studio/client/v2/inspector/kinds/clip-model.js +51 -0
  179. package/apps/studio/client/v2/inspector/kinds/clip.jsx +75 -2
  180. package/apps/studio/client/v2/inspector/model.js +21 -0
  181. package/apps/studio/client/v2/inspector/sections/fill.jsx +12 -3
  182. package/apps/studio/client/v2/inspector/sections/recent-colours.js +8 -5
  183. package/apps/studio/client/v2/inspector/view-mode.jsx +11 -1
  184. package/apps/studio/client/v2/link-server/LinkServerDialog.jsx +492 -0
  185. package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
  186. package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
  187. package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
  188. package/apps/studio/client/v2/link-server/link-server.css +109 -0
  189. package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
  190. package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
  191. package/apps/studio/client/v2/preview/link-follow.js +4 -2
  192. package/apps/studio/client/v2/preview/preview-chrome-host.jsx +16 -6
  193. package/apps/studio/client/v2/search/help-model.js +2 -0
  194. package/apps/studio/client/v2/search/search-keywords.js +3 -2
  195. package/apps/studio/client/v2/settings/account.jsx +4 -2
  196. package/apps/studio/client/v2/settings/advanced-section.jsx +344 -137
  197. package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
  198. package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
  199. package/apps/studio/client/v2/settings/general-section.jsx +155 -24
  200. package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
  201. package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
  202. package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
  203. package/apps/studio/client/v2/settings/settings-cards.js +220 -0
  204. package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
  205. package/apps/studio/client/v2/settings/settings-model.js +100 -31
  206. package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
  207. package/apps/studio/client/v2/settings/settings.css +374 -64
  208. package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
  209. package/apps/studio/client/v2/settings/this-project-model.js +172 -0
  210. package/apps/studio/client/v2/settings/use-connections.js +3 -2
  211. package/apps/studio/client/v2/settings/use-open-card.js +37 -0
  212. package/apps/studio/client/v2/share/share-sheet.jsx +28 -11
  213. package/apps/studio/client/v2/shell/api-session-boot.js +6 -0
  214. package/apps/studio/client/v2/shell/api-session.js +126 -0
  215. package/apps/studio/client/v2/shell/connection-state.js +197 -0
  216. package/apps/studio/client/v2/shell/floating-panels.css +31 -1
  217. package/apps/studio/client/v2/shell/image-pick.js +61 -8
  218. package/apps/studio/client/v2/shell/menu-aim.js +43 -0
  219. package/apps/studio/client/v2/shell/menu-runner.js +25 -7
  220. package/apps/studio/client/v2/shell/occlusion-insets.js +18 -1
  221. package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
  222. package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
  223. package/apps/studio/client/v2/shell/project-account-model.js +272 -149
  224. package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
  225. package/apps/studio/client/v2/shell/project-account.css +237 -0
  226. package/apps/studio/client/v2/shell/project-pill.jsx +52 -6
  227. package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
  228. package/apps/studio/client/v2/shell/shell-parity.js +3 -2
  229. package/apps/studio/client/v2/shell/shell-parity.json +71 -36
  230. package/apps/studio/client/v2/shell/still-bridge.js +194 -0
  231. package/apps/studio/client/v2/shell/still-store.js +319 -0
  232. package/apps/studio/client/v2/shell/use-account.js +2 -0
  233. package/apps/studio/client/v2/shell/use-tool-panels.js +2 -1
  234. package/apps/studio/client/v2/signin/use-signin.js +1 -1
  235. package/apps/studio/client/v2/timeline/Timeline.jsx +15 -0
  236. package/apps/studio/client/v2/timeline/frame-handle-model.js +142 -0
  237. package/apps/studio/client/v2/timeline/frame-handle.jsx +151 -0
  238. package/apps/studio/clip-ops.ts +126 -8
  239. package/apps/studio/cloud/endpoints.ts +29 -4
  240. package/apps/studio/collab/ai-activity.ts +10 -8
  241. package/apps/studio/collab/awareness-bridge.ts +34 -9
  242. package/apps/studio/collab/index.ts +3 -0
  243. package/apps/studio/collab/registry.ts +41 -10
  244. package/apps/studio/comment-reattach.ts +149 -0
  245. package/apps/studio/comments/mine-stamp.ts +15 -7
  246. package/apps/studio/comments/ops.ts +52 -8
  247. package/apps/studio/comments-overlay.tsx +146 -9
  248. package/apps/studio/dist/client.bundle.js +892 -885
  249. package/apps/studio/dist/comment-mount.js +2 -2
  250. package/apps/studio/dist/styles.css +1 -1
  251. package/apps/studio/dom-selection.ts +87 -18
  252. package/apps/studio/ds/board/directions.css +8 -0
  253. package/apps/studio/ds/board/outline.tsx +16 -0
  254. package/apps/studio/ds/canvas-check.ts +6 -0
  255. package/apps/studio/edit-ops/clip/reframe.ts +19 -3
  256. package/apps/studio/edit-ops/clip-carry.ts +602 -0
  257. package/apps/studio/edit-ops/clipboard.ts +318 -23
  258. package/apps/studio/edit-ops/dispatch.ts +20 -2
  259. package/apps/studio/edit-ops/scope-names.ts +249 -40
  260. package/apps/studio/edit-ops/slot-defaults.ts +3 -0
  261. package/apps/studio/edit-ops/types.ts +6 -0
  262. package/apps/studio/editing/align-bar.tsx +33 -9
  263. package/apps/studio/editing/artboard-actions.ts +5 -0
  264. package/apps/studio/editing/artboard-menu.tsx +6 -2
  265. package/apps/studio/editing/click-to-type.ts +1 -1
  266. package/apps/studio/editing/clip-words.ts +48 -0
  267. package/apps/studio/editing/clipboard.ts +21 -6
  268. package/apps/studio/editing/declared-background.ts +25 -0
  269. package/apps/studio/editing/index.tsx +3 -0
  270. package/apps/studio/editing/object-keys.ts +4 -4
  271. package/apps/studio/editing/object-menu.tsx +13 -3
  272. package/apps/studio/editing/pen/points.tsx +61 -0
  273. package/apps/studio/editing/text-in-place.tsx +11 -0
  274. package/apps/studio/editing/video-frame-handle.tsx +425 -0
  275. package/apps/studio/exporters/capture-prepass.ts +374 -0
  276. package/apps/studio/exporters/degraded.ts +148 -0
  277. package/apps/studio/exporters/hub-render-door.ts +28 -2
  278. package/apps/studio/exporters/index.ts +3 -1
  279. package/apps/studio/exporters/job-budget.ts +93 -0
  280. package/apps/studio/exporters/jobs.ts +215 -28
  281. package/apps/studio/exporters/parity-check.ts +254 -0
  282. package/apps/studio/exporters/remote.ts +209 -15
  283. package/apps/studio/exporters/svg-inline.ts +87 -0
  284. package/apps/studio/exporters/video-render-lib.ts +88 -26
  285. package/apps/studio/exporters/video.ts +29 -6
  286. package/apps/studio/figma/assets.ts +58 -43
  287. package/apps/studio/figma/codegen-fonts.ts +100 -0
  288. package/apps/studio/figma/fig-decode.ts +390 -25
  289. package/apps/studio/figma/fig-kiwi.ts +18 -4
  290. package/apps/studio/figma/fig-vector.ts +59 -3
  291. package/apps/studio/figma/sanitize.ts +2 -0
  292. package/apps/studio/figma/style-map.ts +293 -48
  293. package/apps/studio/figma/to-artboard.ts +455 -69
  294. package/apps/studio/figma/to-strokes.ts +44 -11
  295. package/apps/studio/figma/types.ts +13 -0
  296. package/apps/studio/footage/schema.ts +3 -3
  297. package/apps/studio/generation/adapters/elevenlabs.ts +7 -1
  298. package/apps/studio/generation/adapters/groq.ts +8 -1
  299. package/apps/studio/generation/spend.ts +312 -0
  300. package/apps/studio/generation/types.ts +12 -0
  301. package/apps/studio/handoff/run.ts +1 -1
  302. package/apps/studio/handoff/targets.ts +2 -2
  303. package/apps/studio/handoff/write-scopes.ts +1 -1
  304. package/apps/studio/history/describe-annotations.ts +4 -0
  305. package/apps/studio/home/accounts.ts +30 -11
  306. package/apps/studio/home/cloud.ts +6 -1
  307. package/apps/studio/home/create-local.ts +32 -3
  308. package/apps/studio/home/hub-health.ts +76 -0
  309. package/apps/studio/home/routes.ts +15 -4
  310. package/apps/studio/http.ts +438 -86
  311. package/apps/studio/imported-module-ids.ts +91 -0
  312. package/apps/studio/inspect.ts +2 -0
  313. package/apps/studio/migrate/hub.ts +8 -1
  314. package/apps/studio/notifications.tsx +47 -5
  315. package/apps/studio/paths.ts +10 -1
  316. package/apps/studio/port.ts +3 -2
  317. package/apps/studio/preview/preview-camera.tsx +15 -382
  318. package/apps/studio/readiness.ts +10 -1
  319. package/apps/studio/release-build.ts +51 -0
  320. package/apps/studio/routes/agent.ts +188 -9
  321. package/apps/studio/routes/ai.ts +43 -11
  322. package/apps/studio/routes/annotations.ts +27 -1
  323. package/apps/studio/routes/assets.ts +18 -1
  324. package/apps/studio/routes/canvas-origin.ts +12 -9
  325. package/apps/studio/routes/cloud-move.ts +15 -0
  326. package/apps/studio/routes/edit.ts +3 -0
  327. package/apps/studio/routes/export.ts +51 -0
  328. package/apps/studio/routes/generate.ts +42 -12
  329. package/apps/studio/routes/hub-link-folder.ts +334 -0
  330. package/apps/studio/routes/hub-signin.ts +78 -1
  331. package/apps/studio/routes/index.ts +9 -1
  332. package/apps/studio/routes/shell.ts +217 -5
  333. package/apps/studio/routes/sync.ts +136 -8
  334. package/apps/studio/routes/votes.ts +2 -1
  335. package/apps/studio/schema/annotations.v2.schema.json +143 -1
  336. package/apps/studio/schema/beats.v1.schema.json +1 -1
  337. package/apps/studio/schema/edl.v1.schema.json +1 -1
  338. package/apps/studio/schema/formats.ts +3 -3
  339. package/apps/studio/schema/transcript.v1.schema.json +1 -1
  340. package/apps/studio/server.ts +142 -43
  341. package/apps/studio/shell/api-key.ts +503 -0
  342. package/apps/studio/shell/attest.ts +59 -0
  343. package/apps/studio/shell/capture-url.ts +20 -0
  344. package/apps/studio/shell/cli-yield.ts +276 -0
  345. package/apps/studio/shell/clip-transfer.ts +302 -0
  346. package/apps/studio/shell/key-file.ts +108 -0
  347. package/apps/studio/shell/server-json.ts +75 -0
  348. package/apps/studio/shell/worktree.ts +19 -0
  349. package/apps/studio/spoof-chars.ts +9 -0
  350. package/apps/studio/studio-page-host.ts +1 -1
  351. package/apps/studio/sync/accepted-cold-start.ts +144 -8
  352. package/apps/studio/sync/accepted-link.ts +76 -29
  353. package/apps/studio/sync/action-stage.ts +575 -44
  354. package/apps/studio/sync/adopt-held.ts +85 -0
  355. package/apps/studio/sync/ctl-heal.ts +58 -0
  356. package/apps/studio/sync/file-ledger.ts +38 -4
  357. package/apps/studio/sync/file-membership.ts +16 -1
  358. package/apps/studio/sync/file-plane.ts +289 -22
  359. package/apps/studio/sync/held-deletes.ts +86 -5
  360. package/apps/studio/sync/hub-link.ts +8 -0
  361. package/apps/studio/sync/index.ts +196 -12
  362. package/apps/studio/sync/journal-client.ts +50 -4
  363. package/apps/studio/sync/link-consent.ts +22 -75
  364. package/apps/studio/sync/link-survey.ts +252 -0
  365. package/apps/studio/sync/local-kernel.ts +296 -8
  366. package/apps/studio/sync/projection.ts +22 -3
  367. package/apps/studio/sync/seed-progress.ts +12 -0
  368. package/apps/studio/sync/source-recovery.ts +59 -3
  369. package/apps/studio/sync/status.ts +19 -2
  370. package/apps/studio/sync/unsynced-refs.ts +397 -0
  371. package/apps/studio/sync/writer-registry.ts +20 -0
  372. package/apps/studio/thumbs/service.ts +4 -1
  373. package/apps/studio/tool-palette.tsx +23 -0
  374. package/apps/studio/ui-prefs.ts +40 -0
  375. package/apps/studio/use-agent-presence.tsx +2 -2
  376. package/apps/studio/use-canvas-keys.ts +6 -1
  377. package/apps/studio/video/format-ids.ts +2 -2
  378. package/apps/studio/video/inject.ts +31 -0
  379. package/apps/studio/video/media-risk.ts +58 -0
  380. package/apps/studio/video/object-fit.ts +137 -0
  381. package/apps/studio/video/provider-transcript.ts +141 -0
  382. package/apps/studio/whats-new.json +137 -0
  383. package/apps/studio/workspace-mode.ts +1 -0
  384. package/apps/studio/ws.ts +5 -0
  385. package/cli/commands/design.mjs +119 -8
  386. package/cli/lib/bash-guard.mjs +366 -6
  387. package/cli/lib/confine-read.mjs +1 -0
  388. package/cli/lib/design-help.gen.mjs +3 -2
  389. package/cli/lib/design-hook.mjs +387 -81
  390. package/cli/lib/design-link.mjs +16 -1
  391. package/cli/lib/design-open.mjs +49 -3
  392. package/cli/lib/desktop-locate.mjs +770 -0
  393. package/cli/lib/handoff.mjs +1 -1
  394. package/cli/lib/hook-state.mjs +291 -0
  395. package/cli/lib/pkg-root.mjs +65 -13
  396. package/cli/lib/studio-locate.mjs +59 -16
  397. package/package.json +15 -8
  398. package/plugins/design/templates/_shell.html +13 -0
  399. package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
  400. package/apps/studio/client/v2/shell/account-card-model.js +0 -114
  401. package/apps/studio/client/v2/shell/account-card.jsx +0 -189
@@ -203,6 +203,58 @@ function editPhrase(u, ctx) {
203
203
  return { text: `AI is editing ${name}` };
204
204
  }
205
205
 
206
+ /** The artboard kinds a plan step may name (CONTRACT §1, Menu › File › New artboard): the only words of a plan step
207
+ * the step line repeats. Anything else a step says stays out — the line never quotes the AI's prose. */
208
+ const KIND_WORDS = ['Desktop', 'Laptop', 'Tablet', 'Mobile', 'A4', 'Letter', 'Video'];
209
+ const kindOf = (e) => {
210
+ const text = typeof e?.content === 'string' ? e.content : '';
211
+ return KIND_WORDS.find((k) => new RegExp(`\\b${k}\\b`, 'i').test(text)) ?? null;
212
+ };
213
+
214
+ /** The Design system's sections (13 ds-make-filling), named by the words a plan step uses for them. */
215
+ const SECTION_WORDS = [
216
+ ['Brand', /\bbrand\b/i],
217
+ ['Colour', /\bcolou?rs?\b/i],
218
+ ['Type', /\b(?:type|typography)\b/i],
219
+ ['Space', /\b(?:space|spacing)\b/i],
220
+ ['Motion', /\bmotion\b/i],
221
+ ['Components', /\bcomponents?\b/i],
222
+ ['Patterns', /\bpatterns?\b/i],
223
+ ];
224
+ const sectionOf = (e) => {
225
+ const text = typeof e?.content === 'string' ? e.content : '';
226
+ return SECTION_WORDS.find(([, re]) => re.test(text))?.[0] ?? null;
227
+ };
228
+
229
+ /** 13 ds-make-filling: "Brand and Colour done · 5 sections to go". Only a plan that names three or more
230
+ * sections is the Design system's; the names come from the fixed list above, never from the step's prose. */
231
+ function sectionStepLine(entries) {
232
+ const named = entries.map((e) => ({ name: sectionOf(e), done: e.status === 'completed' }));
233
+ if (named.filter((n) => n.name).length < 3) return null;
234
+ const done = named.filter((n) => n.name && n.done).map((n) => n.name);
235
+ const left = named.filter((n) => n.name && !n.done).length;
236
+ const list =
237
+ done.length > 1 ? `${done.slice(0, -1).join(', ')} and ${done[done.length - 1]}` : done[0];
238
+ const parts = [
239
+ list && `${list} done`,
240
+ left && `${left} ${left === 1 ? 'section' : 'sections'} to go`,
241
+ ].filter(Boolean);
242
+ return parts.length ? parts.join(' · ') : null;
243
+ }
244
+
245
+ /** 01 cf-ai-drafting: "Desktop done · Mobile next" — the last finished step and the next one to come, each named
246
+ * by an artboard kind. Null when the plan names no kind on either side (the caller keeps "Step 2 of 3"). */
247
+ function kindStepLine(entries, i) {
248
+ let done = null;
249
+ for (let j = i - 1; j >= 0 && !done; j--)
250
+ if (entries[j].status === 'completed') done = kindOf(entries[j]);
251
+ let next = null;
252
+ for (let j = i + 1; j < entries.length && !next; j++)
253
+ if (entries[j].status !== 'completed') next = kindOf(entries[j]);
254
+ const parts = [done && `${done} done`, next && `${next} next`].filter(Boolean);
255
+ return parts.length ? parts.join(' · ') : null;
256
+ }
257
+
206
258
  function planPhrase(u) {
207
259
  const entries = Array.isArray(u?.entries)
208
260
  ? u.entries.filter((e) => e && typeof e === 'object')
@@ -211,7 +263,8 @@ function planPhrase(u) {
211
263
  let i = entries.findIndex((e) => e.status === 'in_progress');
212
264
  if (i < 0) i = entries.findIndex((e) => e.status !== 'completed');
213
265
  if (i < 0) return null;
214
- const step = `Step ${i + 1} of ${entries.length}`;
266
+ const step =
267
+ sectionStepLine(entries) ?? kindStepLine(entries, i) ?? `Step ${i + 1} of ${entries.length}`;
215
268
  const doing = doingOf(typeof entries[i].content === 'string' ? entries[i].content : '');
216
269
  return { text: doing ? `AI is ${doing}` : `AI is on step ${i + 1} of ${entries.length}`, step };
217
270
  }
@@ -32,7 +32,11 @@ export const OFFER_TARGETS_MAX = 8;
32
32
  export const OFFER_WORDS = Object.freeze({
33
33
  primary: 'Make these changes',
34
34
  secondary: 'Not now',
35
+ /** 15 an-ai-write: a review the AI WROTE as notes — gather those notes into one section. */
36
+ section: 'Put them in a section',
35
37
  });
38
+ /** The most notes one offer may list as written (the same cap as an ask's scope). */
39
+ export const OFFER_WROTE_MAX = 100;
36
40
 
37
41
  const ID = '[A-Za-z0-9_.:-]{1,128}';
38
42
  const REF_RE = new RegExp(`^(?:ab:${ID}|el:${ID}/${ID})$`);
@@ -100,11 +104,19 @@ export function parseOffer(text, { scopeIds = [], echoes = [] } = {}) {
100
104
  }
101
105
  const says = plain(raw.says, OFFER_SAYS_MAX);
102
106
  if (!says) return { text: src, offer: null };
107
+ // 15 an-ai-write: the ids of the notes this answer WROTE. They are not in the ask's scope (the ask named none),
108
+ // so only their shape is checked; the button sends them back as a scope and the run reads them like any scope.
109
+ const wrote = Array.isArray(raw.wrote)
110
+ ? [
111
+ ...new Set(raw.wrote.filter((id) => typeof id === 'string' && ANNOTATION_ID_RE.test(id))),
112
+ ].slice(0, OFFER_WROTE_MAX)
113
+ : [];
103
114
  return {
104
115
  text: stripped,
105
116
  offer: {
106
117
  v: 1,
107
118
  says,
119
+ ...(wrote.length ? { wrote } : {}),
108
120
  answers: idList(raw.answers, scope),
109
121
  leaves: idList(raw.leaves, scope).filter((id) => !idList(raw.answers, scope).includes(id)),
110
122
  targets,
@@ -135,9 +147,14 @@ export function seenTargetsFor(offer) {
135
147
  // annotation scope of each send here (acp-runtime.js, one line). An offer is validated against it: a block that
136
148
  // names ids the ask never carried loses them.
137
149
  let asked = null;
150
+ // The canvas the latest send was FROZEN on. A review asked with no selection carries no annotation ids (so
151
+ // `asked` stays null), yet its offer can still write notes ("Put them in a section"), and those need a file.
152
+ let sentFrom = null;
138
153
 
139
- /** @param {{ annotations?: { file: string, ids: string[] } } | null | undefined} frozen the context a send froze */
154
+ /** @param {{ canvas?: string, runScope?: { canvas?: string }, annotations?: { file: string, ids: string[] } } | null | undefined} frozen the context a send froze */
140
155
  export function noteAskedAnnotations(frozen) {
156
+ const c = frozen?.canvas ?? frozen?.runScope?.canvas;
157
+ sentFrom = typeof c === 'string' && c ? c : null;
141
158
  const a = frozen?.annotations;
142
159
  asked = a
143
160
  ? {
@@ -152,6 +169,9 @@ export function noteAskedAnnotations(frozen) {
152
169
  /** The stickies / arrows the latest send was about (`null`: it was not about annotations). */
153
170
  export const askedAnnotations = () => asked;
154
171
 
172
+ /** The canvas the latest send was frozen on (`null`: that send had no canvas context). */
173
+ export const askedCanvas = () => sentFrom;
174
+
155
175
  /**
156
176
  * sec-a C2 — exactly what "Make these changes" sends, in words, shown on the card before the press: the
157
177
  * canned text, how many stickies ride as the scope, which of them the run may resolve, and where it points
@@ -9,6 +9,7 @@
9
9
  // <result>." (the AI describes the result, never itself), Undo first and then the way on.
10
10
 
11
11
  import { groupLabel } from '../history/use-versions.js';
12
+ import { stripOffer } from './ai-offer.js';
12
13
  import { humanize } from './runs-model.js';
13
14
  import { shortArtboardName } from './scope.js';
14
15
  import { askTopic } from './suggest-why.js';
@@ -225,7 +226,8 @@ export function lastAssistantDigest(messages) {
225
226
  const parts = Array.isArray(last?.content) ? last.content : [];
226
227
  const text = parts
227
228
  .filter((p) => p?.type === 'text')
228
- .map((p) => String(p.text ?? ''))
229
+ // the offer block is the card's, never words: the polite live region reads this out
230
+ .map((p) => stripOffer(String(p.text ?? '')))
229
231
  .join('\n')
230
232
  .trim();
231
233
  const steps = parts.filter((p) => p?.type === 'tool-call').map(stepTitle);
@@ -26,6 +26,7 @@ export const VOTE_WORDS = {
26
26
  pickTargets: 'Pick at least one artboard to vote on.',
27
27
  failed: 'Couldn’t start the vote. Nothing was changed.',
28
28
  castFailed: 'Your vote didn’t count. Try again.',
29
+ endFailed: 'Couldn’t end the vote. Try again.',
29
30
  noneLeft: 'No votes left. Take one back to move it.',
30
31
  cast: 'Cast',
31
32
  clear: 'Clear',
@@ -256,19 +257,42 @@ export function createVoteStore(o = {}) {
256
257
  }
257
258
  }
258
259
 
260
+ /**
261
+ * End vote (the bar's button, or an editor's store writing the result once the time ran out). A refused end says
262
+ * why — the server's line — and lets the next press try again; an allowed end closes the bar on the server's own
263
+ * answer, even if the read after it still lists the vote open.
264
+ */
259
265
  async function finish(id) {
260
- if (endingId === id) return;
266
+ if (endingId === id) return { ok: true };
261
267
  endingId = id;
262
268
  const v = state.vote;
263
269
  const labels = {};
264
270
  for (const a of state.artboards) labels[asTarget(a.id)] = a.label;
265
- await call(fetchImpl, 'POST', url('/end'), {
271
+ const r = await call(fetchImpl, 'POST', url('/end'), {
266
272
  file: state.file,
267
273
  id,
268
274
  labels,
269
275
  ...(v ? { place: resultPlace(state.artboards, v.targets) } : {}),
270
276
  });
277
+ if (r.status !== 200 || !r.data?.ok) {
278
+ endingId = null;
279
+ notify(r.data?.line ?? VOTE_WORDS.endFailed);
280
+ await load();
281
+ return { ok: false };
282
+ }
271
283
  await load();
284
+ const row = r.data.vote;
285
+ if (
286
+ row?.id === id &&
287
+ row.state === 'ended' &&
288
+ state.vote?.id === id &&
289
+ state.vote.state === 'open'
290
+ ) {
291
+ set({ vote: row, pending: null });
292
+ arm();
293
+ notify(VOTE_WORDS.ended);
294
+ }
295
+ return { ok: true };
272
296
  }
273
297
 
274
298
  return {
@@ -383,8 +407,8 @@ export function createVoteStore(o = {}) {
383
407
  },
384
408
  async end() {
385
409
  const v = state.vote;
386
- if (!v || v.state !== 'open' || !state.canEdit) return;
387
- await finish(v.id);
410
+ if (!v || v.state !== 'open' || !state.canEdit) return { ok: false };
411
+ return finish(v.id);
388
412
  },
389
413
  stop() {
390
414
  if (timer) clearTimer(timer);
@@ -41,6 +41,7 @@ export function isAssetDrag(e) {
41
41
  */
42
42
  function createSession(opts = {}) {
43
43
  let drag = null;
44
+ let token = null;
44
45
  let idle = null;
45
46
  let detach = null;
46
47
  const subs = new Set();
@@ -54,6 +55,7 @@ function createSession(opts = {}) {
54
55
  detach = null;
55
56
  if (!drag) return;
56
57
  drag = null;
58
+ token = null;
57
59
  emit();
58
60
  };
59
61
  const touch = () => {
@@ -66,13 +68,20 @@ function createSession(opts = {}) {
66
68
  if (!win?.addEventListener) return null;
67
69
  const onEnd = () => end();
68
70
  const onDrop = () => setTimeout(end, 0);
71
+ // #168 F6: a hidden window (another app tab, a minimised window) ends the drag; nothing waits for its return
72
+ const doc = win.document;
73
+ const onVisibility = () => {
74
+ if (doc?.hidden) end();
75
+ };
69
76
  win.addEventListener('dragend', onEnd, true);
70
77
  win.addEventListener('pointerdown', onEnd, true);
71
78
  win.addEventListener('drop', onDrop, true);
79
+ doc?.addEventListener?.('visibilitychange', onVisibility);
72
80
  return () => {
73
81
  win.removeEventListener('dragend', onEnd, true);
74
82
  win.removeEventListener('pointerdown', onEnd, true);
75
83
  win.removeEventListener('drop', onDrop, true);
84
+ doc?.removeEventListener?.('visibilitychange', onVisibility);
76
85
  };
77
86
  };
78
87
  return {
@@ -93,6 +102,7 @@ function createSession(opts = {}) {
93
102
  }
94
103
  if (detach) detach();
95
104
  drag = d;
105
+ token = newToken();
96
106
  detach = attach();
97
107
  touch();
98
108
  // after the dragstart handler returns: a DOM change inside dragstart can cancel the drag in some engines.
@@ -106,6 +116,8 @@ function createSession(opts = {}) {
106
116
  /** The drag is still alive (a dragover): push the idle timeout out. */
107
117
  touch,
108
118
  current: () => drag,
119
+ /** #168 F6: the opaque id the drag data carries instead of the path (null when no drag is in flight). */
120
+ token: () => (drag ? token : null),
109
121
  subscribe(fn) {
110
122
  subs.add(fn);
111
123
  return () => subs.delete(fn);
@@ -113,6 +125,13 @@ function createSession(opts = {}) {
113
125
  };
114
126
  }
115
127
 
128
+ /** An opaque drag id: what a drop target outside the shell could read from the drag data, never the path. */
129
+ function newToken() {
130
+ const bytes = new Uint8Array(9);
131
+ globalThis.crypto.getRandomValues(bytes);
132
+ return `dg_${Array.from(bytes, (b) => b.toString(36).padStart(2, '0')).join('')}`;
133
+ }
134
+
116
135
  export const assetDragSession = createSession();
117
136
  export const _createSessionForTest = createSession;
118
137
 
@@ -155,6 +174,10 @@ export function placeRequestFor(drag, target, canvas) {
155
174
  * @param deps.place (req) => Promise<{ok, created?, message?}> — `placeAsset`
156
175
  * @param deps.preview () => boolean — the canvas is in Preview: a drop adds an annotation, never a design edit
157
176
  */
177
+ /** #168 F6: the canvas each drag was first over — kept per drag (not per lane), so a catcher remounted for the new
178
+ * tab cannot adopt a drag that began over another canvas. The open canvas changing under a live drag ends it. */
179
+ const DRAG_CANVAS = new WeakMap();
180
+
158
181
  export function createCatcherLane(deps) {
159
182
  let seq = 0;
160
183
  let pending = null; // { requestId, drag, canvas, timer }
@@ -162,9 +185,21 @@ export function createCatcherLane(deps) {
162
185
  if (pending?.timer) clearTimeout(pending.timer);
163
186
  pending = null;
164
187
  };
188
+ /** The drag in flight, or null — ending it when the open canvas is no longer the one it was over. */
189
+ const liveDrag = () => {
190
+ const drag = deps.session.current();
191
+ if (!drag) return null;
192
+ const canvas = deps.canvas();
193
+ if (!DRAG_CANVAS.has(drag)) DRAG_CANVAS.set(drag, canvas);
194
+ else if (DRAG_CANVAS.get(drag) !== canvas) {
195
+ deps.session.end();
196
+ return null;
197
+ }
198
+ return drag;
199
+ };
165
200
  return {
166
201
  over(x, y) {
167
- if (!deps.session.current()) return false;
202
+ if (!liveDrag()) return false;
168
203
  deps.session.touch?.();
169
204
  deps.post({ dgn: 'asset-drag-over', x: Math.round(x), y: Math.round(y) });
170
205
  return true;
@@ -174,7 +209,7 @@ export function createCatcherLane(deps) {
174
209
  },
175
210
  /** The tile was dropped at (x, y) in frame coordinates. Returns the requestId asked, or null. */
176
211
  drop(x, y) {
177
- const drag = deps.session.current();
212
+ const drag = liveDrag();
178
213
  const canvas = deps.canvas();
179
214
  if (!drag || !canvas) return null;
180
215
  clearPending();
@@ -14,16 +14,18 @@ export const CATCHER_TESTID = 'canvas-asset-drop-catcher';
14
14
 
15
15
  /**
16
16
  * Nothing is placed by a person who may only look, nor while the canvas is shown at a past version (Version history's
17
- * Viewing) or through a design-system preview: the frame is not the live file, so a drop would write to a canvas the
18
- * person is not looking at.
17
+ * Viewing): the frame is not the live file, so a drop would write to a canvas the person is not looking at.
18
+ *
19
+ * A design-system preview ("Preview in …", `?dsPreview=`) is NOT in that list (#170 D4): it frames the live file under
20
+ * another system's tokens, so a drop places on the file the person is looking at. `dsPreview` stays in the signature
21
+ * for the caller; it no longer decides.
19
22
  */
20
- export function catcherReadOnly({ readOnly, role, viewing, canvasTab, dsPreview }) {
23
+ export function catcherReadOnly({ readOnly, role, viewing, canvasTab }) {
21
24
  return (
22
25
  !!readOnly ||
23
26
  role === 'observer' ||
24
27
  role === 'viewer' ||
25
- (!!viewing && viewing.path === canvasTab) ||
26
- !!dsPreview
28
+ (!!viewing && viewing.path === canvasTab)
27
29
  );
28
30
  }
29
31
 
@@ -82,7 +82,7 @@ export function addedText(mtimeMs, now = Date.now()) {
82
82
  }
83
83
 
84
84
  /**
85
- * "Added by Tereza" — from the origin record's display name, when one exists. Never an e-mail: a name that has an `@` in it
85
+ * "Added by Tereza" — from the synced who-added record (`assets/<stem>.added.json`, #172), else this Mac's origin record. Never an e-mail: a name that has an `@` in it
86
86
  * is not drawn, whatever the answer said. '' when nobody is named.
87
87
  */
88
88
  export function addedByLine(d) {
@@ -194,6 +194,11 @@ export function AssetDetails({
194
194
  {edits}
195
195
  </Row>
196
196
  ) : null}
197
+ {d.mediaWarnings?.length ? (
198
+ <Row k="Heads-up" testid="assets-details-media-warning">
199
+ {d.mediaWarnings.join(' ')}
200
+ </Row>
201
+ ) : null}
197
202
  {d.footage ? (
198
203
  <>
199
204
  {d.footage.summary ? (
@@ -1,12 +1,12 @@
1
1
  // client/v2/assets/tile-drag.js — an Assets tile that can be dragged onto a frame (S2.15; artboard ed-img).
2
2
  //
3
3
  // `tileDragProps(asset, name)` is spread onto a picture tile: it makes the tile draggable and, at drag start, records the drag
4
- // in the shell's `assetDragSession` (asset-drop-session.js) and puts `{asset, w?, h?}` under the tile's own MIME type
5
- // (editing/asset-drag.ts) for same-origin targets. The CANVAS never reads the drag: WebKit gives a shell-started drag no event
4
+ // in the shell's `assetDragSession` (asset-drop-session.js) and puts only the session's opaque token under the tile's own
5
+ // MIME type (editing/asset-drag.ts; #168 F6 — never the path, which a frame reached directly could read). The CANVAS never reads the drag: WebKit gives a shell-started drag no event
6
6
  // in the canvas origin (r3), so the shell's catcher over the frame takes the drop, the canvas names what lies under it and the
7
7
  // shell asks `image.place` with this path. Pictures AND clips drag (r5-1: a clip lands as a `<video>` in Edit, as an annotation video in Preview); sound does not.
8
8
 
9
- import { ASSET_DRAG_MIME, assetDragData, isAssetPath } from '../../../editing/asset-drag.ts';
9
+ import { ASSET_DRAG_MIME, isAssetPath } from '../../../editing/asset-drag.ts';
10
10
  import { assetDragSession } from './asset-drop-session.js';
11
11
 
12
12
  export { ASSET_DRAG_MIME };
@@ -25,10 +25,14 @@ export function startAssetDrag(e, asset, img) {
25
25
  }
26
26
  dt.effectAllowed = 'copy';
27
27
  const { w, h } = naturalOf(img);
28
- assetDragSession.begin({ asset, w, h });
29
- dt.setData(ASSET_DRAG_MIME, assetDragData({ asset, w, h }));
30
- // a plain-text twin so a drop on a text field says what it is, and nothing richer leaks
31
- dt.setData('text/plain', asset);
28
+ if (!assetDragSession.begin({ asset, w, h })) {
29
+ e?.preventDefault?.();
30
+ return false;
31
+ }
32
+ // #168 F6 — the drag data carries only the session's opaque token: a drop that reaches a canvas frame directly
33
+ // (Chromium delivers one across origins) reads no name. The path and size stay in the shell's session, which the
34
+ // catcher reads; there is no plain-text twin for the same reason.
35
+ dt.setData(ASSET_DRAG_MIME, assetDragSession.token() ?? '');
32
36
  if (img && typeof dt.setDragImage === 'function') {
33
37
  try {
34
38
  dt.setDragImage(img, 24, 24);
@@ -64,7 +64,7 @@ function useOthers(wanted, me) {
64
64
  }
65
65
 
66
66
  /** No thread is listed (05 · es-panels-canvas, es-viewer). `kind` is `emptyKind`. */
67
- function EmptyComments({ kind, active, canvas, names, onShare }) {
67
+ function EmptyComments({ kind, active, canvas, names, onShare, canComment = true }) {
68
68
  if (kind === 'done') {
69
69
  return (
70
70
  <div className="cmp-party">
@@ -82,6 +82,19 @@ function EmptyComments({ kind, active, canvas, names, onShare }) {
82
82
  }
83
83
  if (kind === 'none') {
84
84
  const viewer = names.length > 0;
85
+ // #170: a session that cannot leave a comment is not taught the C key (the copy table mirrors the
86
+ // 05 board, which has no such line, so this one is local like FILTER_EMPTY).
87
+ if (!canComment) {
88
+ return (
89
+ <Empty
90
+ spot="comment"
91
+ spotW={168}
92
+ testid="comments-empty"
93
+ title={`No comments on ${canvas} yet.`}
94
+ next="This project is view-only here, so new comments wait for edit access."
95
+ />
96
+ );
97
+ }
85
98
  const id = viewer ? 'es-viewer.viewer-comments-none' : 'es-panels-canvas.comments-none';
86
99
  const vars = { canvas, names: namesLine(names) };
87
100
  return (
@@ -92,7 +105,7 @@ function EmptyComments({ kind, active, canvas, names, onShare }) {
92
105
  vars={vars}
93
106
  testid="comments-empty"
94
107
  actions={
95
- !viewer && onShare ? (
108
+ !viewer && canComment && onShare ? (
96
109
  <button
97
110
  type="button"
98
111
  className="btn btn--ghost btn--sm"
@@ -112,7 +125,11 @@ function EmptyComments({ kind, active, canvas, names, onShare }) {
112
125
  glyph="comment"
113
126
  testid="comments-empty"
114
127
  title={FILTER_EMPTY[active] ?? FILTER_EMPTY.resolved}
115
- next={active === 'resolved' ? undefined : 'Press [[C]], then click where it belongs.'}
128
+ next={
129
+ active === 'resolved' || !canComment
130
+ ? undefined
131
+ : 'Press [[C]], then click where it belongs.'
132
+ }
116
133
  />
117
134
  );
118
135
  }
@@ -229,6 +246,7 @@ export function CommentsPanel({
229
246
  onClose,
230
247
  onShare,
231
248
  viewer = false,
249
+ canComment = true,
232
250
  me: meProp,
233
251
  artboardLabel,
234
252
  now,
@@ -295,6 +313,7 @@ export function CommentsPanel({
295
313
  canvas={activePath ? canvasLabel(activePath) : 'this canvas'}
296
314
  names={others}
297
315
  onShare={onShare}
316
+ canComment={canComment}
298
317
  />
299
318
  ) : (
300
319
  groups.map((g) => (
@@ -18,6 +18,9 @@ import { WIDTH_PRESETS } from '../../../editing/artboard-resize.ts';
18
18
 
19
19
  const PRESET_NAME = new Map(WIDTH_PRESETS.map((p) => [p.w, p.label]));
20
20
 
21
+ /** #168 F2: the one id this notice is raised under — the canvas asked for it, so a repeat replaces, never stacks. */
22
+ export const DUPLICATE_NOTICE_ID = 'canvas-duplicate-at-width';
23
+
21
24
  /** A width a board could honestly have (api.ts `dim`: 64 … 8192 world px). */
22
25
  const honest = (w) => typeof w === 'number' && Number.isFinite(w) && w >= 64 && w <= 8192;
23
26
 
@@ -31,7 +34,7 @@ export function duplicatedAtWords(width) {
31
34
  * @param {{ op?: string, params?: { items?: Array<{ width?: number }> } } | undefined} body
32
35
  * @param {{ ok?: boolean } | undefined} result
33
36
  * @param {(() => void) | undefined} [undo]
34
- * @returns {{ message: string, action?: { label: string, onClick: () => void } } | null}
37
+ * @returns {{ id: string, message: string, action?: { label: string, onClick: () => void } } | null}
35
38
  */
36
39
  export function settleDuplicateAtWidth(body, result, undo) {
37
40
  if (body?.op !== 'artboard.duplicate-at-width' || !result?.ok) return null;
@@ -41,5 +44,6 @@ export function settleDuplicateAtWidth(body, result, undo) {
41
44
  // one sentence needs one width: "Tablet and Mobile" (two widths) is the inspector's toast, not this one
42
45
  if (!honest(width) || !items.every((i) => i?.width === width)) return null;
43
46
  const message = duplicatedAtWords(width);
44
- return undo ? { message, action: { label: 'Undo', onClick: () => undo() } } : { message };
47
+ const id = DUPLICATE_NOTICE_ID;
48
+ return undo ? { id, message, action: { label: 'Undo', onClick: () => undo() } } : { id, message };
45
49
  }
@@ -185,6 +185,7 @@ export default function DiagnosticsHost({ toast }) {
185
185
  cloud: cfg?.cloud ?? null,
186
186
  groupPaths: (groups || []).map((g) => g.path).filter(Boolean),
187
187
  names: canvasNamesBySlug(groups),
188
+ designRel: cfg?.designRel,
188
189
  behind: gitStatus?.behind || 0,
189
190
  onGetLatest: gitGetLatest,
190
191
  resync,
@@ -13,11 +13,11 @@ import { syncPresentation } from '../../../sync/presentation.ts';
13
13
  export const STATUS_IDS = Object.freeze(['diag.sync', 'diag.server', 'diag.ai']);
14
14
  export const VALUE_IDS = Object.freeze(['diag.address', 'diag.process', 'diag.project-folder']);
15
15
 
16
- /** Sync: one word. A solo project has nothing to sync (a neutral word, not a problem). */
16
+ /** Sync: one word. A solo project is "Only on this Mac" (a neutral word, not a problem; canvas 17). */
17
17
  export function syncWord(syncStatus, { project, aiHeld = false } = {}) {
18
18
  if (aiHeld) return { word: 'Needs you', tone: 'warn' };
19
19
  const p = syncPresentation(syncStatus, { project });
20
- if (!p) return { word: 'Local project', tone: 'neutral' };
20
+ if (!p) return { word: 'Only on this Mac', tone: 'neutral' };
21
21
  switch (p.phase) {
22
22
  case 'synced':
23
23
  return { word: 'Up to date', tone: 'ok' };
@@ -40,6 +40,36 @@ export function syncWord(syncStatus, { project, aiHeld = false } = {}) {
40
40
  }
41
41
  }
42
42
 
43
+ /**
44
+ * 2.1.1 T3 — Sync on a project only on this Mac (canvas 17 ac-sync): the next step, not a dead end. Two
45
+ * ways out, the same two as the avatar menu: Maude Cloud (the existing move, `share.move-to-cloud` → the
46
+ * Share sheet's Move to Maude Cloud) and your own server (`account.link-server` → the one dialog). Both
47
+ * are the Mac app's (the move answers only the desktop window), so a browser tab gets words, no buttons.
48
+ */
49
+ export function soloSync({ native = false, folder = '' } = {}) {
50
+ const at = typeof folder === 'string' && folder ? tilde(folder) : '';
51
+ return {
52
+ title: 'Only on this Mac',
53
+ body: 'Nothing leaves this Mac yet. Put it on Maude Cloud to open it from any Mac and share it — or sync it with your own server.',
54
+ actions: native
55
+ ? [
56
+ {
57
+ id: 'share.move-to-cloud',
58
+ label: 'Create project on Maude Cloud',
59
+ primary: true,
60
+ testid: 'diag-sync-to-cloud',
61
+ },
62
+ { id: 'account.link-server', label: 'Link your server', testid: 'diag-sync-link-server' },
63
+ ]
64
+ : [],
65
+ fine: !native
66
+ ? 'Open this project in the Maude app to put it on Maude Cloud or link your server.'
67
+ : at
68
+ ? `It stays in ${at} either way.`
69
+ : 'It stays on this Mac either way.',
70
+ };
71
+ }
72
+
43
73
  /**
44
74
  * Server: the studio answers (this page is served by it); the socket says whether it is live. In a cloud tab
45
75
  * there is no process of yours to name — the server is the cloud's (S11.15, 06 · ad-edge-where).
@@ -15,6 +15,7 @@ import { useModalFocus } from '../shell/modal-focus.js';
15
15
  import { StIcon } from '../../shell/icons.jsx';
16
16
  import { TeamProjectsDialog } from '../../panels/TeamProjects.jsx';
17
17
  import { isNativeApp } from '../../github.js';
18
+ import { menuRunner } from '../shell/menu-runner.js';
18
19
  import SyncDetails from './sync-details/sync-details.jsx';
19
20
  import { AdvancedFold } from '../fold/advanced-fold.jsx';
20
21
  import ReadinessList from '../../panels/ReadinessList.jsx';
@@ -26,6 +27,7 @@ import {
26
27
  LOG_FILTERS,
27
28
  logLines,
28
29
  modeStamp,
30
+ soloSync,
29
31
  tilde,
30
32
  } from './diagnostics-model.js';
31
33
  import {
@@ -368,21 +370,45 @@ function ResyncCard({ view }) {
368
370
  );
369
371
  }
370
372
 
371
- function SyncView({ sync }) {
373
+ function SyncView({ sync, folder = '', onClose }) {
372
374
  const [latest, setLatest] = useState('');
373
375
  const [busy, setBusy] = useState(false);
374
376
  const [signInAt, setSignInAt] = useState(null);
375
377
  if (!sync.status) {
378
+ // 2.1.1 T3 (canvas 17 ac-sync): a project only on this Mac offers the next step, not a dead end.
379
+ const v = soloSync({ native: sync.native ?? isNativeApp(), folder });
376
380
  return (
377
- <div className="dg-card" data-testid="diag-sync-solo">
381
+ <div className="dg-card dg-solo" data-testid="diag-sync-solo">
378
382
  <div className="dg-hd">
379
- <strong>Sync</strong>
383
+ <strong>{sync.project ? `Sync · ${sync.project}` : 'Sync'}</strong>
380
384
  <Word w={sync.word} />
381
385
  </div>
382
- <p className="dg-empty">
383
- This project isn’t linked to the cloud, so there is nothing to sync. Everything is on this
384
- Mac.
385
- </p>
386
+ <div className="dg-solo-b">
387
+ <span className="dg-solo-ic" aria-hidden="true">
388
+ <StIcon name="laptop" size={20} />
389
+ </span>
390
+ <strong>{v.title}</strong>
391
+ <p className="dg-empty">{v.body}</p>
392
+ {v.actions.length ? (
393
+ <div className="dg-solo-acts">
394
+ {v.actions.map((a) => (
395
+ <button
396
+ key={a.id}
397
+ type="button"
398
+ className={a.primary ? 'dg-btn dg-btn--primary' : 'dg-btn'}
399
+ data-testid={a.testid}
400
+ onClick={() => {
401
+ menuRunner.run(a.id);
402
+ onClose?.();
403
+ }}
404
+ >
405
+ {a.label}
406
+ </button>
407
+ ))}
408
+ </div>
409
+ ) : null}
410
+ <p className="dg-hint">{v.fine}</p>
411
+ </div>
386
412
  </div>
387
413
  );
388
414
  }
@@ -423,6 +449,7 @@ function SyncView({ sync }) {
423
449
  cloud={sync.cloud}
424
450
  native={sync.native ?? isNativeApp()}
425
451
  names={sync.names}
452
+ designRel={sync.designRel}
426
453
  focusConflict={sync.focus?.slug ?? null}
427
454
  focusSeq={sync.focus?.seq ?? 0}
428
455
  onSignInAgain={(url) => setSignInAt(url)}
@@ -549,7 +576,7 @@ export default function DiagnosticsSheet({
549
576
  </div>
550
577
  </div>
551
578
  ) : (
552
- <SyncView sync={sync} />
579
+ <SyncView sync={sync} folder={info?.folder} onClose={onClose} />
553
580
  )}
554
581
  </div>
555
582
  </section>