@andorra-labs/code 0.1.10 → 0.1.11

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 (155) hide show
  1. package/README.md +28 -208
  2. package/THIRD_PARTY_NOTICES.md +15 -0
  3. package/dist/src/agent-execution.js +36 -0
  4. package/dist/src/app-server/protocol.d.ts +1 -0
  5. package/dist/src/app-server.d.ts +34 -1
  6. package/dist/src/app-server.js +264 -54
  7. package/dist/src/automation-service.js +1 -1
  8. package/dist/src/browser-session.d.ts +8 -0
  9. package/dist/src/browser-session.js +27 -1
  10. package/dist/src/browser-ui/app.js +237 -15
  11. package/dist/src/browser-ui/index.html +5 -5
  12. package/dist/src/browser-ui/style.css +110 -65
  13. package/dist/src/browser-ui/tokens.css +27 -26
  14. package/dist/src/coding-tools.d.ts +24 -0
  15. package/dist/src/coding-tools.js +71 -8
  16. package/dist/src/command-screens.js +1 -1
  17. package/dist/src/commands.js +1 -1
  18. package/dist/src/completion-gates.d.ts +42 -7
  19. package/dist/src/completion-gates.js +55 -9
  20. package/dist/src/completion.d.ts +8 -0
  21. package/dist/src/completion.js +19 -1
  22. package/dist/src/dashboard-view.js +2 -2
  23. package/dist/src/deadline.js +4 -0
  24. package/dist/src/graph-manager-chat.js +13 -13
  25. package/dist/src/graph-runner.js +39 -2
  26. package/dist/src/graph-server.js +9 -9
  27. package/dist/src/graph-sync.d.ts +8 -0
  28. package/dist/src/graph-sync.js +54 -3
  29. package/dist/src/graph-tool.js +1 -1
  30. package/dist/src/graph-ui/app.js +262 -93
  31. package/dist/src/graph-ui/controls.css +43 -22
  32. package/dist/src/graph-ui/controls.js +31 -1
  33. package/dist/src/graph-ui/embed.js +62 -13
  34. package/dist/src/graph-ui/icons.js +4 -0
  35. package/dist/src/graph-ui/index.html +3 -3
  36. package/dist/src/graph-ui/manager-state.js +2 -2
  37. package/dist/src/graph-ui/manager.css +19 -18
  38. package/dist/src/graph-ui/manager.js +11 -11
  39. package/dist/src/graph-ui/skill-picker.js +1 -1
  40. package/dist/src/graph-ui/studio-canvas.js +8 -8
  41. package/dist/src/graph-ui/studio.css +18 -15
  42. package/dist/src/graph-ui/studio.js +92 -35
  43. package/dist/src/graph-ui/style.css +122 -79
  44. package/dist/src/graph-ui/theme.js +2 -2
  45. package/dist/src/graph-ui/tokens.css +33 -29
  46. package/dist/src/graphs.d.ts +3 -2
  47. package/dist/src/graphs.js +3 -2
  48. package/dist/src/membership-errors.d.ts +7 -1
  49. package/dist/src/membership-errors.js +9 -3
  50. package/dist/src/pull-requests.d.ts +42 -6
  51. package/dist/src/pull-requests.js +11 -3
  52. package/dist/src/react-runtime.js +121 -14
  53. package/dist/src/read-document-doc.d.ts +20 -0
  54. package/dist/src/read-document-doc.js +524 -0
  55. package/dist/src/read-document-docx.d.ts +21 -0
  56. package/dist/src/read-document-docx.js +584 -0
  57. package/dist/src/read-document-text.d.ts +29 -0
  58. package/dist/src/read-document-text.js +67 -0
  59. package/dist/src/read-document-tool.d.ts +48 -0
  60. package/dist/src/read-document-tool.js +162 -0
  61. package/dist/src/read-document.d.ts +78 -0
  62. package/dist/src/read-document.js +353 -0
  63. package/dist/src/read-image.d.ts +29 -2
  64. package/dist/src/read-image.js +42 -17
  65. package/dist/src/runtime.d.ts +19 -0
  66. package/dist/src/runtime.js +10 -1
  67. package/dist/src/session-changes.d.ts +6 -1
  68. package/dist/src/session-changes.js +13 -5
  69. package/dist/src/side-panel.d.ts +6 -1
  70. package/dist/src/side-panel.js +12 -10
  71. package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
  72. package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
  73. package/dist/src/skills/bundled/graph-manager/SKILL.md +37 -3
  74. package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
  75. package/dist/src/skills/bundled/provenance.json +4 -4
  76. package/dist/src/skills/runtime-skills.js +3 -3
  77. package/dist/src/stall-recovery.d.ts +6 -2
  78. package/dist/src/stall-recovery.js +7 -2
  79. package/dist/src/terminal-ui.js +2 -2
  80. package/dist/src/time-limit.d.ts +53 -0
  81. package/dist/src/time-limit.js +79 -0
  82. package/dist/src/tools.js +92 -7
  83. package/dist/src/transcript.js +1 -1
  84. package/dist/src/types.d.ts +6 -0
  85. package/dist/src/usage-analytics.d.ts +3 -1
  86. package/dist/src/usage-analytics.js +16 -2
  87. package/package.json +6 -26
  88. package/docs/README.md +0 -36
  89. package/docs/agents/README.md +0 -62
  90. package/docs/agents/install-for-agents.md +0 -56
  91. package/docs/agents/mcp-server.md +0 -212
  92. package/docs/agents/subagent-mode.md +0 -149
  93. package/docs/concepts/README.md +0 -47
  94. package/docs/concepts/jev-actionable-routing.md +0 -113
  95. package/docs/concepts/jev-decision-thresholds.md +0 -412
  96. package/docs/concepts/jev-efficiency.md +0 -217
  97. package/docs/concepts/jev-eval-2026-11-01.md +0 -78
  98. package/docs/concepts/limits.md +0 -52
  99. package/docs/concepts/memory.md +0 -10
  100. package/docs/concepts/security.md +0 -50
  101. package/docs/concepts/workspace-instructions.md +0 -29
  102. package/docs/getting-started/README.md +0 -82
  103. package/docs/getting-started/accounts.md +0 -78
  104. package/docs/getting-started/configure-providers.md +0 -132
  105. package/docs/guides/README.md +0 -13
  106. package/docs/guides/browser.md +0 -39
  107. package/docs/guides/desktop-app.md +0 -414
  108. package/docs/guides/extensions.md +0 -102
  109. package/docs/guides/graph-builder.md +0 -116
  110. package/docs/guides/headless.md +0 -46
  111. package/docs/guides/tui.md +0 -75
  112. package/docs/guides/update.md +0 -70
  113. package/docs/guides/web-search.md +0 -51
  114. package/docs/guides/windows-code-signing.md +0 -319
  115. package/docs/llms.txt +0 -45
  116. package/docs/reference/README.md +0 -7
  117. package/docs/reference/cli.md +0 -76
  118. package/docs/reference/config.md +0 -91
  119. package/docs/reference/slash-commands.md +0 -59
  120. package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
  121. package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
  122. package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
  123. package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
  124. package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
  125. package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
  126. package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
  127. package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
  128. package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
  129. package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
  130. package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
  131. package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
  132. package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
  133. package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
  134. package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
  135. package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
  136. package/scripts/jev-efficiency-eval.mjs +0 -187
  137. package/scripts/jev-efficiency-live.mjs +0 -193
  138. package/scripts/zcode-engine-replay.mjs +0 -223
  139. package/tests/agent-centric-mcp-test-plan.md +0 -208
  140. package/tests/analytics-settings-test-plan.md +0 -165
  141. package/tests/browser-cli-smoke.mjs +0 -276
  142. package/tests/browser-test-plan.md +0 -280
  143. package/tests/chat-side-panel-test-plan.md +0 -309
  144. package/tests/decision-engine-test-plan.md +0 -163
  145. package/tests/default-active-jev-test-plan.md +0 -85
  146. package/tests/harness-extensions-test-plan.md +0 -113
  147. package/tests/jev-all-decisions-test-plan.md +0 -156
  148. package/tests/jev-efficiency/criteria.json +0 -158
  149. package/tests/jev-efficiency/workloads.mjs +0 -242
  150. package/tests/jev-efficiency-test-plan.md +0 -198
  151. package/tests/permissions-sandbox-probe.mjs +0 -74
  152. package/tests/permissions-test-plan.md +0 -191
  153. package/tests/product-telemetry-test-plan.md +0 -536
  154. package/tests/thinking-stream-preview-test-plan.md +0 -136
  155. package/tests/zcode-react-engine-test-plan.md +0 -396
@@ -16,11 +16,12 @@ input[type="checkbox"], input[type="radio"] {
16
16
  cursor: pointer; box-shadow: none;
17
17
  transition: background-color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard);
18
18
  }
19
- input[type="checkbox"] { border-radius: var(--radius-xs); color: var(--on-accent-fill, var(--on-accent)); }
19
+ input[type="checkbox"] { border-radius: var(--radius-xs); }
20
20
  input[type="radio"] { border-radius: var(--radius-full); }
21
21
  input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--text-3); }
22
- /* On is the accent fill, as a switch's is. */
23
- input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--accent-fill, var(--accent)); border-color: var(--accent-fill, var(--accent)); }
22
+ /* On fills with the ink and cuts the mark from it in the ink's contrast colour, as the desktop's
23
+ checkbox does (desktop/src/styles/controls.css); the blue fill belongs to the action alone (A1). */
24
+ input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
24
25
  input[type="checkbox"]::before {
25
26
  content: ""; width: 10px; height: 10px; background: currentColor;
26
27
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
@@ -34,16 +35,16 @@ input[type="checkbox"]:indeterminate::before {
34
35
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
35
36
  }
36
37
  input[type="radio"]::before {
37
- content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent-fill, var(--accent));
38
+ content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent);
38
39
  transform: scale(0); transition: transform var(--dur-1) var(--ease-standard);
39
40
  }
40
- input[type="radio"]:checked { border-color: var(--accent-fill, var(--accent)); }
41
+ input[type="radio"]:checked { border-color: var(--accent); }
41
42
  input[type="radio"]:checked::before { transform: scale(1); }
42
43
  /* Disabled takes the disabled ink for its edge and mark rather than fading the whole control. */
43
44
  input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: default; border-color: var(--text-disabled); background: var(--bg-card); }
44
45
  input[type="checkbox"]:disabled:checked, input[type="checkbox"]:disabled:indeterminate { background: var(--text-disabled); border-color: var(--text-disabled); }
45
46
  input[type="radio"]:disabled::before { background: var(--text-disabled); }
46
- input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; box-shadow: none; }
47
+ input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
47
48
 
48
49
  /* Number and search fields ---------------------------------------------------- */
49
50
  input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
@@ -58,15 +59,19 @@ input[type="search"]::-webkit-search-cancel-button {
58
59
  input[type="search"]::-webkit-search-cancel-button:hover { background: var(--text); }
59
60
 
60
61
  /* Select ------------------------------------------------------------------------ */
61
- /* The closed select is the app's boxed field with its chevron (Lucide's, on the 1.5 stroke, in each
62
- appearance's muted ink); the list it opens is the panel below. */
62
+ /* The closed select is the app's boxed field with its chevron (Lucide's, on the 1.5 stroke); the list
63
+ it opens is the panel below. A native select draws no pseudo-element to mask, so the chevron is an
64
+ image, and an image cannot read a token: its stroke is the muted ink exactly as `--text-3` defines
65
+ it in each appearance, the ink colour at the token's alpha (dark #f5f5f5 at 60%, light #1c1c1c at
66
+ 66%), so it composites to the same neutral as every other muted glyph on any ground.
67
+ `test/graph-ui-theme.test.ts` holds the two strokes to the tokens. */
63
68
  select:not([multiple]) {
64
69
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; text-overflow: ellipsis;
65
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aa4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
70
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-opacity='.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
66
71
  background-repeat: no-repeat; background-position: right 10px center;
67
72
  }
68
73
  :root[data-theme='light'] select:not([multiple]) {
69
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c5d63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
74
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-opacity='.66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
70
75
  }
71
76
  select:not([multiple])[data-open="true"] { border-color: var(--text-3); }
72
77
  select:disabled { cursor: default; color: var(--text-disabled); }
@@ -74,19 +79,19 @@ select:disabled { cursor: default; color: var(--text-disabled); }
74
79
  /* The dropdown is the app's popover: 8px corners, a 4px inset, rows on the 4px radius at the row
75
80
  height that fill one ink tier under the pointer or the keys. Group labels are sentence case. */
76
81
  .select-panel {
77
- position: fixed; z-index: 400; min-width: 160px; max-width: min(420px, calc(100vw - 16px));
82
+ position: fixed; z-index: var(--z-menu); min-width: 160px; max-width: min(420px, calc(100vw - 16px));
78
83
  display: flex; flex-direction: column; overflow: hidden;
79
84
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
80
85
  box-shadow: var(--shadow-menu); padding: var(--space-1); color: var(--text);
81
86
  animation: controls-panel-in var(--dur-1) var(--ease-standard);
82
87
  }
83
- .select-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
88
+ .select-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
84
89
  .select-option {
85
90
  display: flex; align-items: center; gap: 8px; min-height: var(--row-height); padding: 0 8px; flex: 0 0 auto;
86
91
  border-radius: var(--radius-xs); cursor: pointer; color: var(--text); min-width: 0; white-space: nowrap;
87
92
  font-size: var(--type-row);
88
93
  }
89
- .select-option:hover, .select-option[data-active="true"] { background: var(--hover, var(--bg-hover)); }
94
+ .select-option:hover, .select-option[data-active="true"] { background: var(--hover); }
90
95
  .select-option[aria-disabled="true"] { color: var(--text-disabled); cursor: default; }
91
96
  .select-option[aria-disabled="true"]:hover { background: transparent; }
92
97
  .select-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@@ -110,23 +115,26 @@ details > summary::before {
110
115
  details[open] > summary::before { transform: rotate(90deg); }
111
116
 
112
117
  /* Scrollbars and resize grip ------------------------------------------------- */
113
- /* Thin bars on the quiet ink, as in the desktop window; the rail keeps its own fade-in bars. */
114
- ::-webkit-scrollbar { width: 8px; height: 8px; }
115
- ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-xs); }
116
- ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
118
+ /* The desktop window's bars (desktop/src/styles/primitives.css): a 6px thumb at 11% ink, 18% under the
119
+ pointer, on no track. The rail keeps its own fade-in bars on the same inks (style.css). */
120
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
121
+ ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 11%, transparent); border-radius: var(--radius-full); }
122
+ ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
117
123
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
118
124
  ::-webkit-resizer {
119
125
  background: linear-gradient(135deg, transparent 0 58%, var(--text-3) 58% 64%, transparent 64% 76%, var(--text-3) 76% 82%, transparent 82%);
120
126
  }
121
127
 
122
128
  /* Tooltips and validation bubbles ---------------------------------------------- */
129
+ /* The desktop's bubble (desktop/src/styles/controls.css `.app-tooltip`): the raised surface, the strong
130
+ hairline, the menu shadow, on the tooltip layer. */
123
131
  .app-tooltip {
124
- position: fixed; left: 0; top: 0; z-index: 1000;
132
+ position: fixed; left: 0; top: 0; z-index: var(--z-tooltip);
125
133
  width: max-content; max-width: min(320px, calc(100vw - 16px));
126
- padding: 5px 9px; border-radius: var(--row-radius);
134
+ padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
127
135
  background: var(--bg-input); color: var(--text); border: 1px solid var(--border-strong);
128
136
  box-shadow: var(--shadow-menu);
129
- font-family: var(--font-ui); font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: 1.45;
137
+ font-family: var(--font-ui); font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs);
130
138
  white-space: pre-line; overflow-wrap: anywhere; text-align: left;
131
139
  pointer-events: none; user-select: none; -webkit-user-select: none;
132
140
  opacity: 0; transform: translateY(-2px);
@@ -134,6 +142,19 @@ details[open] > summary::before { transform: rotate(90deg); }
134
142
  }
135
143
  .app-tooltip[data-placement="above"] { transform: translateY(2px); }
136
144
  .app-tooltip[data-visible="true"] { opacity: 1; transform: none; }
145
+ /* One line: the name, then the shortcut as a key chip (C7). It never wraps. */
146
+ .app-tooltip[data-kind="line"] {
147
+ display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; overflow: hidden;
148
+ max-width: min(480px, calc(100vw - 16px));
149
+ }
150
+ .app-tooltip-kbd { margin-left: auto; }
151
+ /* A key as a chip, the desktop's `.kbd` (desktop/src/styles/primitives.css). */
152
+ .kbd {
153
+ display: inline-flex; align-items: center; flex: none; height: 18px; min-width: 0; padding: 0 var(--space-1);
154
+ border: 0; border-radius: var(--radius-xs); background: var(--bg-control); color: var(--text-2);
155
+ font: inherit; font-family: var(--font-ui); font-size: var(--type-xs); line-height: 1; letter-spacing: 0;
156
+ font-variant-numeric: tabular-nums; white-space: nowrap;
157
+ }
137
158
  .app-tooltip[data-variant="invalid"] {
138
159
  display: flex; align-items: flex-start; gap: 6px;
139
160
  color: var(--err-text); border-color: color-mix(in srgb, var(--err) 55%, var(--border-strong));
@@ -147,8 +168,8 @@ details[open] > summary::before { transform: rotate(90deg); }
147
168
  /* Question dialogs ------------------------------------------------------------ */
148
169
  .ask-dialog { width: min(440px, calc(100vw - 40px)); }
149
170
  .ask-dialog-body { padding: var(--space-5) var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: 8px; }
150
- .ask-dialog-title { margin: 0; font-size: var(--type-section); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
151
- .ask-dialog-message { margin: 0; color: var(--text-2); font-size: var(--type-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
171
+ .ask-dialog-title { margin: 0; font-size: var(--type-section); line-height: var(--leading-md); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
172
+ .ask-dialog-message { margin: 0; color: var(--text-2); font-size: var(--type-sm); line-height: var(--leading-sm); white-space: pre-line; overflow-wrap: anywhere; }
152
173
  .ask-dialog-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
153
174
  .ask-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--space-3); }
154
175
  /* A destructive question confirms with the ordinary primary button, whose label names the action;
@@ -129,6 +129,18 @@
129
129
  // ------------------------------------------------------------------ Tooltips
130
130
 
131
131
  const tipText = element => (element.getAttribute(STASH) ?? element.getAttribute('title') ?? element.getAttribute('data-tip') ?? '').trim();
132
+ // One bubble, one line (C7), as the desktop's (desktop/src/engine/tooltips.ts): a title that ends in
133
+ // a chord in parentheses — "Undo (Ctrl/Cmd+Z)" — is drawn as the name and a key chip. The editor's
134
+ // titles name both platforms' modifier; the chip names this platform's alone, the way the window's
135
+ // own tooltips do (⌘Z on macOS, Ctrl+Z elsewhere).
136
+ const SHORTCUT = /^(.*\S)\s+\(((?:(?:Ctrl\/Cmd|Ctrl|Alt|Shift|Cmd|Option)\+)*(?:[⌘⌥⇧⌃]+)?(?:[A-Z0-9,.\/]|Enter|Esc|Escape|Tab|Space|Delete|Backspace|F\d{1,2}))\)$/;
137
+ const macintosh = () => /Macintosh|Mac OS X/i.test(typeof navigator === 'undefined' ? '' : navigator.userAgent || '');
138
+ function tooltipShortcut(text, mac = macintosh()) {
139
+ const match = SHORTCUT.exec(text);
140
+ if (!match) return { name: text };
141
+ const chord = mac ? match[2].replace(/(?:Ctrl\/Cmd|Cmd)\+/g, '⌘') : match[2].replace(/Ctrl\/Cmd\+/g, 'Ctrl+');
142
+ return { name: match[1], shortcut: chord };
143
+ }
132
144
  function tipAnchor(target) {
133
145
  if (!target || typeof target.closest !== 'function') return null;
134
146
  const anchor = target.closest(`[title], [data-tip], [${STASH}]`);
@@ -149,7 +161,13 @@
149
161
  node.dataset.variant = variant;
150
162
  node.setAttribute('role', variant === 'invalid' ? 'alert' : 'tooltip');
151
163
  }
152
- node.textContent = text;
164
+ const { name, shortcut } = variant === 'tip' ? tooltipShortcut(text) : { name: text };
165
+ if (shortcut === undefined) { node.textContent = text; delete node.dataset.kind; }
166
+ else {
167
+ const kbd = make('kbd', 'kbd app-tooltip-kbd', shortcut);
168
+ node.replaceChildren(make('span', undefined, name), kbd);
169
+ node.dataset.kind = 'line';
170
+ }
153
171
  node.dataset.visible = 'false';
154
172
  // A modal dialog is drawn in the top layer, over anything on the body: a bubble for a field
155
173
  // inside one has to live inside it to be seen.
@@ -633,6 +651,17 @@
633
651
  return { element: zone, input, file: () => chosen, focus: () => browse.focus() };
634
652
  }
635
653
 
654
+ // One focus treatment, keyboard only (ADR 0022): a text field matches :focus-visible on a click as
655
+ // well, so the page records how focus last arrived and style.css draws a field's halo for the
656
+ // keyboard alone. Tab is the key that walks focus; any press of the pointer hands it back.
657
+ function installFocusSource() {
658
+ const root = document.documentElement;
659
+ if (!root?.dataset) return;
660
+ document.addEventListener('pointerdown', () => { root.dataset.focusVia = 'pointer'; }, true);
661
+ document.addEventListener('keydown', event => { if (event.key === 'Tab') delete root.dataset.focusVia; }, true);
662
+ }
663
+
664
+ installFocusSource();
636
665
  installTooltips();
637
666
  installSelects();
638
667
  installDialogExits();
@@ -645,5 +674,6 @@
645
674
  refreshSelect,
646
675
  leave,
647
676
  closeDialog,
677
+ tooltipShortcut,
648
678
  });
649
679
  })();
@@ -96,7 +96,7 @@
96
96
  const id = graph.id;
97
97
  section.append(part('h3', 'Project visibility'));
98
98
  if (id === 'default') {
99
- section.append(part('p', 'This bundled workflow is always visible in every project.', 'help'));
99
+ section.append(part('p', 'This bundled graph is always visible in every project.', 'help'));
100
100
  return;
101
101
  }
102
102
  if (!visibilityProjects) {
@@ -104,10 +104,10 @@
104
104
  return;
105
105
  }
106
106
  if (!visibilityAvailable) {
107
- section.append(part('p', 'Project visibility is unavailable until Andorra Code can read your signed-in account. This workflow remains visible in every project.', 'help'));
107
+ section.append(part('p', 'Project visibility is unavailable until Andorra Code can read your signed-in account. This graph remains visible in every project.', 'help'));
108
108
  return;
109
109
  }
110
- section.append(part('p', 'Choose the project folders where this workflow appears in the desktop New Task and task Workflow pickers. This choice stays on this desktop; it is not saved in the workflow.', 'help'));
110
+ section.append(part('p', 'Choose the project folders where this graph appears in the desktop New Task and task Graph pickers. This choice stays on this desktop; it is not saved in the graph.', 'help'));
111
111
  const allowed = visibilityChoices.get(id);
112
112
  if (allowed === undefined) {
113
113
  section.append(part('p', 'Loading project assignment…', 'help'));
@@ -144,16 +144,51 @@
144
144
  row.append(input, part('span', `${project.name} `), part('span', project.path, 'mono'));
145
145
  section.append(row);
146
146
  }
147
- if (visibilityProjects.length === 0) section.append(part('p', 'Add a project folder in the desktop app to assign this workflow.', 'help'));
148
- else if (allowed.length === 0) section.append(part('p', 'This workflow is hidden in every project until you select one.', 'help'));
147
+ if (visibilityProjects.length === 0) section.append(part('p', 'Add a project folder in the desktop app to assign this graph.', 'help'));
148
+ else if (allowed.length === 0) section.append(part('p', 'This graph is hidden in every project until you select one.', 'help'));
149
149
  }
150
150
  }
151
151
 
152
- // The desktop window's own controls (Back, Reload, notifications) render in the editor's toolbar
153
- // rather than in a second header above it. The host names which apply; the editor owns their
154
- // labels and only ever reports which one was chosen.
152
+ // The desktop window's own controls (Back, Reload) render in the editor's toolbar rather than in a
153
+ // second header above it. The host names which apply; the editor owns their labels and only ever
154
+ // reports which one was chosen. `notifications` is drawn only for an older desktop that still asks
155
+ // for it: a current one raises the editor's notification through its own setting (P-ATN-08).
155
156
  const HOST_ACTIONS = new Set(['back', 'reload', 'notifications']);
156
157
  let hostChrome = false;
158
+ // Framed in the desktop window, the editor's top row is the window's: the host names the room its
159
+ // window controls take at either end, and whether a press on the row's blank space moves the window
160
+ // (the app draws its own caption rows there). The caption is the toolbar, and on macOS also the
161
+ // rail's blank row under the traffic lights (style.css `.rail-caption`). The rule is the desktop's
162
+ // caption rule (desktop/src/components/windowChrome.ts): a control, the title's text and anything
163
+ // focusable keep the press for themselves.
164
+ let captionMoves = false;
165
+ const CAPTION_CONTROL = 'button, input, select, textarea, a, label, summary, [contenteditable], [role], [tabindex], .graph-heading strong, .graph-heading span, .menu-list';
166
+ const captionPress = event => {
167
+ const target = event.target && event.target.nodeType === 1 ? event.target : event.target?.parentElement;
168
+ if (!captionMoves || event.button !== 0 || !target || typeof target.closest !== 'function') return false;
169
+ const caption = target.closest('.chrome, .rail-caption');
170
+ return !!caption && !target.closest(CAPTION_CONTROL);
171
+ };
172
+ window.addEventListener('mousedown', event => {
173
+ if (event.detail !== 1 || !captionPress(event)) return;
174
+ event.preventDefault();
175
+ emit({ type: 'andorra.graph.window', action: 'drag' });
176
+ });
177
+ window.addEventListener('dblclick', event => {
178
+ if (captionPress(event)) emit({ type: 'andorra.graph.window', action: 'maximize' });
179
+ });
180
+ const inset = value => (typeof value === 'number' && Number.isFinite(value) ? Math.min(240, Math.max(0, Math.round(value))) : 0);
181
+ function applyInsets(insets) {
182
+ const root = document.documentElement;
183
+ if (!root?.style) return;
184
+ const left = inset(insets?.left), right = inset(insets?.right);
185
+ // The right inset pads the toolbar (style.css); the left one is a corner the rail keeps clear,
186
+ // a row of the toolbar's height whatever its width, so only its presence is passed on.
187
+ root.style.setProperty('--host-inset-right', `${right}px`);
188
+ if (left || right) root.setAttribute('data-host-insets', ''); else root.removeAttribute('data-host-insets');
189
+ // The traffic lights' corner is over the rail: it keeps a caption row clear above its lists.
190
+ if (left) root.setAttribute('data-host-corner', ''); else root.removeAttribute('data-host-corner');
191
+ }
157
192
  const hostAction = action => emit({ type: 'andorra.graph.host.action', action });
158
193
  // Exporting through the host writes the file to the user's Downloads folder and reveals it. Only
159
194
  // the graph or Agent id crosses the frame; the host fetches the definition from the engine itself.
@@ -176,15 +211,27 @@
176
211
  const busy = data.busy === true;
177
212
  const first = !hostChrome;
178
213
  hostChrome = true;
214
+ captionMoves = data.caption === true;
215
+ applyInsets(data.insets);
179
216
  const slot = document.getElementById?.('host-chrome');
180
217
  if (slot) {
181
218
  slot.replaceChildren();
182
219
  if (actions.includes('back')) {
220
+ // The editor hides the desktop's sidebar, so Back carries how many tasks need the person's
221
+ // input there (P-ATN-03): the host's figure and words, drawn as the desktop's ink count pill.
222
+ const count = Number.isInteger(data.attention?.count) && data.attention.count > 0 ? Math.min(999, data.attention.count) : 0;
223
+ const words = count && typeof data.attention.label === 'string' ? data.attention.label.slice(0, 80) : '';
183
224
  const back = part('button', undefined, 'ghost btn-small');
184
225
  back.type = 'button'; back.disabled = busy;
185
- back.setAttribute('aria-label', 'Back to Workflows'); back.title = 'Back to Workflows';
226
+ back.setAttribute('aria-label', words ? `Back to Graphs — ${words}` : 'Back to Graphs');
227
+ back.title = words ? `Back to Graphs · ${words}` : 'Back to Graphs';
186
228
  const mark = icon('arrow-left'); if (mark) back.append(mark);
187
- back.append(part('span', 'Workflows'));
229
+ back.append(part('span', 'Graphs'));
230
+ if (count) {
231
+ const pill = part('span', count > 99 ? '99+' : String(count), 'attention-count');
232
+ pill.setAttribute('aria-hidden', 'true');
233
+ back.append(pill);
234
+ }
188
235
  back.onclick = () => hostAction('back');
189
236
  slot.append(back);
190
237
  }
@@ -204,12 +251,14 @@
204
251
  }
205
252
 
206
253
  window.AndorraEmbed = {
207
- ready() { emit({ type: 'andorra.graph.ready', hostChrome: true }); },
254
+ // `caption`: this editor applies the host's insets and forwards caption presses, so the host may
255
+ // drop its own caption band and let the toolbar be the window's top row.
256
+ ready() { emit({ type: 'andorra.graph.ready', hostChrome: true, caption: true }); },
208
257
  hostChrome() { return hostChrome; },
209
258
  openProviderSettings() { if (hostChrome) hostAction('providers'); },
210
259
  exportGraph(graphId) {
211
260
  if (!hostChrome || !safeGraphId(graphId)) {
212
- return Promise.resolve({ ok: false, error: 'That workflow cannot be exported here.' })
261
+ return Promise.resolve({ ok: false, error: 'That graph cannot be exported here.' })
213
262
  .then(result => { status(result.error, true); return result; });
214
263
  }
215
264
  return requestExport({ type: 'andorra.graph.export', graphId }).then(result => {
@@ -326,7 +375,7 @@
326
375
  const snapshot = copy(state.graph);
327
376
  await api('/api/drafts', snapshot);
328
377
  if (JSON.stringify(state.graph) !== JSON.stringify(snapshot)) {
329
- throw new Error('The workflow changed while saving; try closing again.');
378
+ throw new Error('The graph changed while saving; try closing again.');
330
379
  }
331
380
  clearTimeout(draftTimer);
332
381
  pendingDraft = null;
@@ -18,6 +18,7 @@ globalThis.AndorraIcons = (() => {
18
18
  const GLYPHS = {
19
19
  'arrow-left': '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
20
20
  'chevron-right': '<path d="m9 18 6-6-6-6"/>',
21
+ lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
21
22
  undo: '<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/>',
22
23
  redo: '<path d="m15 14 5-5-5-5"/><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"/>',
23
24
  'zoom-in': '<circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/>',
@@ -56,6 +57,9 @@ globalThis.AndorraIcons = (() => {
56
57
  terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
57
58
  approval: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><polyline points="16 11 18 13 22 9"/>',
58
59
  flag: '<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" x2="4" y1="22" y2="15"/>',
60
+ // The empty states' marks: a list with no match, and no graph open (Lucide's "workflow" glyph).
61
+ search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
62
+ graph: '<rect width="8" height="8" x="3" y="3" rx="2"/><path d="M7 11v4a2 2 0 0 0 2 2h4"/><rect width="8" height="8" x="13" y="13" rx="2"/>',
59
63
  };
60
64
 
61
65
  /** The glyph a node type is drawn with. */
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Workflow Editor · Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><link rel="stylesheet" href="/library.css"><link rel="stylesheet" href="/studio.css"><link rel="stylesheet" href="/controls.css"><link rel="stylesheet" href="/manager.css"><script src="/theme.js"></script></head>
3
+ <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Graph Editor · Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><link rel="stylesheet" href="/library.css"><link rel="stylesheet" href="/studio.css"><link rel="stylesheet" href="/controls.css"><link rel="stylesheet" href="/manager.css"><script src="/theme.js"></script></head>
4
4
  <body>
5
- <aside class="rail" id="library-rail"><div id="rail-resize" role="separator" aria-label="Resize library sidebar" aria-orientation="vertical" aria-controls="library-rail" tabindex="0"></div><div class="rail-body" tabindex="0" aria-label="Workflow and step library"><div class="section-label">Your workflows <button id="new-graph" aria-label="Create workflow" title="Create workflow" data-icon="plus"></button></div><input id="search" type="search" placeholder="Find a workflow" aria-label="Find a workflow"><nav id="graphs" aria-label="Workflows" tabindex="0"></nav><div class="section-label library-label">Step library</div><input id="node-search" type="search" placeholder="Search steps…" aria-label="Search steps"><nav id="node-library" aria-label="Step library"></nav><p class="hint">Drag a step onto the canvas, or select it and press Enter to add it. Connect each outcome to one or more destinations.</p></div><footer class="rail-footer">Your account <span id="sync-status" role="status">Saved locally; cloud sync pending</span></footer></aside>
6
- <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Workflow Editor</strong><span id="revision">Loading workflows…</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Workflow Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this workflow with Workflow Manager" data-icon="bot" hidden><span>Workflow Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Workflow Manager build this workflow with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save</button></div></header><div class="workspace"><section id="canvas" aria-label="Workflow canvas"><div id="scene"><svg id="edges" aria-label="Workflow connections"></svg><div id="nodes"></div></div><div id="empty">Create a workflow to get started.</div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit workflow" title="Fit workflow" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange steps" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Workflow settings</strong><button id="graph-settings" class="btn-small" title="Show the workflow's own settings">Workflow Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Workflow Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Workflow Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Workflow Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Workflow Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models"><select id="manager-provider" aria-label="Workflow Manager provider"></select><select id="manager-model" aria-label="Workflow Manager model"></select></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Workflow Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Workflow Manager to build or change this workflow" aria-label="Message Workflow Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace…</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
5
+ <aside class="rail" id="library-rail"><div id="rail-resize" role="separator" aria-label="Resize library sidebar" aria-orientation="vertical" aria-controls="library-rail" tabindex="0"></div><div class="rail-caption" aria-hidden="true"></div><div class="rail-body" tabindex="0" aria-label="Graph and step library"><div class="section-label">Your graphs <button id="new-graph" aria-label="Create graph" title="Create graph" data-icon="plus"></button></div><div class="rail-search"><input id="search" type="search" placeholder="Find a graph" aria-label="Find a graph"></div><nav id="graphs" aria-label="Graphs" tabindex="0"></nav><div class="section-label library-label">Step library</div><div class="rail-search"><input id="node-search" type="search" placeholder="Search steps…" aria-label="Search steps"></div><nav id="node-library" aria-label="Step library"></nav><p class="hint">Drag a step onto the canvas, or select it and press Enter to add it. Connect each outcome to one or more destinations.</p></div><footer class="rail-footer">Your account <span id="sync-status" role="status">Saved locally; cloud sync pending</span></footer></aside>
6
+ <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Graph Editor</strong><span id="revision">Loading graphs…</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Graph Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this graph with Graph Manager" data-icon="bot" hidden><span>Graph Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Graph Manager build this graph with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save</button></div></header><div class="workspace"><section id="canvas" aria-label="Graph canvas"><div id="scene"><svg id="edges" aria-label="Graph connections"></svg><div id="nodes"></div></div><div id="empty"><div class="empty-state"><span class="empty-state-icon" data-icon="graph"></span><p class="empty-state-title">No graph open</p><p class="empty-state-line">Create a graph to get started.</p><div class="empty-state-action"><button id="empty-create" type="button" class="primary btn-small">Create Graph</button></div></div></div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit graph" title="Fit graph" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange steps" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Graph settings</strong><button id="graph-settings" class="btn-small" title="Show the graph's own settings">Graph Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Graph Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Graph Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Graph Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Graph Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models"><select id="manager-provider" aria-label="Graph Manager provider"></select><select id="manager-model" aria-label="Graph Manager model"></select></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Graph Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Graph Manager to build or change this graph" aria-label="Message Graph Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace…</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
7
7
  <script src="/compat.js" defer></script><script src="/icons.js" defer></script><script src="/controls.js" defer></script><script src="/skill-picker.js" defer></script><script src="/edge-router.js" defer></script><script src="/drafts.js" defer></script><script src="/app.js" defer></script><script src="/manager-markdown.js" defer></script><script src="/manager-state.js" defer></script><script src="/manager.js" defer></script><script src="/embed.js" defer></script><script src="/sidebar.js" defer></script><script src="/studio.js" defer></script><script src="/studio-canvas.js" defer></script></body></html>
@@ -156,7 +156,7 @@ globalThis.AndorraManagerState = (() => {
156
156
  }
157
157
 
158
158
  /** Graph actions that change the draft; the summary counts them as edits. */
159
- const EDITS = new Set(['Set step', 'Edit step', 'Remove step', 'Connect', 'Remove connection', 'Edit workflow']);
159
+ const EDITS = new Set(['Set step', 'Edit step', 'Remove step', 'Connect', 'Remove connection', 'Edit graph']);
160
160
  const plural = (count, one, many) => `${count} ${count === 1 ? one : many}`;
161
161
  /**
162
162
  * What a settled stretch did, in one sentence: `Thought for 12s, made 5 edits, ran 3 other steps`.
@@ -171,7 +171,7 @@ globalThis.AndorraManagerState = (() => {
171
171
  // A save that failed or was denied is a step like any other, not a save.
172
172
  const other = tools.length - edits - saves;
173
173
  if (edits) parts.push(`made ${plural(edits, 'edit', 'edits')}`);
174
- if (saves) parts.push('saved the workflow');
174
+ if (saves) parts.push('saved the graph');
175
175
  if (other) parts.push(`ran ${plural(other, edits || saves ? 'other step' : 'step', edits || saves ? 'other steps' : 'steps')}`);
176
176
  if (!parts.length) return 'Worked';
177
177
  const sentence = parts.join(', ');
@@ -6,11 +6,11 @@
6
6
  /* The button's first-run tip hangs under it, over the toolbar's edge and clear of the canvas tips
7
7
  (those sit at the canvas's top left). */
8
8
  .manager-anchor { position: relative; display: flex; }
9
- #graph-manager[aria-expanded="true"] { background: var(--selected, var(--accent-soft)); }
9
+ #graph-manager[aria-expanded="true"] { background: var(--selected); }
10
10
  .manager-tip {
11
- position: absolute; z-index: 20; top: calc(100% + var(--space-2)); right: 0; width: max-content; max-width: 280px;
11
+ position: absolute; z-index: var(--z-menu); top: calc(100% + var(--space-2)); right: 0; width: max-content; max-width: 280px;
12
12
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
13
- color: var(--text); font-size: var(--type-xs); line-height: 1.45; white-space: normal;
13
+ color: var(--text); font-size: var(--type-xs); line-height: var(--leading-xs); white-space: normal;
14
14
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-menu);
15
15
  }
16
16
  .manager-tip .icon-button { flex: none; min-width: 24px; width: 24px; min-height: 24px; height: 24px; border-radius: var(--radius-sm); }
@@ -18,7 +18,7 @@
18
18
  /* The panel is a flex sibling of the canvas and the inspector: opening it narrows the canvas. */
19
19
  #manager-panel {
20
20
  width: var(--manager-panel, 380px); max-width: 60%; flex-shrink: 0; min-height: 0; border-left: 1px solid var(--border);
21
- background: var(--bg-surface); display: flex; flex-direction: column; position: relative; z-index: 3;
21
+ background: var(--bg-surface); display: flex; flex-direction: column; position: relative; z-index: var(--z-raised);
22
22
  }
23
23
  #manager-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 7px; cursor: col-resize; }
24
24
  #manager-resize:focus-visible { outline: none; background: var(--accent-ring); }
@@ -32,7 +32,7 @@
32
32
  .manager-notice {
33
33
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
34
34
  padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border);
35
- background: var(--bg-card); color: var(--text); font-size: var(--type-xs); line-height: 1.45;
35
+ background: var(--bg-card); color: var(--text); font-size: var(--type-xs); line-height: var(--leading-xs);
36
36
  }
37
37
  .manager-notice > span:first-child { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
38
38
  .manager-notice-actions { display: flex; gap: var(--space-1); flex: none; }
@@ -41,7 +41,7 @@
41
41
 
42
42
  #manager-transcript {
43
43
  flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--space-3);
44
- padding: var(--space-4); font-size: var(--type-sm); line-height: 1.55;
44
+ padding: var(--space-4); font-size: var(--type-sm); line-height: var(--leading-sm);
45
45
  }
46
46
  #manager-transcript:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-ring); }
47
47
  .manager-empty { margin: 0; }
@@ -52,28 +52,28 @@
52
52
  reply as prose, and its work as flat gray lines between them. */
53
53
  .manager-user-body {
54
54
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--card-radius);
55
- padding: var(--space-2) var(--space-3); white-space: pre-wrap; color: var(--text); line-height: 1.55;
55
+ padding: var(--space-2) var(--space-3); white-space: pre-wrap; color: var(--text); line-height: var(--leading-sm);
56
56
  }
57
57
  .manager-assistant { color: var(--text); }
58
58
 
59
59
  /* Markdown in the reply, after the app's `.md` rules. */
60
- .markdown { white-space: normal; line-height: 1.65; }
60
+ .markdown { white-space: normal; line-height: var(--leading-prose); }
61
61
  .markdown > * + * { margin-top: 10px; }
62
62
  .markdown > :first-child { margin-top: 0; }
63
63
  .markdown p, .markdown ul, .markdown ol, .markdown pre, .markdown blockquote { margin-bottom: 0; }
64
64
  .markdown p { margin: 0; }
65
- .markdown :is(h3, h4, h5, h6, h7, h8) { margin: 16px 0 4px; font-size: var(--type-sm); font-weight: var(--weight-strong); line-height: 1.3; }
66
- .markdown h3 { font-size: var(--type-md); }
65
+ .markdown :is(h3, h4, h5, h6, h7, h8) { margin: 16px 0 4px; font-size: var(--type-sm); font-weight: var(--weight-strong); line-height: var(--leading-sm); }
66
+ .markdown h3 { font-size: var(--type-md); line-height: var(--leading-md); }
67
67
  .markdown > :is(h3, h4, h5, h6, h7, h8):first-child { margin-top: 0; }
68
68
  .markdown ul, .markdown ol { padding-left: 1.4em; margin-top: 6px; }
69
69
  .markdown li + li { margin-top: 2px; }
70
70
  .markdown li > :is(ul, ol) { margin-top: 2px; }
71
- .markdown code { font-family: var(--font-mono); font-size: 0.92em; padding: 1px 4px; border-radius: var(--radius-xs); background: var(--bg-input); border: 1px solid var(--border); }
71
+ .markdown code { font-family: var(--font-mono); font-size: var(--type-xs); padding: 1px 4px; border-radius: var(--radius-xs); background: var(--bg-input); border: 1px solid var(--border); }
72
72
  .markdown pre { margin: 10px 0 0; padding: var(--space-2) var(--space-3); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: auto; max-height: 360px; }
73
- .markdown pre code { padding: 0; border: 0; background: none; font-size: var(--type-xs); line-height: 1.55; white-space: pre; }
73
+ .markdown pre code { padding: 0; border: 0; background: none; font-size: var(--type-xs); line-height: var(--leading-code); white-space: pre; }
74
74
  .markdown blockquote { margin: 10px 0 0; padding-left: var(--space-3); border-left: 2px solid var(--border-strong); color: var(--text-2); }
75
75
  .markdown hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
76
- .markdown a { color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 2px; }
76
+ .markdown a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
77
77
  .markdown-table { overflow: auto; }
78
78
  .markdown table { border-collapse: collapse; font-size: var(--type-xs); }
79
79
  .markdown :is(th, td) { border: 1px solid var(--border); padding: 3px 8px; text-align: left; vertical-align: top; }
@@ -86,7 +86,7 @@
86
86
  .manager-fold-head {
87
87
  display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; width: 100%; min-width: 0; padding: 1px 2px;
88
88
  background: transparent; border: 0; border-radius: 0; appearance: none; -webkit-appearance: none;
89
- min-height: 0; height: auto; text-align: left; font: inherit; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: 1.6;
89
+ min-height: 0; height: auto; text-align: left; font: inherit; font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: var(--leading-xs);
90
90
  color: var(--text-2); box-shadow: none;
91
91
  }
92
92
  button.manager-fold-head { cursor: pointer; }
@@ -114,21 +114,22 @@ button.manager-fold-head::after {
114
114
  .manager-preview-tail > span { direction: ltr; unicode-bidi: isolate; }
115
115
  .manager-row-duration { margin-left: auto; order: 2; flex-shrink: 0; min-width: 6ch; text-align: right; color: var(--text-3); font-family: var(--font-mono); font-size: var(--type-xs); }
116
116
  .manager-status-glyph { order: 1; flex: none; font-family: var(--font-mono); color: var(--text-3); }
117
- .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head .manager-status-glyph { color: var(--accent); animation: manager-pulse 1.4s var(--ease-standard) infinite; }
117
+ .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head .manager-status-glyph { color: var(--accent); animation: manager-pulse var(--loop-breathe) var(--ease-in-out) infinite; }
118
118
  .manager-fold[data-status="failed"] > .manager-fold-head .manager-status-glyph { color: var(--err-text); }
119
119
  .manager-fold:is([data-status="running"], [data-status="thinking"]) > .manager-fold-head :is(.manager-activity-name, .manager-activity-verb) { color: var(--text); }
120
120
  @keyframes manager-pulse { 50% { opacity: 0.35; } }
121
121
  @media (prefers-reduced-motion: reduce) { .manager-status-glyph { animation: none !important; } }
122
122
  .manager-activity-text {
123
- white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--type-xs); line-height: 1.6;
124
- max-height: calc(10 * 1.6em); overflow: auto; padding-left: 2px; user-select: text; -webkit-user-select: text;
123
+ white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--type-xs); line-height: var(--leading-xs);
124
+ max-height: calc(10 * var(--leading-xs)); overflow: auto; padding-left: 2px; user-select: text; -webkit-user-select: text;
125
125
  }
126
126
  .manager-activity-text:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-ring); border-radius: var(--radius-xs); }
127
127
  .manager-activity-command { font-family: var(--font-mono); font-size: var(--type-xs); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2px; user-select: text; -webkit-user-select: text; }
128
128
  .manager-activity-reason { font-size: var(--type-xs); color: var(--err-text); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2px; }
129
129
  .manager-activity-note { font-size: var(--type-xs); color: var(--text-3); padding-left: 2px; }
130
130
 
131
- .manager-saved { color: var(--ok-text); font-size: var(--type-xs); }
131
+ /* A saved or deleted graph is a step done, not a check passed: the muted ink, never green (P-LNT-06). */
132
+ .manager-saved { color: var(--text-2); font-size: var(--type-xs); }
132
133
  .manager-row.manager-error { color: var(--err-text); font-size: var(--type-xs); white-space: pre-wrap; }
133
134
  .manager-card {
134
135
  display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);