@1agh/maude 1.2.0 → 1.3.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.
- package/README.md +3 -1
- package/apps/studio/acp/index.ts +43 -7
- package/apps/studio/annotations-layer.tsx +191 -116
- package/apps/studio/annotations-model.ts +39 -0
- package/apps/studio/annotations-sync.ts +50 -0
- package/apps/studio/api.ts +689 -36
- package/apps/studio/bin/annotate.mjs +3 -1
- package/apps/studio/bin/server-up.sh +17 -2
- package/apps/studio/canvas-edit.ts +391 -7
- package/apps/studio/canvas-lib.tsx +82 -18
- package/apps/studio/canvas-notice-message.ts +16 -0
- package/apps/studio/canvas-notifications.tsx +19 -0
- package/apps/studio/canvas-shell.tsx +57 -6
- package/apps/studio/client/app.jsx +686 -241
- package/apps/studio/client/apply-edit-request.ts +55 -0
- package/apps/studio/client/export-center.jsx +111 -61
- package/apps/studio/client/github.js +38 -1
- package/apps/studio/client/index-loader.ts +76 -0
- package/apps/studio/client/panels/CloudBar.jsx +52 -6
- package/apps/studio/client/panels/GitPanel.jsx +103 -0
- package/apps/studio/client/panels/OnboardingWizard.jsx +36 -7
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +92 -27
- package/apps/studio/client/panels/SourceConflictPanel.jsx +166 -0
- package/apps/studio/client/panels/SyncPanel.jsx +113 -0
- package/apps/studio/client/panels/TeamProjects.jsx +376 -0
- package/apps/studio/client/panels/file-deep-link-dialog.jsx +54 -0
- package/apps/studio/client/photo-knobs.jsx +3 -0
- package/apps/studio/client/share-dialog.jsx +91 -0
- package/apps/studio/client/share-link.js +94 -0
- package/apps/studio/client/styles/3-shell-maude.css +35 -18
- package/apps/studio/client/styles/4-components.css +18 -1
- package/apps/studio/client/tree-row-menu.jsx +48 -3
- package/apps/studio/client/whats-new.jsx +26 -32
- package/apps/studio/cloud/endpoints.ts +132 -0
- package/apps/studio/collab/index.ts +4 -0
- package/apps/studio/collab/persistence.ts +5 -1
- package/apps/studio/collab/registry.ts +9 -3
- package/apps/studio/collab/room.ts +13 -2
- package/apps/studio/context.ts +59 -0
- package/apps/studio/dist/client.bundle.js +1586 -1554
- package/apps/studio/dist/runtime/.min-sizes.json +1 -0
- package/apps/studio/dist/runtime/sonner.js +1 -0
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/http.ts +289 -18
- package/apps/studio/inspect.ts +19 -0
- package/apps/studio/managed-projects.ts +150 -0
- package/apps/studio/notifications.tsx +292 -0
- package/apps/studio/runtime-bundle.ts +2 -0
- package/apps/studio/server.ts +59 -3
- package/apps/studio/sync/accepted-cold-start.ts +225 -0
- package/apps/studio/sync/accepted-link.ts +320 -0
- package/apps/studio/sync/action-stage.ts +343 -0
- package/apps/studio/sync/agent.ts +12 -60
- package/apps/studio/sync/cell-file-events.ts +3 -0
- package/apps/studio/sync/codec.ts +73 -6
- package/apps/studio/sync/ctl-provider.ts +15 -2
- package/apps/studio/sync/document-discovery.ts +81 -0
- package/apps/studio/sync/file-membership.ts +10 -2
- package/apps/studio/sync/file-plane.ts +309 -26
- package/apps/studio/sync/index.ts +1078 -19
- package/apps/studio/sync/migrate-seed.ts +110 -19
- package/apps/studio/sync/poke.ts +4 -2
- package/apps/studio/sync/presentation.ts +285 -2
- package/apps/studio/sync/projection.ts +820 -23
- package/apps/studio/sync/repeated-module.ts +73 -0
- package/apps/studio/sync/revision-barrier.ts +129 -0
- package/apps/studio/sync/seed-repair.ts +46 -0
- package/apps/studio/sync/source-merge.ts +100 -0
- package/apps/studio/sync/source-ops.ts +289 -0
- package/apps/studio/sync/source-recovery.ts +70 -0
- package/apps/studio/sync/source-validation.ts +56 -0
- package/apps/studio/sync/status.ts +79 -1
- package/apps/studio/sync/transaction-client.ts +460 -0
- package/apps/studio/sync/writer-registry.ts +236 -0
- package/apps/studio/text-caret.ts +35 -0
- package/apps/studio/undo-hud.tsx +9 -87
- package/apps/studio/use-canvas-media-drop.tsx +4 -39
- package/apps/studio/whats-new.json +101 -0
- package/cli/lib/harness/codex-runtime.mjs +4 -1
- package/package.json +9 -8
- package/plugins/design/dependencies.json +3 -3
- package/plugins/design/templates/_shell.html +47 -0
- package/plugins/flow/dependencies.json +3 -3
|
@@ -2448,16 +2448,67 @@ function CanvasRouter({
|
|
|
2448
2448
|
// sink so an `edit-source` command's do()/undo() reaches the main-origin-only
|
|
2449
2449
|
// `/_api/edit-*` write — which the untrusted canvas iframe can't call (DDR-054).
|
|
2450
2450
|
// It posts `dgn:'apply-edit'` to the parent shell, which performs the write.
|
|
2451
|
+
//
|
|
2452
|
+
// The shell answers with `dgn:'apply-edit-result'`. do()/undo() await it, so
|
|
2453
|
+
// a refusal (a teammate changed the value since — audit 2026-09-13 P1 #5 —
|
|
2454
|
+
// or any failed write) rejects, the stack keeps the entry instead of moving
|
|
2455
|
+
// its cursor, and the user is told why.
|
|
2451
2456
|
useEffect(() => {
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
+
const pending = new Map<
|
|
2458
|
+
string,
|
|
2459
|
+
{ resolve: () => void; reject: (err: Error) => void; timer: ReturnType<typeof setTimeout> }
|
|
2460
|
+
>();
|
|
2461
|
+
const onResult = (event: MessageEvent) => {
|
|
2462
|
+
if (event.source !== window.parent) return;
|
|
2463
|
+
const data = event.data as
|
|
2464
|
+
| { dgn?: unknown; requestId?: unknown; ok?: unknown; error?: unknown; conflict?: unknown }
|
|
2465
|
+
| undefined;
|
|
2466
|
+
if (data?.dgn !== 'apply-edit-result' || typeof data.requestId !== 'string') return;
|
|
2467
|
+
const entry = pending.get(data.requestId);
|
|
2468
|
+
if (!entry) return;
|
|
2469
|
+
pending.delete(data.requestId);
|
|
2470
|
+
clearTimeout(entry.timer);
|
|
2471
|
+
if (data.ok === true) {
|
|
2472
|
+
entry.resolve();
|
|
2473
|
+
return;
|
|
2457
2474
|
}
|
|
2475
|
+
const reason = typeof data.error === 'string' && data.error ? data.error : 'the edit failed';
|
|
2476
|
+
// A conflict's reason already reads as a sentence ("color was changed by
|
|
2477
|
+
// someone else — kept their value"); it applies to undo and redo alike.
|
|
2478
|
+
showCanvasToast(data.conflict === true ? reason : `Couldn't apply — ${reason}`, 'warning');
|
|
2479
|
+
entry.reject(new Error(reason));
|
|
2458
2480
|
};
|
|
2481
|
+
window.addEventListener('message', onResult);
|
|
2482
|
+
let sequence = 0;
|
|
2483
|
+
const applyFn: EditSourceApplyFn = (apply) =>
|
|
2484
|
+
new Promise<void>((resolve, reject) => {
|
|
2485
|
+
sequence += 1;
|
|
2486
|
+
const requestId = `${Date.now().toString(36)}-${sequence}-${Math.random().toString(36).slice(2, 8)}`;
|
|
2487
|
+
// Generous: the shell serializes these writes behind any in-flight one.
|
|
2488
|
+
const timer = setTimeout(() => {
|
|
2489
|
+
pending.delete(requestId);
|
|
2490
|
+
reject(new Error('the edit was not confirmed'));
|
|
2491
|
+
}, 30_000);
|
|
2492
|
+
pending.set(requestId, { resolve, reject, timer });
|
|
2493
|
+
try {
|
|
2494
|
+
window.parent.postMessage({ dgn: 'apply-edit', requestId, ...apply }, '*');
|
|
2495
|
+
} catch {
|
|
2496
|
+
/* detached / cross-origin teardown — nothing to apply */
|
|
2497
|
+
pending.delete(requestId);
|
|
2498
|
+
clearTimeout(timer);
|
|
2499
|
+
reject(new Error('the canvas is detached'));
|
|
2500
|
+
}
|
|
2501
|
+
});
|
|
2459
2502
|
undoSinks.setSink('editSourceApplyFn', applyFn);
|
|
2460
|
-
return () =>
|
|
2503
|
+
return () => {
|
|
2504
|
+
window.removeEventListener('message', onResult);
|
|
2505
|
+
for (const entry of pending.values()) {
|
|
2506
|
+
clearTimeout(entry.timer);
|
|
2507
|
+
entry.reject(new Error('the canvas closed'));
|
|
2508
|
+
}
|
|
2509
|
+
pending.clear();
|
|
2510
|
+
undoSinks.setSink('editSourceApplyFn', undefined);
|
|
2511
|
+
};
|
|
2461
2512
|
}, [undoSinks]);
|
|
2462
2513
|
|
|
2463
2514
|
// Phase 12.1 — reorder undo. Same origin-split shape as editSourceApplyFn:
|