@1agh/maude 2.0.0-rc.1 → 2.0.0

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 (108) hide show
  1. package/apps/studio/acp/index.ts +35 -2
  2. package/apps/studio/acp/login-state.ts +3 -2
  3. package/apps/studio/actions/defs/chat.ts +4 -1
  4. package/apps/studio/actions.manifest.json +1 -1
  5. package/apps/studio/agent-runs.ts +3 -0
  6. package/apps/studio/ai/lease-home.ts +11 -1
  7. package/apps/studio/ai/run-lifecycle.ts +17 -0
  8. package/apps/studio/ai/runs.ts +64 -12
  9. package/apps/studio/api.ts +31 -5
  10. package/apps/studio/bridge/dgn-protocol.ts +13 -0
  11. package/apps/studio/canvas-imports.ts +23 -4
  12. package/apps/studio/canvas-lib.tsx +7 -0
  13. package/apps/studio/client/app.jsx +4 -0
  14. package/apps/studio/client/export-lane.js +4 -2
  15. package/apps/studio/client/fonts/LICENSE-Inter-Tight.txt +93 -0
  16. package/apps/studio/client/fonts/LICENSE-Inter.txt +93 -0
  17. package/apps/studio/client/fonts/LICENSE-JetBrains-Mono.txt +93 -0
  18. package/apps/studio/client/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  19. package/apps/studio/client/fonts/inter-latin-wght-normal.woff2 +0 -0
  20. package/apps/studio/client/fonts/inter-tight-latin-ext-wght-normal.woff2 +0 -0
  21. package/apps/studio/client/fonts/inter-tight-latin-wght-normal.woff2 +0 -0
  22. package/apps/studio/client/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  23. package/apps/studio/client/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  24. package/apps/studio/client/hooks/use-canvas-bridge.jsx +6 -0
  25. package/apps/studio/client/index.html +0 -3
  26. package/apps/studio/client/panels/ChatPanel.jsx +10 -2
  27. package/apps/studio/client/panels/acp-runtime.js +14 -0
  28. package/apps/studio/client/styles/_index.css +2 -0
  29. package/apps/studio/client/styles/fonts.css +63 -0
  30. package/apps/studio/client/system/system-view.jsx +6 -2
  31. package/apps/studio/client/tree-row-menu.jsx +4 -0
  32. package/apps/studio/client/v2/ai/Advanced.jsx +23 -7
  33. package/apps/studio/client/v2/ai/AttachMenu.jsx +4 -0
  34. package/apps/studio/client/v2/ai/ChatList.jsx +7 -1
  35. package/apps/studio/client/v2/ai/ConnectSheet.jsx +75 -4
  36. package/apps/studio/client/v2/ai/NeedsYouSlot.jsx +42 -8
  37. package/apps/studio/client/v2/ai/NotReady.jsx +24 -3
  38. package/apps/studio/client/v2/ai/RunList.jsx +4 -0
  39. package/apps/studio/client/v2/ai/RunSurface.jsx +14 -4
  40. package/apps/studio/client/v2/ai/ScopeChip.jsx +4 -0
  41. package/apps/studio/client/v2/ai/Working.jsx +13 -1
  42. package/apps/studio/client/v2/ai/activity-line.js +390 -0
  43. package/apps/studio/client/v2/ai/activity-store.js +45 -0
  44. package/apps/studio/client/v2/ai/advanced-model.js +62 -12
  45. package/apps/studio/client/v2/ai/ai-list-advanced.css +7 -0
  46. package/apps/studio/client/v2/ai/ai-run.css +19 -0
  47. package/apps/studio/client/v2/ai/ai-send.js +6 -2
  48. package/apps/studio/client/v2/ai/connect-flow.js +29 -8
  49. package/apps/studio/client/v2/ai/needs-you.css +18 -0
  50. package/apps/studio/client/v2/ai/needs-you.js +10 -0
  51. package/apps/studio/client/v2/ai/ring-relay.js +11 -1
  52. package/apps/studio/client/v2/ai/use-activity-line.js +81 -0
  53. package/apps/studio/client/v2/annotations/templates-panel.jsx +4 -0
  54. package/apps/studio/client/v2/assets/kinds-chip.jsx +1 -1
  55. package/apps/studio/client/v2/assets/place-asset.js +20 -1
  56. package/apps/studio/client/v2/assets/tile-menu.jsx +1 -1
  57. package/apps/studio/client/v2/canvases/canvases-panel.jsx +5 -1
  58. package/apps/studio/client/v2/canvases/row-menu.jsx +4 -2
  59. package/apps/studio/client/v2/ds/review.css +2 -0
  60. package/apps/studio/client/v2/empty/ai-drafting.jsx +78 -0
  61. package/apps/studio/client/v2/empty/empty-host.jsx +17 -0
  62. package/apps/studio/client/v2/empty/empty.css +98 -0
  63. package/apps/studio/client/v2/export/advanced/render.jsx +5 -2
  64. package/apps/studio/client/v2/export/export-copy.js +11 -4
  65. package/apps/studio/client/v2/export/export-sheet.jsx +6 -2
  66. package/apps/studio/client/v2/export/exports-model.js +13 -0
  67. package/apps/studio/client/v2/export/exports-panel.jsx +4 -2
  68. package/apps/studio/client/v2/export/job-row.jsx +4 -0
  69. package/apps/studio/client/v2/export/other-formats.jsx +7 -1
  70. package/apps/studio/client/v2/export/sections/batch-model.js +3 -2
  71. package/apps/studio/client/v2/export/sections/batch.jsx +20 -4
  72. package/apps/studio/client/v2/inspector/sections/colour-popover.jsx +4 -0
  73. package/apps/studio/client/v2/inspector/token-chip.jsx +4 -0
  74. package/apps/studio/client/v2/kinds/SizePicker.jsx +4 -0
  75. package/apps/studio/client/v2/presence/faces.jsx +4 -0
  76. package/apps/studio/client/v2/share/role-menu.jsx +7 -1
  77. package/apps/studio/client/v2/share/share-model.js +20 -1
  78. package/apps/studio/client/v2/share/share-sheet.jsx +6 -4
  79. package/apps/studio/client/v2/shell/account-card.jsx +7 -1
  80. package/apps/studio/client/v2/shell/canvas-pointer.js +21 -0
  81. package/apps/studio/client/v2/shell/mode-switch.jsx +4 -0
  82. package/apps/studio/client/v2/shell/project-pill.jsx +4 -0
  83. package/apps/studio/client/v2/shell/save-status.js +10 -1
  84. package/apps/studio/client/v2/shell/share-cluster-host.jsx +2 -0
  85. package/apps/studio/client/v2/shell/share-cluster.jsx +6 -1
  86. package/apps/studio/client/v2/shell/use-dismiss-outside.js +14 -6
  87. package/apps/studio/client/v2/timeline/joins/transition-picker.jsx +7 -1
  88. package/apps/studio/client/v2/undo/undo-history.jsx +7 -1
  89. package/apps/studio/cloud/endpoints.ts +31 -1
  90. package/apps/studio/dist/client.bundle.js +921 -921
  91. package/apps/studio/dist/comment-mount.js +1 -1
  92. package/apps/studio/dist/styles.css +1 -1
  93. package/apps/studio/editing/canvas-pointer.ts +29 -0
  94. package/apps/studio/routes/cloud-move.ts +7 -4
  95. package/apps/studio/sync/ctl-provider.ts +4 -1
  96. package/apps/studio/sync/file-ledger.ts +12 -0
  97. package/apps/studio/sync/file-membership.ts +28 -0
  98. package/apps/studio/sync/file-plane.ts +119 -5
  99. package/apps/studio/sync/index.ts +55 -1
  100. package/apps/studio/sync/journal-client.ts +12 -0
  101. package/apps/studio/sync/poke.ts +30 -0
  102. package/apps/studio/sync/presentation.ts +6 -1
  103. package/apps/studio/sync/projection.ts +7 -0
  104. package/apps/studio/sync/retry-after.ts +27 -0
  105. package/apps/studio/sync/status.ts +9 -1
  106. package/apps/studio/video-play-overlay.tsx +67 -12
  107. package/apps/studio/whats-new.json +78 -6
  108. package/package.json +8 -8
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -18,6 +18,7 @@ import { layersTreeSig, shellToast } from '../shell/util.js';
18
18
  // S7.21 — the toast after the inspector's "Add a width" (08 ak-web-widths) and the video artboard's length
19
19
  import { settleDuplicateAtWidth } from '../v2/create/duplicate-done.js';
20
20
  import { menuRunner } from '../v2/shell/menu-runner.js';
21
+ import { announceCanvasPointer } from '../v2/shell/canvas-pointer.js';
21
22
  import { panelLayout } from '../v2/shell/use-panel-layout.js';
22
23
 
23
24
  // 01 cf-duplicate-done / 08 ak-web-widths: a copy made is told with the copy glyph, not a success tick
@@ -234,6 +235,11 @@ export function useCanvasBridge({
234
235
  : null;
235
236
  if (!activeWin || e.source !== activeWin) return;
236
237
  }
238
+ // rc3 r4-12 — a press in the active canvas: the shell's open menus close on it (use-dismiss-outside.js)
239
+ if (m.dgn === 'canvas-pointerdown') {
240
+ announceCanvasPointer();
241
+ return;
242
+ }
237
243
  // S9.22b — the overlay's comment door + mention people (comment-bridge.js). Accepted only from the
238
244
  // active canvas's own window and only once the dgn table's parser has cleaned it; the answer goes
239
245
  // back to that window alone. An `add` is pinned to `activePath` inside the handler.
@@ -4,9 +4,6 @@
4
4
  <meta charset="utf-8">
5
5
  <title>maude · studio</title>
6
6
  <link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3E%3Cpath%20d='M7%200H25A7%207%200%200%201%2032%207V32H7A7%207%200%200%201%200%2025V7A7%207%200%200%201%207%200Z'%20fill='%235b62e8'/%3E%3Cpath%20d='M16%205l2.8%208.2L27%2016l-8.2%202.8L16%2027l-2.8-8.2L5%2016l8.2-2.8z'%20fill='%23fff'/%3E%3C/svg%3E">
7
- <link rel="preconnect" href="https://fonts.googleapis.com">
8
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap">
10
7
  <link rel="stylesheet" href="/_client/styles.css">
11
8
  </head>
12
9
  <body>
@@ -602,8 +602,16 @@ export default function ChatPanel({
602
602
  () =>
603
603
  fetch('/_api/acp/status')
604
604
  .then((r) => r.json())
605
- .then((d) => setStatus({ available: d.available, reason: d.reason }))
606
- .catch(() => setStatus({ available: false, reason: 'Could not reach the Claude bridge.' })),
605
+ .then((d) => {
606
+ const next = { available: d.available, reason: d.reason };
607
+ setStatus(next);
608
+ return next; // rc3-f: the Connect sheet reads it — a setup that leaves AI unable to start says so
609
+ })
610
+ .catch(() => {
611
+ const next = { available: false, reason: 'Could not reach the Claude bridge.' };
612
+ setStatus(next);
613
+ return next;
614
+ }),
607
615
  []
608
616
  );
609
617
  useEffect(() => {
@@ -224,6 +224,13 @@ export function createAcpConnection() {
224
224
  if (reduceActivity(activeTools, frame)) emitActivity();
225
225
  }
226
226
 
227
+ // rc3-h (#182) — every turn frame (`update` / `turn-end` / `error`), for the one activity line that says what
228
+ // AI is doing now (v2/ai/activity-line.js). Not turn content: the line reads the stream, it renders none of it.
229
+ const turnFrameListeners = new Set();
230
+ function emitTurnFrame(frame) {
231
+ for (const fn of turnFrameListeners) fn(frame);
232
+ }
233
+
227
234
  // Post-turn-end continuation — the ACP adapter settles the prompt at the main
228
235
  // agent's `result` (claude-agent-acp #773) but KEEPS streaming background work
229
236
  // (subagent results, the consolidation) afterward. Those frames arrive with no
@@ -406,6 +413,7 @@ export function createAcpConnection() {
406
413
  }
407
414
  // Everything else belongs to the active prompt turn.
408
415
  trackActivity(frame);
416
+ emitTurnFrame(frame);
409
417
  if (turnHandler) turnHandler(frame);
410
418
  else if (frame.t === 'update') {
411
419
  // No active turn, but the adapter is still streaming (the post-settle
@@ -473,6 +481,12 @@ export function createAcpConnection() {
473
481
  return () => activityListeners.delete(fn);
474
482
  },
475
483
 
484
+ /** rc3-h — each turn frame as it comes (no replay: a line that joins late starts from the next event). */
485
+ onTurnFrame(fn) {
486
+ turnFrameListeners.add(fn);
487
+ return () => turnFrameListeners.delete(fn);
488
+ },
489
+
476
490
  /** Subscribe to the post-turn-end continuation parts; replays the current tail. */
477
491
  onBackground(fn) {
478
492
  backgroundListeners.add(fn);
@@ -16,6 +16,8 @@
16
16
 
17
17
  @layer reset, tokens, layout, shell, components, utilities;
18
18
 
19
+ /* #175 item 4 — Inter / Inter Tight / JetBrains Mono, self-hosted (no request to Google Fonts). */
20
+ @import url("./fonts.css");
19
21
  @import url("./0-reset.css");
20
22
  /* P8 C0 — THE shell token ladder, GENERATED (scripts/gen-tokens.mjs) from maude-v2: on <html data-theme> (so a
21
23
  popover portalled to <body> resolves it) and on the shell root `.maude[data-theme]`. It replaced the v1 amber
@@ -0,0 +1,63 @@
1
+ /* Self-hosted web fonts for the app chrome (#175 item 4): Inter, Inter Tight and JetBrains Mono, as latin + latin-ext
2
+ * variable woff2 under client/fonts/ (Czech needs latin-ext), served from the app's own origin at /_client/fonts/.
3
+ * The app makes no request to Google Fonts at all — privacy, and it works offline.
4
+ * Each family is licensed SIL OFL 1.1; the licence text sits beside the files (client/fonts/LICENSE-*.txt).
5
+ * `font-display: swap`: the text paints in the fallback face at once and swaps when the file lands, so the first
6
+ * paint waits on nothing. The files are the @fontsource-variable/{inter,inter-tight,jetbrains-mono} 5.3.0 builds of
7
+ * the upstream rsms/inter, rsms/inter-tight and JetBrains/JetBrainsMono fonts, unmodified.
8
+ * Not wrapped in an @layer: @font-face is global. Canvases' own DS fonts are not declared here.
9
+ */
10
+ @font-face {
11
+ font-family: "Inter";
12
+ font-style: normal;
13
+ font-display: swap;
14
+ font-weight: 100 900;
15
+ src: url("/_client/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
16
+ unicode-range:
17
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
18
+ }
19
+ @font-face {
20
+ font-family: "Inter";
21
+ font-style: normal;
22
+ font-display: swap;
23
+ font-weight: 100 900;
24
+ src: url("/_client/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
25
+ unicode-range:
26
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
27
+ }
28
+ @font-face {
29
+ font-family: "Inter Tight";
30
+ font-style: normal;
31
+ font-display: swap;
32
+ font-weight: 100 900;
33
+ src: url("/_client/fonts/inter-tight-latin-ext-wght-normal.woff2") format("woff2-variations");
34
+ unicode-range:
35
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
36
+ }
37
+ @font-face {
38
+ font-family: "Inter Tight";
39
+ font-style: normal;
40
+ font-display: swap;
41
+ font-weight: 100 900;
42
+ src: url("/_client/fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations");
43
+ unicode-range:
44
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
45
+ }
46
+ @font-face {
47
+ font-family: "JetBrains Mono";
48
+ font-style: normal;
49
+ font-display: swap;
50
+ font-weight: 100 800;
51
+ src: url("/_client/fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
52
+ unicode-range:
53
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
54
+ }
55
+ @font-face {
56
+ font-family: "JetBrains Mono";
57
+ font-style: normal;
58
+ font-display: swap;
59
+ font-weight: 100 800;
60
+ src: url("/_client/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
61
+ unicode-range:
62
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
63
+ }
@@ -183,9 +183,13 @@ export function SystemView({ data, onOpen, cfg, onSelectDs }) {
183
183
  if (noSystem) {
184
184
  return (
185
185
  <div className="sv">
186
+ {/* rc3 r4-7 walk — the product's own word for the view (CONTRACT §7 "called 'Design system' in UI copy"); the
187
+ MAUDE-DSN/01 code and "design system view" were the specimen board's labels and read as a leak here.
188
+ The code stays where 06 · ad-ds keeps it: the Advanced view of a system that exists. */}
186
189
  <header className="sv-header">
187
- <span className="sv-sku">MAUDE-DSN/01</span>
188
- <span className="sv-title">design system view</span>
190
+ <h1 className="sv-title" data-testid="sv-no-system-heading">
191
+ Design system
192
+ </h1>
189
193
  </header>
190
194
  <div className="sv-empty sv-no-system" data-testid="sv-no-system">
191
195
  <div>
@@ -10,6 +10,7 @@
10
10
  // arbitrary row, not the menubar's fixed offset.
11
11
 
12
12
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
13
+ import { onCanvasPointer } from './v2/shell/canvas-pointer.js';
13
14
 
14
15
  const EDGE = 8;
15
16
 
@@ -117,9 +118,12 @@ export function TreeRowMenu({ state, onClose, rootItems, destinations, onPickDes
117
118
  };
118
119
  document.addEventListener('pointerdown', onDocPointer, true);
119
120
  document.addEventListener('keydown', onKey, true);
121
+ // rc3 r4-12 — a press in the canvas closes it too (told over the dgn bridge; it never reaches this document)
122
+ const offCanvas = onCanvasPointer(() => onClose());
120
123
  return () => {
121
124
  document.removeEventListener('pointerdown', onDocPointer, true);
122
125
  document.removeEventListener('keydown', onKey, true);
126
+ offCanvas();
123
127
  };
124
128
  }, [state, onClose]);
125
129
 
@@ -40,14 +40,23 @@ import { canOpenInTerminal, openChatInTerminal } from './chat-store-api.js';
40
40
  import { ChatFootInfo } from './Composer.jsx';
41
41
  import { ConnectedRawLog } from './RawLog.jsx';
42
42
 
43
- function Row({ row, label, children, hint }) {
43
+ function Row({ row, label, children, hint, hintRisky, hintTestId }) {
44
44
  return (
45
45
  <div className="ai-adv-row" data-adv-row={row}>
46
46
  <label className="ai-adv-k" htmlFor={rowDomId(row)}>
47
47
  {label}
48
48
  </label>
49
49
  {children}
50
- {hint ? <span className="ai-adv-hint">{hint}</span> : null}
50
+ {hint ? (
51
+ <span
52
+ className="ai-adv-hint"
53
+ id={`${rowDomId(row)}-hint`}
54
+ data-testid={hintTestId}
55
+ data-risky={hintRisky ? '' : undefined}
56
+ >
57
+ {hint}
58
+ </span>
59
+ ) : null}
51
60
  </div>
52
61
  );
53
62
  }
@@ -253,6 +262,7 @@ export function ChatAdvanced({
253
262
  const parsed = caps?.parsedOptions ?? { model: null, effort: null, fast: null, others: [] };
254
263
  const modes = caps?.modes ?? null;
255
264
  const modeList = modeOptions(modes);
265
+ const currentMode = modeList.find((m) => m.id === modes?.currentModeId);
256
266
  // "Change canvases" is the ask-before mode seen as a switch: the "AI changes nothing" modes are off.
257
267
  const changesNothing = modeList.find((m) => m.id === modes?.currentModeId)?.group === 'nochange';
258
268
  const askingMode = modeList.find((m) => m.group === 'asks')?.id ?? modes?.currentModeId;
@@ -406,23 +416,29 @@ export function ChatAdvanced({
406
416
  <OptionSwitch row="fast" label="Fast mode" opt={parsed.fast} onChange={onSetConfig} />
407
417
  ) : null}
408
418
  {modeList.length ? (
409
- <Row row="ask-before" label="Ask before">
419
+ <Row
420
+ row="ask-before"
421
+ label="Permissions"
422
+ hint={currentMode?.hint}
423
+ hintRisky={currentMode?.risky}
424
+ hintTestId="chat-mode-hint"
425
+ >
410
426
  <select
411
427
  id={rowDomId('ask-before')}
412
428
  className="ai-adv-select"
413
429
  data-adv-control
414
430
  data-testid="chat-mode-picker"
431
+ data-risky={currentMode?.risky ? '' : undefined}
415
432
  value={modes?.currentModeId ?? ''}
416
- title={
417
- modeList.find((m) => m.id === modes?.currentModeId)?.description || 'Ask before'
418
- }
433
+ title={currentMode?.hint || currentMode?.description || 'Permissions'}
434
+ aria-describedby={currentMode?.hint ? `${rowDomId('ask-before')}-hint` : undefined}
419
435
  onChange={(e) => onSetMode(e.target.value)}
420
436
  >
421
437
  {['asks', 'nochange', 'free'].map((g) => {
422
438
  const list = modeList.filter((m) => m.group === g);
423
439
  if (!list.length) return null;
424
440
  const options = list.map((m) => (
425
- <option key={m.id} value={m.id}>
441
+ <option key={m.id} value={m.id} title={m.hint || undefined}>
426
442
  {m.label}
427
443
  </option>
428
444
  ));
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { useCallback, useEffect, useId, useRef, useState } from 'react';
10
10
  import { Clip, FileGlyph, FolderGlyph, ImageGlyph } from './AChip.jsx';
11
+ import { onCanvasPointer } from '../shell/canvas-pointer.js';
11
12
 
12
13
  /** Asks the shell to open the Assets tab (app.jsx listens; lead patch). */
13
14
  export const OPEN_ASSETS_EVENT = 'maude:ai-attach-assets';
@@ -85,12 +86,15 @@ export function AttachMenu({ attach, disabled = false }) {
85
86
  };
86
87
  document.addEventListener('pointerdown', onDown);
87
88
  document.addEventListener('keydown', onKey, true);
89
+ // rc3 r4-12 — a press in the canvas closes it too (told over the dgn bridge; it never reaches this document)
90
+ const offCanvas = onCanvasPointer(() => close(false));
88
91
  rootRef.current
89
92
  ?.querySelector('[role="menuitem"]:not([aria-disabled="true"])')
90
93
  ?.focus({ preventScroll: true });
91
94
  return () => {
92
95
  document.removeEventListener('pointerdown', onDown);
93
96
  document.removeEventListener('keydown', onKey, true);
97
+ offCanvas();
94
98
  };
95
99
  }, [open, close]);
96
100
 
@@ -29,6 +29,7 @@ import { useChatUndoReady, useUndoChat } from './ChatUndo.jsx';
29
29
  import { fetchChats, searchChats, trashChat } from './chat-store-api.js';
30
30
  import { Spark } from './icons.jsx';
31
31
  import { RunIcon } from './RunList.jsx';
32
+ import { onCanvasPointer } from '../shell/canvas-pointer.js';
32
33
 
33
34
  const SEARCH_DEBOUNCE_MS = 150;
34
35
 
@@ -69,7 +70,12 @@ function RowMenu({ items, anchorRef, onPick, onClose }) {
69
70
  if (!ref.current?.contains(e.target) && !anchorRef.current?.contains(e.target)) onClose();
70
71
  };
71
72
  document.addEventListener('pointerdown', onDown);
72
- return () => document.removeEventListener('pointerdown', onDown);
73
+ // rc3 r4-12 — a press in the canvas closes it too (told over the dgn bridge; it never reaches this document)
74
+ const offCanvas = onCanvasPointer(() => onClose());
75
+ return () => {
76
+ document.removeEventListener('pointerdown', onDown);
77
+ offCanvas();
78
+ };
73
79
  }, [anchorRef, onClose]);
74
80
  const onKeyDown = (e) => {
75
81
  if (e.key === 'Escape') {
@@ -3,22 +3,77 @@
3
3
  // is connected. Exported for S6 (the first-canvas drafting flow) and for 02 `ob-ai-connect`: it is a controlled
4
4
  // view — the caller owns what Connect does (the panel runs `connectClaude`; onboarding may do the same).
5
5
  //
6
- // <ConnectSheet inline width phase="idle|installing|waiting" error onConnect onCancel>{advanced}</ConnectSheet>
6
+ // <ConnectSheet inline width phase="idle|checking|installing|waiting" startedAt error onConnect onCancel>{advanced}</ConnectSheet>
7
+ //
8
+ // rc3-f (issue #181): while it works the sheet SAYS what runs — a live status line with the step, the elapsed time
9
+ // of the install and how long it usually takes, and what comes next — never just a disabled button. After a
10
+ // failure the button is "Try again" and runs the whole setup again.
7
11
  //
8
12
  // `inline` draws it in flow (inside the panel); otherwise it is a window sheet (the caller puts a Veil under
9
13
  // it). Words are CONTRACT §7: "Connect your Claude account to let AI draft this." → Connect · Cancel.
10
14
 
11
- import { useId, useRef } from 'react';
15
+ import { useEffect, useId, useRef, useState } from 'react';
12
16
  import { portalToBody } from '../portal-scope.jsx';
13
17
  import { useModalFocus } from '../shell/modal-focus.js';
14
18
  import { Spark } from './icons.jsx';
15
19
 
16
20
  const CONNECT_LABEL = {
17
21
  idle: 'Connect',
18
- installing: 'Setting up Claude Code…',
22
+ checking: 'Checking Claude Code…',
23
+ installing: 'Installing Claude Code…',
19
24
  waiting: 'Waiting for your browser…',
20
25
  };
21
26
 
27
+ /** The button after a failure: the same whole setup, again. */
28
+ export const TRY_AGAIN = 'Try again';
29
+
30
+ /** 42_000 → "0:42", 125_000 → "2:05". */
31
+ export function elapsedClock(ms) {
32
+ const s = Math.max(0, Math.floor((Number.isFinite(ms) ? ms : 0) / 1000));
33
+ return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, '0')}`;
34
+ }
35
+
36
+ /**
37
+ * What the setup is doing now, in the sheet's status line: the lead, the rest, the step.
38
+ * @param {string} phase
39
+ * @param {number} elapsedMs the install's time so far (only 'installing' shows it)
40
+ */
41
+ export function setupProgressWords(phase, elapsedMs = 0) {
42
+ if (phase === 'checking')
43
+ return { lead: 'Checking Claude Code on this Mac…', rest: 'This takes a few seconds.' };
44
+ if (phase === 'installing')
45
+ return {
46
+ lead: `Installing Claude Code… ${elapsedClock(elapsedMs)}`,
47
+ rest: 'Usually 1–2 minutes. Then your browser opens to sign in.',
48
+ step: 'Step 1 of 2',
49
+ };
50
+ if (phase === 'waiting')
51
+ return {
52
+ lead: 'Sign in through your browser.',
53
+ rest: "AI is ready as soon as you're signed in.",
54
+ step: 'Step 2 of 2',
55
+ };
56
+ return null;
57
+ }
58
+
59
+ /** The elapsed time of an install, ticking once a second while it runs. Without a start from the caller the
60
+ * sheet's own clock starts when the install phase begins. */
61
+ function useElapsed(phase, startedAt, now) {
62
+ const own = useRef(null);
63
+ const [, tick] = useState(0);
64
+ const installing = phase === 'installing';
65
+ if (!installing) own.current = null;
66
+ else if (own.current === null) own.current = now();
67
+ useEffect(() => {
68
+ if (!installing) return undefined;
69
+ const timer = setInterval(() => tick((n) => n + 1), 1000);
70
+ return () => clearInterval(timer);
71
+ }, [installing]);
72
+ if (!installing) return 0;
73
+ const from = Number.isFinite(startedAt) ? startedAt : own.current;
74
+ return now() - from;
75
+ }
76
+
22
77
  export function ConnectSheet({
23
78
  width = 440,
24
79
  inline = false,
@@ -27,6 +82,9 @@ export function ConnectSheet({
27
82
  onConnect,
28
83
  onCancel,
29
84
  connectRef,
85
+ // rc3-f: when the install began (ms, the server's clock) — a sheet that joins a running install shows its real time
86
+ startedAt = null,
87
+ now = Date.now,
30
88
  // S6.9 (02 ob-adv-sheets): Home's "Connect AI" reads "Connect AI" and carries no "your prompt waits"
31
89
  // line (there is no prompt yet). The defaults are CONTRACT §7's words, unchanged for every other caller.
32
90
  title = 'Connect your Claude account?',
@@ -38,6 +96,7 @@ export function ConnectSheet({
38
96
  }) {
39
97
  const titleId = useId();
40
98
  const busy = phase !== 'idle';
99
+ const progress = setupProgressWords(phase, useElapsed(phase, startedAt, now));
41
100
  return (
42
101
  // biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-modal is set only while role is "dialog" (inline, the sheet is a group and carries none)
43
102
  <div
@@ -66,6 +125,18 @@ export function ConnectSheet({
66
125
  </span>
67
126
  ) : null}
68
127
  {children}
128
+ {progress ? (
129
+ <p
130
+ className="ai-conn-prog"
131
+ role="status"
132
+ aria-live="polite"
133
+ data-testid="ai-connect-progress"
134
+ data-phase={phase}
135
+ >
136
+ {progress.step ? <span className="ai-conn-step">{progress.step}</span> : null}
137
+ <strong>{progress.lead}</strong> {progress.rest}
138
+ </p>
139
+ ) : null}
69
140
  {error ? (
70
141
  <p className="ai-conn-err" role="alert" data-testid="ai-connect-error">
71
142
  {error}
@@ -90,7 +161,7 @@ export function ConnectSheet({
90
161
  data-testid="ai-connect-go"
91
162
  onClick={onConnect}
92
163
  >
93
- {CONNECT_LABEL[phase] ?? CONNECT_LABEL.idle}
164
+ {!busy && error ? TRY_AGAIN : (CONNECT_LABEL[phase] ?? CONNECT_LABEL.idle)}
94
165
  </button>
95
166
  </div>
96
167
  </div>