bareloop 0.53.0 → 0.54.1
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/CHANGELOG.md +34 -0
- package/bareloop.context.md +17 -11
- package/package.json +2 -2
- package/src/authorflow.js +33 -3
- package/src/authoring.js +30 -2
- package/src/authorjob.js +4 -0
- package/src/bridges.js +4 -3
- package/src/carrystore.js +5 -2
- package/src/declaredclose.js +1 -1
- package/src/kinds.js +4 -2
- package/src/launcher.js +7 -4
- package/src/learn.js +6 -4
- package/src/panel/handed.js +92 -0
- package/src/panel/index.html +225 -120
- package/src/panel/jobplan.js +6 -1
- package/src/panel/server.js +43 -8
- package/src/panel/status.js +3 -1
- package/src/plan.js +38 -1
- package/src/planrun.js +192 -38
- package/src/ralph.js +2 -0
- package/src/replay.js +6 -0
- package/src/reuse.js +3 -3
- package/src/tools.js +65 -6
- package/src/u-readout.js +2 -2
- package/src/userrun.js +1 -1
- package/types/authorflow.d.ts +54 -1
- package/types/bridges.d.ts +4 -3
- package/types/launcher.d.ts +5 -0
- package/types/panel/handed.d.ts +38 -0
- package/types/panel/jobplan.d.ts +2 -1
- package/types/plan.d.ts +19 -1
- package/types/planrun.d.ts +44 -1
- package/types/replay.d.ts +3 -0
- package/types/reuse.d.ts +2 -2
- package/types/tools.d.ts +25 -3
package/src/panel/index.html
CHANGED
|
@@ -22,9 +22,11 @@
|
|
|
22
22
|
--cyan:#7dcfff; --cyan-bg:#182634;
|
|
23
23
|
--magenta:#bb9af7;
|
|
24
24
|
--accent:#7aa2f7; --plan:#7aa2f7;
|
|
25
|
+
--search-tint:var(--panel2);
|
|
25
26
|
--btn-bg:#1f2335; --btn-text:#c0caf5;
|
|
26
27
|
--field-bg:var(--bg); --field-soft-bg:var(--bg); --field-border:var(--text-dim);
|
|
27
28
|
--primary-bg:#7aa2f7; --primary-text:#1a1b26; --primary-border:#7aa2f7;
|
|
29
|
+
--cap-w:#b7791f; --cap-w-bg:#3a2e17; --cap-w-ink:#f0c987; --cap-s:#3d59a1; --cap-s-bg:#1f2a4d; --cap-s-ink:#a9c1f5; --cap-j:#6b7396; --cap-j-bg:#2a2f45; --cap-j-ink:#c0caf5; --cap-r:#2b8a7e; --cap-r-bg:#17332f; --cap-r-ink:#8fdccf; --req:#c9a85f;
|
|
28
30
|
font: 14px/1.5 "Courier Prime", "Courier New", Courier, ui-monospace, monospace;
|
|
29
31
|
}
|
|
30
32
|
*{box-sizing:border-box;}
|
|
@@ -68,9 +70,11 @@
|
|
|
68
70
|
--cyan:#007197; --cyan-bg:#d6ecf1;
|
|
69
71
|
--magenta:#9854f1;
|
|
70
72
|
--accent:#2668c2; --plan:#2668c2;
|
|
73
|
+
--search-tint:#f5f7fc;
|
|
71
74
|
--btn-bg:#e9e9ed; --btn-text:#3760bf;
|
|
72
75
|
--field-bg:#ffffff; --field-soft-bg:#f7f7f9;
|
|
73
76
|
--primary-bg:#2668c2; --primary-text:#e1e2e7; --primary-border:#2668c2;
|
|
77
|
+
--cap-w:#b7791f; --cap-w-bg:#f6e7c8; --cap-w-ink:#7a4c0c; --cap-s:#2a4fa8; --cap-s-bg:#cfdaf3; --cap-s-ink:#1d3a80; --cap-j:#5b6680; --cap-j-bg:#c7cddb; --cap-j-ink:#333c52; --cap-r:#2b8a7e; --cap-r-bg:#cdeee8; --cap-r-ink:#14524a; --req:#8a6d2a;
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
:root[data-theme="light"]{
|
|
@@ -83,9 +87,11 @@
|
|
|
83
87
|
--cyan:#007197; --cyan-bg:#d6ecf1;
|
|
84
88
|
--magenta:#9854f1;
|
|
85
89
|
--accent:#2668c2; --plan:#2668c2;
|
|
90
|
+
--search-tint:#f5f7fc;
|
|
86
91
|
--btn-bg:#e9e9ed; --btn-text:#3760bf;
|
|
87
92
|
--field-bg:#ffffff; --field-soft-bg:#f7f7f9;
|
|
88
93
|
--primary-bg:#2668c2; --primary-text:#e1e2e7; --primary-border:#2668c2;
|
|
94
|
+
--cap-w:#b7791f; --cap-w-bg:#f6e7c8; --cap-w-ink:#7a4c0c; --cap-s:#2a4fa8; --cap-s-bg:#cfdaf3; --cap-s-ink:#1d3a80; --cap-j:#5b6680; --cap-j-bg:#c7cddb; --cap-j-ink:#333c52; --cap-r:#2b8a7e; --cap-r-bg:#cdeee8; --cap-r-ink:#14524a; --req:#8a6d2a;
|
|
89
95
|
}
|
|
90
96
|
.theme-toggle{padding:4px 9px;min-height:32px;border:1px solid var(--border-strong);background:var(--btn-bg);color:var(--text);}
|
|
91
97
|
|
|
@@ -129,13 +135,11 @@
|
|
|
129
135
|
@media (min-width: 1200px){ .left-pane{width:630px;} }
|
|
130
136
|
.right-pane{flex:1;min-width:0;display:flex;flex-direction:column;}
|
|
131
137
|
|
|
132
|
-
.tabrow{display:flex;border-bottom:1px solid var(--border-strong);background:var(--panel2);
|
|
138
|
+
.tabrow{display:flex;border-bottom:1px solid var(--border-strong);background:var(--panel2);}
|
|
133
139
|
.tabrow button{
|
|
134
140
|
flex:1;padding:10px 6px;min-height:44px;background:transparent;border:none;
|
|
135
141
|
border-right:1px dotted var(--border-strong);font-size:13px;color:var(--text-dim);
|
|
136
|
-
counter-increment:tabnum;
|
|
137
142
|
}
|
|
138
|
-
.tabrow button::before{content:"[" counter(tabnum) "] ";color:var(--text-faint);font-weight:700;}
|
|
139
143
|
.tabrow button:last-child{border-right:none;}
|
|
140
144
|
|
|
141
145
|
.pane-body{padding:12px;overflow:auto;flex:1;min-height:0;}
|
|
@@ -264,7 +268,25 @@
|
|
|
264
268
|
.rl-dash{border-top:1px dashed var(--border-strong);margin:10px 0 6px;}
|
|
265
269
|
.rl-sect{font-size:12px;color:var(--text-dim);font-weight:700;margin:12px 0 6px;}
|
|
266
270
|
.rl-sect:first-child{margin-top:0;}
|
|
271
|
+
/* hamr 2026-11-02 (as fwdloop aea2e1d, 5bd929a): the Runs tab section captions are colour bars with a count pill */
|
|
272
|
+
.rl-cap{display:flex;align-items:center;gap:8px;font-size:15px;margin:18px 0 8px;padding:7px 12px;border-left:5px solid var(--cap-c);background:var(--cap-bg);color:var(--cap-ink);}
|
|
273
|
+
.rl-cap.rl-cap-w{--cap-c:var(--cap-w);--cap-bg:var(--cap-w-bg);--cap-ink:var(--cap-w-ink);}
|
|
274
|
+
.rl-cap.rl-cap-s{--cap-c:var(--cap-s);--cap-bg:var(--cap-s-bg);--cap-ink:var(--cap-s-ink);}
|
|
275
|
+
.rl-cap.rl-cap-j{--cap-c:var(--cap-j);--cap-bg:var(--cap-j-bg);--cap-ink:var(--cap-j-ink);}
|
|
276
|
+
.rl-cap.rl-cap-r{--cap-c:var(--cap-r);--cap-bg:var(--cap-r-bg);--cap-ink:var(--cap-r-ink);}
|
|
277
|
+
.rl-cap .rl-n{font-size:12px;line-height:1.4;padding:1px 8px;border-radius:10px;background:var(--cap-c);color:#fff;}
|
|
278
|
+
.rl-cap .rl-p{font-size:0;}
|
|
279
|
+
.rl-cap .rl-note{font-size:11px;font-weight:400;}
|
|
280
|
+
.rl-jobcard{position:relative;margin:14px 0 0;padding:10px;}
|
|
281
|
+
.rl-jobcard::before{content:"";position:absolute;left:-1px;right:-1px;top:-9px;height:2px;background:var(--border-strong);}
|
|
267
282
|
#panel-runs .rl-faint{margin-bottom:4px;}
|
|
283
|
+
/* Runs tab: the search block is a light card (V1), hamr 2026-11-03 */
|
|
284
|
+
#panel-runs .rl-dash{border:0;margin:12px 0 0;}
|
|
285
|
+
#panel-runs .rl-faint[data-testid="rl-filter-note"]{color:var(--accent);font-weight:700;font-size:12px;letter-spacing:.02em;background:var(--search-tint);padding:8px 10px 6px;margin-bottom:0;border-radius:6px 6px 0 0;}
|
|
286
|
+
#panel-runs .rl-faint[data-testid="rl-filter-note"]::before{content:"SEARCH ";letter-spacing:.08em;}
|
|
287
|
+
#runs-filterbar-anchor{background:var(--search-tint);padding:4px 10px 10px;margin-bottom:12px;border-radius:0 0 6px 6px;}
|
|
288
|
+
#runs-filterbar-anchor input[type="search"],#runs-filterbar-anchor input[type="text"]{border:1px solid var(--accent) !important;background:var(--bg,#fff);font-size:14px;padding:8px 10px;}
|
|
289
|
+
#runs-filterbar-anchor input:focus{outline:2px solid var(--accent);outline-offset:1px;}
|
|
268
290
|
@media (max-width:899px){ .rl-fold{min-height:44px;} }
|
|
269
291
|
/* the one thing P9 v2 adds to fwd: a run that matches the search or filter is marked, not selected */
|
|
270
292
|
.rl-card.rl-hit{box-shadow:inset 3px 0 0 var(--accent);}
|
|
@@ -276,11 +298,9 @@
|
|
|
276
298
|
are already both on screen there, nothing to jump back to). */
|
|
277
299
|
.back-to-list-link{display:none;font-size:12px;color:var(--accent);text-decoration:underline;background:none;border:none;padding:0;cursor:pointer;}
|
|
278
300
|
@media (max-width: 899px){ .back-to-list-link{display:inline-block;} }
|
|
279
|
-
.rp-tabrow{display:flex;flex-wrap:wrap;border-bottom:1px solid var(--border-strong);background:var(--panel2);
|
|
280
|
-
.rp-tabrow button{padding:10px 14px;min-height:44px;background:transparent;border:none;border-right:1px dotted var(--border-strong);font-size:13px;color:var(--text-dim);
|
|
281
|
-
.rp-tabrow button::before{content:"[" counter(rtabnum) "] ";color:var(--text-faint);font-weight:700;}
|
|
301
|
+
.rp-tabrow{display:flex;flex-wrap:wrap;border-bottom:1px solid var(--border-strong);background:var(--panel2);}
|
|
302
|
+
.rp-tabrow button{padding:10px 14px;min-height:44px;background:transparent;border:none;border-right:1px dotted var(--border-strong);font-size:13px;color:var(--text-dim);}
|
|
282
303
|
.tabrow button[aria-selected="true"],.rp-tabrow button[aria-selected="true"]{background:var(--panel);color:var(--accent);font-weight:700;box-shadow:inset 0 -2px 0 var(--accent);}
|
|
283
|
-
.tabrow button[aria-selected="true"]::before,.rp-tabrow button[aria-selected="true"]::before{color:var(--accent);}
|
|
284
304
|
|
|
285
305
|
.counters{display:block;padding:9px 12px;border:none;border-bottom:2px solid var(--border-strong);background:var(--panel2);color:var(--text-dim);margin:-12px -12px 14px;font-size:12px;font-weight:700;white-space:normal;overflow-wrap:break-word;}
|
|
286
306
|
.counters b,.counters span{color:var(--accent);}
|
|
@@ -292,11 +312,11 @@
|
|
|
292
312
|
.ended-block.green{border-color:var(--green);}
|
|
293
313
|
.ended-block.grey{border-color:var(--grey-dot);}
|
|
294
314
|
.ended-row{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:6px;}
|
|
295
|
-
.ended-label{color:var(--
|
|
315
|
+
.ended-label{color:var(--accent);font-weight:700;font-size:11px;letter-spacing:0.08em;min-width:52px;}
|
|
296
316
|
.ended-text{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;}
|
|
297
317
|
/* a NEXT with several instructions is one per line: label muted, instructions in a second column (the shape fwdloop copied, 2026-10-25) */
|
|
298
318
|
.next-rows{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:10px;row-gap:2px;}
|
|
299
|
-
.next-label{color:var(--
|
|
319
|
+
.next-label{color:var(--accent);font-weight:700;}
|
|
300
320
|
.next-text{min-width:0;overflow-wrap:anywhere;}
|
|
301
321
|
.ended-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
|
|
302
322
|
/* P5 item 4: Import (read only) — the folder browser, the imported rows, the view */
|
|
@@ -346,19 +366,21 @@
|
|
|
346
366
|
.summary-box.grey{border-color:var(--grey-dot);}
|
|
347
367
|
.summary-box.amber{border-color:var(--amber);}
|
|
348
368
|
.summary-box.magenta{border-color:var(--magenta);}
|
|
349
|
-
.summary-box::before{content:"┤ SUMMARY ├";position:absolute;top:-10px;left:10px;background:var(--panel2);padding:0 6px;font-size:
|
|
369
|
+
.summary-box::before{content:"┤ SUMMARY ├";position:absolute;top:-10px;left:10px;background:var(--panel2);padding:0 6px;font-size:12px;font-weight:700;color:var(--accent);letter-spacing:0.08em;}
|
|
350
370
|
.summary-headline{font-weight:700;margin-bottom:8px;font-size:13px;}
|
|
351
371
|
.summary-row{display:flex;gap:0;padding:2px 0;}
|
|
352
372
|
.sum-label{flex:none;width:66px;color:var(--text-faint);}
|
|
353
373
|
.sum-val{color:var(--text);}
|
|
354
374
|
.summary-box .num{color:var(--accent);font-weight:700;}
|
|
355
375
|
.summary-box.imported-box::before{content:"┤ IMPORTED ├";}
|
|
376
|
+
/* hamr 2026-11-03: Run summary row labels blue bold like ENDED/NEXT/SCHEDULE; scoped, the Import box keeps its faint labels */
|
|
377
|
+
#run-summary .sum-label{color:var(--accent);font-weight:700;}
|
|
356
378
|
.imported-box .sum-label{width:104px;}
|
|
357
379
|
.imported-box .summary-row{flex-wrap:wrap;}
|
|
358
380
|
.imported-box .sum-val{flex:1 1 180px;min-width:0;overflow-wrap:anywhere;}
|
|
359
381
|
|
|
360
382
|
.map-box{border:1px solid var(--border-strong);padding:10px;margin-top:16px;margin-bottom:14px;background:var(--panel2);}
|
|
361
|
-
.map-box::before{content:"┤ MAP ├";display:block;font-size:
|
|
383
|
+
.map-box::before{content:"┤ MAP ├";display:block;font-size:12px;font-weight:700;color:var(--accent);letter-spacing:0.08em;margin:-2px 0 8px 0;}
|
|
362
384
|
/* ruling 1A: chips as wide as their own text, side by side, wrapping — a name is never truncated */
|
|
363
385
|
.map-chips{display:flex;flex-wrap:wrap;gap:8px 4px;align-items:flex-start;padding-left:1.4em;}
|
|
364
386
|
/* ruling A: a step + its trailing arrow are ONE unit (the arrow never wraps alone); the lead arrow of a wrapped line
|
|
@@ -417,6 +439,20 @@
|
|
|
417
439
|
button.fx-rowhead:focus-visible,.fx-more:focus-visible,.cell.fail:focus-visible{outline:2px solid var(--red);outline-offset:1px;}
|
|
418
440
|
.fx-caret{flex:none;width:12px;color:var(--text-faint);}
|
|
419
441
|
.fx-try{flex:none;font-weight:700;}
|
|
442
|
+
/* hamr 2026-11-03: Audit tab caption words are accent (like the Run tab's); scoped to #audit-body. Values, the [ +N more lines ] buttons and the red/green glyph spans keep their own colours. */
|
|
443
|
+
#audit-body table th{color:var(--accent);font-weight:700;}
|
|
444
|
+
#audit-body .sub-label,#audit-body .fx-label,#audit-body td.hint{color:var(--accent);font-weight:700;}
|
|
445
|
+
#audit-body .fx-try{color:var(--accent);}
|
|
446
|
+
/* the "told in this run" row (fwdloop M14 p4 look): the caption is accent, the try buttons are small, the opened text sits on a quiet panel */
|
|
447
|
+
.btn.hints[aria-expanded="true"]{outline:2px solid var(--accent);outline-offset:1px;}
|
|
448
|
+
.btn.hints:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
|
|
449
|
+
.cell.none{color:var(--text-faint);cursor:default;font-weight:400;}
|
|
450
|
+
tr.hint-row td{color:var(--text-faint);}
|
|
451
|
+
tr.hint-row td.q{color:var(--accent);}
|
|
452
|
+
.fx-row.hintrow.open>.fx-rowhead{background:var(--panel2);}
|
|
453
|
+
.fx-row.hintrow .fx-body{border-left-color:var(--accent);background:var(--panel2);}
|
|
454
|
+
.fx-row.hintrow .fx-try{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;}
|
|
455
|
+
.fx-lines div.ind{margin-left:16px;}
|
|
420
456
|
.fx-chk{flex:none;white-space:nowrap;}
|
|
421
457
|
.fx-first{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);}
|
|
422
458
|
.fx-faint,.fx-count{color:var(--text-faint);}
|
|
@@ -457,6 +493,7 @@
|
|
|
457
493
|
|
|
458
494
|
/* build item C: Audit tab grouped-by-part rows */
|
|
459
495
|
.audit-part{border:1px solid var(--border);margin-bottom:6px;background:var(--panel2);}
|
|
496
|
+
.handed-text{margin:0;padding:8px 10px;background:var(--panel);border:1px solid var(--border);font:12px/1.45 ui-monospace,"Courier New",monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:28em;overflow:auto;}
|
|
460
497
|
.audit-part-toggle{width:100%;text-align:left;display:block;white-space:normal;min-height:44px;padding:8px 10px;}
|
|
461
498
|
.audit-part-toggle::before,.audit-part-toggle::after{content:"";}
|
|
462
499
|
.audit-part-body{padding:8px 10px 10px;border-top:1px dotted var(--border-strong);}
|
|
@@ -503,7 +540,7 @@
|
|
|
503
540
|
.jf-err{color:var(--red);font-size:12px;overflow-wrap:anywhere;}
|
|
504
541
|
.jf-err:empty{display:none;}
|
|
505
542
|
.field input,.field select{width:100%;}
|
|
506
|
-
label{display:block;font-size:
|
|
543
|
+
label{display:block;font-size:12px;font-weight:700;color:var(--accent);margin-bottom:2px;text-transform:uppercase;letter-spacing:0.04em;}
|
|
507
544
|
.ro-value{padding:6px 8px;min-height:32px;box-sizing:border-box;border:1px solid var(--border);background:var(--bg);color:var(--text-dim);}
|
|
508
545
|
.ro-value.scroll{max-height:160px;overflow-y:auto;white-space:pre-wrap;word-break:break-word;}
|
|
509
546
|
.field-row{display:flex;flex-wrap:wrap;gap:10px;}
|
|
@@ -522,6 +559,10 @@
|
|
|
522
559
|
.radio-row label{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--text);margin:0;text-transform:none;}
|
|
523
560
|
.cap-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;margin-bottom:6px;}
|
|
524
561
|
.cap-field label{display:block;font-size:11px;font-weight:700;color:var(--text-dim);margin-bottom:1px;}
|
|
562
|
+
/* hamr 2026-11-02 (as fwdloop 0ae68fb): the Chat job card captions are pills, no left bar; checkbox/radio labels are not captions */
|
|
563
|
+
#job-card .field > label:not(.jf-thinking),#job-card .cap-field > label{font-size:13px;font-weight:700;color:var(--accent);text-transform:none;letter-spacing:0;margin:8px 0 6px;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--accent) 16%,transparent);display:inline-block;}
|
|
564
|
+
/* hamr 2026-11-03 (fwdloop 0ae68fb): `required` rides inside the Chat card caption pill, small and grey; it marks what validateJobCard refuses when empty */
|
|
565
|
+
#job-card .req{font-size:11px;font-weight:400;color:var(--req);margin-left:8px;}
|
|
525
566
|
.cap-field input{width:100%;padding:5px 6px;box-sizing:border-box;}
|
|
526
567
|
.btn.primary{background:var(--primary-bg);color:var(--primary-text);border-color:var(--primary-border);font-weight:700;}
|
|
527
568
|
.btn.primary::before,.btn.primary::after{color:var(--primary-text);opacity:0.6;}
|
|
@@ -627,7 +668,7 @@
|
|
|
627
668
|
.settings-header h2::after{content:" ├";color:var(--text-faint);}
|
|
628
669
|
.money-strip{display:grid;grid-template-columns:repeat(3, 1fr);gap:12px;align-items:end;padding:10px;border:1px solid var(--border-strong);background:var(--panel2);}
|
|
629
670
|
.money-item{min-width:0;}
|
|
630
|
-
.money-item label{display:block;font-size:
|
|
671
|
+
.money-item label{display:block;font-size:12px;font-weight:700;color:var(--accent);margin-bottom:2px;}
|
|
631
672
|
.money-value{font-size:16px;font-weight:700;padding:6px 0;overflow-wrap:anywhere;}
|
|
632
673
|
.money-item input{width:100%;height:44px;box-sizing:border-box;}
|
|
633
674
|
.keyfile-strip{position:relative;border:1px solid var(--border-strong);padding:12px 12px 8px;background:var(--panel2);margin:14px 0;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
|
|
@@ -655,7 +696,7 @@
|
|
|
655
696
|
.pv-fold{border:0;background:none;color:var(--text);font:inherit;padding:0 4px 0 0;min-width:22px;min-height:24px;cursor:pointer;text-align:left;}
|
|
656
697
|
.pv-krow select,.pv-krow input[type=text]{width:100%;max-width:100%;min-height:28px;box-sizing:border-box;}
|
|
657
698
|
.pv-grid select,.pv-grid input[type=text]{font-size:12px;height:28px;padding:2px 6px;}
|
|
658
|
-
.pv-legacy{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:28px;text-transform:none;letter-spacing:0;font-weight:400;font-size:12px;}
|
|
699
|
+
.pv-legacy{color:var(--text-dim);display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:28px;text-transform:none;letter-spacing:0;font-weight:400;font-size:12px;}
|
|
659
700
|
.pv-legacy input,.pv-m-use input{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer;}
|
|
660
701
|
.pv-tok{text-align:right;font-variant-numeric:tabular-nums;}
|
|
661
702
|
.pv-refcell{display:flex;justify-content:flex-end;}
|
|
@@ -697,7 +738,7 @@
|
|
|
697
738
|
/* a refused Start (a $0 refusal, e.g. an Inputs line) is read like the red failure line of the progress list, not like a faint hint */
|
|
698
739
|
.card-refusal:not(:empty){font-size:13px;margin-top:8px;line-height:1.4;}
|
|
699
740
|
.card-refusal:empty{display:none;}
|
|
700
|
-
.field label.jf-thinking{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;margin-top:6px;font-size:12px;text-transform:none;letter-spacing:0;}
|
|
741
|
+
.field label.jf-thinking{color:var(--text-dim);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;margin-top:6px;font-size:12px;text-transform:none;letter-spacing:0;}
|
|
701
742
|
.field label.jf-thinking input{width:auto;min-height:0;margin:0;}
|
|
702
743
|
.table-wrap{overflow-x:auto;border:1px solid var(--border-strong);background:var(--panel2);max-width:100%;}
|
|
703
744
|
@media (max-width: 899px){
|
|
@@ -803,25 +844,25 @@
|
|
|
803
844
|
<div class="hint" id="jf-thinking-note" data-testid="jf-thinking-note"></div>
|
|
804
845
|
</div>
|
|
805
846
|
<div class="field">
|
|
806
|
-
<label for="jf-name">Job name</label>
|
|
847
|
+
<label for="jf-name">Job name <span class="req">required</span></label>
|
|
807
848
|
<input id="jf-name" type="text" placeholder="kebab-case, unique">
|
|
808
849
|
</div>
|
|
809
850
|
<div class="field">
|
|
810
|
-
<label for="jf-job">The job</label>
|
|
851
|
+
<label for="jf-job">The job <span class="req">required</span></label>
|
|
811
852
|
<div class="nbox" data-testid="nbox-job">
|
|
812
853
|
<div class="gut" id="jf-job-gut" aria-hidden="true"></div>
|
|
813
854
|
<div class="nbox-in"><textarea class="jf-wrap" id="jf-job" rows="3" data-testid="jf-job" spellcheck="false"></textarea><div class="nbox-mir" id="jf-job-mir" aria-hidden="true"></div></div>
|
|
814
855
|
</div>
|
|
815
856
|
</div>
|
|
816
857
|
<div class="field">
|
|
817
|
-
<label for="jf-inputs">Inputs</label>
|
|
858
|
+
<label for="jf-inputs">Inputs <span class="req">required</span></label>
|
|
818
859
|
<div class="nbox" data-testid="nbox-inputs">
|
|
819
860
|
<div class="gut" id="jf-inputs-gut" aria-hidden="true"></div>
|
|
820
861
|
<div class="nbox-in"><textarea class="jf-wrap" id="jf-inputs" rows="2" data-testid="jf-inputs" spellcheck="false"></textarea><div class="nbox-mir" id="jf-inputs-mir" aria-hidden="true"></div></div>
|
|
821
862
|
</div>
|
|
822
863
|
</div>
|
|
823
864
|
<div class="field">
|
|
824
|
-
<label for="jf-dest">Destination</label>
|
|
865
|
+
<label for="jf-dest">Destination <span class="req">required</span></label>
|
|
825
866
|
<textarea class="jf-wrap" id="jf-dest" rows="1" placeholder="the write fence — where in the repo this run may change files"></textarea>
|
|
826
867
|
</div>
|
|
827
868
|
|
|
@@ -845,7 +886,7 @@
|
|
|
845
886
|
|
|
846
887
|
<div class="cap-row" data-testid="cap-row">
|
|
847
888
|
<div class="cap-field">
|
|
848
|
-
<label for="jf-cap-money">Cap
|
|
889
|
+
<label for="jf-cap-money">Cap $ <span class="req">required</span></label>
|
|
849
890
|
<input id="jf-cap-money" type="text">
|
|
850
891
|
<div class="hint" id="jf-cap-note" data-testid="cap-note"></div>
|
|
851
892
|
</div>
|
|
@@ -967,10 +1008,6 @@
|
|
|
967
1008
|
<button class="chip" aria-pressed="false" data-view="flat" data-testid="audit-view-flat">Flat</button>
|
|
968
1009
|
</div>
|
|
969
1010
|
</div>
|
|
970
|
-
<div id="audit-learnings" class="audit-part" data-testid="audit-learnings" hidden>
|
|
971
|
-
<button type="button" id="audit-learnings-summary" class="btn audit-part-toggle" aria-expanded="false" data-testid="audit-learnings-summary">What the planner was told from earlier runs</button>
|
|
972
|
-
<div id="audit-learnings-list" class="audit-part-body" data-testid="audit-learnings-list" hidden></div>
|
|
973
|
-
</div>
|
|
974
1011
|
<div id="audit-groups" data-testid="audit-groups"></div>
|
|
975
1012
|
<div id="audit-flat-wrap" hidden>
|
|
976
1013
|
<div id="audit-empty" class="hint" data-testid="audit-empty" style="font-size:13px;padding:24px 0;">select a run first</div>
|
|
@@ -1614,8 +1651,8 @@
|
|
|
1614
1651
|
noRows: data.runs.length === 0,
|
|
1615
1652
|
};
|
|
1616
1653
|
}
|
|
1617
|
-
function rlSectHtml(label, n, note){
|
|
1618
|
-
return '<div class="rl-sect">' + label + ' (' + n + ')' + (note ? ' ' + note : '') + '</div>';
|
|
1654
|
+
function rlSectHtml(label, n, note, cap){
|
|
1655
|
+
return '<div class="rl-sect rl-cap rl-cap-' + cap + '">' + label + ' <span class="rl-p">(</span><span class="rl-n">' + n + '</span><span class="rl-p">)</span>' + (note ? ' <span class="rl-note">' + note + '</span>' : '') + '</div>';
|
|
1619
1656
|
}
|
|
1620
1657
|
// line 1 and 2 of a Running now / Needs you card; both jump to the run (rlJump). The tag is a label (a span), never a button.
|
|
1621
1658
|
function rlJumpCardHtml(r, need){
|
|
@@ -1657,16 +1694,16 @@
|
|
|
1657
1694
|
// The sections above the search box, from ONE ordered list: only never-filtered sections live here (Scheduled is searched, so rlSchedHtml draws it below).
|
|
1658
1695
|
function rlTopHtml(m){
|
|
1659
1696
|
var sections = [
|
|
1660
|
-
{ label: "Running now", items: m.running, draw: function(r){ return rlJumpCardHtml(r, false); } },
|
|
1661
|
-
{ label: "Needs you", items: m.needs.concat(m.gaveUp || []), draw: function(r){ return r.pill ? rlGaveUpCardHtml(r) : rlJumpCardHtml(r, true); } },
|
|
1697
|
+
{ label: "Running now", cap: "r", items: m.running, draw: function(r){ return rlJumpCardHtml(r, false); } },
|
|
1698
|
+
{ label: "Needs you", cap: "w", items: m.needs.concat(m.gaveUp || []), draw: function(r){ return r.pill ? rlGaveUpCardHtml(r) : rlJumpCardHtml(r, true); } },
|
|
1662
1699
|
];
|
|
1663
1700
|
return sections.map(function(s){
|
|
1664
|
-
return s.items.length ? rlSectHtml(s.label, s.items.length) + s.items.map(s.draw).join("") : "";
|
|
1701
|
+
return s.items.length ? rlSectHtml(s.label, s.items.length, "", s.cap) + s.items.map(s.draw).join("") : "";
|
|
1665
1702
|
}).join("");
|
|
1666
1703
|
}
|
|
1667
1704
|
// Scheduled sits BELOW the search box (PRD v1.106 Part 2). No match draws nothing, header included; with the \u25F7 chip pressed it says so in words.
|
|
1668
1705
|
function rlSchedHtml(m){
|
|
1669
|
-
if(m.scheduled.length) return rlSectHtml("Scheduled", m.scheduled.length) + m.scheduled.map(rlScheduledCardHtml).join("");
|
|
1706
|
+
if(m.scheduled.length) return rlSectHtml("Scheduled", m.scheduled.length, "", "s") + m.scheduled.map(rlScheduledCardHtml).join("");
|
|
1670
1707
|
return m.schedOnly ? '<div class="hint" data-testid="rl-sched-none">no scheduled job matches</div>' : "";
|
|
1671
1708
|
}
|
|
1672
1709
|
// the count line under the chips: only the \u25F7 view has one; "showing N scheduled job(s)". Empty otherwise.
|
|
@@ -1688,7 +1725,7 @@
|
|
|
1688
1725
|
// a job card: `[sign] job · k runs · type` / `word · why` of its newest run, highlighted when the selected run is one of its runs; not clickable. Inside: the newest run's card, then the older-runs fold.
|
|
1689
1726
|
function rlJobCardHtml(c){
|
|
1690
1727
|
var h = c.head;
|
|
1691
|
-
var top = '<div class="rl-card' + (c.selected ? ' rl-sel' : '') + '" id="rl-job-' + escapeXml(c.job) + '" data-testid="rl-job-' + escapeXml(c.job) + '">';
|
|
1728
|
+
var top = '<div class="rl-card rl-jobcard' + (c.selected ? ' rl-sel' : '') + '" id="rl-job-' + escapeXml(c.job) + '" data-testid="rl-job-' + escapeXml(c.job) + '">';
|
|
1692
1729
|
if(c.empty){
|
|
1693
1730
|
return top + '<span class="rl-l1"><span class="dot grey"></span><span class="rl-nm" title="' + escapeXml(c.job) + '">' + escapeXml(c.job) + '</span></span><span class="rl-l2">no runs yet</span></div>';
|
|
1694
1731
|
}
|
|
@@ -1733,7 +1770,7 @@
|
|
|
1733
1770
|
function rlJobsHtml(m){
|
|
1734
1771
|
if(m.schedOnly) return "";
|
|
1735
1772
|
var h = "";
|
|
1736
|
-
if(m.jobs.length) h += rlSectHtml("Jobs", m.jobs.length, "· run in the last " + m.limits.quietDays + " days") + m.jobs.map(rlJobCardHtml).join("");
|
|
1773
|
+
if(m.jobs.length) h += rlSectHtml("Jobs", m.jobs.length, "· run in the last " + m.limits.quietDays + " days", "j") + m.jobs.map(rlJobCardHtml).join("");
|
|
1737
1774
|
if(m.quiet.length){
|
|
1738
1775
|
h += '<button class="rl-fold" type="button" data-rl-fold="__quiet" data-testid="rl-fold-quiet" aria-expanded="' + (m.quietOpen ? 'true' : 'false') + '">' + (m.quietOpen ? '▾' : '▸') + ' quiet jobs (' + m.quiet.length + ') · no run in ' + m.limits.quietDays + ' days</button>';
|
|
1739
1776
|
if(m.quietOpen) h += m.quiet.map(rlJobCardHtml).join("");
|
|
@@ -2889,7 +2926,6 @@
|
|
|
2889
2926
|
// fetch, wired separately in selectRun below).
|
|
2890
2927
|
lastLegDividers = Array.isArray(detail.legDividers) ? detail.legDividers : [];
|
|
2891
2928
|
renderAuditGroups(detail);
|
|
2892
|
-
renderAuditLearnings(detail);
|
|
2893
2929
|
}
|
|
2894
2930
|
|
|
2895
2931
|
// Cross-run learnings, READ-ONLY: what the planner was handed, one group per injection (the draft, the first replan). ONE fold for the
|
|
@@ -2918,91 +2954,100 @@
|
|
|
2918
2954
|
bits.push(h.fixed ? "fixed" : "never fixed");
|
|
2919
2955
|
return bits.join(" \u00B7 ");
|
|
2920
2956
|
}
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
var
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2957
|
+
// The memory and the learnings are shown WHERE THEY WERE PASSED ON (ITEM33-BUILD addendum 2026-11-02): the server hangs `memo` on each
|
|
2958
|
+
// worker try and `learnings` on the planner part that received them. Each is one closed-by-default fold in the SAME light style as
|
|
2959
|
+
// the "try N rounds" fold (details.rounds-fold, its summary caret, its .rf-body); the text is set with textContent, never innerHTML.
|
|
2960
|
+
function handedFold(testid, headHtml, bodyEl){
|
|
2961
|
+
var wrap = document.createElement("details");
|
|
2962
|
+
wrap.className = "rounds-fold";
|
|
2963
|
+
wrap.setAttribute("data-testid", testid);
|
|
2964
|
+
var sum = document.createElement("summary");
|
|
2965
|
+
sum.setAttribute("data-testid", testid + "-toggle");
|
|
2966
|
+
sum.innerHTML = headHtml;
|
|
2967
|
+
var body = document.createElement("div");
|
|
2968
|
+
body.className = "rf-body";
|
|
2969
|
+
body.setAttribute("data-testid", testid + "-body");
|
|
2970
|
+
body.appendChild(bodyEl);
|
|
2971
|
+
wrap.appendChild(sum);
|
|
2972
|
+
wrap.appendChild(body);
|
|
2973
|
+
return wrap;
|
|
2974
|
+
}
|
|
2975
|
+
// the carry memo one worker try was handed: a fold with the exact text, or one plain line when the run predates saving it
|
|
2976
|
+
function memoFoldEl(memo, testid){
|
|
2977
|
+
if(memo.missing){
|
|
2978
|
+
var line = document.createElement("div");
|
|
2979
|
+
line.className = "hint";
|
|
2980
|
+
line.style.cssText = "margin:4px 0 4px 12px;overflow-wrap:anywhere;";
|
|
2981
|
+
line.setAttribute("data-testid", testid + "-missing");
|
|
2982
|
+
line.textContent = "Memory this worker got: not saved (older run)";
|
|
2983
|
+
return line;
|
|
2984
|
+
}
|
|
2985
|
+
var pre = document.createElement("pre");
|
|
2986
|
+
pre.className = "handed-text";
|
|
2987
|
+
pre.setAttribute("data-testid", testid + "-text");
|
|
2988
|
+
pre.textContent = memo.text;
|
|
2989
|
+
var head = escapeXml("Memory this worker got (" + Number(memo.chars).toLocaleString("en-US") + " chars" + (memo.capped ? ", cut at cap" : "") + ")");
|
|
2990
|
+
return handedFold(testid, head, pre);
|
|
2991
|
+
}
|
|
2992
|
+
// the learnings block the planner was handed at the draft or the first replan (hints split by the server's parseHintBlock), or the plain
|
|
2993
|
+
// line when the learnings file could not be read and nothing was handed
|
|
2994
|
+
function learningsFoldEl(it, errLine, testid){
|
|
2995
|
+
var list = document.createElement("div");
|
|
2996
|
+
var phase = it ? it.phase : "draft";
|
|
2997
|
+
var hints = it && Array.isArray(it.hints) ? it.hints : [];
|
|
2998
|
+
if(it){
|
|
2944
2999
|
var note = document.createElement("div");
|
|
2945
3000
|
note.className = "hint";
|
|
2946
3001
|
note.style.cssText = "margin:6px 0;overflow-wrap:anywhere;";
|
|
2947
|
-
note.textContent =
|
|
3002
|
+
note.textContent = "Read-only. Given to the planner at the " + (phase === "replan" ? "first replan" : "draft") + " (" + Number(it.chars).toLocaleString("en-US") + " characters). No worker sees it.";
|
|
2948
3003
|
list.appendChild(note);
|
|
2949
|
-
hints.forEach(function(h){
|
|
2950
|
-
var hint = document.createElement("div");
|
|
2951
|
-
hint.className = "audit-table-scroll";
|
|
2952
|
-
hint.setAttribute("data-testid", "audit-learnings-hint-" + it.phase + "-" + h.n);
|
|
2953
|
-
var table = document.createElement("table");
|
|
2954
|
-
table.className = "rounds-table";
|
|
2955
|
-
var tbody = document.createElement("tbody");
|
|
2956
|
-
var trT = document.createElement("tr");
|
|
2957
|
-
var title = document.createElement("td");
|
|
2958
|
-
title.setAttribute("colspan", "2");
|
|
2959
|
-
title.style.cssText = "font-weight:600;overflow-wrap:anywhere";
|
|
2960
|
-
title.setAttribute("data-testid", "audit-learnings-hint-" + it.phase + "-" + h.n + "-title");
|
|
2961
|
-
title.textContent = learnHintLabel(h);
|
|
2962
|
-
trT.appendChild(title);
|
|
2963
|
-
tbody.appendChild(trT);
|
|
2964
|
-
var t = "audit-learnings-hint-" + it.phase + "-" + h.n + "-";
|
|
2965
|
-
if(h.said) learnRow(tbody, t + "said", "It said:", [h.said]);
|
|
2966
|
-
if(h.touched) learnRow(tbody, t + "touched", "Fix touched:", [h.touched]);
|
|
2967
|
-
if(h.changed && h.changed.length) learnRow(tbody, t + "changed", "What changed:", h.changed.concat(h.moreChanged ? ["(+" + h.moreChanged + " more)"] : []));
|
|
2968
|
-
table.appendChild(tbody);
|
|
2969
|
-
hint.appendChild(table);
|
|
2970
|
-
list.appendChild(hint);
|
|
2971
|
-
});
|
|
2972
|
-
});
|
|
2973
|
-
if(sum){
|
|
2974
|
-
// count DISTINCT hints across the draft and replan blocks: the same ledger row (ids[i], parallel to hints[i]) handed twice is one hint
|
|
2975
|
-
var seen = {};
|
|
2976
|
-
var first = 0;
|
|
2977
|
-
items.forEach(function(it){
|
|
2978
|
-
var hs = Array.isArray(it.hints) ? it.hints : [];
|
|
2979
|
-
var byId = Array.isArray(it.ids) && it.ids.length === hs.length;
|
|
2980
|
-
hs.forEach(function(h, i){
|
|
2981
|
-
var key = byId ? "id:" + it.ids[i] : "n:" + it.phase + ":" + h.n;
|
|
2982
|
-
if(!seen[key]){ seen[key] = true; first += 1; }
|
|
2983
|
-
});
|
|
2984
|
-
});
|
|
2985
|
-
var label = items.length ? head + " \u00B7 " + first + (first === 1 ? " hint" : " hints") : head;
|
|
2986
|
-
// arrow back (hamr 2026-10-24, latest wins over 2026-10-23): auditCaret (\u25BC open / \u25B6 closed) first, as the schedule header; then the same `[✓] word` state markup the schedule/step headers wear (stateDotHTML), then the plain-words title
|
|
2987
|
-
var paint = function(){ sum.innerHTML = auditCaret(sum.getAttribute("aria-expanded") === "true") + stateDotHTML(glyphClass(mark), "learnings", "audit-learnings-state") + " " + escapeXml(label); };
|
|
2988
|
-
paint();
|
|
2989
|
-
// ONE fold, same as the other Audit sections: the header button toggles the body (wired once)
|
|
2990
|
-
sum.onclick = function(){
|
|
2991
|
-
var open = sum.getAttribute("aria-expanded") === "true";
|
|
2992
|
-
sum.setAttribute("aria-expanded", open ? "false" : "true");
|
|
2993
|
-
list.hidden = open;
|
|
2994
|
-
paint();
|
|
2995
|
-
};
|
|
2996
3004
|
}
|
|
3005
|
+
hints.forEach(function(h){
|
|
3006
|
+
var hint = document.createElement("div");
|
|
3007
|
+
hint.className = "audit-table-scroll";
|
|
3008
|
+
hint.setAttribute("data-testid", "audit-learnings-hint-" + phase + "-" + h.n);
|
|
3009
|
+
var table = document.createElement("table");
|
|
3010
|
+
table.className = "rounds-table";
|
|
3011
|
+
var tbody = document.createElement("tbody");
|
|
3012
|
+
var trT = document.createElement("tr");
|
|
3013
|
+
var title = document.createElement("td");
|
|
3014
|
+
title.setAttribute("colspan", "2");
|
|
3015
|
+
title.style.cssText = "font-weight:600;overflow-wrap:anywhere";
|
|
3016
|
+
title.setAttribute("data-testid", "audit-learnings-hint-" + phase + "-" + h.n + "-title");
|
|
3017
|
+
title.textContent = learnHintLabel(h);
|
|
3018
|
+
trT.appendChild(title);
|
|
3019
|
+
tbody.appendChild(trT);
|
|
3020
|
+
var t = "audit-learnings-hint-" + phase + "-" + h.n + "-";
|
|
3021
|
+
if(h.said) learnRow(tbody, t + "said", "It said:", [h.said]);
|
|
3022
|
+
if(h.touched) learnRow(tbody, t + "touched", "Fix touched:", [h.touched]);
|
|
3023
|
+
if(h.changed && h.changed.length) learnRow(tbody, t + "changed", "What changed:", h.changed.concat(h.moreChanged ? ["(+" + h.moreChanged + " more)"] : []));
|
|
3024
|
+
table.appendChild(tbody);
|
|
3025
|
+
hint.appendChild(table);
|
|
3026
|
+
list.appendChild(hint);
|
|
3027
|
+
});
|
|
2997
3028
|
if(errLine){
|
|
2998
3029
|
var en = document.createElement("div");
|
|
2999
3030
|
en.className = "hint";
|
|
3000
3031
|
en.style.cssText = "margin:6px 0;overflow-wrap:anywhere;";
|
|
3001
|
-
en.setAttribute("data-testid", "
|
|
3032
|
+
en.setAttribute("data-testid", testid + "-error");
|
|
3002
3033
|
en.textContent = errLine;
|
|
3003
3034
|
list.appendChild(en);
|
|
3004
3035
|
}
|
|
3005
|
-
|
|
3036
|
+
var failed = !it && !!errLine;
|
|
3037
|
+
var title2 = failed ? "No lessons were given to the planner" : "Learnings the planner got (" + (phase === "replan" ? "first replan" : "draft") + ") · " + hints.length + (hints.length === 1 ? " hint" : " hints");
|
|
3038
|
+
var head = stateDotHTML(glyphClass(failed ? "\u2717" : "\u2713"), "learnings", testid + "-state") + " " + escapeXml(title2);
|
|
3039
|
+
return handedFold(testid, head, list);
|
|
3040
|
+
}
|
|
3041
|
+
// under a part's body: the memory fold of every try the grid does not place (a part without a grid; the fix loop's cut-off try), and the
|
|
3042
|
+
// learnings the planner part was handed. A grid part's tries show their memo in the grid's `told in this run` row (gridTableHtml), not here.
|
|
3043
|
+
function appendHanded(body, part, idx, inGrid){
|
|
3044
|
+
var tries = inGrid ? [] : (Array.isArray(part.attempts) ? part.attempts : []).slice();
|
|
3045
|
+
if(part.cutOffTry && (!inGrid || part.kind === "fix")) tries.push(Object.assign({}, part.cutOffTry, { cutOff: true }));
|
|
3046
|
+
tries.forEach(function(a, i){
|
|
3047
|
+
if(!a || !a.memo) return;
|
|
3048
|
+
body.appendChild(memoFoldEl(a.memo, "audit-memo-" + idx + "-" + (i + 1)));
|
|
3049
|
+
});
|
|
3050
|
+
if(part.learnings || part.learningsError) body.appendChild(learningsFoldEl(part.learnings || null, part.learningsError || "", "audit-learnings-" + idx + "-" + (part.learnings ? part.learnings.phase : "draft")));
|
|
3006
3051
|
}
|
|
3007
3052
|
|
|
3008
3053
|
// ONE spelling of a step's state: its dot + the bold state word — read by the Run tab's step cards AND the Audit tab's grouped rows
|
|
@@ -3042,8 +3087,8 @@
|
|
|
3042
3087
|
function gridStepTryOf(part, t, boxIsLive){
|
|
3043
3088
|
var a = (part.attempts || []).filter(function(x){ return x.n === t.n; })[0] || null;
|
|
3044
3089
|
var out = {
|
|
3045
|
-
n: t.n, glyph: t.cutOff ? "?" : attemptGlyph(t.outcome, boxIsLive), hint: t.thinking || "", noVerdict: t.cutOff ? (t.words || "") : null,
|
|
3046
|
-
known: false, inflight: false, cells: {}, order: [], judged: a && Array.isArray(a.judged) ? a.judged : [], attempt: a || { n: t.n }, calls: a ? (typeof a.rounds === "number" ? a.rounds : null) : (t.cutOff && part.cutOffTry && typeof part.cutOffTry.rounds === "number" ? part.cutOffTry.rounds : null), opening: false
|
|
3090
|
+
n: t.n, glyph: t.cutOff ? "?" : attemptGlyph(t.outcome, boxIsLive), hint: t.thinking || "", nudged: !!(a && a.nudged), noVerdict: t.cutOff ? (t.words || "") : null,
|
|
3091
|
+
known: false, inflight: false, cells: {}, order: [], judged: a && Array.isArray(a.judged) ? a.judged : [], attempt: a || { n: t.n }, memo: a ? a.memo : (t.cutOff && part.cutOffTry ? part.cutOffTry.memo : null), calls: a ? (typeof a.rounds === "number" ? a.rounds : null) : (t.cutOff && part.cutOffTry && typeof part.cutOffTry.rounds === "number" ? part.cutOffTry.rounds : null), opening: false
|
|
3047
3092
|
};
|
|
3048
3093
|
if(!t.cutOff && a && Array.isArray(a.checks)){
|
|
3049
3094
|
out.known = true;
|
|
@@ -3058,8 +3103,8 @@
|
|
|
3058
3103
|
function gridFixTryOf(a, boxIsLive){
|
|
3059
3104
|
var noVerdict = typeof a.noVerdict === "string" && a.noVerdict !== "" ? a.noVerdict : null;
|
|
3060
3105
|
var out = {
|
|
3061
|
-
n: a.n, glyph: tryGlyph(a, boxIsLive), hint: a.source === "outer-close" ? "opening close" : (a.thinking || ""), noVerdict: noVerdict,
|
|
3062
|
-
known: Array.isArray(a.stages), judged: [], inflight: (a.outcome === null || a.outcome === undefined) && !!boxIsLive, cells: {}, order: [], attempt: a,
|
|
3106
|
+
n: a.n, glyph: tryGlyph(a, boxIsLive), hint: a.source === "outer-close" ? "opening close" : (a.thinking || ""), nudged: !!a.nudged, noVerdict: noVerdict,
|
|
3107
|
+
known: Array.isArray(a.stages), memo: a.memo, judged: [], inflight: (a.outcome === null || a.outcome === undefined) && !!boxIsLive, cells: {}, order: [], attempt: a,
|
|
3063
3108
|
calls: typeof a.rounds === "number" ? a.rounds : null, opening: a.source === "outer-close"
|
|
3064
3109
|
};
|
|
3065
3110
|
if(out.known){
|
|
@@ -3136,8 +3181,15 @@
|
|
|
3136
3181
|
function gridTableHtml(pid, model){
|
|
3137
3182
|
if(model.rows.length === 0) return "";
|
|
3138
3183
|
var head = '<tr><th class="q">check</th>' + model.tries.map(function(t){
|
|
3139
|
-
return '<th class="t">try ' + t.n + " " + gridGlyph(t.glyph) + (t.hint ? '<span class="hint">' + escapeXml(t.hint) + "</span>" : "") + "</th>";
|
|
3184
|
+
return '<th class="t">try ' + t.n + " " + gridGlyph(t.glyph) + (t.hint ? '<span class="hint">' + escapeXml(t.hint) + "</span>" : "") + (t.nudged ? '<span class="hint">nudged</span>' : "") + "</th>";
|
|
3140
3185
|
}).join("") + "</tr>";
|
|
3186
|
+
// the memo one worker try was handed: `told in this run`, one button per try that got it (the exact saved text opens in the errors area)
|
|
3187
|
+
var hrow = "";
|
|
3188
|
+
if(model.tries.some(gridHasMemo)){
|
|
3189
|
+
hrow = '<tr class="hint-row memo-row"><td class="q">told in this run</td>' + model.tries.map(function(t){
|
|
3190
|
+
return '<td class="c">' + (gridHasMemo(t) ? '<button type="button" class="btn small hints" data-memo="' + t.n + '" aria-expanded="false" aria-controls="fxerr-' + pid + '" title="try ' + t.n + ' \u00B7 told in this run">' + gridMemoWord(t.memo) + "</button>" : '<span class="cell none">\u2014</span>') + "</td>";
|
|
3191
|
+
}).join("") + "</tr>";
|
|
3192
|
+
}
|
|
3141
3193
|
var body = model.rows.map(function(r){
|
|
3142
3194
|
var tds = model.tries.map(function(t){
|
|
3143
3195
|
var c = gridCellOf(t, r);
|
|
@@ -3148,10 +3200,29 @@
|
|
|
3148
3200
|
}).join("");
|
|
3149
3201
|
return '<tr><td class="q">' + r.n + " " + escapeXml(r.question) + "</td>" + tds + "</tr>";
|
|
3150
3202
|
}).join("");
|
|
3151
|
-
return '<div class="grid-wrap audit-table-scroll"><table class="grid fgrid" data-testid="audit-grid-table"><thead>' + head + "</thead><tbody>" + body + "</tbody></table></div>";
|
|
3152
|
-
}
|
|
3153
|
-
// the
|
|
3203
|
+
return '<div class="grid-wrap audit-table-scroll"><table class="grid fgrid" data-testid="audit-grid-table"><thead>' + head + "</thead><tbody>" + hrow + body + "</tbody></table></div>";
|
|
3204
|
+
}
|
|
3205
|
+
// the memo's button word is its line count; "line"/"lines" are the page's own words, as in "+N more lines"
|
|
3206
|
+
function gridHasMemo(t){ return !!t.memo && typeof t.memo.text === "string" && t.memo.text !== ""; }
|
|
3207
|
+
function gridMemoLines(m){
|
|
3208
|
+
var lines = String(m.text).split("\n");
|
|
3209
|
+
while(lines.length && lines[lines.length - 1].trim() === "") lines.pop();
|
|
3210
|
+
return lines;
|
|
3211
|
+
}
|
|
3212
|
+
function gridMemoWord(m){ var n = gridMemoLines(m).length; return n + (n === 1 ? " line" : " lines"); }
|
|
3213
|
+
// text lines under an opened row, 8 then "+N more lines" (a leading indent is kept as an indent)
|
|
3214
|
+
function gridLinesHtml(lines, more, attr, key){
|
|
3215
|
+
var cap = 8;
|
|
3216
|
+
var shown = more ? lines : lines.slice(0, cap);
|
|
3217
|
+
return '<div class="fx-lines">' + shown.map(function(l){ return /^\s/.test(l) ? '<div class="ind">' + escapeXml(l.replace(/^\s+/, "")) + "</div>" : "<div>" + escapeXml(l) + "</div>"; }).join("") + "</div>" +
|
|
3218
|
+
(lines.length > cap ? '<button type="button" class="fx-more" ' + attr + '="' + key + '">' + (more ? "show first " + cap + " only" : "+" + (lines.length - cap) + " more lines") + "</button>" : "");
|
|
3219
|
+
}
|
|
3220
|
+
// the errors area: the memo texts opened by their buttons, then one list row per red try; `st` = {open: {tryN: true}, more: {"tryN:checkN": true}, memo: {tryN: true}, mmore: {tryN: true}}
|
|
3154
3221
|
function gridErrorsHtml(pid, model, st){
|
|
3222
|
+
var mrows = model.tries.filter(function(t){ return gridHasMemo(t) && st.memo[t.n]; }).map(function(t){
|
|
3223
|
+
return '<div class="fx-row hintrow open"><button type="button" class="fx-rowhead" id="fxmemo-' + pid + "-" + t.n + '" data-mrow="' + t.n + '" aria-expanded="true"><span class="fx-caret">\u25BE</span><span class="fx-try">try ' + t.n + " \u00B7 told in this run \u00B7 " + gridMemoWord(t.memo) + '</span></button><div class="fx-body">' +
|
|
3224
|
+
gridLinesHtml(gridMemoLines(t.memo), !!st.mmore[t.n], "data-mmore", t.n) + "</div></div>";
|
|
3225
|
+
}).join("");
|
|
3155
3226
|
var rows = model.tries.map(function(t){
|
|
3156
3227
|
if(t.noVerdict){
|
|
3157
3228
|
return '<div class="fx-row fx-row-q"><span class="fx-rowhead"><span class="fx-caret"></span><span class="fx-try">try ' + t.n + '</span><span class="fx-chk">' + gridGlyph("?") + '</span><span class="fx-first fx-faint">' + escapeXml(t.noVerdict) + "</span></span></div>";
|
|
@@ -3180,17 +3251,17 @@
|
|
|
3180
3251
|
}
|
|
3181
3252
|
return '<div class="fx-row' + (open ? " open" : "") + '">' + head + body + "</div>";
|
|
3182
3253
|
}).join("");
|
|
3183
|
-
return rows ? '<div class="fx-label">errors</div>' + rows : "";
|
|
3254
|
+
return mrows + rows ? '<div class="fx-label">errors</div>' + mrows + rows : "";
|
|
3184
3255
|
}
|
|
3185
3256
|
// the rounds, folded per try, lazy: each fold fetches its own try's rounds (the per-attempt endpoint) the first time it opens
|
|
3186
3257
|
function gridRoundsHtml(model){
|
|
3187
3258
|
return '<div class="sub-label">rounds per try</div><div class="fold-list">' + model.tries.map(function(t){
|
|
3188
|
-
var line = '<div class="try-line" style="margin-top:6px">try ' + t.n + " " + gridGlyph(t.glyph) + "</div>";
|
|
3259
|
+
var line = '<div data-fxtry="' + t.n + '"><div class="try-line" style="margin-top:6px">try ' + t.n + " " + gridGlyph(t.glyph) + "</div>";
|
|
3189
3260
|
if(t.calls === 0){
|
|
3190
|
-
return line + '<div class="step-rounds-note">' + (t.opening ? "no rounds: the opening close ran before any model call" : "no rounds recorded") + "</div>";
|
|
3261
|
+
return line + '<div class="step-rounds-note">' + (t.opening ? "no rounds: the opening close ran before any model call" : "no rounds recorded") + "</div></div>";
|
|
3191
3262
|
}
|
|
3192
3263
|
return line + '<details class="rounds-fold" data-fxrounds="' + t.n + '"><summary>try ' + t.n + " rounds" + (t.calls === null ? "" : " (" + gridPlural(t.calls, "call") + ")") +
|
|
3193
|
-
'</summary><div class="rf-body"><div class="hint">loading…</div></div></details>';
|
|
3264
|
+
'</summary><div class="rf-body"><div class="hint">loading…</div></div></details></div>';
|
|
3194
3265
|
}).join("") + "</div>";
|
|
3195
3266
|
}
|
|
3196
3267
|
// a rubric step's try names the file its check read (the server's `attempt.judged` words): one faint line per try that has one
|
|
@@ -3210,12 +3281,15 @@
|
|
|
3210
3281
|
Array.prototype.forEach.call(wrap.querySelectorAll("[data-fx]"), function(b){
|
|
3211
3282
|
b.setAttribute("aria-expanded", st.open[b.getAttribute("data-fx").split(":")[0]] ? "true" : "false");
|
|
3212
3283
|
});
|
|
3284
|
+
Array.prototype.forEach.call(wrap.querySelectorAll("[data-memo]"), function(b){
|
|
3285
|
+
b.setAttribute("aria-expanded", st.memo[b.getAttribute("data-memo")] ? "true" : "false");
|
|
3286
|
+
});
|
|
3213
3287
|
}
|
|
3214
3288
|
// a step's or the fix loop's body: tally (steps), then the grid, the errors list and the rounds folds
|
|
3215
3289
|
function buildGridBody(body, partIndex, part, boxIsLive){
|
|
3216
3290
|
var pid = "p" + partIndex;
|
|
3217
3291
|
var model = gridModelOf(part, boxIsLive);
|
|
3218
|
-
var st = { open: gridDefaultOpen(model), more: {} };
|
|
3292
|
+
var st = { open: gridDefaultOpen(model), more: {}, memo: {}, mmore: {} };
|
|
3219
3293
|
if(part.tally){
|
|
3220
3294
|
var tally = document.createElement("div");
|
|
3221
3295
|
tally.className = "step-tally";
|
|
@@ -3236,6 +3310,33 @@
|
|
|
3236
3310
|
if(el && focusRow){ el.scrollIntoView({ block: "nearest" }); el.focus(); } else if(el){ el.focus(); }
|
|
3237
3311
|
};
|
|
3238
3312
|
wrap.addEventListener("click", function(e){
|
|
3313
|
+
var mmore = e.target.closest("[data-mmore]");
|
|
3314
|
+
if(mmore){
|
|
3315
|
+
var mk = mmore.getAttribute("data-mmore");
|
|
3316
|
+
st.mmore[mk] = !st.mmore[mk];
|
|
3317
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3318
|
+
var magain = wrap.querySelector('[data-mmore="' + mk + '"]');
|
|
3319
|
+
if(magain) magain.focus();
|
|
3320
|
+
return;
|
|
3321
|
+
}
|
|
3322
|
+
var mrow = e.target.closest("[data-mrow]");
|
|
3323
|
+
if(mrow){
|
|
3324
|
+
var mn = mrow.getAttribute("data-mrow");
|
|
3325
|
+
st.memo[mn] = false;
|
|
3326
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3327
|
+
var mb = wrap.querySelector('[data-memo="' + mn + '"]');
|
|
3328
|
+
if(mb) mb.focus();
|
|
3329
|
+
return;
|
|
3330
|
+
}
|
|
3331
|
+
var memo = e.target.closest("[data-memo]");
|
|
3332
|
+
if(memo){
|
|
3333
|
+
var mn2 = memo.getAttribute("data-memo");
|
|
3334
|
+
st.memo[mn2] = !st.memo[mn2];
|
|
3335
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3336
|
+
var me = document.getElementById("fxmemo-" + pid + "-" + mn2);
|
|
3337
|
+
if(me) me.scrollIntoView({ block: "nearest" });
|
|
3338
|
+
return;
|
|
3339
|
+
}
|
|
3239
3340
|
var more = e.target.closest("[data-fxmore]");
|
|
3240
3341
|
if(more){
|
|
3241
3342
|
var key = more.getAttribute("data-fxmore");
|
|
@@ -3253,7 +3354,7 @@
|
|
|
3253
3354
|
toggle(tn, st.open[tn] ? false : true, true);
|
|
3254
3355
|
}
|
|
3255
3356
|
});
|
|
3256
|
-
Array.prototype.forEach.call(wrap.querySelectorAll("details
|
|
3357
|
+
Array.prototype.forEach.call(wrap.querySelectorAll("details[data-fxrounds]"), function(d){
|
|
3257
3358
|
var t = model.tries.filter(function(x){ return x.n === parseInt(d.getAttribute("data-fxrounds"), 10); })[0];
|
|
3258
3359
|
var built = false;
|
|
3259
3360
|
d.addEventListener("toggle", function(){
|
|
@@ -3662,6 +3763,7 @@
|
|
|
3662
3763
|
var built = false;
|
|
3663
3764
|
var buildBody = function(){
|
|
3664
3765
|
built = true;
|
|
3766
|
+
var gridBuilt = false;
|
|
3665
3767
|
var toolsHeader = document.createElement("div");
|
|
3666
3768
|
toolsHeader.className = "hint";
|
|
3667
3769
|
toolsHeader.textContent = partLine2Text(part);
|
|
@@ -3678,6 +3780,7 @@
|
|
|
3678
3780
|
body.appendChild(doorEl);
|
|
3679
3781
|
} else if((part.kind === "fix" && attempts.length > 0) || (part.kind === "step" && ((Array.isArray(part.tries) && part.tries.length > 0) || attempts.length > 1))){
|
|
3680
3782
|
// PRD v1.119: a plan step's tries and the fix loop's tries are ONE grid look: checks x tries, an errors list, the rounds folded per try
|
|
3783
|
+
gridBuilt = true;
|
|
3681
3784
|
buildGridBody(body, idx, part, box.state === "running");
|
|
3682
3785
|
} else {
|
|
3683
3786
|
// parts with NO sub-loop (scout, plan, replan, judge, run, or a
|
|
@@ -3687,6 +3790,7 @@
|
|
|
3687
3790
|
body.appendChild(roundsEl);
|
|
3688
3791
|
loadRounds(roundsEl, idx, attempts[0] || { n: 1 }, 0);
|
|
3689
3792
|
}
|
|
3793
|
+
appendHanded(body, part, idx, gridBuilt);
|
|
3690
3794
|
};
|
|
3691
3795
|
headBtn.addEventListener("click", function(){
|
|
3692
3796
|
var expanded = headBtn.getAttribute("aria-expanded") === "true";
|
|
@@ -3836,6 +3940,7 @@
|
|
|
3836
3940
|
// one `~` row per rule (fwdloop's shape); an older plan that carries only the joined `rule` still shows it
|
|
3837
3941
|
(l.rules && l.rules.length ? l.rules : (l.rule ? [l.rule] : [])).forEach(function(r){ h += '<div class="sub">~ ' + escapeXml(r) + "</div>"; });
|
|
3838
3942
|
(l.checks || []).forEach(function(c){ h += checkLine(c); });
|
|
3943
|
+
(l.always || []).forEach(function(g){ h += '<div class="fold" data-testid="plan-always"><span class="mk">\u203A</span> check \u00B7 always-on: ' + escapeXml(g) + "</div>"; });
|
|
3839
3944
|
(l.refused || []).forEach(function(r){ h += '<div class="fold" data-testid="plan-refused"><span class="mk">\u203A</span> not checked \u00B7 ' + escapeXml(r) + "</div>"; });
|
|
3840
3945
|
h += "</div>";
|
|
3841
3946
|
});
|