@1agh/maude 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/studio/annotations-layer.tsx +8 -0
- package/apps/studio/bin/_capture-init.js +5 -0
- package/apps/studio/bin/screenshot.sh +7 -1
- package/apps/studio/bridge/dgn-protocol.ts +3 -2
- package/apps/studio/canvas-shell.tsx +54 -0
- package/apps/studio/client/panels/SyncConsentDialog.jsx +4 -1
- package/apps/studio/client/v2/empty/empty-host.jsx +11 -2
- package/apps/studio/client/v2/empty/use-empty-canvas.js +22 -7
- package/apps/studio/client/v2/preview/preview-chrome-host.jsx +1 -0
- package/apps/studio/client/v2/undo/zoom-undo.jsx +19 -2
- package/apps/studio/comments/reveal.ts +13 -0
- package/apps/studio/comments-overlay.tsx +36 -0
- package/apps/studio/dist/client.bundle.js +154 -154
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/editing/annotation-count.ts +25 -0
- package/apps/studio/editing/empty-report.ts +8 -3
- package/apps/studio/editing/empty-reporter.tsx +10 -1
- package/apps/studio/sync/index.ts +9 -1
- package/apps/studio/whats-new.json +9 -0
- package/package.json +8 -8
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// apps/studio/editing/annotation-count.ts — #227: how many annotations the canvas's board holds.
|
|
2
|
+
//
|
|
3
|
+
// The annotation layer is the only code that knows the board (hidden with ⇧P, folded into the far-zoom
|
|
4
|
+
// mosaic or panned out of view, an annotation is still on the canvas — so the DOM is not the answer). It
|
|
5
|
+
// writes the number here; the empty-state reporter (empty-report.ts) reads it and sends it with the
|
|
6
|
+
// artboard count, so "Your canvas is ready." never sits over a canvas somebody has already drawn on.
|
|
7
|
+
|
|
8
|
+
let count = 0;
|
|
9
|
+
const subs = new Set<() => void>();
|
|
10
|
+
|
|
11
|
+
export function setAnnotationCount(n: number): void {
|
|
12
|
+
const next = Number.isFinite(n) ? Math.max(0, Math.round(n)) : 0;
|
|
13
|
+
if (next === count) return;
|
|
14
|
+
count = next;
|
|
15
|
+
for (const fn of subs) fn();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const annotationCount = (): number => count;
|
|
19
|
+
|
|
20
|
+
export function onAnnotationCount(fn: () => void): () => void {
|
|
21
|
+
subs.add(fn);
|
|
22
|
+
return () => {
|
|
23
|
+
subs.delete(fn);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -23,7 +23,7 @@ export interface EmptyRect {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export type EmptyPost =
|
|
26
|
-
| { dgn: 'artboards'; count: number }
|
|
26
|
+
| { dgn: 'artboards'; count: number; annotations?: number }
|
|
27
27
|
| {
|
|
28
28
|
dgn: 'artboard-empty';
|
|
29
29
|
artboardId: string | null;
|
|
@@ -112,6 +112,8 @@ export interface EmptyReporterDeps {
|
|
|
112
112
|
doc: Document;
|
|
113
113
|
/** The artboard id when exactly one WHOLE artboard is selected, else null. */
|
|
114
114
|
selectedArtboard: () => string | null;
|
|
115
|
+
/** #227 — how many annotations the board holds (annotation-count.ts). Absent = not told, nothing sent. */
|
|
116
|
+
annotations?: () => number;
|
|
115
117
|
post: (m: EmptyPost) => void;
|
|
116
118
|
raf?: (fn: () => void) => number;
|
|
117
119
|
caf?: (id: number) => void;
|
|
@@ -136,14 +138,17 @@ export function createEmptyReporter(deps: EmptyReporterDeps): EmptyReporter {
|
|
|
136
138
|
typeof cancelAnimationFrame === 'function' ? frameCaf(id) : clearTimeout(id));
|
|
137
139
|
let pending: number | null = null;
|
|
138
140
|
let lastCount = -1;
|
|
141
|
+
let lastAnnotations = -1;
|
|
139
142
|
let lastKey: string | null = null;
|
|
140
143
|
let lastId: string | null = null;
|
|
141
144
|
|
|
142
145
|
function pass(): void {
|
|
143
146
|
const count = deps.doc.querySelectorAll('[data-dc-screen]').length;
|
|
144
|
-
|
|
147
|
+
const annotations = deps.annotations ? deps.annotations() : undefined;
|
|
148
|
+
if (count !== lastCount || (annotations !== undefined && annotations !== lastAnnotations)) {
|
|
145
149
|
lastCount = count;
|
|
146
|
-
|
|
150
|
+
if (annotations !== undefined) lastAnnotations = annotations;
|
|
151
|
+
deps.post({ dgn: 'artboards', count, ...(annotations !== undefined ? { annotations } : {}) });
|
|
147
152
|
}
|
|
148
153
|
const id = deps.selectedArtboard();
|
|
149
154
|
const m = id ? measureEmptyArtboard(deps.doc, id) : null;
|
|
@@ -7,6 +7,7 @@ import { useEffect, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { postToShell } from '../bridge/dgn-protocol.ts';
|
|
9
9
|
import { useSelectionSet } from '../use-selection-set.tsx';
|
|
10
|
+
import { annotationCount, onAnnotationCount } from './annotation-count.ts';
|
|
10
11
|
import { createEmptyReporter, EMPTY_CHROME_SEL } from './empty-report.ts';
|
|
11
12
|
|
|
12
13
|
/** A whole-artboard selection (no element id) → that artboard's id; anything else → null. */
|
|
@@ -29,8 +30,13 @@ export function EmptyArtboardReporter(): null {
|
|
|
29
30
|
const reporter = createEmptyReporter({
|
|
30
31
|
doc: document,
|
|
31
32
|
selectedArtboard: () => selectedRef.current,
|
|
33
|
+
annotations: annotationCount,
|
|
32
34
|
post: (m) => {
|
|
33
|
-
if (m.dgn === 'artboards')
|
|
35
|
+
if (m.dgn === 'artboards')
|
|
36
|
+
postToShell(window, 'artboards', {
|
|
37
|
+
count: m.count,
|
|
38
|
+
...(m.annotations !== undefined ? { annotations: m.annotations } : {}),
|
|
39
|
+
});
|
|
34
40
|
else
|
|
35
41
|
postToShell(window, 'artboard-empty', {
|
|
36
42
|
artboardId: m.artboardId,
|
|
@@ -42,6 +48,8 @@ export function EmptyArtboardReporter(): null {
|
|
|
42
48
|
});
|
|
43
49
|
requestRef.current = reporter.request;
|
|
44
50
|
reporter.request();
|
|
51
|
+
// #227 — the first sticky on an empty canvas (or the last one gone) is a new answer
|
|
52
|
+
const offAnnotations = onAnnotationCount(reporter.request);
|
|
45
53
|
let obs: MutationObserver | null = null;
|
|
46
54
|
if (typeof MutationObserver !== 'undefined') {
|
|
47
55
|
obs = new MutationObserver((records) => {
|
|
@@ -59,6 +67,7 @@ export function EmptyArtboardReporter(): null {
|
|
|
59
67
|
}
|
|
60
68
|
return () => {
|
|
61
69
|
obs?.disconnect();
|
|
70
|
+
offAnnotations();
|
|
62
71
|
reporter.cancel();
|
|
63
72
|
requestRef.current = null;
|
|
64
73
|
};
|
|
@@ -2916,6 +2916,14 @@ export function createSyncRuntime(
|
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
|
|
2919
|
+
/**
|
|
2920
|
+
* #230 — how long "Create folder" waits for the project's answer before the folder is made here and the
|
|
2921
|
+
* proposal keeps going on its own. A new folder only adds, so nothing is lost by not waiting: with the
|
|
2922
|
+
* project slow or asking this machine to slow down, the old 8 s wait was 8 s of "Creating…" per folder.
|
|
2923
|
+
* A healthy project answers well inside this, so a refusal (a taken name on a peer) is still said in
|
|
2924
|
+
* the dialog. Deleting and moving keep the long wait — those change what other people have.
|
|
2925
|
+
*/
|
|
2926
|
+
const FOLDER_CREATE_WAIT_MS = 1_200;
|
|
2919
2927
|
function proposeFolder(
|
|
2920
2928
|
op:
|
|
2921
2929
|
| { op: 'dir.create'; path: string }
|
|
@@ -2938,7 +2946,7 @@ export function createSyncRuntime(
|
|
|
2938
2946
|
}
|
|
2939
2947
|
const answer =
|
|
2940
2948
|
op.op === 'dir.create'
|
|
2941
|
-
? acceptedLink.dirCreate(op.path)
|
|
2949
|
+
? acceptedLink.dirCreate(op.path, FOLDER_CREATE_WAIT_MS)
|
|
2942
2950
|
: op.op === 'dir.delete'
|
|
2943
2951
|
? acceptedLink.dirDelete(op.path)
|
|
2944
2952
|
: acceptedLink.dirMove(op.from, op.to);
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./whats-new.schema.json",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"id": "reports-227-230-fixes",
|
|
6
|
+
"version": "2.3.2",
|
|
7
|
+
"date": "2026-11-24",
|
|
8
|
+
"kind": "fix",
|
|
9
|
+
"title": "Comments, folders and bug reports fixed",
|
|
10
|
+
"summary": "Clicking a comment in the Comments panel now moves the canvas to it. Creating a folder no longer waits on a slow workspace. Report a bug is a button at the bottom left, and its window screenshot is no longer covered by the sync question. A canvas that holds only annotations no longer shows “Your canvas is ready.”",
|
|
11
|
+
"surface": "design-ui"
|
|
12
|
+
},
|
|
4
13
|
{
|
|
5
14
|
"id": "codex-and-other-agents-in-chat",
|
|
6
15
|
"version": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agh/maude",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"test:e2e:desktop:parity:cloud": "pnpm --filter @maude/desktop-e2e e2e:parity:cloud"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"@1agh/maude-darwin-arm64": "2.3.
|
|
77
|
-
"@1agh/maude-darwin-x64": "2.3.
|
|
78
|
-
"@1agh/maude-linux-arm64": "2.3.
|
|
79
|
-
"@1agh/maude-linux-arm64-musl": "2.3.
|
|
80
|
-
"@1agh/maude-linux-x64": "2.3.
|
|
81
|
-
"@1agh/maude-linux-x64-musl": "2.3.
|
|
82
|
-
"@1agh/maude-win32-x64": "2.3.
|
|
76
|
+
"@1agh/maude-darwin-arm64": "2.3.2",
|
|
77
|
+
"@1agh/maude-darwin-x64": "2.3.2",
|
|
78
|
+
"@1agh/maude-linux-arm64": "2.3.2",
|
|
79
|
+
"@1agh/maude-linux-arm64-musl": "2.3.2",
|
|
80
|
+
"@1agh/maude-linux-x64": "2.3.2",
|
|
81
|
+
"@1agh/maude-linux-x64-musl": "2.3.2",
|
|
82
|
+
"@1agh/maude-win32-x64": "2.3.2"
|
|
83
83
|
},
|
|
84
84
|
"files": [
|
|
85
85
|
"cli",
|