spell 0.8.5 → 0.8.6

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 (56) hide show
  1. package/app/package.json +1 -1
  2. package/app/spaces/@spell/examples/Solitaire/__project.json5 +22 -4
  3. package/dist/epic/cli/epicGroups.js +1 -0
  4. package/dist/epic/command/epicArgs.js +3 -1
  5. package/dist/epic/comments/ThreadFacts.js +10 -2
  6. package/dist/epic/components/__pack/epics.entry.js +41 -41
  7. package/dist/epic/components/__pack/epics.pack.js +1517 -1481
  8. package/dist/epic/components/epic-answer/EpicAnswer.css +21 -11
  9. package/dist/epic/components/epic-answer/EpicAnswer.css.inline.js +1 -1
  10. package/dist/epic/components/epic-item/CollapseAll.css +3 -3
  11. package/dist/epic/components/epic-item/Fold.js +105 -81
  12. package/dist/epic/components/epic-overview/EpicOverview.js +0 -2
  13. package/dist/epic/components/epic-phase/EpicPhase.css +16 -7
  14. package/dist/epic/components/epic-phase/EpicPhase.css.inline.js +1 -1
  15. package/dist/epic/components/epic-phase/EpicPhase.js +1 -3
  16. package/dist/epic/components/epic-section/EpicFold.css +15 -0
  17. package/dist/epic/components/epic-section/EpicFold.css.inline.js +1 -1
  18. package/dist/epic/components/epic-section/EpicFold.js +80 -52
  19. package/dist/epic/components/epic-section/EpicSection.js +1 -3
  20. package/dist/epic/components/epic-section/EpicSection.types.js +1 -15
  21. package/dist/epic/components/epic-section/PhaseDrag.js +7 -4
  22. package/dist/epic/docs/__data/components.json5 +0 -42
  23. package/dist/epic/docs/epic-overview.html +6 -6
  24. package/dist/epic/docs/epic-phase.html +12 -5
  25. package/dist/epic/docs/epic-section.html +6 -4
  26. package/dist/epic/review/ReviewClient.js +9 -0
  27. package/dist/epic/tool/InboxCommands.js +12 -1
  28. package/dist/epic/tool/PLAN-DOC.md +9 -0
  29. package/dist/epic/tool/PlanDoc.js +17 -5
  30. package/dist/epic/tool/PlanDocCommands.js +6 -3
  31. package/dist/epic/tool/ReviewInbox.js +20 -4
  32. package/dist/epic/tools/_assets/commands.js +452 -451
  33. package/dist/epic/tools/_assets/core-reference.js +656 -655
  34. package/dist/epic/tools/_assets/spell-comments.js +575 -569
  35. package/dist/epic/tools/_assets/spell-doc-runtime.js +16 -3
  36. package/dist/epic/tools/_assets/spell-syntax.js +415 -414
  37. package/dist/epic/tools/_assets/spell-ui.entry.js +3 -2
  38. package/dist/epic/tools/_assets/spell-ui.js +7898 -7835
  39. package/dist/server/WebServer.js +2 -1
  40. package/dist/server/liveClient.d.ts +37 -1
  41. package/dist/server/liveClient.js +119 -6
  42. package/dist/server/site/PagePatch.d.ts +35 -1
  43. package/dist/server/site/PagePatch.js +94 -12
  44. package/dist/ui/components/ui-components/PackHotSwap.d.ts +6 -0
  45. package/dist/ui/components/ui-components/PackHotSwap.js +12 -2
  46. package/dist/ui/components/ui-section/UISection.d.ts +8 -0
  47. package/dist/ui/components/ui-section/UISection.js +22 -11
  48. package/dist/ui/docs-components/ui-docs-theme-bench/UIDocsThemeBench.d.ts +1 -1
  49. package/dist/util/spell/constants.js +1 -1
  50. package/epic/package.json +1 -1
  51. package/epic/skills/epic/SKILL.md +16 -0
  52. package/epic/src/AGENTS.md +29 -4
  53. package/epic/src/tool/PLAN-DOC.md +9 -0
  54. package/package.json +1 -1
  55. package/parser/package.json +1 -1
  56. package/ui/package.json +1 -1
@@ -18,11 +18,11 @@ import { E } from "spell/ui/core";
18
18
  import { PhaseIds } from "../../phases/index.js";
19
19
  import { EpicPage } from "../epic-page/EpicPage.js";
20
20
  import { SHOW_NOTE, stopIfOwn } from "../epic-review/EpicReview.types.js";
21
- import { Fold, expandAllUnder, foldAllUnder } from "../epic-item/Fold.js";
21
+ import { CONTROLS, DEEP_TIPS, Fold, expandAllUnder, foldAllUnder } from "../epic-item/Fold.js";
22
22
  import { BODY, FILE_PROTOCOL, NOTE, STACK_PROPERTY } from "./EpicSection.types.js";
23
23
  var _tmpl$ = /* @__PURE__ */ _$template(`<span slot=icon class=icon>`);
24
24
  var _tmpl$2 = /* @__PURE__ */ _$template(`<p>`);
25
- var _tmpl$3 = /* @__PURE__ */ _$template(`<div title><ui-section sticky collapsible><span slot=label class=header><span class=words></span></span><span slot=actions class=tools><slot></slot><!><!></span><div><!><slot></slot><!>`, 1);
25
+ var _tmpl$3 = /* @__PURE__ */ _$template(`<div title><ui-section sticky collapsible><span slot=label class=header><span class=words></span></span><span slot=actions class=tools><slot></slot></span><div><!><slot></slot><!>`, 1);
26
26
  var __create = Object.create;
27
27
  var __defProp2 = Object.defineProperty;
28
28
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -117,10 +117,12 @@ var _onSourceShown_dec;
117
117
  var _partSource_dec;
118
118
  var _inner_dec;
119
119
  var _onShowNote_dec;
120
+ var _onTipShown_dec;
120
121
  var _onInnerToggle_dec;
121
122
  var _expandAll_dec;
122
123
  var _collapseAll_dec;
123
- var _toggleAll_dec;
124
+ var _foldAll_dec;
125
+ var _toggleDeep_dec;
124
126
  var _isOpen_dec;
125
127
  var _elementSetup_dec;
126
128
  var _b;
@@ -142,7 +144,7 @@ var DOMEpicFoldElement = class extends (_a = E.DOMLoadableBodyElement, _contents
142
144
  _init = __decoratorStart(_a);
143
145
  __decorateElement(_init, 2, "contentsEntry", _contentsEntry_dec, DOMEpicFoldElement);
144
146
  __decoratorMetadata(_init, DOMEpicFoldElement);
145
- var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec = [E.protoMerged], _isOpen_dec = [E.cssState("open"), E.controlled("open")], _toggleAll_dec = [E.untracked], _collapseAll_dec = [E.untracked], _expandAll_dec = [E.untracked], _onInnerToggle_dec = [E.on("ui-opening", { target: "renderRoot" }), E.on("ui-closing", { target: "renderRoot" })], _onShowNote_dec = [E.on(SHOW_NOTE, { target: "renderRoot" })], _inner_dec = [E.state], _partSource_dec = [E.untracked], _onSourceShown_dec = [E.onChange("source", "isOpen", "isConnected")], _bodyIsLoaded_dec = [E.cssState("loaded")], _bodyFailed_dec = [E.cssState("error")], _watchHash_dec = [E.whileConnected], _followHash_dec = [E.untracked], _b) {
147
+ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec = [E.protoMerged], _isOpen_dec = [E.cssState("open"), E.controlled("open")], _toggleDeep_dec = [E.untracked], _foldAll_dec = [E.untracked], _collapseAll_dec = [E.untracked], _expandAll_dec = [E.untracked], _onInnerToggle_dec = [E.on("ui-opening", { target: "renderRoot" }), E.on("ui-closing", { target: "renderRoot" })], _onTipShown_dec = [E.onChange("isOpen", "inner")], _onShowNote_dec = [E.on(SHOW_NOTE, { target: "renderRoot" })], _inner_dec = [E.state], _partSource_dec = [E.untracked], _onSourceShown_dec = [E.onChange("source", "isOpen", "isConnected")], _bodyIsLoaded_dec = [E.cssState("loaded")], _bodyFailed_dec = [E.cssState("error")], _watchHash_dec = [E.whileConnected], _followHash_dec = [E.untracked], _b) {
146
148
  static {
147
149
  __name(this, "_EpicFold");
148
150
  }
@@ -160,10 +162,11 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
160
162
  originalEvent
161
163
  }), "detail")
162
164
  }));
163
- __publicField(this, "allOpenCell", new E.Cell(false));
164
165
  __publicField(this, "watchInner", (element) => {
165
166
  const section = element;
166
167
  void section.ready.then(() => this.inner = section.component);
168
+ element.addEventListener("click", (event) => this.onTitleRowClick(event, element));
169
+ element.addEventListener("keydown", (event) => this.onToggleKey(event, element));
167
170
  });
168
171
  __privateAdd(this, _inner, __runInitializers(_init2, 12, this)), __runInitializers(_init2, 15, this);
169
172
  __publicField(this, "body", new E.LoadableBody({
@@ -208,21 +211,12 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
208
211
  expand() {
209
212
  return this.disclosure.open();
210
213
  }
211
- /** Everything inside opened by its toggle-all (`allOpenCell`). */
212
- get allOpen() {
213
- return this.allOpenCell.get();
214
+ toggleDeep() {
215
+ if (this.isOpen) this.foldAll();
216
+ else void this.expandAll();
214
217
  }
215
- set allOpen(value) {
216
- this.allOpenCell.set(value);
217
- }
218
- toggleAll() {
219
- if (this.isOpen && this.allOpen) {
220
- this.allOpen = false;
221
- this.collapseAll();
222
- } else {
223
- this.allOpen = true;
224
- void this.expandAll();
225
- }
218
+ foldAll() {
219
+ return this.collapseAll() + (this.collapse() ? 1 : 0);
226
220
  }
227
221
  collapseAll() {
228
222
  this.keepTitlePut();
@@ -259,6 +253,44 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
259
253
  behavior: "instant"
260
254
  });
261
255
  }
256
+ /** ⌥+Enter or ⌥+Space on its fold button (`Fold.deepKey()`): `toggleDeep()`, as ⌥-click. */
257
+ onToggleKey(event, section) {
258
+ const onToggle = _EpicFold2.titleRowPath(event, section)?.some((node) => _EpicFold2.hasPart(node, "toggle"));
259
+ if (onToggle && Fold.deepKey(event)) this.toggleDeep();
260
+ }
261
+ /**
262
+ * The elements `event` passed through inside `section`'s OWN title row, innermost first; `undefined` when it
263
+ * didn't start there (its body, or a nested fold's title row, whose events bubble out through it).
264
+ */
265
+ static titleRowPath(event, section) {
266
+ const path = event.composedPath();
267
+ const title = path.findIndex((node) => node instanceof Element && node.getRootNode() === section.shadowRoot && _EpicFold2.hasPart(node, "title"));
268
+ return title < 0 ? void 0 : path.slice(0, title).filter((node) => node instanceof Element);
269
+ }
270
+ /**
271
+ * A click on its title row, but not on the fold button (`<ui-section>`'s own, which folds by itself): the row's
272
+ * empty space, its badge, an estimate pill, the gaps between its buttons fold it too, ⌥ as on the chevron
273
+ * (Owen, 2026-10-29: the empty space is part of the header)
274
+ * - NOT on a control (`CONTROLS`, any `<ui-button>` or `<epic-review>`), nor a drag that selected words
275
+ * - a native listener on the inner section: its shadow root's path is open to it (`composedPath()`)
276
+ */
277
+ onTitleRowClick(event, section) {
278
+ if (event.defaultPrevented) return;
279
+ const inTitle = _EpicFold2.titleRowPath(event, section);
280
+ if (!inTitle) return;
281
+ for (const node of inTitle) {
282
+ if (_EpicFold2.hasPart(node, "toggle") || node.matches(TITLE_ROW_CONTROLS)) return;
283
+ if (node.localName === "slot" && node.getRootNode() === this.domElement.renderRoot && node.matches(CONTROLS)) return;
284
+ }
285
+ const selection = window.getSelection();
286
+ if (selection && !selection.isCollapsed && String(selection)) return;
287
+ if (Fold.isDeep(event)) this.toggleDeep();
288
+ else this.toggle(event);
289
+ }
290
+ /** `node`'s `part` names hold `name`. */
291
+ static hasPart(node, name) {
292
+ return (node.getAttribute("part") ?? "").split(/\s+/).includes(name);
293
+ }
262
294
  onInnerToggle(event) {
263
295
  const detail = event.detail;
264
296
  const sender = event.target;
@@ -269,7 +301,11 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
269
301
  return;
270
302
  }
271
303
  event.preventDefault();
272
- this.toggle(detail.originalEvent);
304
+ if (Fold.isDeep(detail.originalEvent)) this.toggleDeep();
305
+ else this.toggle(detail.originalEvent);
306
+ }
307
+ onTipShown(open, inner) {
308
+ if (inner) inner.toggleTipMore = open ? DEEP_TIPS.fold : DEEP_TIPS.open;
273
309
  }
274
310
  onShowNote(event) {
275
311
  if (stopIfOwn(event)) void this.reveal();
@@ -348,12 +384,10 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
348
384
  var _el$5 = _el$4.firstChild;
349
385
  var _el$6 = _el$4.nextSibling;
350
386
  var _el$7 = _el$6.firstChild;
351
- var _el$8 = _el$7.nextSibling;
352
- var _el$9 = _el$8.nextSibling;
353
- var _el$10 = _el$6.nextSibling;
354
- var _el$12 = _el$10.firstChild;
355
- var _el$13 = _el$12.nextSibling;
356
- var _el$14 = _el$13.nextSibling;
387
+ var _el$8 = _el$6.nextSibling;
388
+ var _el$10 = _el$8.firstChild;
389
+ var _el$11 = _el$10.nextSibling;
390
+ var _el$12 = _el$11.nextSibling;
357
391
  var _ref$ = _self$.watchInner;
358
392
  typeof _ref$ === "function" || Array.isArray(_ref$) ? _$ref(() => {
359
393
  return _ref$;
@@ -380,23 +414,14 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
380
414
  _el$7._$owner = _$getOwner();
381
415
  _$insert(_el$6, () => {
382
416
  return pieces.tools?.();
383
- }, _el$8);
384
- _$insert(_el$6, () => {
385
- return Fold.toggleAllButton({
386
- expandLabel: _self$.translationForKey("expandAll", { name: _self$.contentsEntry().label }),
387
- collapseLabel: _self$.translationForKey("collapseAll", { name: _self$.contentsEntry().label }),
388
- part: _self$.partForName("toggle-all"),
389
- expanded: /* @__PURE__ */ __name(() => _self$.isOpen && _self$.allOpen, "expanded"),
390
- onToggle: /* @__PURE__ */ __name(() => _self$.toggleAll(), "onToggle")
391
- });
392
- }, _el$9);
393
- _$insert(_el$10, _$createComponent(Show, {
417
+ }, null);
418
+ _$insert(_el$8, _$createComponent(Show, {
394
419
  get when() {
395
420
  return _self$.failureText;
396
421
  },
397
422
  get children() {
398
- var _el$11 = _tmpl$2();
399
- _$insert(_el$11, () => {
423
+ var _el$9 = _tmpl$2();
424
+ _$insert(_el$9, () => {
400
425
  return _self$.failureText;
401
426
  });
402
427
  _$effect(() => {
@@ -405,19 +430,19 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
405
430
  t: _self$.partForName("note")
406
431
  };
407
432
  }, ({ e, t }, _p$) => {
408
- _$className(_el$11, e, _p$?.e);
409
- t !== _p$?.t && _$setAttribute(_el$11, "part", t);
433
+ _$className(_el$9, e, _p$?.e);
434
+ t !== _p$?.t && _$setAttribute(_el$9, "part", t);
410
435
  });
411
- return _el$11;
436
+ return _el$9;
412
437
  }
413
- }), _el$12);
414
- _$insert(_el$10, () => {
438
+ }), _el$10);
439
+ _$insert(_el$8, () => {
415
440
  return pieces.before?.();
416
- }, _el$13);
417
- _el$13._$owner = _$getOwner();
418
- _$insert(_el$10, () => {
441
+ }, _el$11);
442
+ _el$11._$owner = _$getOwner();
443
+ _$insert(_el$8, () => {
419
444
  return pieces.after?.();
420
- }, _el$14);
445
+ }, _el$12);
421
446
  _$effect(() => {
422
447
  return {
423
448
  e: _$readShallow(_self$.rootClass),
@@ -445,9 +470,9 @@ var _EpicFold = class _EpicFold2 extends (_b = E.UIComponent, _elementSetup_dec
445
470
  h !== _p$?.h && _$setAttribute(_el$2, "badge", h);
446
471
  r !== _p$?.r && _$setAttribute(_el$6, "part", r);
447
472
  d !== _p$?.d && _$setAttribute(_el$7, "name", d);
448
- _$className(_el$10, l, _p$?.l);
449
- u !== _p$?.u && _$setAttribute(_el$10, "part", u);
450
- _$style(_el$10, c, _p$?.c);
473
+ _$className(_el$8, l, _p$?.l);
474
+ u !== _p$?.u && _$setAttribute(_el$8, "part", u);
475
+ _$style(_el$8, c, _p$?.c);
451
476
  });
452
477
  return _el$;
453
478
  }
@@ -487,10 +512,12 @@ _init2 = __decoratorStart(_b);
487
512
  _isOpen = /* @__PURE__ */ new WeakMap();
488
513
  _inner = /* @__PURE__ */ new WeakMap();
489
514
  __decorateElement(_init2, 4, "isOpen", _isOpen_dec, _EpicFold, _isOpen);
490
- __decorateElement(_init2, 1, "toggleAll", _toggleAll_dec, _EpicFold);
515
+ __decorateElement(_init2, 1, "toggleDeep", _toggleDeep_dec, _EpicFold);
516
+ __decorateElement(_init2, 1, "foldAll", _foldAll_dec, _EpicFold);
491
517
  __decorateElement(_init2, 1, "collapseAll", _collapseAll_dec, _EpicFold);
492
518
  __decorateElement(_init2, 1, "expandAll", _expandAll_dec, _EpicFold);
493
519
  __decorateElement(_init2, 1, "onInnerToggle", _onInnerToggle_dec, _EpicFold);
520
+ __decorateElement(_init2, 1, "onTipShown", _onTipShown_dec, _EpicFold);
494
521
  __decorateElement(_init2, 1, "onShowNote", _onShowNote_dec, _EpicFold);
495
522
  __decorateElement(_init2, 4, "inner", _inner_dec, _EpicFold, _inner);
496
523
  __decorateElement(_init2, 1, "partSource", _partSource_dec, _EpicFold);
@@ -508,6 +535,7 @@ __publicField(_EpicFold, "elementSetup", __runInitializers(_init2, 16, _EpicFold
508
535
  })), __runInitializers(_init2, 19, _EpicFold);
509
536
  var EpicFold = _EpicFold;
510
537
  var EXPAND_ROUNDS = 6;
538
+ var TITLE_ROW_CONTROLS = "a[href], button, input, select, textarea, label, summary, [role='button'], [contenteditable], ui-button, epic-review";
511
539
  var SOURCE = "source";
512
540
  export {
513
541
  DOMEpicFoldElement,
@@ -30,7 +30,6 @@ import { DOMEpicFoldElement, EpicFold } from "./EpicFold.js";
30
30
  import { PhaseDrag } from "./PhaseDrag.js";
31
31
  import { StateFilter } from "./StateFilter.js";
32
32
  import { CLOSED_STATUSES, COUNT_ATTRIBUTES, COUNT_CHANGED, COUNTED, EMPTY, FILTER, FILTER_KEY, FILTER_STATES, ITEM_KINDS, NEW_HERE, NUMBERED_BLOCKS, PHASE_FILTER_STATES, PHASE_TOGGLES, PHASE_TOGGLES_KEY, REPORT, SECTION_LOOKS, STAYS_FOLDED_KINDS, TOGGLE, PhaseState } from "./EpicSection.types.js";
33
- import collapseAllCSS from "../epic-item/CollapseAll.css.inline.js";
34
33
  import foldCSS from "./EpicFold.css.inline.js";
35
34
  import sectionCSS from "./EpicSection.css.inline.js";
36
35
  import runsPageCSS from "./EpicSection.runs.css.inline.js";
@@ -266,7 +265,7 @@ var _EpicSection = class _EpicSection2 extends (_a = EpicFold, _vocabulary_dec =
266
265
  /**
267
266
  * It stays FOLDED (the Log, `STAYS_FOLDED_KINDS`): the page's expand-all leaves it folded (`expandAllUnder()`),
268
267
  * and every load starts it folded (the docs runtime's `STAYS_FOLDED`).
269
- * - a link into it, a click on its title and its own expand-all still open it
268
+ * - a link into it, a click on its title and ⌥-click on its own chevron still open it
270
269
  */
271
270
  get staysFolded() {
272
271
  return STAYS_FOLDED_KINDS.includes(this.kind ?? "");
@@ -1004,7 +1003,6 @@ __publicField(_EpicSection, "elementSetup", __runInitializers(_init, 20, _EpicSe
1004
1003
  styleSheets: {
1005
1004
  "epic-tooltip": tooltipCSS,
1006
1005
  "epic-fold": foldCSS,
1007
- "epic-collapse-all": collapseAllCSS,
1008
1006
  "epic-state-chips": chipsCSS,
1009
1007
  "epic-section": sectionCSS
1010
1008
  }
@@ -44,10 +44,6 @@ var FOLD_PARTS = [
44
44
  description: "The `<ui-section>` drawing the title bar and fold: its own parts through `::part()` from inside."
45
45
  },
46
46
  { name: "body", description: "Around its children: sets `--epic-stack` for them." },
47
- {
48
- name: "toggle-all",
49
- description: "Always, before the fold chevron, ONE double chevron (Owen, 2026-10-25): down, it opens it and everything inside it (sections, phases, items, cards and panels, parts loading as they open); up once it has, it folds everything inside again."
50
- },
51
47
  { name: "note", description: "The `Loads from parts/x.html ...` line, when its part can't load." }
52
48
  ];
53
49
  var FOLD_STATES = [
@@ -61,17 +57,7 @@ var FOLD_TEXTS = [
61
57
  text: "Loads from {source} when opened (needs the page server).",
62
58
  description: "Its part can't load: the page was opened from disk."
63
59
  },
64
- { key: "partError", text: "Couldn't load {source}.", description: "Its part couldn't be loaded." },
65
- {
66
- key: "expandAll",
67
- text: "Open everything in {name}",
68
- description: "The expand-all button's name and tooltip; `name` its title (`3. Questions`)."
69
- },
70
- {
71
- key: "collapseAll",
72
- text: "Fold everything in {name}",
73
- description: "The collapse-all button's name and tooltip; `name` its title (`3. Questions`)."
74
- }
60
+ { key: "partError", text: "Couldn't load {source}.", description: "Its part couldn't be loaded." }
75
61
  ];
76
62
  var STACK_PROPERTY = "--epic-stack";
77
63
  var FILE_PROTOCOL = "file-protocol";
@@ -89,11 +89,14 @@ var PhaseDrag = class _PhaseDrag {
89
89
  ////////////////
90
90
  // ## The drag
91
91
  ////////////////
92
- /** The drag starts: the phase marked as dragged, the section as dragging (no text selection). */
92
+ /**
93
+ * The drag starts: the phase marked as dragged, the section as dragging (no text selection), and every phase too,
94
+ * so its title row shows the grabbing cursor over its own (`EpicPhase.css`)
95
+ */
93
96
  begin(phase) {
94
97
  this.drag = { phase, from: this.phases.indexOf(phase) + 1 };
95
98
  phase.setAttribute(DRAGGED, "");
96
- this.host.setAttribute(DRAGGING, "");
99
+ for (const each of [this.host, ...this.phases]) each.setAttribute(DRAGGING, "");
97
100
  }
98
101
  /** The pointer is at `y`: where it would land, drawn as a line on that phase (`data-drop`); none where it can't. */
99
102
  over(y) {
@@ -134,7 +137,7 @@ var PhaseDrag = class _PhaseDrag {
134
137
  /** The drag is over: its marks off the page. */
135
138
  end() {
136
139
  this.drag?.phase.removeAttribute(DRAGGED);
137
- this.host.removeAttribute(DRAGGING);
140
+ for (const each of [this.host, ...this.phases]) each.removeAttribute(DRAGGING);
138
141
  for (const phase of this.host.querySelectorAll(`[${DROP}]`)) phase.removeAttribute(DROP);
139
142
  this.drag = void 0;
140
143
  }
@@ -152,7 +155,7 @@ var PhaseDrag = class _PhaseDrag {
152
155
  }
153
156
  /**
154
157
  * The phase whose TITLE ROW `event` pressed, one of `host`'s own; `undefined` for anything else: its body, or one
155
- * of the row's controls (the review pills, a link, the collapse-all), which keep their clicks.
158
+ * of the row's controls (the review pills, a link), which keep their clicks.
156
159
  */
157
160
  static phaseFrom(event, host) {
158
161
  const path = event.composedPath();
@@ -3370,10 +3370,6 @@
3370
3370
  "name": "body",
3371
3371
  "description": "Around its children: sets `--epic-stack` for them."
3372
3372
  },
3373
- {
3374
- "name": "toggle-all",
3375
- "description": "Always, before the fold chevron, ONE double chevron (Owen, 2026-10-25): down, it opens it and everything inside it (sections, phases, items, cards and panels, parts loading as they open); up once it has, it folds everything inside again."
3376
- },
3377
3373
  {
3378
3374
  "name": "note",
3379
3375
  "description": "The `Loads from parts/x.html ...` line, when its part can't load."
@@ -3429,16 +3425,6 @@
3429
3425
  "text": "Couldn't load {source}.",
3430
3426
  "description": "Its part couldn't be loaded."
3431
3427
  },
3432
- {
3433
- "key": "expandAll",
3434
- "text": "Open everything in {name}",
3435
- "description": "The expand-all button's name and tooltip; `name` its title (`3. Questions`)."
3436
- },
3437
- {
3438
- "key": "collapseAll",
3439
- "text": "Fold everything in {name}",
3440
- "description": "The collapse-all button's name and tooltip; `name` its title (`3. Questions`)."
3441
- },
3442
3428
  {
3443
3429
  "key": "title",
3444
3430
  "text": "Overview",
@@ -4297,10 +4283,6 @@
4297
4283
  "name": "body",
4298
4284
  "description": "Around its children: sets `--epic-stack` for them."
4299
4285
  },
4300
- {
4301
- "name": "toggle-all",
4302
- "description": "Always, before the fold chevron, ONE double chevron (Owen, 2026-10-25): down, it opens it and everything inside it (sections, phases, items, cards and panels, parts loading as they open); up once it has, it folds everything inside again."
4303
- },
4304
4286
  {
4305
4287
  "name": "note",
4306
4288
  "description": "The `Loads from parts/x.html ...` line, when its part can't load."
@@ -4367,16 +4349,6 @@
4367
4349
  "text": "Couldn't load {source}.",
4368
4350
  "description": "Its part couldn't be loaded."
4369
4351
  },
4370
- {
4371
- "key": "expandAll",
4372
- "text": "Open everything in {name}",
4373
- "description": "The expand-all button's name and tooltip; `name` its title (`3. Questions`)."
4374
- },
4375
- {
4376
- "key": "collapseAll",
4377
- "text": "Fold everything in {name}",
4378
- "description": "The collapse-all button's name and tooltip; `name` its title (`3. Questions`)."
4379
- },
4380
4352
  {
4381
4353
  "key": "statusTodo",
4382
4354
  "text": "To do",
@@ -5184,10 +5156,6 @@
5184
5156
  "name": "body",
5185
5157
  "description": "Around its children: sets `--epic-stack` for them."
5186
5158
  },
5187
- {
5188
- "name": "toggle-all",
5189
- "description": "Always, before the fold chevron, ONE double chevron (Owen, 2026-10-25): down, it opens it and everything inside it (sections, phases, items, cards and panels, parts loading as they open); up once it has, it folds everything inside again."
5190
- },
5191
5159
  {
5192
5160
  "name": "note",
5193
5161
  "description": "The `Loads from parts/x.html ...` line, when its part can't load."
@@ -5266,16 +5234,6 @@
5266
5234
  "text": "Couldn't load {source}.",
5267
5235
  "description": "Its part couldn't be loaded."
5268
5236
  },
5269
- {
5270
- "key": "expandAll",
5271
- "text": "Open everything in {name}",
5272
- "description": "The expand-all button's name and tooltip; `name` its title (`3. Questions`)."
5273
- },
5274
- {
5275
- "key": "collapseAll",
5276
- "text": "Fold everything in {name}",
5277
- "description": "The collapse-all button's name and tooltip; `name` its title (`3. Questions`)."
5278
- },
5279
5237
  {
5280
5238
  "key": "epicsTitle",
5281
5239
  "text": "Epics"
@@ -133,9 +133,9 @@
133
133
  its own.
134
134
  </li>
135
135
  <li>
136
- Expand-all, the double chevron pointing down at its title's end, opens it and everything in it at once:
137
- its sub-sections, their items and asides, parts loading as they open. Collapse-all, beside it while it's
138
- open, folds everything inside again.
136
+ ⌥-click (Alt-click) on its chevron or title opens it and everything in it at once: its sub-sections,
137
+ their items and asides, parts loading as they open. On an open Overview it folds everything inside,
138
+ then the Overview itself.
139
139
  </li>
140
140
  <li>Its number is its place among the page's blocks: always <code>1</code>.</li>
141
141
  <li>
@@ -159,8 +159,8 @@
159
159
  </p>
160
160
  <ul>
161
161
  <li>
162
- They sit after the title, before its review buttons (while the page is reviewed), expand-all,
163
- collapse-all and the fold chevron.
162
+ They sit after the title, before its review buttons (while the page is reviewed); the fold chevron
163
+ is at the row's start.
164
164
  </li>
165
165
  <li>A click on one never folds or unfolds it.</li>
166
166
  <li>
@@ -208,7 +208,7 @@
208
208
  </p>
209
209
  <ul>
210
210
  <li>
211
- In its title row, in order: the bullhorn, then Make Todo and Revisit in one pill, then expand-all, collapse-all and the fold chevron.
211
+ In its title row, in order: the bullhorn, then Make Todo and Revisit in one pill; the fold chevron at the row's start.
212
212
  </li>
213
213
  <li>
214
214
  Revisit opens it and its note box, right under the title row, above the summary. Leaving the box empty
@@ -159,13 +159,20 @@
159
159
  </p>
160
160
  <ul>
161
161
  <li>
162
- They sit after the title, before its review buttons (while the page is reviewed), expand-all,
163
- collapse-all and the fold chevron.
162
+ They sit after the title, before its review buttons (while the page is reviewed); the fold chevron is
163
+ at the row's start.
164
164
  </li>
165
165
  <li>
166
- Expand-all, the double chevron pointing down, shows folded or open: it opens the block and everything
167
- in it (sections, phases, items, asides and cards), parts loading as they open. Collapse-all shows
168
- beside it while it's open.
166
+ ⌥-click (Alt-click) on its chevron or title, or ⌥+Enter on the focused chevron, opens it and
167
+ everything in it (sections, phases, items, asides and cards), parts loading as they open; on an open
168
+ one it folds everything inside, then the block itself. The chevron's tooltip says so. Its title row
169
+ has no expand-all or collapse-all button of its own (epic <code>epic-engine</code> I161): the page's
170
+ toolbar keeps one.
171
+ </li>
172
+ <li>
173
+ The pointer over its chevron, status icon, title, time pill and buttons. Over the row's empty space:
174
+ the grab cursor on a to-do phase while the page is reviewed (it drags there), else the pointer, as a
175
+ click there folds it.
169
176
  </li>
170
177
  <li>A click on one never folds or unfolds it.</li>
171
178
  <li>The docs runtime puts the block's bullhorn there too, so it never sits over a button.</li>
@@ -144,12 +144,14 @@
144
144
  <ul>
145
145
  <li>
146
146
  They sit after the title, before its tools (the Phases toggles, an item section's state filter, an
147
- Overview sub-section's review buttons), expand-all, collapse-all and the fold chevron.
147
+ Overview sub-section's review buttons); the fold chevron is at the row's start.
148
148
  </li>
149
149
  <li>
150
- Expand-all, the double chevron pointing down, shows folded or open: it opens the block and everything
151
- in it (sections, phases, items, asides and cards), parts loading as they open. Collapse-all shows
152
- beside it while it's open.
150
+ ⌥-click (Alt-click) on its chevron or title, or ⌥+Enter on the focused chevron, opens it and
151
+ everything in it (sections, phases, items, asides and cards), parts loading as they open; on an open
152
+ one it folds everything inside, then the block itself. The chevron's tooltip says so. Its title row
153
+ has no expand-all or collapse-all button of its own (epic <code>epic-engine</code> I161): the page's
154
+ toolbar keeps one.
153
155
  </li>
154
156
  <li>A click on one never folds or unfolds it.</li>
155
157
  <li>The docs runtime puts the block's bullhorn there too, so it never sits over a button.</li>
@@ -257,6 +257,9 @@ var ReviewClient = class _ReviewClient extends PageStore {
257
257
  * a revisit carrying a pick keeps the pick ("pick B, but ..." without the "but")
258
258
  * - else:
259
259
  * - Approve and Make Todo mark it
260
+ * - Approve (Accept plan) on a revisit made of his comments in its text KEEPS them (epic `epic-engine` I163;
261
+ * Owen, 2026-10-29: "just incorporate the feedback and auto-approve rather than asking me again"):
262
+ * `{ action: "approve", note, comments }`; clicked again, it's that revisit again
260
263
  * - Revisit opens the note box; but on a part with Owen's comments in its text (`commentsIn()`) and nothing
261
264
  * typed, it marks the revisit at once, its note pointing at them, its `comments` naming them: the inline
262
265
  * comments ARE his note (Owen, 2026-10-26, epic `epic-engine` I140: "don't make me type in the comment section")
@@ -275,6 +278,8 @@ var ReviewClient = class _ReviewClient extends PageStore {
275
278
  return "chosen";
276
279
  }
277
280
  if (mark?.action === action && !isImmediate(mark)) {
281
+ if (action === "approve" && mark.comments?.length)
282
+ return void this.save(id, { action: "revisit", when: "soon", note: mark.note ?? "", ...commentsOf(mark) });
278
283
  const pick = action === "revisit" ? pickOf(mark) : {};
279
284
  return void this.save(id, pick.pick ? { action: "pick", ...pick } : null);
280
285
  }
@@ -297,6 +302,10 @@ var ReviewClient = class _ReviewClient extends PageStore {
297
302
  return "chosen";
298
303
  }
299
304
  }
305
+ if (action === "approve" && mark?.action === "revisit" && !isImmediate(mark) && mark.comments?.length) {
306
+ void this.save(id, { action, ...mark.note && { note: mark.note }, ...commentsOf(mark) });
307
+ return "chosen";
308
+ }
300
309
  void this.save(id, { action });
301
310
  return "chosen";
302
311
  }
@@ -289,6 +289,8 @@ var InboxCommands = class {
289
289
  * Print the work `wait` took (`takeWork()`'s `{ now, sent, canceled }`), each mark with its item (`describeItem()`):
290
290
  * id, kind, status, title, the mark, the note, a pick's option card.
291
291
  * - a send's comments too (Send hands them over, Owen 2026-10-10): where each is, its words, his latest reply
292
+ * - an approve carrying his comments in its text (epic `epic-engine` I163): "accepted, with comments to fold in:
293
+ * C4, C5", each comment under it, and how to fold them in (`--plan ... --accepted`) with no second Accept
292
294
  * - plain lines for Claude to read, then what to run next
293
295
  * - `guides`: the sends taken from the epic's guides (P13), each page's comments under it, with the commands that
294
296
  * answer them one at a time (`epic comments working` / `answer`)
@@ -341,7 +343,11 @@ var InboxCommands = class {
341
343
  if (mark.note) lines.push(` ${mark.action === "test" ? "comment" : "note"}: "${mark.note}"`);
342
344
  if (mark.shot) lines.push(` screenshot: ${mark.shot}`);
343
345
  }
344
- if (mark.inlineComments?.length) {
346
+ if (mark.action === "approve" && mark.inlineComments?.length) {
347
+ const ids = mark.inlineComments.map((comment) => comment.id);
348
+ lines.push(` accepted, with comments to fold in: ${upper(ids)}`);
349
+ for (const comment of mark.inlineComments) lines.push(...commentLines(comment, " "));
350
+ } else if (mark.inlineComments?.length) {
345
351
  lines.push(` his comments in its text, the revisit's content (${mark.inlineComments.length}):`);
346
352
  for (const comment of mark.inlineComments) lines.push(...commentLines(comment, " "));
347
353
  }
@@ -352,10 +358,15 @@ var InboxCommands = class {
352
358
  if (sent.comments.length) lines.push(` comments, to answer on their threads (${sent.comments.length}):`);
353
359
  for (const comment of sent.comments) lines.push(...commentLines(comment, " "));
354
360
  const talk = sent.marks.filter((mark) => mark.action === "revisit");
361
+ const fold = sent.marks.filter((mark) => mark.action === "approve" && mark.inlineComments?.length);
355
362
  if (sent.marks.length || sent.urgency.length)
356
363
  lines.push(
357
364
  `next: \`epic inbox apply ${name}\` (approve, pick, todo, a todo's next phase or drop, skip, new, test results, urgency)`
358
365
  );
366
+ if (fold.length)
367
+ lines.push(
368
+ `then fold each accepted part's comments in, no second Accept: a phase's plan with \`epic update ${name}#P<n> --plan "..." --accepted\`; answer each comment (\`epic inbox done ${name}#<C id> --file <answer.html>\`); only one against what he decided, or changing the scope a lot, becomes a Q item instead`
369
+ );
359
370
  if (talk.length)
360
371
  lines.push(
361
372
  `then talk over ${talk.map((mark) => mark.id).join(", ")} in the chat; \`epic inbox clear ${name}#<id>\` after each`
@@ -191,6 +191,15 @@ As `plan-doc.md`, "Ids":
191
191
  (`<epic-review buttons="plan">`).
192
192
  - Accept plan is the inbox mark `approve` on the phase; `inbox apply` writes the field's `accepted` (now) and
193
193
  `plan="accepted"` (`PlanDoc.acceptPlan()`): "plan accepted: build it".
194
+ - Accept plan pressed on a phase whose text holds Owen's comments (its auto revisit, I158) KEEPS them (epic
195
+ `epic-engine` I163): the mark `{ action: "approve", note, comments: ["c4", "c5"] }`; a comment saved on a phase
196
+ already approved joins it, still approved (`ReviewInbox.noteComment()`).
197
+ - `wait` prints "accepted, with comments to fold in: C4, C5", each comment under it; `inbox apply` accepts the
198
+ plan as usual ("plan accepted: build it, with comments to fold in: C4, C5") and leaves the comments waiting.
199
+ - Claude folds them in and keeps it accepted: `update <name>#P3 --plan "..." --accepted` writes the plan
200
+ `accepted` (logged `P3 plan written: accepted, Owen's comments folded in`), no `waiting`, no spinner; then
201
+ answers each comment. Without `--accepted`, `--plan` waits as before.
202
+ - Only a comment against something he decided, or changing the scope a lot, becomes a Q item instead.
194
203
  - Children in that order, always (the vocabulary's `childOrder: "listed"`):
195
204
  the tool puts each where it belongs.
196
205
  - Owen's kept notes (`<epic-reply>`) after Requests, before Goal; slotted children (status cards) at the end.