@agent-native/core 0.114.1 → 0.114.3

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 (139) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +30 -0
  3. package/corpus/core/package.json +2 -1
  4. package/corpus/core/src/cli/create.ts +23 -0
  5. package/corpus/core/src/cli/skills.ts +24 -0
  6. package/corpus/core/src/db/request-telemetry.ts +32 -8
  7. package/corpus/core/src/settings/store.ts +15 -6
  8. package/corpus/core/src/shared/optional-node-builtins.ts +66 -0
  9. package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  10. package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  11. package/corpus/core/src/templates/default/AGENTS.md +4 -1
  12. package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  13. package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  14. package/corpus/core/src/templates/headless/AGENTS.md +5 -1
  15. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
  16. package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  17. package/corpus/core/src/templates/workspace-core/AGENTS.md +3 -1
  18. package/corpus/core/src/templates/workspace-root/AGENTS.md +3 -1
  19. package/corpus/core/src/vite/client.ts +5 -0
  20. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  21. package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
  22. package/corpus/templates/analytics/AGENTS.md +5 -0
  23. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  24. package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
  25. package/corpus/templates/assets/AGENTS.md +5 -0
  26. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -2
  27. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  28. package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
  29. package/corpus/templates/brain/AGENTS.md +5 -0
  30. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  31. package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
  32. package/corpus/templates/calendar/AGENTS.md +5 -0
  33. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  34. package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  35. package/corpus/templates/chat/AGENTS.md +4 -1
  36. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  37. package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
  38. package/corpus/templates/clips/AGENTS.md +5 -0
  39. package/corpus/templates/clips/shared/feature-flags.ts +1 -1
  40. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  41. package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
  42. package/corpus/templates/content/AGENTS.md +5 -0
  43. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  44. package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
  45. package/corpus/templates/design/AGENTS.md +5 -0
  46. package/corpus/templates/design/actions/update-file.ts +10 -1
  47. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +30 -1
  48. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +14 -1
  49. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +547 -50
  50. package/corpus/templates/design/app/components/design/dnd-debug.ts +27 -0
  51. package/corpus/templates/design/app/components/design/multi-screen/draft-primitives.ts +19 -2
  52. package/corpus/templates/design/app/i18n-data.ts +19 -0
  53. package/corpus/templates/design/app/lib/design-save-outbox.ts +46 -2
  54. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +4 -9
  55. package/corpus/templates/design/app/pages/design-editor/history.ts +14 -1
  56. package/corpus/templates/design/changelog/2026-07-17-drawn-shapes-stay-free-positioned-when-dragged.md +6 -0
  57. package/corpus/templates/design/changelog/2026-07-17-shapes-show-a-live-outline-while-you-draw.md +6 -0
  58. package/corpus/templates/design/shared/drag-reflow.ts +375 -0
  59. package/corpus/templates/design/shared/full-app.ts +1 -1
  60. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  61. package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
  62. package/corpus/templates/dispatch/AGENTS.md +5 -0
  63. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  64. package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
  65. package/corpus/templates/forms/AGENTS.md +5 -0
  66. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  67. package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
  68. package/corpus/templates/macros/AGENTS.md +5 -0
  69. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  70. package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
  71. package/corpus/templates/mail/AGENTS.md +5 -0
  72. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  73. package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
  74. package/corpus/templates/plan/AGENTS.md +5 -0
  75. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  76. package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
  77. package/corpus/templates/slides/AGENTS.md +5 -0
  78. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  79. package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
  80. package/corpus/templates/tasks/AGENTS.md +5 -0
  81. package/dist/cli/create.d.ts.map +1 -1
  82. package/dist/cli/create.js +21 -0
  83. package/dist/cli/create.js.map +1 -1
  84. package/dist/cli/skills.d.ts.map +1 -1
  85. package/dist/cli/skills.js +19 -0
  86. package/dist/cli/skills.js.map +1 -1
  87. package/dist/collab/routes.d.ts +1 -1
  88. package/dist/db/request-telemetry.d.ts.map +1 -1
  89. package/dist/db/request-telemetry.js +24 -6
  90. package/dist/db/request-telemetry.js.map +1 -1
  91. package/dist/notifications/routes.d.ts +1 -1
  92. package/dist/observability/routes.d.ts +5 -5
  93. package/dist/secrets/routes.d.ts +9 -9
  94. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  95. package/dist/server/transcribe-voice.d.ts +1 -1
  96. package/dist/settings/store.d.ts +1 -1
  97. package/dist/settings/store.d.ts.map +1 -1
  98. package/dist/settings/store.js +14 -6
  99. package/dist/settings/store.js.map +1 -1
  100. package/dist/shared/optional-node-builtins.d.ts +23 -0
  101. package/dist/shared/optional-node-builtins.d.ts.map +1 -0
  102. package/dist/shared/optional-node-builtins.js +35 -0
  103. package/dist/shared/optional-node-builtins.js.map +1 -0
  104. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  105. package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  106. package/dist/templates/chat/AGENTS.md +4 -1
  107. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  108. package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  109. package/dist/templates/default/AGENTS.md +4 -1
  110. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  111. package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  112. package/dist/templates/headless/AGENTS.md +5 -1
  113. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
  114. package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  115. package/dist/templates/workspace-core/AGENTS.md +3 -1
  116. package/dist/templates/workspace-root/AGENTS.md +3 -1
  117. package/dist/vite/client.d.ts.map +1 -1
  118. package/dist/vite/client.js +2 -0
  119. package/dist/vite/client.js.map +1 -1
  120. package/package.json +2 -1
  121. package/src/cli/create.ts +23 -0
  122. package/src/cli/skills.ts +24 -0
  123. package/src/db/request-telemetry.ts +32 -8
  124. package/src/settings/store.ts +15 -6
  125. package/src/shared/optional-node-builtins.ts +66 -0
  126. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  127. package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
  128. package/src/templates/chat/AGENTS.md +4 -1
  129. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  130. package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
  131. package/src/templates/default/AGENTS.md +4 -1
  132. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  133. package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
  134. package/src/templates/headless/AGENTS.md +5 -1
  135. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
  136. package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
  137. package/src/templates/workspace-core/AGENTS.md +3 -1
  138. package/src/templates/workspace-root/AGENTS.md +3 -1
  139. package/src/vite/client.ts +5 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: agent-native-toolkit
3
+ description: >-
4
+ Inventory and ownership rules for shared Agent Native workspace UI. Use
5
+ before building app chrome, settings, navigation, sharing, collaboration,
6
+ setup, history, comments, chat rails, agent UX, or repeated workspace behavior.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Agent-Native Toolkit
13
+
14
+ Use this skill when deciding whether app chrome, settings, collaboration,
15
+ sharing, navigation, organization, setup, history, comments, or agent UX should
16
+ be built app-locally or moved into reusable framework/toolkit pieces.
17
+
18
+ ## Core Rule
19
+
20
+ Apps own domain models, domain actions, and product-specific workflows. The
21
+ framework and `@agent-native/toolkit` own repeated workspace behavior users
22
+ expect to work the same everywhere.
23
+
24
+ Move behavior into shared toolkit primitives when it is:
25
+
26
+ - workspace-wide, such as settings, nav, search, org membership, or setup
27
+ - agent-visible, such as context, actions, run progress, or proof-of-done
28
+ - governed, such as secrets, permissions, sharing, audit, or billing
29
+ - repeated by two or more apps
30
+ - not tied to one domain model
31
+
32
+ Keep behavior app-local when the abstraction would hide important domain
33
+ language or make a simple app-specific workflow harder to understand.
34
+
35
+ ## Discover Before Building
36
+
37
+ Before creating an app-local version of repeated workspace or agent UI:
38
+
39
+ 1. Check the reusable kits below and the installed package documentation.
40
+ 2. Search installed public components and source with `docs-search` and
41
+ `source-search`.
42
+ 3. Run `agent-native eject --list` to see the version-matched units published
43
+ by the packages installed in this app.
44
+ 4. Read `customizing-agent-native` and configure, compose, or eject the
45
+ smallest unit instead of recreating shared behavior from memory.
46
+
47
+ Use public package exports at runtime. Published source and ejection manifests
48
+ are discovery and ownership-transfer mechanisms, not private runtime APIs.
49
+
50
+ ## Settings Direction
51
+
52
+ Durable settings belong in the Settings app or a registered settings route. The
53
+ agent sidebar should not become a second settings app. It can show contextual
54
+ quick controls and deep links such as:
55
+
56
+ - `/settings/ai`
57
+ - `/settings/connections`
58
+ - `/settings/secrets`
59
+ - `/settings/usage`
60
+ - `/settings/apps/:appId`
61
+
62
+ When adding a new API key, OAuth grant, provider connection, model selector, app
63
+ preference, notification preference, or usage/billing surface, register it as a
64
+ settings tab or app settings panel first. Only add sidebar UI when it is needed
65
+ in the moment of agent use.
66
+
67
+ ## Reusable Kits
68
+
69
+ - **Settings kit**: a searchable settings page with account, workspace, AI
70
+ models, LLM keys, connections, secrets, usage, notifications, changelog, and
71
+ app-specific panels. Search is on by default; register a `SettingsSearchEntry`
72
+ per control so users find settings by name across tabs.
73
+ - **Collaboration kit**: Yjs docs, presence, agent presence, live cursors,
74
+ remote selections, recent edit highlights, real-time sync indicators, and
75
+ undo/redo grouping.
76
+ - **Sharing kit**: private/workspace/org/public-link access, invites, roles,
77
+ expirations, agent-readable links, and resource registration.
78
+ - **Navigation and command kit**: app shell, side nav, breadcrumbs, app switcher,
79
+ command palette entries, recent resources, pinned resources, and global search.
80
+ - **Organization kit**: folders, tags, favorites, archive, trash, ownership,
81
+ membership, and common resource metadata.
82
+ - **Setup and connections kit**: declarative setup requirements, model readiness,
83
+ missing-secret states, OAuth grants, and provider connection health.
84
+ - **Agent UX kit**: sidebar, composer, staged context, mentions, voice, human
85
+ approval, generative UI, progress, and screen-state exposure.
86
+ - **Chat history kit**: presentational chat lists and recent-chat rails belong
87
+ in Toolkit; Core keeps thread persistence, agent execution, transport, and
88
+ page-to-sidebar handoff. Apps inject routing, labels, and domain actions.
89
+ - **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
90
+ `@agent-native/core/client`) with Context, Files, Connections, Jobs, and
91
+ Access tabs plus a Personal/Organization scope toggle. The canonical home
92
+ for context transparency, MCP servers, A2A remote agents, recurring
93
+ jobs/automations, and external-client connect flows. See the `agent-page`
94
+ skill.
95
+ - **History and recovery kit**: audit log, activity feed, version history,
96
+ checkpoints, undo, redo, restore, and proof-of-done.
97
+ - **Comments and review kit**: anchored comments, pins, mentions, review
98
+ requests, resolved threads, agent follow-up tasks, and notifications.
99
+ - **Workflow and observability kit**: notifications, approvals, scheduled work,
100
+ background runs, recurring jobs, traces, evals, feedback, and run timelines.
101
+
102
+ ## Implementation Checklist
103
+
104
+ When adding or refactoring one of these areas:
105
+
106
+ 1. Search existing framework and template code for duplicated UI or actions.
107
+ 2. Decide the shared contract: data shape, action API, React component/hook, and
108
+ app adapter points.
109
+ 3. Keep shared data provider-agnostic and scoped by auth/sharing rules.
110
+ 4. Expose the same capability to the UI and agent through actions or documented
111
+ client helpers.
112
+ 5. Register app-specific labels, routes, resource adapters, and settings panels
113
+ instead of hardcoding app names in core UI.
114
+ 6. Update docs and relevant skills so future apps discover the shared path.
115
+ 7. Keep the component easy to adopt piecemeal: expose props/slots first and
116
+ ship readable source plus a complete ejection unit so apps can take ownership
117
+ of the smallest feature when needed. See `customizing-agent-native` for the
118
+ configure → compose → eject → propose seam ladder.
119
+
120
+ ## Related Skills
121
+
122
+ Read these alongside this skill when the work touches the specific area:
123
+
124
+ - `sharing`
125
+ - `real-time-collab`
126
+ - `real-time-sync`
127
+ - `client-side-routing`
128
+ - `context-awareness`
129
+ - `onboarding`
130
+ - `secrets`
131
+ - `audit-log`
132
+ - `observability`
133
+ - `frontend-design`
@@ -37,7 +37,7 @@ Keep definitions in a shared TypeScript module so server and client code use the
37
37
  same stable key. Flags are boolean and default-off.
38
38
 
39
39
  ```ts
40
- import { defineFeatureFlag } from "@agent-native/core/feature-flags";
40
+ import { defineFeatureFlag } from "@agent-native/core/feature-flags/registry";
41
41
 
42
42
  export const FULL_APP_BUILDING = defineFeatureFlag({
43
43
  key: "full-app-building",
@@ -7,6 +7,11 @@ through actions against the shared SQL state.
7
7
  Keep this file essential. Detailed generation, design-system, export, and UI
8
8
  patterns live in `.agents/skills/`.
9
9
 
10
+ Before building common workspace or agent UI, read `agent-native-toolkit` to
11
+ inventory existing public kits and installed package seams. Use
12
+ `customizing-agent-native` for the configure → compose → eject → propose seam
13
+ ladder.
14
+
10
15
  ## Core Rules
11
16
 
12
17
  - Store large file/blob payloads in configured file/blob storage, not SQL: no
@@ -169,7 +169,16 @@ export default defineAction({
169
169
  .limit(1);
170
170
 
171
171
  if (!file) {
172
- throw new Error(`File not found: ${id}`);
172
+ // Terminal (not transient): the row is gone or out of access scope, so a
173
+ // retry can never succeed. Mark it 404 so the client save-outbox drops the
174
+ // entry instead of retrying forever (which turns one orphaned/deleted
175
+ // screen into an update-file 500 storm — see design-save-outbox
176
+ // isTerminalSaveError).
177
+ const notFound = new Error(`File not found: ${id}`) as Error & {
178
+ status?: number;
179
+ };
180
+ notFound.status = 404;
181
+ throw notFound;
173
182
  }
174
183
 
175
184
  await assertAccess("design", file.designId, "editor");
@@ -109,6 +109,7 @@ import {
109
109
  schedulePendingTextEditActivation,
110
110
  } from "./design-canvas/pending-text-edit";
111
111
  import { DeviceFrame } from "./DeviceFrame";
112
+ import { dndHostLog } from "./dnd-debug";
112
113
  import { shapeClosingHandles } from "./multi-screen/draft-primitives";
113
114
  import type {
114
115
  ElementInfo,
@@ -304,6 +305,15 @@ ${editorChromeBridgeScript}
304
305
  </script>
305
306
  `;
306
307
 
308
+ /**
309
+ * Master switch for the Figma-parity live-reflow drag (hysteresis-stabilized
310
+ * targeting + size guard in Phase 0; transform lift/follow, live sibling
311
+ * reflow, and exact absolute commit in Phase 1). Flip to `true` to try the new
312
+ * drag feel; flip back to `false` for the previous behavior without a revert.
313
+ * Baked into the injected bridge as `__LIVE_REFLOW_ENABLED__`.
314
+ */
315
+ const LIVE_REFLOW_ENABLED = true;
316
+
307
317
  interface DesignCanvasProps {
308
318
  content: string;
309
319
  contentKey?: string;
@@ -931,6 +941,10 @@ function buildEditorChromeBridgeScript(args: {
931
941
  "__RUNTIME_LAYER_SNAPSHOT_ENABLED__",
932
942
  args.runtimeLayerSnapshotEnabled ? "true" : "false",
933
943
  )
944
+ .replace(
945
+ "__LIVE_REFLOW_ENABLED__",
946
+ LIVE_REFLOW_ENABLED ? "true" : "false",
947
+ )
934
948
  );
935
949
  }
936
950
 
@@ -2106,7 +2120,11 @@ export function DesignCanvas({
2106
2120
  "__DESIGN_CANVAS_CONTENT_OFFSET_Y__",
2107
2121
  String(Math.round(embeddedFrame?.contentOffsetY ?? 0)),
2108
2122
  )
2109
- .replace("__RUNTIME_LAYER_SNAPSHOT_ENABLED__", "false");
2123
+ .replace("__RUNTIME_LAYER_SNAPSHOT_ENABLED__", "false")
2124
+ .replace(
2125
+ "__LIVE_REFLOW_ENABLED__",
2126
+ LIVE_REFLOW_ENABLED ? "true" : "false",
2127
+ );
2110
2128
  // ALWAYS injected (like the other always-on bridges above) so
2111
2129
  // MultiScreenCanvas's cross-screen drag hit-testing
2112
2130
  // (agent-native:hit-test / agent-native:hit-test-result) resolves an
@@ -2479,6 +2497,12 @@ export function DesignCanvas({
2479
2497
  const selector = String(e.data.selector || "");
2480
2498
  const anchorSelector = String(e.data.anchorSelector || "");
2481
2499
  const placement = String(e.data.placement || "after");
2500
+ dndHostLog("recv:structure-change", {
2501
+ selector,
2502
+ anchorSelector,
2503
+ placement,
2504
+ dropMode: e.data.dropMode,
2505
+ });
2482
2506
  const requestId =
2483
2507
  typeof e.data.requestId === "string" ? e.data.requestId : undefined;
2484
2508
  const sourceId =
@@ -2546,6 +2570,11 @@ export function DesignCanvas({
2546
2570
  : undefined,
2547
2571
  },
2548
2572
  );
2573
+ dndHostLog("persist:result", {
2574
+ applied,
2575
+ requestId,
2576
+ willAck: Boolean(requestId) && applied !== "pending",
2577
+ });
2549
2578
  if (requestId && applied !== "pending") {
2550
2579
  iframeRef.current?.contentWindow?.postMessage(
2551
2580
  {
@@ -84,6 +84,7 @@ import {
84
84
  } from "./canvas-primitive-style";
85
85
  import { appendHitTestResponder } from "./design-canvas/hit-test";
86
86
  import { DesignCanvas } from "./DesignCanvas";
87
+ import { dndHostLog } from "./dnd-debug";
87
88
  import {
88
89
  gradientToCss,
89
90
  parseGradientCss,
@@ -154,6 +155,10 @@ const TRANSFORM_BADGE_MAX_WIDTH = 180;
154
155
  // (frame z-order is a small per-design integer) while staying well under the
155
156
  // reserved resize-handle stacking range (999_999+).
156
157
  const TOP_SCREEN_Z_BOOST = 100_000;
158
+ // A live draw preview must paint above every screen — including the
159
+ // TOP_SCREEN_Z_BOOSTed active one — or its outline hides behind the opaque
160
+ // screen iframe until commit. Stays below the resize-handle range (999_999+).
161
+ const DRAFT_PREVIEW_Z = TOP_SCREEN_Z_BOOST + 50_000;
157
162
  const EMPTY_SELECTED_LAYER_SELECTOR_GROUPS_BY_SCREEN: Record<
158
163
  string,
159
164
  string[][]
@@ -2269,6 +2274,13 @@ export const MultiScreenCanvas = memo(function MultiScreenCanvas({
2269
2274
  return;
2270
2275
  }
2271
2276
 
2277
+ if (msg.phase !== "move") {
2278
+ dndHostLog("overview:cross-screen", {
2279
+ phase: msg.phase,
2280
+ source: sourceScreenId,
2281
+ selector: msg.selector,
2282
+ });
2283
+ }
2272
2284
  if (msg.phase === "start") {
2273
2285
  setCrossScreenSourceIsBoard(sourceScreenId === boardFileId);
2274
2286
  crossScreenDragMsgRef.current = {
@@ -5167,6 +5179,7 @@ export const MultiScreenCanvas = memo(function MultiScreenCanvas({
5167
5179
  frameGeometryWithOverrides(after, state.originFrames),
5168
5180
  after,
5169
5181
  );
5182
+ dndHostLog("overview:frame-commit", { ids: state.targetIds });
5170
5183
  suppressNextPick.current = true;
5171
5184
  }
5172
5185
  finishDrag();
@@ -8156,7 +8169,7 @@ function DraftPrimitiveLayer({
8156
8169
  ...frameStyleLeftTop(geometry),
8157
8170
  width: geometry.width,
8158
8171
  height: geometry.height,
8159
- zIndex: geometry.z ?? 40,
8172
+ zIndex: preview ? DRAFT_PREVIEW_Z : (geometry.z ?? 40),
8160
8173
  transform: geometry.rotation
8161
8174
  ? `rotate(${geometry.rotation}deg)`
8162
8175
  : undefined,