waygraph 0.12.47 → 0.12.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +20 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1725,6 +1725,7 @@ async function cycleHighlightRings(page, highlights, gatesFast, opts) {
|
|
|
1725
1725
|
const defaultHoldMs = opts && opts.defaultHoldMs != null ? opts.defaultHoldMs : null;
|
|
1726
1726
|
const pace = opts && opts.pace !== undefined ? opts.pace : undefined;
|
|
1727
1727
|
let dock = opts && opts.todoDock;
|
|
1728
|
+
const advanceTodos = !(opts && opts.advanceTodos === false);
|
|
1728
1729
|
// Push stubAfter/before dock before the first ring so Method after-panels
|
|
1729
1730
|
// show the updated checklist immediately (not only after the ring cycle).
|
|
1730
1731
|
if (dock) {
|
|
@@ -1751,7 +1752,10 @@ async function cycleHighlightRings(page, highlights, gatesFast, opts) {
|
|
|
1751
1752
|
size: h.size,
|
|
1752
1753
|
weight: h.weight,
|
|
1753
1754
|
});
|
|
1754
|
-
|
|
1755
|
+
// Do NOT advanceTodoDock by ring index after stubAfter already set
|
|
1756
|
+
// progress - that reset current back to 0 and the next block looked
|
|
1757
|
+
// blank. Mid-act Method advance still uses syncTodoDockAdvance.
|
|
1758
|
+
if (dock && advanceTodos) {
|
|
1755
1759
|
dock = advanceTodoDock(dock, i);
|
|
1756
1760
|
if (opts && opts.todoDockRef) opts.todoDockRef.current = dock;
|
|
1757
1761
|
await page
|
|
@@ -1759,7 +1763,7 @@ async function cycleHighlightRings(page, highlights, gatesFast, opts) {
|
|
|
1759
1763
|
if (window.__wgSyncTodos) window.__wgSyncTodos({ sync: "set", dock: d });
|
|
1760
1764
|
}, dock)
|
|
1761
1765
|
.catch(() => {});
|
|
1762
|
-
} else if ((opts && opts.todos && opts.todos.length) || (h.todos && h.todos.length)) {
|
|
1766
|
+
} else if (!dock && ((opts && opts.todos && opts.todos.length) || (h.todos && h.todos.length))) {
|
|
1763
1767
|
const rows =
|
|
1764
1768
|
opts && opts.todos && opts.todos.length
|
|
1765
1769
|
? opts.todos
|
|
@@ -1863,7 +1867,14 @@ async function renderAfterStep(page, info) {
|
|
|
1863
1867
|
todoDock: info.todoDock,
|
|
1864
1868
|
todos: info.todos,
|
|
1865
1869
|
todoSync: info.todoSync,
|
|
1870
|
+
todoDockRef: info.todoDockRef,
|
|
1871
|
+
// stubAfter already authored progress - do not re-index by ring 0..n
|
|
1872
|
+
advanceTodos: false,
|
|
1866
1873
|
});
|
|
1874
|
+
// After-ring advances may have moved the dock - surface latest for caller.
|
|
1875
|
+
if (info.todoDockRef && info.todoDockRef.current) {
|
|
1876
|
+
info.todoDock = info.todoDockRef.current;
|
|
1877
|
+
}
|
|
1867
1878
|
const afterPayload = { ...info, stepLabel: miniStepLabel(info) };
|
|
1868
1879
|
await page
|
|
1869
1880
|
.evaluate((info) => {
|
|
@@ -3339,6 +3350,10 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3339
3350
|
})
|
|
3340
3351
|
.catch(() => {});
|
|
3341
3352
|
result = stepOutcome.result;
|
|
3353
|
+
// Mid-act Method fill/click advances live on todoDockRef - fold that
|
|
3354
|
+
// back into lastTodoDock before stubAfter / next-block keep, or the
|
|
3355
|
+
// next step reverts to the pre-act (blank / index-0) checklist.
|
|
3356
|
+
if (todoDockRef.current) lastTodoDock = todoDockRef.current;
|
|
3342
3357
|
// withExpectedFailure last block that SUCCEEDS on the intentional fail
|
|
3343
3358
|
// branch (e.g. submit-login -> LoginPage + error banner). Still show
|
|
3344
3359
|
// stubOnError rings + amber "expected outcome" panel - branching no
|
|
@@ -3467,6 +3482,7 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3467
3482
|
todoDock: lastTodoDock,
|
|
3468
3483
|
todoSync: appliedAfter.sync,
|
|
3469
3484
|
todoId: lastTodoDock && lastTodoDock.id,
|
|
3485
|
+
todoDockRef,
|
|
3470
3486
|
forceCollapsed:
|
|
3471
3487
|
!!process.env.WAYGRAPH_VIDEO ||
|
|
3472
3488
|
process.env.WAYGRAPH_MINI === "1" ||
|
|
@@ -3474,6 +3490,8 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3474
3490
|
? true
|
|
3475
3491
|
: undefined,
|
|
3476
3492
|
});
|
|
3493
|
+
// Ring cycle / stubAfter may have advanced the dock - persist for next block.
|
|
3494
|
+
if (todoDockRef.current) lastTodoDock = todoDockRef.current;
|
|
3477
3495
|
await gate();
|
|
3478
3496
|
}
|
|
3479
3497
|
await teardownOverlay(page);
|