@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
@@ -25,13 +25,14 @@ export function createSettingsHandlers(d, io = {}) {
25
25
  toast(next ? onSay : offSay);
26
26
  };
27
27
  return {
28
- 'settings.reset-panel-layout': () => d.setSettingsOpen?.('advanced'),
29
- 'settings.reset-all': () => d.setSettingsOpen?.('advanced'),
28
+ 'settings.reset-panel-layout': () => d.setSettingsOpen?.('advanced#reset'),
29
+ 'settings.reset-all': () => d.setSettingsOpen?.('advanced#reset'),
30
30
  // S11.14 — the Connections rows open where their words are; nothing is typed or linked from ⌘K.
31
- 'connections.replace-hub-token': () => d.setSettingsOpen?.('connections'),
32
- 'connections.figma-test': () => d.setSettingsOpen?.('connections'),
33
- 'connections.cloud-project-connect': () => d.setSettingsOpen?.('connections'),
34
- 'connections.cloud-project-disconnect': () => d.setSettingsOpen?.('connections'),
31
+ // 2.1.1 T6: the project's link (cloud projects, your server's token) is General › This project now.
32
+ 'connections.replace-hub-token': () => d.setSettingsOpen?.('general#this-project'),
33
+ 'connections.figma-test': () => d.setSettingsOpen?.('connections#figma'),
34
+ 'connections.cloud-project-connect': () => d.setSettingsOpen?.('general#this-project'),
35
+ 'connections.cloud-project-disconnect': () => d.setSettingsOpen?.('general#this-project'),
35
36
  'settings.use-own-plugin-copy': flip(
36
37
  OWN_PLUGIN_COPY_PREF,
37
38
  'Using your own plugin copy. Takes effect when the AI chat next starts.',
@@ -37,6 +37,9 @@ export const SETTINGS_TAB_STORE = 'mdcc-settings-tab-v2';
37
37
  * Every row Settings carries that nothing-deleted.json knows by id (`nd`), plus the v1 settings that
38
38
  * have no ND row of their own (`nd: null`, kept reachable because "every today-setting has a row").
39
39
  * `testid` is the hook a person / scenario finds the control by; `where` is the path to follow.
40
+ * 2.1.1 T6: `card` is the card of its section that holds it (settings-cards.js `CARDS`) — ⌘K opens that
41
+ * card — and `fold` the fold inside it, when the row sits under one. A `local` row in General lives in
42
+ * This project, the one General card that reads this Mac.
40
43
  */
41
44
  export const SETTINGS_ROWS = Object.freeze([
42
45
  // ── General ──────────────────────────────────────────────────────────────────────────────────
@@ -44,6 +47,7 @@ export const SETTINGS_ROWS = Object.freeze([
44
47
  nd: 'A-light-dark-toggle',
45
48
  section: 'general',
46
49
  testid: 'settings-theme',
50
+ card: 'look',
47
51
  action: 'settings.theme',
48
52
  where: 'Settings › General › Look › Theme: Light · Dark · Auto (⌘K “Theme” toggles it)',
49
53
  },
@@ -51,15 +55,21 @@ export const SETTINGS_ROWS = Object.freeze([
51
55
  nd: 'A-open-the-cloud-dashboard',
52
56
  section: 'general',
53
57
  testid: 'settings-open-dashboard',
54
- where: 'Settings › General › Account › Open the cloud dashboard',
58
+ card: 'this-project',
59
+ // 2.1.1 T6: the Maude Cloud account belongs to the project (canvas 17 · 10) — on the desktop it is under
60
+ // This project › Sync details; a cloud tab has no This project card and keeps its own Account card.
61
+ where:
62
+ 'Settings › General › This project › Sync details › Maude Cloud › Manage on the web (a cloud tab: Settings › General › Account)',
55
63
  // The Mac's own account (a local project): a read-only link is somebody else's Mac, so it has none.
56
64
  // A cloud viewer keeps it — the hub told its tab where the dashboard is.
57
65
  account: true,
66
+ fold: 'settings.project',
58
67
  },
59
68
  {
60
69
  nd: null,
61
70
  section: 'general',
62
71
  testid: 'settings-canvas-view',
72
+ card: 'canvas',
63
73
  where: 'Settings › General › Canvas and view',
64
74
  },
65
75
  {
@@ -68,6 +78,7 @@ export const SETTINGS_ROWS = Object.freeze([
68
78
  nd: null,
69
79
  section: 'general',
70
80
  testid: 'panel-side-<id>',
81
+ card: 'layout',
71
82
  where: 'Settings › General › Layout › Panel positions',
72
83
  },
73
84
  {
@@ -75,20 +86,59 @@ export const SETTINGS_ROWS = Object.freeze([
75
86
  nd: null,
76
87
  section: 'general',
77
88
  testid: 'settings-single-keys',
89
+ card: 'keyboard',
78
90
  where: 'Settings › General › Keyboard › Single-key shortcuts',
79
91
  },
80
- // ── Connections ──────────────────────────────────────────────────────────────────────────────
92
+ {
93
+ // #206 (DDR-250): may Claude Code in the terminal open projects in this Maude — a Tauri pref.
94
+ nd: null,
95
+ section: 'general',
96
+ testid: 'settings-terminal-opens',
97
+ card: 'terminal',
98
+ // General is about the person, not the Mac (no `local`); `native`: only the desktop app has the switch.
99
+ where: 'Settings › General › Terminal › Let the terminal open projects in Maude',
100
+ native: true,
101
+ },
102
+ // ── General › This project (2.1.1 T6, canvas 17 · 08 · 09) ─────────────────────────────────────
103
+ // The project's link — Maude Cloud and your server — left Connections: Connections is about the person,
104
+ // This project is about this project. Desktop only (`local`): the card reads this Mac's link and sign-ins.
81
105
  {
82
106
  nd: 'A-cloud-account-email-and-sign-out',
83
- section: 'connections',
107
+ section: 'general',
84
108
  testid: 'cloud-account',
85
- where: 'Settings › Connections › Maude Cloud (email, Sign out)',
109
+ card: 'this-project',
110
+ where: 'Settings › General › This project › Sync details › Maude Cloud (email, Sign out)',
86
111
  local: true,
112
+ fold: 'settings.project',
87
113
  },
114
+ {
115
+ nd: 'A-team-hub-address-and-access-token',
116
+ section: 'general',
117
+ testid: 'settings-hub-address',
118
+ card: 'this-project',
119
+ // the address, the access token as its last four characters, Replace… — under Sync details, for a
120
+ // project linked to your server (a cloud link draws the address under its Maude Cloud block)
121
+ where:
122
+ 'Settings › General › This project › Sync details › Your server (address, access token •••• last 4, Replace…)',
123
+ local: true,
124
+ fold: 'settings.project',
125
+ },
126
+ {
127
+ nd: 'A-your-team-s-own-server-email-password',
128
+ section: 'general',
129
+ testid: 'settings-team-server-add',
130
+ card: 'this-project',
131
+ where:
132
+ 'Settings › General › This project › Link your server… (a linked project: Sync details › Link another server…)',
133
+ local: true,
134
+ fold: 'settings.project',
135
+ },
136
+ // ── Connections (2.1.1 T6, canvas 17 · 10: only the person's own integrations) ─────────────────
88
137
  {
89
138
  nd: 'A-sign-in-with-github',
90
139
  section: 'connections',
91
140
  testid: 'settings-github',
141
+ card: 'github',
92
142
  where: 'Settings › Connections › GitHub › Sign in',
93
143
  local: true,
94
144
  },
@@ -96,6 +146,7 @@ export const SETTINGS_ROWS = Object.freeze([
96
146
  nd: 'A-ai-provider-keys',
97
147
  section: 'connections',
98
148
  testid: 'settings-ai-keys',
149
+ card: 'ai',
99
150
  where: 'Settings › Connections › AI images, video and voice › Manage',
100
151
  local: true,
101
152
  },
@@ -103,33 +154,16 @@ export const SETTINGS_ROWS = Object.freeze([
103
154
  nd: 'A-figma-token',
104
155
  section: 'connections',
105
156
  testid: 'figma-connect-card',
157
+ card: 'figma',
106
158
  where: 'Settings › Connections › Figma (Test, Disconnect; the token under its Advanced)',
107
159
  local: true,
108
160
  },
109
- {
110
- nd: 'A-team-hub-address-and-access-token',
111
- section: 'connections',
112
- testid: 'settings-hub-address',
113
- // S11.14 — under the Advanced of the row the link belongs to (your team's own server, or Maude Cloud):
114
- // the address, the access token as its last four characters, Replace….
115
- where:
116
- 'Settings › Connections › Your team’s own server › Advanced (address, access token •••• last 4, Replace…)',
117
- local: true,
118
- // drawn only while that row's own Advanced fold is open (a cloud link draws it under `connections.cloud`)
119
- fold: 'connections.hub',
120
- },
121
- {
122
- nd: 'A-your-team-s-own-server-email-password',
123
- section: 'connections',
124
- testid: 'settings-team-server-add',
125
- where: 'Settings › Connections › Your team’s own server › Add a team server…',
126
- local: true,
127
- },
128
161
  // ── Advanced ─────────────────────────────────────────────────────────────────────────────────
129
162
  {
130
163
  nd: 'A-app-version',
131
164
  section: 'advanced',
132
165
  testid: 'settings-app-version',
166
+ card: 'this-mac',
133
167
  where: 'Settings › Advanced › This Mac › Version',
134
168
  local: true,
135
169
  },
@@ -137,6 +171,7 @@ export const SETTINGS_ROWS = Object.freeze([
137
171
  nd: 'A-update-banner-restart-now-later',
138
172
  section: 'advanced',
139
173
  testid: 'settings-update-restart',
174
+ card: 'this-mac',
140
175
  where:
141
176
  'Settings › Advanced › This Mac › Update (Restart now · Later) — the banner says the same',
142
177
  local: true,
@@ -147,6 +182,7 @@ export const SETTINGS_ROWS = Object.freeze([
147
182
  nd: 'D19',
148
183
  section: 'advanced',
149
184
  testid: 'settings-check-updates',
185
+ card: 'this-mac',
150
186
  where: 'Settings › Advanced › This Mac › Update › Check for updates',
151
187
  local: true,
152
188
  native: true,
@@ -155,6 +191,7 @@ export const SETTINGS_ROWS = Object.freeze([
155
191
  nd: 'A-server-build-name-maude-dev-srv',
156
192
  section: 'advanced',
157
193
  testid: 'settings-server-build',
194
+ card: 'this-mac',
158
195
  where: 'Settings › Advanced › This Mac › Server build',
159
196
  local: true,
160
197
  },
@@ -162,6 +199,7 @@ export const SETTINGS_ROWS = Object.freeze([
162
199
  nd: 'A-where-keys-are-kept-keys-json',
163
200
  section: 'advanced',
164
201
  testid: 'settings-keys-store',
202
+ card: 'this-mac',
165
203
  where: 'Settings › Advanced › This Mac › Keys are kept in',
166
204
  local: true,
167
205
  },
@@ -169,6 +207,7 @@ export const SETTINGS_ROWS = Object.freeze([
169
207
  nd: 'A-install-claude-code-automatically',
170
208
  section: 'advanced',
171
209
  testid: 'settings-claude-autosetup',
210
+ card: 'claude-code',
172
211
  where: 'Settings › Advanced › Claude Code › Install and sign in automatically',
173
212
  local: true,
174
213
  },
@@ -176,6 +215,7 @@ export const SETTINGS_ROWS = Object.freeze([
176
215
  nd: 'A-draw-with-the-svg-agent-copies-design-draw',
177
216
  section: 'advanced',
178
217
  testid: 'settings-copy-draw',
218
+ card: 'claude-code',
179
219
  where: 'Settings › Advanced › Claude Code › Draw a mark with the SVG agent › Copy command',
180
220
  local: true,
181
221
  },
@@ -183,6 +223,7 @@ export const SETTINGS_ROWS = Object.freeze([
183
223
  nd: 'A-brand-upload-copy-command',
184
224
  section: 'advanced',
185
225
  testid: 'settings-copy-brand',
226
+ card: 'claude-code',
186
227
  where: 'Settings › Advanced › Claude Code › Import a brand from the terminal › Copy command',
187
228
  local: true,
188
229
  },
@@ -190,6 +231,7 @@ export const SETTINGS_ROWS = Object.freeze([
190
231
  nd: 'A-transcription-engine-and-whisper-model',
191
232
  section: 'advanced',
192
233
  testid: 'settings-transcription',
234
+ card: 'engines',
193
235
  where: 'Settings › Advanced › Engines › Subtitles (engine + whisper model)',
194
236
  local: true,
195
237
  },
@@ -197,42 +239,56 @@ export const SETTINGS_ROWS = Object.freeze([
197
239
  nd: 'A-keyframe-engine-and-gemma-model',
198
240
  section: 'advanced',
199
241
  testid: 'settings-keyframes',
242
+ card: 'engines',
200
243
  where: 'Settings › Advanced › Engines › Video keyframes (engine + Gemma model)',
201
244
  local: true,
202
245
  },
246
+ // 2.1.1 T6 (canvas 17 · 08, 11): This project's sync switches left Advanced — they are the project's,
247
+ // under General › This project › Sync details.
203
248
  {
204
249
  nd: 'A-sync-project-files-propagate-deletions',
205
- section: 'advanced',
250
+ section: 'general',
206
251
  testid: 'sync-setting-syncFiles',
207
- where: 'Settings › Advanced › This project › Sync project files · Propagate deletions',
252
+ card: 'this-project',
253
+ where:
254
+ 'Settings › General › This project › Sync details › Sync project files · Propagate deletions',
208
255
  local: true,
256
+ fold: 'settings.project',
209
257
  },
210
258
  {
211
259
  nd: 'A-sync-canvases-only-or-everything',
212
- section: 'advanced',
260
+ section: 'general',
213
261
  testid: 'sync-setting-syncFiles',
214
- where: 'Settings › Advanced › This project › Sync project files (off = canvases only)',
262
+ card: 'this-project',
263
+ where:
264
+ 'Settings › General › This project › Sync details › Sync project files (off = canvases only)',
215
265
  local: true,
266
+ fold: 'settings.project',
216
267
  },
217
268
  {
218
269
  nd: 'A-first-link-conflicts-rule',
219
- section: 'advanced',
270
+ section: 'general',
220
271
  testid: 'sync-setting-firstAnchor',
221
- where: 'Settings › Advanced › This project › When a folder first links',
272
+ card: 'this-project',
273
+ where: 'Settings › General › This project › Sync details › When a folder first links',
222
274
  local: true,
275
+ fold: 'settings.project',
223
276
  },
224
277
  {
225
278
  nd: 'A-hand-design-to-the-workspace',
226
- section: 'advanced',
279
+ section: 'general',
227
280
  testid: 'sync-ownership-adopt',
228
- where: 'Settings › Advanced › This project › Who keeps .design/ › Hand over…',
281
+ card: 'this-project',
282
+ where: 'Settings › General › This project › Sync details › Who keeps .design/ › Hand over…',
229
283
  local: true,
284
+ fold: 'settings.project',
230
285
  },
231
286
  {
232
287
  // S11.13 (06 ad-settings › This Mac): "Bun 1.3.4 · built in" — the runtime that serves the project.
233
288
  nd: null,
234
289
  section: 'advanced',
235
290
  testid: 'settings-runtime',
291
+ card: 'this-mac',
236
292
  where: 'Settings › Advanced › This Mac › Runtime',
237
293
  local: true,
238
294
  },
@@ -241,6 +297,7 @@ export const SETTINGS_ROWS = Object.freeze([
241
297
  nd: null,
242
298
  section: 'advanced',
243
299
  testid: 'settings-server-port',
300
+ card: 'this-mac',
244
301
  where: 'Settings › Advanced › This Mac › Local server port',
245
302
  local: true,
246
303
  },
@@ -248,6 +305,7 @@ export const SETTINGS_ROWS = Object.freeze([
248
305
  nd: null,
249
306
  section: 'advanced',
250
307
  testid: 'settings-plugins',
308
+ card: 'claude-code',
251
309
  where: 'Settings › Advanced › Claude Code › Plugins',
252
310
  local: true,
253
311
  },
@@ -256,6 +314,7 @@ export const SETTINGS_ROWS = Object.freeze([
256
314
  nd: null,
257
315
  section: 'advanced',
258
316
  testid: 'settings-own-plugin-copy',
317
+ card: 'claude-code',
259
318
  action: 'settings.use-own-plugin-copy',
260
319
  where: 'Settings › Advanced › Claude Code › Use my own plugin copy',
261
320
  local: true,
@@ -265,6 +324,7 @@ export const SETTINGS_ROWS = Object.freeze([
265
324
  nd: null,
266
325
  section: 'advanced',
267
326
  testid: 'settings-decision-memory',
327
+ card: 'decision-memory',
268
328
  where: 'Settings › Advanced › Decision memory',
269
329
  local: true,
270
330
  },
@@ -273,6 +333,7 @@ export const SETTINGS_ROWS = Object.freeze([
273
333
  nd: null,
274
334
  section: 'advanced',
275
335
  testid: 'settings-report-logs',
336
+ card: 'privacy',
276
337
  where: 'Settings › Advanced › Privacy › Logs in bug reports',
277
338
  local: true,
278
339
  },
@@ -281,6 +342,7 @@ export const SETTINGS_ROWS = Object.freeze([
281
342
  nd: null,
282
343
  section: 'advanced',
283
344
  testid: 'settings-experimental-teams',
345
+ card: 'experimental',
284
346
  action: 'settings.experimental-teams',
285
347
  where: 'Settings › Advanced › Experimental › AI reviews argue it out (teams)',
286
348
  local: true,
@@ -289,6 +351,7 @@ export const SETTINGS_ROWS = Object.freeze([
289
351
  nd: null,
290
352
  section: 'advanced',
291
353
  testid: 'settings-reset-panel-layout',
354
+ card: 'reset',
292
355
  action: 'settings.reset-panel-layout',
293
356
  where: 'Settings › Advanced › Reset › Reset panel layout',
294
357
  local: true,
@@ -297,6 +360,7 @@ export const SETTINGS_ROWS = Object.freeze([
297
360
  nd: null,
298
361
  section: 'advanced',
299
362
  testid: 'settings-reset-all',
363
+ card: 'reset',
300
364
  action: 'settings.reset-all',
301
365
  where: 'Settings › Advanced › Reset › Reset all settings…',
302
366
  local: true,
@@ -307,6 +371,7 @@ export const SETTINGS_ROWS = Object.freeze([
307
371
  nd: null,
308
372
  section: 'advanced',
309
373
  testid: 'settings-reset-folds',
374
+ card: 'reset',
310
375
  where: 'Settings › Advanced › Reset › Close all Advanced sections',
311
376
  // ⌘K lists the action itself (06 ad-search draws it once, path "Settings › Advanced › Reset"): this row stays
312
377
  // in the sheet and in the parity table but is not a second search result.
@@ -321,6 +386,9 @@ export function sectionsFor(cloud, readOnly = false) {
321
386
  return SECTIONS.filter((s) => !s.local || (cloud === null && !readOnly));
322
387
  }
323
388
 
389
+ /** The fold This project's Sync details opens (remembered per Mac, like every Advanced fold). */
390
+ export const PROJECT_FOLD = 'settings.project';
391
+
324
392
  /** Is a Settings row in this shell? The one rule the sheet, ⌘K and the parity table share. */
325
393
  export function rowShown(row, { cloud = null, readOnly = false } = {}) {
326
394
  if (row.local && (cloud !== null || readOnly)) return false;
@@ -417,6 +485,7 @@ export const FOLD_LABELS = Object.freeze({
417
485
  'left.canvases': 'Canvases › Advanced',
418
486
  'left.layers': 'Layers › Advanced',
419
487
  settings: 'Settings › Advanced',
488
+ 'settings.project': 'Settings › This project › Sync details',
420
489
  diagnostics: 'Menu › Diagnostics › Advanced',
421
490
  help: 'Keyboard shortcuts › Advanced',
422
491
  inspector: 'Inspector › Advanced',
@@ -13,6 +13,9 @@
13
13
  // tablist (arrows / Home / End rove); each section is a tabpanel. A section that was opened stays
14
14
  // mounted (hidden) so a model download's poll survives a section switch.
15
15
  //
16
+ // 2.1.1 T6 (canvas 17 · 08 · 10 · 11): every section is one column of expandable cards (settings-card.jsx),
17
+ // one open per section; ⌘K opens the card that holds the row it found.
18
+ //
16
19
  // Connections and Advanced are the desktop's (`cloud === null`, and an owner's session): a browser tab
17
20
  // has no keychain, ffmpeg or whisper, and a read-only link must not touch the Mac's config, so those
18
21
  // sections are ABSENT there, not disabled (settings-model.js).
@@ -25,6 +28,7 @@ import AdvancedSection from './advanced-section.jsx';
25
28
  import { restoreFocus, trapTab } from '../shell/modal-focus.js';
26
29
  import ConnectionsSection from './connections-section.jsx';
27
30
  import GeneralSection from './general-section.jsx';
31
+ import { parseSettingsTarget } from './settings-cards.js';
28
32
  import { railTarget, resolveTab, SETTINGS_TAB_STORE, sectionsFor } from './settings-model.js';
29
33
 
30
34
  function remembered() {
@@ -41,7 +45,8 @@ export default function SettingsSheet({
41
45
  /** A read-only session (V2-4.9): General only — the preferences of the person, none of the Mac's. */
42
46
  readOnly = false,
43
47
  onClose,
44
- initialTab,
48
+ /** The section to open on — or ⌘K's `"advanced#privacy"`: the section, then the card that holds the row. */
49
+ initialTab: requested,
45
50
  /** The staged auto-update (`{ version }`) or null, and the “Later” answer. */
46
51
  update = null,
47
52
  onUpdateLater,
@@ -52,7 +57,13 @@ export default function SettingsSheet({
52
57
  }) {
53
58
  const sections = sectionsFor(cloud, readOnly);
54
59
  const ids = sections.map((s) => s.id);
60
+ // 2.1.1 T6: ⌘K hands `"advanced#privacy"` — the tab, then the card that holds the row it found.
61
+ const { tab: initialTab, card: initialCard } = parseSettingsTarget(requested);
55
62
  const [tab, setTab] = useState(() => resolveTab(cloud, initialTab, remembered(), readOnly));
63
+ const [focus] = useState(() =>
64
+ initialCard && initialTab ? { tab: initialTab, card: initialCard, n: 1 } : null
65
+ );
66
+ const focusFor = (id) => (focus && focus.tab === id ? focus : null);
56
67
  // A section the shell lost between renders (cloud answered late) must not stay selected.
57
68
  const current = ids.includes(tab) ? tab : 'general';
58
69
  const [visited, setVisited] = useState(() => new Set([current]));
@@ -182,17 +193,25 @@ export default function SettingsSheet({
182
193
  data-testid={`settings-panel-${s.id}`}
183
194
  >
184
195
  {s.id === 'general' && (
185
- <GeneralSection cloud={cloud} readOnly={readOnly} {...general} />
186
- )}
187
- {s.id === 'connections' && (
188
- <ConnectionsSection
196
+ <GeneralSection
197
+ cloud={cloud}
198
+ readOnly={readOnly}
199
+ focus={focusFor('general')}
189
200
  syncStatus={syncStatus}
190
201
  onLinkedHub={onLinkedHub}
191
202
  onLocalProject={onLocalProject}
203
+ onCloseSheet={onClose}
204
+ {...general}
192
205
  />
193
206
  )}
207
+ {s.id === 'connections' && <ConnectionsSection focus={focusFor('connections')} />}
194
208
  {s.id === 'advanced' && (
195
- <AdvancedSection update={update} onUpdateLater={onUpdateLater} live={general} />
209
+ <AdvancedSection
210
+ update={update}
211
+ onUpdateLater={onUpdateLater}
212
+ live={general}
213
+ focus={focusFor('advanced')}
214
+ />
196
215
  )}
197
216
  </section>
198
217
  )