@outerlayer/cli 0.36.0-next.20261101121137 → 0.36.0-next.20261101131017
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/build-info.json +1 -1
- package/dist/{chunk-H3TI7BQX.js → chunk-KCUX5I5W.js} +28 -21
- package/dist/{chunk-3YX7FHYP.js → chunk-W46566FP.js} +1 -1
- package/dist/{cli-CMO2CMXG.js → cli-EMQEIYSR.js} +3 -3
- package/dist/{demo-voice-cmd-SMR3QVZA.js → demo-voice-cmd-H4PCO2PT.js} +1 -1
- package/dist/{emit-demo-cmd-ELRNY5FA.js → emit-demo-cmd-VKGN74NW.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/recorder.cjs +23 -22
- package/dist/{work-proofs-cmd-CVDZARET.js → work-proofs-cmd-3GPGH4RL.js} +1 -1
- package/dist/{work-proofs-record-RCD7XSUK.js → work-proofs-record-AC4GYMQA.js} +2 -2
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +2 -2
- package/skill-pack/maintained/outerlayer-evidence/SKILL.md +2 -2
- package/skill-pack/maintained/outerlayer-evidence/references/demo.md +11 -13
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-01T13:12:46.857Z+5d02743","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -2495,18 +2495,20 @@ async function measureDemo(video, duration, tools) {
|
|
|
2495
2495
|
|
|
2496
2496
|
// src/demo/media.ts
|
|
2497
2497
|
var SEGMENT_FPS = 25;
|
|
2498
|
-
|
|
2498
|
+
var DEMO_CRF = 38;
|
|
2499
|
+
function encodeArgs(duration, output, crf) {
|
|
2499
2500
|
return [
|
|
2500
2501
|
"-c:v",
|
|
2501
2502
|
"libvpx-vp9",
|
|
2502
2503
|
"-b:v",
|
|
2503
2504
|
"0",
|
|
2504
2505
|
"-crf",
|
|
2505
|
-
|
|
2506
|
+
String(crf),
|
|
2507
|
+
// The `good` encoder makes a file about half the size of the `realtime` one at the same quality.
|
|
2506
2508
|
"-deadline",
|
|
2507
|
-
"
|
|
2509
|
+
"good",
|
|
2508
2510
|
"-cpu-used",
|
|
2509
|
-
"
|
|
2511
|
+
"4",
|
|
2510
2512
|
"-row-mt",
|
|
2511
2513
|
"1",
|
|
2512
2514
|
"-pix_fmt",
|
|
@@ -2568,7 +2570,7 @@ function segmentsArgs(plan) {
|
|
|
2568
2570
|
"[vout]",
|
|
2569
2571
|
...plan.narrated ? ["-map", "[speech]", "-c:a", "libopus", "-b:a", "48k"] : ["-an"],
|
|
2570
2572
|
...keyFrames.length > 0 ? ["-force_key_frames", keyFrames.map((at) => at.toFixed(3)).join(",")] : [],
|
|
2571
|
-
...encodeArgs(plan.duration, plan.output)
|
|
2573
|
+
...encodeArgs(plan.duration, plan.output, plan.crf ?? DEMO_CRF)
|
|
2572
2574
|
];
|
|
2573
2575
|
}
|
|
2574
2576
|
function rangeArgs(plan) {
|
|
@@ -2587,7 +2589,7 @@ function rangeArgs(plan) {
|
|
|
2587
2589
|
"-map",
|
|
2588
2590
|
"0:v:0",
|
|
2589
2591
|
...plan.narrated ? ["-map", "0:a:0", "-c:a", "libopus", "-b:a", "48k"] : ["-an"],
|
|
2590
|
-
...encodeArgs(duration, plan.output)
|
|
2592
|
+
...encodeArgs(duration, plan.output, DEMO_CRF)
|
|
2591
2593
|
];
|
|
2592
2594
|
}
|
|
2593
2595
|
function durationFromProbe(formatDuration, lastPacketLines) {
|
|
@@ -3546,6 +3548,7 @@ function deadAirRefusal(problems) {
|
|
|
3546
3548
|
return `the demo holds dead air: ${problems.join("; ")} \u2014 tell each step as a beat with demo.say(), so the demo shows only narrated steps`;
|
|
3547
3549
|
}
|
|
3548
3550
|
var millis2 = (seconds) => Math.round(seconds * 1e3) / 1e3;
|
|
3551
|
+
var WHOLE_CRF_STEPS = [DEMO_CRF, 44, 50];
|
|
3549
3552
|
async function renderWhole(params) {
|
|
3550
3553
|
const { manifest, manifestDir, videoPath, work, speakerFor, narrated, media } = params;
|
|
3551
3554
|
const output = join(work, "demo.webm");
|
|
@@ -3613,21 +3616,25 @@ async function renderWhole(params) {
|
|
|
3613
3616
|
}
|
|
3614
3617
|
}
|
|
3615
3618
|
const viewport = manifest.viewport;
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3619
|
+
for (const crf of WHOLE_CRF_STEPS) {
|
|
3620
|
+
try {
|
|
3621
|
+
media.renderSegments({
|
|
3622
|
+
video: videoPath,
|
|
3623
|
+
spans: timeline.spans,
|
|
3624
|
+
outStarts: timeline.outStarts,
|
|
3625
|
+
duration: timeline.duration,
|
|
3626
|
+
crossfade: CROSSFADE,
|
|
3627
|
+
chapterStarts: timeline.chapters.map((range) => range.start),
|
|
3628
|
+
output,
|
|
3629
|
+
narrated,
|
|
3630
|
+
speech,
|
|
3631
|
+
...viewport === void 0 ? {} : { crop: viewport },
|
|
3632
|
+
...crf === DEMO_CRF ? {} : { crf }
|
|
3633
|
+
});
|
|
3634
|
+
} catch (err) {
|
|
3635
|
+
throw new EmitDemoError(`ffmpeg could not cut the demo: ${String(err)}`);
|
|
3636
|
+
}
|
|
3637
|
+
if (statSync(output).size <= ARTIFACT_MAX_BYTES) break;
|
|
3631
3638
|
}
|
|
3632
3639
|
let measure;
|
|
3633
3640
|
try {
|
|
@@ -369,7 +369,7 @@ async function runWorkProofs(opts) {
|
|
|
369
369
|
async function runWorkProofsCommand(opts) {
|
|
370
370
|
try {
|
|
371
371
|
if (opts.record) {
|
|
372
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
372
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-AC4GYMQA.js');
|
|
373
373
|
const result2 = await runWorkProofsRecord(opts);
|
|
374
374
|
process.exitCode = result2.exitCode;
|
|
375
375
|
return;
|
|
@@ -4392,7 +4392,7 @@ its criterion, and the new record retires the old record. The id must be the ite
|
|
|
4392
4392
|
as \`work demo --item <n> --json\` prints it.
|
|
4393
4393
|
`
|
|
4394
4394
|
).action(async (manifest, opts) => {
|
|
4395
|
-
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-
|
|
4395
|
+
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-VKGN74NW.js');
|
|
4396
4396
|
let item;
|
|
4397
4397
|
if (opts.item !== void 0) {
|
|
4398
4398
|
item = parseTrackerNumber(opts.item);
|
|
@@ -4435,7 +4435,7 @@ as \`work demo --item <n> --json\` prints it.
|
|
|
4435
4435
|
}
|
|
4436
4436
|
});
|
|
4437
4437
|
program2.command("demo-voice", { hidden: true }).description("Speak demo lines for a recorder: JSON lines in on stdin, out on stdout").action(async () => {
|
|
4438
|
-
const { runDemoVoice } = await import('./demo-voice-cmd-
|
|
4438
|
+
const { runDemoVoice } = await import('./demo-voice-cmd-H4PCO2PT.js');
|
|
4439
4439
|
await runDemoVoice();
|
|
4440
4440
|
});
|
|
4441
4441
|
const demoCmd = program2.command("demo").description("Record demos with the recorder this CLI carries");
|
|
@@ -5021,7 +5021,7 @@ differs from HEAD.
|
|
|
5021
5021
|
fail(trackerNumberError("--pr", opts.pr));
|
|
5022
5022
|
return;
|
|
5023
5023
|
}
|
|
5024
|
-
const { runWorkProofsCommand } = await import('./work-proofs-cmd-
|
|
5024
|
+
const { runWorkProofsCommand } = await import('./work-proofs-cmd-3GPGH4RL.js');
|
|
5025
5025
|
await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
|
|
5026
5026
|
});
|
|
5027
5027
|
workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { realSpeaker } from './chunk-
|
|
3
|
+
import { realSpeaker } from './chunk-KCUX5I5W.js';
|
|
4
4
|
import './chunk-ER6KQCVJ.js';
|
|
5
5
|
import './chunk-CIEX2ZKQ.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { EmitDemoError, realSpeaker, runEmitDemo } from './chunk-
|
|
3
|
+
export { EmitDemoError, realSpeaker, runEmitDemo } from './chunk-KCUX5I5W.js';
|
|
4
4
|
import './chunk-ER6KQCVJ.js';
|
|
5
5
|
import './chunk-CIEX2ZKQ.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
package/dist/index.js
CHANGED
|
@@ -26,5 +26,5 @@ if (argv[0] === "claude") {
|
|
|
26
26
|
process.exit(await runClaudeLauncher(argv.slice(1)));
|
|
27
27
|
}
|
|
28
28
|
(await import('./hook-fast-3HPWMSFB.js')).recordLinkExitFailure(argv);
|
|
29
|
-
var { runCli } = await import('./cli-
|
|
29
|
+
var { runCli } = await import('./cli-EMQEIYSR.js');
|
|
30
30
|
await runCli(process.argv);
|
package/dist/recorder.cjs
CHANGED
|
@@ -196,6 +196,7 @@ function pointerScript() {
|
|
|
196
196
|
if (!root) return;
|
|
197
197
|
const circle = document.createElement("div");
|
|
198
198
|
circle.setAttribute("data-outerlayer-pointer", "");
|
|
199
|
+
circle.setAttribute("data-outerlayer-click", "");
|
|
199
200
|
circle.style.cssText = "position:fixed;left:" + cx + "px;top:" + cy + "px;width:12px;height:12px;pointer-events:none;z-index:2147483646;border-radius:50%;border:2px solid rgba(59,130,246,.9);background:rgba(59,130,246,.2);transform:translate(-50%,-50%);";
|
|
200
201
|
root.appendChild(circle);
|
|
201
202
|
const began = performance.now();
|
|
@@ -416,11 +417,15 @@ function stylesheetScript(css) {
|
|
|
416
417
|
}
|
|
417
418
|
var HIDE_OVERLAY = "[data-outerlayer-mask]{visibility:hidden!important}";
|
|
418
419
|
var HIDE_POINTER = "[data-outerlayer-pointer],[data-outerlayer-highlight]{visibility:hidden!important}";
|
|
420
|
+
var CLICK_RING_WAIT = 1e3;
|
|
419
421
|
async function takeFrame(page, params) {
|
|
420
422
|
const { path: path$1, options, masks, fullPage = false, hideOverlay = false } = params;
|
|
421
423
|
if (options.fonts) await page.evaluate(() => document.fonts.ready.then(() => void 0));
|
|
422
424
|
const css = stylesheetFor(options);
|
|
423
425
|
if (css !== "") await page.evaluate(stylesheetScript(css));
|
|
426
|
+
if (!hideOverlay) {
|
|
427
|
+
await page.waitForFunction(() => document.querySelector("[data-outerlayer-click]") === null, void 0, { timeout: CLICK_RING_WAIT }).catch(() => void 0);
|
|
428
|
+
}
|
|
424
429
|
const bytes = await page.screenshot({
|
|
425
430
|
// Motion stops for the frame even when the video keeps it, so two runs give the same frame.
|
|
426
431
|
animations: "disabled",
|
|
@@ -429,8 +434,8 @@ async function takeFrame(page, params) {
|
|
|
429
434
|
fullPage,
|
|
430
435
|
mask: masks,
|
|
431
436
|
maskColor: MASK_COLOR,
|
|
432
|
-
|
|
433
|
-
${HIDE_POINTER}` :
|
|
437
|
+
...hideOverlay ? { style: `${HIDE_OVERLAY}
|
|
438
|
+
${HIDE_POINTER}` } : {}
|
|
434
439
|
});
|
|
435
440
|
fs.mkdirSync(path.dirname(path$1), { recursive: true });
|
|
436
441
|
fs.writeFileSync(path$1, bytes);
|
|
@@ -443,9 +448,10 @@ function takeStill(page, params) {
|
|
|
443
448
|
// ../playwright/src/highlight.ts
|
|
444
449
|
var HIGHLIGHT_ATTRIBUTE = "data-outerlayer-highlight";
|
|
445
450
|
var CHECK_TIMEOUT = 2e3;
|
|
446
|
-
var LARGEST_SHARE = 0.
|
|
451
|
+
var LARGEST_SHARE = 0.15;
|
|
452
|
+
var TALLEST_SHARE = 0.4;
|
|
447
453
|
function ring(element, params) {
|
|
448
|
-
const { attribute,
|
|
454
|
+
const { attribute, share, tallest } = params;
|
|
449
455
|
const unite = (elements) => {
|
|
450
456
|
let left = Infinity;
|
|
451
457
|
let top = Infinity;
|
|
@@ -462,18 +468,10 @@ function ring(element, params) {
|
|
|
462
468
|
}
|
|
463
469
|
return left === Infinity ? void 0 : { left, top, width: right - left, height: bottom - top };
|
|
464
470
|
};
|
|
465
|
-
const tooLarge = (box2) => box2.width * box2.height > window.innerWidth * window.innerHeight * share || box2.height > window.innerHeight *
|
|
471
|
+
const tooLarge = (box2) => box2.width * box2.height > window.innerWidth * window.innerHeight * share || box2.height > window.innerHeight * tallest;
|
|
466
472
|
const current = Array.from(document.querySelectorAll(`[${attribute}]`)).find((box2) => box2.dataset.leaving === void 0);
|
|
467
473
|
const targets = current?.outerlayerTargets ?? [];
|
|
468
474
|
if (current !== void 0 && targets.some((target) => target === element || target.contains(element))) return "same";
|
|
469
|
-
if (join4 && current !== void 0) {
|
|
470
|
-
const kept = targets.filter((target) => !element.contains(target));
|
|
471
|
-
const united = unite([...kept, element]);
|
|
472
|
-
if (united !== void 0 && !tooLarge(united)) {
|
|
473
|
-
current.outerlayerTargets = [...kept, element];
|
|
474
|
-
return "grown";
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
475
|
const alone = unite([element]);
|
|
478
476
|
if (alone === void 0 || tooLarge(alone)) return "none";
|
|
479
477
|
for (const old of Array.from(document.querySelectorAll(`[${attribute}]`))) {
|
|
@@ -490,7 +488,7 @@ function ring(element, params) {
|
|
|
490
488
|
const box = document.createElement("div");
|
|
491
489
|
box.outerlayerTargets = [element];
|
|
492
490
|
box.setAttribute(attribute, "");
|
|
493
|
-
box.style.cssText = "position:fixed;pointer-events:none;z-index:2147483630;border-radius:10px;opacity:0;box-shadow:0 0 0 3px rgba(59,130,246,.95),0 0 0 9999px rgba(15,23,42,.
|
|
491
|
+
box.style.cssText = "position:fixed;pointer-events:none;z-index:2147483630;border-radius:10px;opacity:0;box-shadow:0 0 0 3px rgba(59,130,246,.95),0 0 0 9999px rgba(15,23,42,.22);";
|
|
494
492
|
document.documentElement.appendChild(box);
|
|
495
493
|
let shown;
|
|
496
494
|
const place = () => {
|
|
@@ -517,10 +515,10 @@ function ring(element, params) {
|
|
|
517
515
|
return "new";
|
|
518
516
|
}
|
|
519
517
|
async function settle(page, change) {
|
|
520
|
-
if (change === "new"
|
|
518
|
+
if (change === "new") await page.waitForTimeout(300);
|
|
521
519
|
}
|
|
522
520
|
async function showHighlight(locator, timeout = 1e4) {
|
|
523
|
-
const change = await locator.evaluate(ring, { attribute: HIGHLIGHT_ATTRIBUTE,
|
|
521
|
+
const change = await locator.evaluate(ring, { attribute: HIGHLIGHT_ATTRIBUTE, share: Number.POSITIVE_INFINITY, tallest: 0.8 }, { timeout });
|
|
524
522
|
await settle(locator.page(), change);
|
|
525
523
|
return change !== "same" && change !== "none";
|
|
526
524
|
}
|
|
@@ -540,9 +538,9 @@ async function highlightCheckedElement(locator) {
|
|
|
540
538
|
);
|
|
541
539
|
if (!pointable) return false;
|
|
542
540
|
await bringIntoView(locator);
|
|
543
|
-
const change = await locator.evaluate(ring, { attribute: HIGHLIGHT_ATTRIBUTE,
|
|
541
|
+
const change = await locator.evaluate(ring, { attribute: HIGHLIGHT_ATTRIBUTE, share: LARGEST_SHARE, tallest: TALLEST_SHARE }, { timeout: CHECK_TIMEOUT });
|
|
544
542
|
await settle(locator.page(), change);
|
|
545
|
-
return change === "new"
|
|
543
|
+
return change === "new";
|
|
546
544
|
} catch {
|
|
547
545
|
return false;
|
|
548
546
|
}
|
|
@@ -889,14 +887,17 @@ var test = test$1.test.extend({
|
|
|
889
887
|
panelOpen = false;
|
|
890
888
|
await closePanels(page);
|
|
891
889
|
}
|
|
892
|
-
const current = {
|
|
890
|
+
const current = { ringed: false, shownAt: Number.NEGATIVE_INFINITY };
|
|
893
891
|
pointing = current;
|
|
894
892
|
const restore = actLikeAPerson(page, person, (target) => clearHighlights(page, target));
|
|
895
893
|
try {
|
|
896
894
|
if (steps !== void 0) {
|
|
897
895
|
await pointAtChecksDuring(async (checked) => {
|
|
898
|
-
if (current.
|
|
899
|
-
if (await highlightCheckedElement(checked))
|
|
896
|
+
if (current.ringed) return;
|
|
897
|
+
if (await highlightCheckedElement(checked)) {
|
|
898
|
+
current.ringed = true;
|
|
899
|
+
current.shownAt = performance.now();
|
|
900
|
+
}
|
|
900
901
|
}, steps);
|
|
901
902
|
}
|
|
902
903
|
} finally {
|
|
@@ -930,7 +931,7 @@ var test = test$1.test.extend({
|
|
|
930
931
|
return response;
|
|
931
932
|
},
|
|
932
933
|
async highlight(locator) {
|
|
933
|
-
if (pointing !== void 0) pointing.
|
|
934
|
+
if (pointing !== void 0) pointing.ringed = true;
|
|
934
935
|
if (await showHighlight(locator) && pointing !== void 0) pointing.shownAt = performance.now();
|
|
935
936
|
},
|
|
936
937
|
async screenshot(screenshotOptions = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-
|
|
3
|
+
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-W46566FP.js';
|
|
4
4
|
import './chunk-GDIVOYDA.js';
|
|
5
5
|
import './chunk-VIJWXQMT.js';
|
|
6
6
|
import './chunk-IP7BIBXJ.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, classifyProofsAt, runWorkProofs, proofsCommentId, kindProblem, proofsCommentBody } from './chunk-
|
|
3
|
+
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, classifyProofsAt, runWorkProofs, proofsCommentId, kindProblem, proofsCommentBody } from './chunk-W46566FP.js';
|
|
4
4
|
import { runWorkComment } from './chunk-A7D5BMII.js';
|
|
5
|
-
import { runEmitDemo } from './chunk-
|
|
5
|
+
import { runEmitDemo } from './chunk-KCUX5I5W.js';
|
|
6
6
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
7
7
|
import { runEmitArtifact } from './chunk-CIEX2ZKQ.js';
|
|
8
8
|
import { runnerMatcher } from './chunk-GDIVOYDA.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outerlayer/cli",
|
|
3
|
-
"version": "0.36.0-next.
|
|
3
|
+
"version": "0.36.0-next.20261101131017",
|
|
4
4
|
"description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Magu Studios, Inc.",
|
|
@@ -294,8 +294,8 @@ tests at HEAD that hold the id of each proof that is not current, and runs them.
|
|
|
294
294
|
video criterion in the criteria's order, as the outerlayer-evidence skill's
|
|
295
295
|
"Record a demo" says. Tell each chapter in beats with `demo.say()`: sign in
|
|
296
296
|
once, and seed and wait between beats, so the demo shows only narrated
|
|
297
|
-
steps. In each beat, check with `expect(locator)` the element its
|
|
298
|
-
names, so the recorder rings it. Write each line as you would say it to a
|
|
297
|
+
steps. In each beat, check first with `expect(locator)` the element its
|
|
298
|
+
line names, so the recorder rings it. Write each line as you would say it to a
|
|
299
299
|
teammate at your screen, in plain words. Render it with `outerlayer emit
|
|
300
300
|
demo <manifest> --output demo.webm`, then watch and listen to it before
|
|
301
301
|
you commit the test. Each beat rings what its line names. Write again each
|
|
@@ -85,8 +85,8 @@ only when Playwright cannot drive the flow.
|
|
|
85
85
|
A demo plays like a person showing the app. Tell each chapter in beats with
|
|
86
86
|
`demo.say(line, steps)`: the line is spoken while its steps run on screen.
|
|
87
87
|
The demo shows only beats, so sign in, seed data and wait outside them. In
|
|
88
|
-
each beat, check with `expect(locator)` the element its line names, so
|
|
89
|
-
recorder rings it. Show a CLI step with `demo.terminal()`. The recorder
|
|
88
|
+
each beat, check first with `expect(locator)` the element its line names, so
|
|
89
|
+
the recorder rings it. Show a CLI step with `demo.terminal()`. The recorder
|
|
90
90
|
ships inside the CLI, so install nothing. The script, and the rules a reviewer holds it to, are in
|
|
91
91
|
[references/demo.md](references/demo.md).
|
|
92
92
|
|
|
@@ -38,10 +38,10 @@ it against the app as it is now, not from an older demo. Import `test` and
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
Each beat lasts as long as its line. Inside a beat a pointer moves to each
|
|
41
|
-
click, `fill` types its text, and the page scrolls smoothly.
|
|
42
|
-
a locator dims the page around the element it checks
|
|
43
|
-
viewer sees what the line talks about.
|
|
44
|
-
|
|
41
|
+
click, `fill` types its text, and the page scrolls smoothly. The first
|
|
42
|
+
`expect` on a locator in a beat dims the page around the element it checks
|
|
43
|
+
and rings it, so the viewer sees what the line talks about. Later checks in
|
|
44
|
+
the beat draw no other ring.
|
|
45
45
|
|
|
46
46
|
Record it with `outerlayer demo record <script>`. In a repository with its
|
|
47
47
|
own Playwright config, add `--config <file>` and `--project <name>` to reuse
|
|
@@ -96,16 +96,14 @@ say it to a teammate at your screen.
|
|
|
96
96
|
- Show a call to an API with `await demo.http({ method, url, body }, run)`
|
|
97
97
|
when a criterion's proof is an API response, or a step goes through the
|
|
98
98
|
API and no page shows it. Return the real `{ status, body }` from `run`.
|
|
99
|
-
- In each beat, check with `expect(locator)`
|
|
100
|
-
such as the new status in a list.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
would fill most of the screen, the ring starts again on the latest one.
|
|
106
|
-
The pointer moving to an element outside the ring clears it.
|
|
99
|
+
- In each beat, check first with `expect(locator)` the one element its line
|
|
100
|
+
names, such as the new status in a list. A beat rings one element. A
|
|
101
|
+
check of a computed value, such as a style read with `evaluate`, rings
|
|
102
|
+
nothing, so check the element itself too. A locator that matches several
|
|
103
|
+
elements, a negated check, and a large element such as a whole card ring
|
|
104
|
+
nothing. The pointer moving to another element clears the ring.
|
|
107
105
|
- Call `await demo.highlight(locator)` to ring an element no check looks at.
|
|
108
|
-
After it, checks in that beat
|
|
106
|
+
After it, checks in that beat draw no ring.
|
|
109
107
|
- Write the script against the guidance here, not by copying an older demo:
|
|
110
108
|
an older demo can break a rule that came later.
|
|
111
109
|
- Turn off `demoOptions.animations` to keep the app's own transitions. Each
|