@1agh/maude 2.0.0-rc.2 → 2.0.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 (76) hide show
  1. package/apps/studio/acp/login-state.ts +3 -2
  2. package/apps/studio/actions/defs/chat.ts +4 -1
  3. package/apps/studio/actions.manifest.json +1 -1
  4. package/apps/studio/bridge/dgn-protocol.ts +13 -0
  5. package/apps/studio/canvas-lib.tsx +7 -0
  6. package/apps/studio/client/export-lane.js +4 -2
  7. package/apps/studio/client/hooks/use-canvas-bridge.jsx +6 -0
  8. package/apps/studio/client/panels/ChatPanel.jsx +10 -2
  9. package/apps/studio/client/panels/acp-runtime.js +14 -0
  10. package/apps/studio/client/system/system-view.jsx +6 -2
  11. package/apps/studio/client/tree-row-menu.jsx +4 -0
  12. package/apps/studio/client/v2/ai/Advanced.jsx +23 -7
  13. package/apps/studio/client/v2/ai/AttachMenu.jsx +4 -0
  14. package/apps/studio/client/v2/ai/ChatList.jsx +7 -1
  15. package/apps/studio/client/v2/ai/ConnectSheet.jsx +75 -4
  16. package/apps/studio/client/v2/ai/NeedsYouSlot.jsx +42 -8
  17. package/apps/studio/client/v2/ai/NotReady.jsx +24 -3
  18. package/apps/studio/client/v2/ai/RunList.jsx +4 -0
  19. package/apps/studio/client/v2/ai/RunSurface.jsx +14 -4
  20. package/apps/studio/client/v2/ai/ScopeChip.jsx +4 -0
  21. package/apps/studio/client/v2/ai/Working.jsx +13 -1
  22. package/apps/studio/client/v2/ai/activity-line.js +390 -0
  23. package/apps/studio/client/v2/ai/activity-store.js +45 -0
  24. package/apps/studio/client/v2/ai/advanced-model.js +62 -12
  25. package/apps/studio/client/v2/ai/ai-list-advanced.css +7 -0
  26. package/apps/studio/client/v2/ai/ai-run.css +19 -0
  27. package/apps/studio/client/v2/ai/ai-send.js +6 -2
  28. package/apps/studio/client/v2/ai/connect-flow.js +29 -8
  29. package/apps/studio/client/v2/ai/needs-you.css +18 -0
  30. package/apps/studio/client/v2/ai/ring-relay.js +11 -1
  31. package/apps/studio/client/v2/ai/use-activity-line.js +81 -0
  32. package/apps/studio/client/v2/annotations/templates-panel.jsx +4 -0
  33. package/apps/studio/client/v2/assets/kinds-chip.jsx +1 -1
  34. package/apps/studio/client/v2/assets/place-asset.js +20 -1
  35. package/apps/studio/client/v2/assets/tile-menu.jsx +1 -1
  36. package/apps/studio/client/v2/canvases/canvases-panel.jsx +5 -1
  37. package/apps/studio/client/v2/canvases/row-menu.jsx +4 -2
  38. package/apps/studio/client/v2/ds/review.css +2 -0
  39. package/apps/studio/client/v2/empty/ai-drafting.jsx +78 -0
  40. package/apps/studio/client/v2/empty/empty-host.jsx +17 -0
  41. package/apps/studio/client/v2/empty/empty.css +98 -0
  42. package/apps/studio/client/v2/export/advanced/render.jsx +5 -2
  43. package/apps/studio/client/v2/export/export-copy.js +11 -4
  44. package/apps/studio/client/v2/export/export-sheet.jsx +6 -2
  45. package/apps/studio/client/v2/export/exports-model.js +13 -0
  46. package/apps/studio/client/v2/export/exports-panel.jsx +4 -2
  47. package/apps/studio/client/v2/export/job-row.jsx +4 -0
  48. package/apps/studio/client/v2/export/other-formats.jsx +7 -1
  49. package/apps/studio/client/v2/export/sections/batch-model.js +3 -2
  50. package/apps/studio/client/v2/export/sections/batch.jsx +20 -4
  51. package/apps/studio/client/v2/inspector/sections/colour-popover.jsx +4 -0
  52. package/apps/studio/client/v2/inspector/token-chip.jsx +4 -0
  53. package/apps/studio/client/v2/kinds/SizePicker.jsx +4 -0
  54. package/apps/studio/client/v2/presence/faces.jsx +4 -0
  55. package/apps/studio/client/v2/share/role-menu.jsx +7 -1
  56. package/apps/studio/client/v2/share/share-model.js +20 -1
  57. package/apps/studio/client/v2/share/share-sheet.jsx +6 -4
  58. package/apps/studio/client/v2/shell/account-card.jsx +7 -1
  59. package/apps/studio/client/v2/shell/canvas-pointer.js +21 -0
  60. package/apps/studio/client/v2/shell/mode-switch.jsx +4 -0
  61. package/apps/studio/client/v2/shell/project-pill.jsx +4 -0
  62. package/apps/studio/client/v2/shell/save-status.js +10 -1
  63. package/apps/studio/client/v2/shell/share-cluster-host.jsx +2 -0
  64. package/apps/studio/client/v2/shell/share-cluster.jsx +6 -1
  65. package/apps/studio/client/v2/shell/use-dismiss-outside.js +14 -6
  66. package/apps/studio/client/v2/timeline/joins/transition-picker.jsx +7 -1
  67. package/apps/studio/client/v2/undo/undo-history.jsx +7 -1
  68. package/apps/studio/cloud/endpoints.ts +31 -1
  69. package/apps/studio/dist/client.bundle.js +921 -921
  70. package/apps/studio/dist/comment-mount.js +1 -1
  71. package/apps/studio/dist/styles.css +1 -1
  72. package/apps/studio/editing/canvas-pointer.ts +29 -0
  73. package/apps/studio/routes/cloud-move.ts +7 -4
  74. package/apps/studio/video-play-overlay.tsx +67 -12
  75. package/apps/studio/whats-new.json +43 -16
  76. package/package.json +8 -8
@@ -17,6 +17,7 @@ import { useShellStore } from '../../stores/shell-store.jsx';
17
17
  import { useUndoModeLane } from './use-undo-mode-lane.js';
18
18
  import { undoProjection, useUndoProjection } from './use-undo-projection.jsx';
19
19
  import { reasonProps } from '../access/disabled-reason.js';
20
+ import { onCanvasPointer } from '../shell/canvas-pointer.js';
20
21
 
21
22
  /** One open flag for the shell (the menu row opens it; Esc / outside / a click closes it). */
22
23
  function createOpenFlag() {
@@ -237,7 +238,12 @@ export function UndoHistoryHost(p) {
237
238
  if (!e.target?.closest?.('[data-testid="undo-history"]')) undoHistoryOpen.close();
238
239
  };
239
240
  document.addEventListener('pointerdown', onDown, true);
240
- return () => document.removeEventListener('pointerdown', onDown, true);
241
+ // rc3 r4-12 — a press in the canvas closes it too (told over the dgn bridge; it never reaches this document)
242
+ const offCanvas = onCanvasPointer(() => undoHistoryOpen.close());
243
+ return () => {
244
+ document.removeEventListener('pointerdown', onDown, true);
245
+ offCanvas();
246
+ };
241
247
  }, [open]);
242
248
  // biome-ignore lint/correctness/useExhaustiveDependencies: clear the highlight when the popover closes or the canvas changes
243
249
  useEffect(() => {
@@ -29,7 +29,7 @@ import { basename, dirname, join, relative, sep } from 'node:path';
29
29
  import { browserDoorOf } from '../client/v2/cloud/browser-door.js';
30
30
  import { asFormat, formatToKeep } from '../format.ts';
31
31
  import { deleteHubCredential, saveHubCredential } from '../sync/hub-link.ts';
32
- import { getHubToken, normalizeUrl } from '../sync/hubs-config.ts';
32
+ import { getHubRecord, getHubToken, normalizeUrl } from '../sync/hubs-config.ts';
33
33
  import { deleteProjectLink, linksPath, recordProjectLink } from '../sync/link-consent.ts';
34
34
  import { boundCloudToken, cloudConfigPath } from './config-path.ts';
35
35
 
@@ -476,6 +476,25 @@ export function createCloudEndpoints(ctx: Ctx) {
476
476
  });
477
477
  },
478
478
 
479
+ /**
480
+ * Link THIS folder to a cell whose hub credential this Mac already holds — the second half
481
+ * of Move to cloud, after `openManaged` signed in (rc3-j, #162). Same linkedHub + sync start
482
+ * as `attach`, without a second /projects/open + /auth/login (which minted a second hub
483
+ * session for the same person). No stored credential for that cell = signed out.
484
+ */
485
+ async attachStored(hubUrl: string): Promise<CloudEndpointResult> {
486
+ let norm: string;
487
+ try {
488
+ norm = normalizeUrl(String(hubUrl ?? ''));
489
+ } catch {
490
+ return { status: 400, json: { ok: false, error: 'unknown workspace' } };
491
+ }
492
+ if (!getHubRecord(norm, ctx.hubsConfigPath)) {
493
+ return { status: 401, json: { ok: false, error: 'Sign in to Maude Cloud first.' } };
494
+ }
495
+ return linkFolder(norm);
496
+ },
497
+
479
498
  /** The maude:// handoff lane, as a managed copy (see `attachCode`). */
480
499
  async openManagedCode(code: string, claimedProject?: string): Promise<CloudEndpointResult> {
481
500
  if (typeof code !== 'string' || !/^mhc_[0-9a-f]{16,128}$/.test(code)) {
@@ -1002,7 +1021,18 @@ export function createCloudEndpoints(ctx: Ctx) {
1002
1021
 
1003
1022
  const norm = normalizeUrl(workspaceUrl);
1004
1023
  saveHubCredential(norm, hubToken, vouchedRole, hubTokenExpiresAt, ctx.hubsConfigPath);
1024
+ return linkFolder(norm, role, project);
1025
+ }
1005
1026
 
1027
+ /**
1028
+ * The folder half of every attach: linkedHub in config.json, the link recorded on this Mac, the
1029
+ * live sync runtime cycled onto it. The caller has already stored the hub credential for `norm`.
1030
+ */
1031
+ async function linkFolder(
1032
+ norm: string,
1033
+ role?: string,
1034
+ project?: string
1035
+ ): Promise<CloudEndpointResult> {
1006
1036
  // Project side — linkedHub in .design/config.json (committed; no token).
1007
1037
  const cfgPath = join(ctx.paths.designRoot, 'config.json');
1008
1038
  let cfg: Record<string, unknown> = {};