create-pmos 0.442.0 → 0.444.0
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/package.json +25 -25
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-board-test.js +8 -2
- package/workspace/briefing-premium-insights-test.js +40 -38
- package/workspace/briefing-premium-test.js +2 -1
- package/workspace/changelog.json +24 -0
- package/workspace/goals-clear-ui-test.js +263 -0
- package/workspace/guide/home.md +12 -2
- package/workspace/guide/metric-drafts.md +8 -2
- package/workspace/home-railcard-test.js +193 -0
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/intelligence-gaps-ui-test.js +16 -14
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/lib/engine/boards.js +9 -2
- package/workspace/lib/engine/records/index.js +9 -2
- package/workspace/lib/initiative-layout.js +3 -1
- package/workspace/lib/insights-premium.js +22 -1
- package/workspace/lib/metric-drafts.js +37 -10
- package/workspace/lib/metric-read-runs.js +20 -13
- package/workspace/lib/metric-reads.js +208 -23
- package/workspace/lib/metrics-cli.js +62 -5
- package/workspace/lib/routes-boards.js +40 -1
- package/workspace/lib/routes-goal-status.js +89 -6
- package/workspace/lib/routes-insights-premium.js +1 -1
- package/workspace/lib/routes-metric-drafts.js +26 -3
- package/workspace/live-pill-round-test.js +178 -0
- package/workspace/metric-drafts-ui-test.js +5 -2
- package/workspace/okr-goals-ui-test.js +27 -23
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +231 -0
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/premium-vw-item-test.js +10 -2
- package/workspace/premium-vw-jira-test.js +3 -0
- package/workspace/public/pm/bd-ini-panel.js +3 -2
- package/workspace/public/pm/cozy-adler.js +21 -0
- package/workspace/public/pm/cozy-divider.css +32 -0
- package/workspace/public/pm/cozy-divider.js +45 -0
- package/workspace/public/pm/cozy-insights.css +96 -0
- package/workspace/public/pm/cozy-live-pill.css +16 -17
- package/workspace/public/pm/cozy-live-pill.js +28 -17
- package/workspace/public/pm/cozy-panels.css +59 -0
- package/workspace/public/pm/cozy-panels.js +524 -0
- package/workspace/public/pm/cozy-today.css +15 -0
- package/workspace/public/pm/cozy-viewer.js +173 -69
- package/workspace/public/pm/cozy-vw-shell.css +4 -0
- package/workspace/public/pm/goals-clear.js +265 -0
- package/workspace/public/pm/home-app.js +73 -14
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/home-today.js +55 -12
- package/workspace/public/pm/ini-edit.js +401 -0
- package/workspace/public/pm/ini-groups.js +14 -8
- package/workspace/public/pm/ini-tasks.js +84 -26
- package/workspace/public/pm/ini-versions.js +18 -4
- package/workspace/public/pm/ini-view-model.js +45 -18
- package/workspace/public/pm/ini-view.css +117 -5
- package/workspace/public/pm/ini-view.js +51 -17
- package/workspace/public/pm/metric-drafts.js +4 -1
- package/workspace/public/pm/mission.js +11 -7
- package/workspace/public/pm/premium-board.js +8 -6
- package/workspace/public/pm/premium-insights.js +375 -59
- package/workspace/public/pm/task-card.css +2 -0
- package/workspace/public/pm/task-card.js +4 -1
- package/workspace/server.js +6 -2
- package/workspace/skills/metric-read.skill +7 -5
- package/workspace/stage-card-tasks-test.js +396 -0
- package/workspace/stage-card-test.js +12 -4
- package/workspace/task-delete-test.js +9 -1
- package/workspace/task-milestones-test.js +3 -3
- package/workspace/task-press-test.js +12 -4
- package/workspace/task-views-test.js +198 -5
- package/workspace/test-lists/batch18-live-pill-round.json +10 -0
- package/workspace/test-lists/batch18-panels.json +9 -0
- package/workspace/test-lists/goals-clear.json +15 -0
- package/workspace/test-lists/home-railcard.json +9 -0
- package/workspace/test-lists/stage-card-tasks.json +6 -0
- package/workspace/tk-tasks-test.js +2 -2
|
@@ -272,6 +272,11 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
272
272
|
.ivt-r.ax .ivt-n { background: var(--cz-well); }
|
|
273
273
|
.ivt-r.ax .ivt-c span { position: absolute; top: 8px; font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); white-space: nowrap; padding-left: 4px; }
|
|
274
274
|
.ivt-r.ax .ivt-c span.b { color: var(--cz-ink2); font-weight: 800; }
|
|
275
|
+
.ivt-r.ax .ivt-c span.cut { visibility: hidden; } /* cut by an edge or under the Today chip (ini-tasks.js wireDrag) */
|
|
276
|
+
/* Home's phone rule gives every button in its Viewer 44 px (home-ini.css .hi-v button): a bar, a mark or a title in the Timeline keeps its
|
|
277
|
+
* own size, or each bar grows to 44 px and spills over the next row (0.442.0 hotfix). The row stays the press area. */
|
|
278
|
+
.iv .ivt :is(.ivt-b, .ivt-d, .ivt-g, .iv-tt, .iv-cb, .iv-car), .iv .iva .iva-r.k :is(.iva-tb, .iva-md, .iv-tt, .iv-cb, .iv-dc) { min-height: 0; min-width: 0; }
|
|
279
|
+
.ivt-d.ms { width: 12px; height: 12px; margin: -6px 0 0 -6px !important; border-radius: 2px !important; transform: rotate(45deg); }
|
|
275
280
|
.ivt-n { position: sticky; left: 0; z-index: 3; width: var(--nw); flex: none; background: var(--cz-card); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; min-width: 0; }
|
|
276
281
|
.ivt-r.k .ivt-n { padding-left: 34px; }
|
|
277
282
|
.ivt-n .iv-tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-size: var(--fs-2); }
|
|
@@ -588,7 +593,8 @@ button.lk-mt:hover { color: var(--cz-ink) !important; }
|
|
|
588
593
|
.iv-tr.drag { opacity: .45; }
|
|
589
594
|
.ig-key { font-family: var(--cz-mono); font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); background: var(--cz-well); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
|
|
590
595
|
.ig-tk { text-align: left; }
|
|
591
|
-
|
|
596
|
+
/* a ticket's own key is grey mono; a task linked to a ticket keeps its key blue, as the List draws it (em.lk) */
|
|
597
|
+
.ig-tk .iv-tt em:not(.lk), .ivt-n .iv-tt em:not(.lk), .ivk-d .iv-tt em:not(.lk) { font-style: normal; font-family: var(--cz-mono); font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
592
598
|
.ig-tkd { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); margin-top: 1px; }
|
|
593
599
|
.ig-sq { width: 12px; height: 12px; border-radius: 3px; flex: none; margin: 4px 3px 0; background: var(--cz-ink3); }
|
|
594
600
|
.ig-sq.doing { background: var(--cz-blue); }
|
|
@@ -716,7 +722,11 @@ button.lk-mt:hover { color: var(--cz-ink) !important; }
|
|
|
716
722
|
.ivt-wn b { color: var(--cz-late); font-weight: 800; }
|
|
717
723
|
@container (max-width: 520px) {
|
|
718
724
|
/* a phone: each title sits above its bar, from the bar's start; it sticks to the left edge once the start scrolls away */
|
|
719
|
-
|
|
725
|
+
/* --tl-n is a place on the whole track, not on the screen: the title is at most a screen wide, and starts no later than one screen
|
|
726
|
+
* before the track's end (0.442.0 hotfix: a start past the first screen squeezed the title to nothing, only the dates showed) */
|
|
727
|
+
.ivt-r.k .ivt-n { position: sticky; left: 0; width: auto; max-width: var(--tl-fw, calc(100cqw - 12px)); margin-left: var(--tl-fl, max(0px, min(var(--tl-n, 0px), 100% - 100cqw + 12px))); padding-left: 6px; padding-right: 6px; background: transparent; gap: 8px; z-index: 3; }
|
|
728
|
+
/* a group's name lets the Today line through: an opaque name cut gaps in it (0.442.0 hotfix) */
|
|
729
|
+
.ivt-r.g .ivt-n { background: transparent; }
|
|
720
730
|
.ivt-r.k .ivt-n .iv-tt { flex: 0 1 auto; }
|
|
721
731
|
.ivt-wn { display: inline; flex: none; }
|
|
722
732
|
.ivt-r.k .ivt-g { display: none; }
|
|
@@ -832,7 +842,7 @@ button.iv-msr:hover { background: var(--cz-well) !important; }
|
|
|
832
842
|
.iv-msk.dn { background: var(--cz-okbg); color: var(--cz-ok); }
|
|
833
843
|
.iv-msr.up .iv-msk { color: var(--cz-blueink); }
|
|
834
844
|
.iv-msr.up.late .iv-msk { color: var(--cz-late); }
|
|
835
|
-
.iv-msn { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink);
|
|
845
|
+
.iv-msn { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); line-height: 1.3; padding: 6px 0; overflow-wrap: anywhere; }
|
|
836
846
|
.iv-msr.dn .iv-msn { color: var(--cz-ink3); font-weight: 600; }
|
|
837
847
|
.iv-msd { font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); white-space: nowrap; }
|
|
838
848
|
.iv-msr.up .iv-msd { color: var(--cz-blueink); }
|
|
@@ -883,7 +893,15 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
883
893
|
.iv-mis .iv-stc { background: transparent !important; color: var(--cz-ink) !important; padding: 0 !important; min-height: 26px; }
|
|
884
894
|
.iv-setd { display: inline-flex !important; align-items: center; gap: 6px; min-height: 40px; font-size: var(--fs-3); font-weight: 800; color: var(--cz-blueink) !important; }
|
|
885
895
|
.iv-mis .iv-scgo.on { height: 40px; padding: 0 14px 0 16px !important; font-size: var(--fs-3); font-weight: 800; }
|
|
886
|
-
.iv-mi { position: relative; cursor: pointer; border-radius: 14px; }
|
|
896
|
+
.iv-mi { position: relative; cursor: pointer; border-radius: 14px; overflow: hidden; }
|
|
897
|
+
/* the picture spans the card edge to edge (Wawan 12:25); at the card's top it takes the card's corners */
|
|
898
|
+
.iv-card .iv-mi { margin: 0 -16px; border-radius: 0; }
|
|
899
|
+
.iv-card > .iv-sc:first-child > .iv-mi:first-child { margin-top: -16px; }
|
|
900
|
+
@container iv (min-width: 820px) {
|
|
901
|
+
.iv-card > .iv-sc:first-child > .iv-sch:not(:has(.iv-setd, .iv-scgo, .iv-chp)) + .iv-mi { margin-top: -16px; }
|
|
902
|
+
}
|
|
903
|
+
/* the Board's page draws its icons with a stroke on every svg (cozy-board.css .bd-page svg); the mission is a picture, not an icon */
|
|
904
|
+
.iv-mi svg.mi-svg { fill: initial; stroke: none; stroke-width: 1; }
|
|
887
905
|
.iv-mi:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
888
906
|
.iv-mi .mi-svg { display: block; height: auto; }
|
|
889
907
|
.iv-mi-nm { display: none; position: relative; height: 18px; margin-top: 4px; }
|
|
@@ -901,12 +919,20 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
901
919
|
.iv-mi-tip i { font-style: normal; font-weight: 600; opacity: .75; }
|
|
902
920
|
/* in place: N of M done, ⋯, the next stage, then the list */
|
|
903
921
|
.iv-mio { display: flex; flex-direction: column; gap: 6px; }
|
|
922
|
+
.iv-mio:not(.on) { display: none; }
|
|
923
|
+
@container iv (min-width: 820px) {
|
|
924
|
+
.iv-mio:not(.on) { display: flex; }
|
|
925
|
+
.iv-mio .iv-msh, .iv-mio .iv-msl { display: none; }
|
|
926
|
+
}
|
|
904
927
|
.iv-mio-h { display: flex; align-items: center; gap: 8px; min-height: 40px; }
|
|
905
928
|
.iv-mio-h .iv-sp { flex: 1; }
|
|
906
929
|
.iv-mio-h .iv-mo { width: 40px; height: 40px; background: var(--cz-card); }
|
|
907
930
|
.iv-mio-h .iv-scgo { height: 40px; background: var(--cz-card) !important; font-size: var(--fs-3); font-weight: 800; color: var(--cz-ink); }
|
|
908
931
|
.iv-mio .iv-msh { padding: 6px 6px 0; }
|
|
909
|
-
.iv-mio-h
|
|
932
|
+
.iv-mio-h { flex-wrap: wrap; row-gap: 4px; }
|
|
933
|
+
.iv-mio-b { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
|
|
934
|
+
/* the dates are never cut (Wawan 11:58): too long for the row, they take their own line and the buttons go under them, right */
|
|
935
|
+
.iv-mio-h .iv-dtc { display: block !important; line-height: 36px; white-space: nowrap; min-width: 0; max-width: 100%; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
|
|
910
936
|
.iv-mio-h .iv-mo, .iv-mio-h .iv-scgo { flex: none; }
|
|
911
937
|
.iv-dtc.w { color: var(--cz-late) !important; }
|
|
912
938
|
/* a real win (XvpE5Adler 1): he stands in the card with a soft green glow, his thanks and the one primary */
|
|
@@ -983,3 +1009,89 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
983
1009
|
}
|
|
984
1010
|
html.ad-still .mi-svg *, html.ad-still .iv-card.adl, html.ad-still .iv-card.adl .iv-ask .ad-svg { animation: none !important; }
|
|
985
1011
|
html.ad-still .mi-svg .mi-vn { stroke-dashoffset: 0; }
|
|
1012
|
+
/* the date picker as a phone's bottom sheet (batch 18 item 16, StA3Dates, StA4Milestone): its title and ✕, the task's name under it */
|
|
1013
|
+
.tkc .tkc-dp .ivd-h { display: flex; align-items: center; gap: 8px; height: 40px; font-size: var(--fs-4); color: var(--cz-ink); }
|
|
1014
|
+
.tkc .tkc-dp .ivd-h .iv-ib { margin-left: auto; }
|
|
1015
|
+
.tkc .tkc-dp .ivd-s { margin: 0 0 10px; font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); }
|
|
1016
|
+
.tkc.ivq.vs-pop.sheet .tkc-dp { width: 100%; }
|
|
1017
|
+
/* a milestone on the Tasks Timeline (batch 18 item 16, StA9Timeline): its ◇ on its date and the date beside it, no bar */
|
|
1018
|
+
.ivt-ms.lb { pointer-events: none; }
|
|
1019
|
+
.ivt-ms.lb b { margin-left: 11px; }
|
|
1020
|
+
.ivt-d.drag + .ivt-ms.lb { opacity: 0; }
|
|
1021
|
+
|
|
1022
|
+
/* ── a task changed where it sits in the List (batch 18 item 16, agreed A; canvas In development St*) ──
|
|
1023
|
+
* One line per task (StA1Rows): the box, the title, its days at the right (a phone: the due day only), the owner's face on a desktop. A title
|
|
1024
|
+
* press opens the row in place (StA2Edit): the name field, then one quiet line: status, Start – Due, ⋯ right after the dates (StA8Desk). */
|
|
1025
|
+
.iv-tr.q { align-items: center; position: relative; box-sizing: border-box; }
|
|
1026
|
+
.iv-tr.q .iv-bxw { align-self: center; }
|
|
1027
|
+
.iv-tr.q > .w { flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
|
|
1028
|
+
.iv-tr.q .iv-tn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
|
|
1029
|
+
.iv-tr.q .iv-tt { display: block !important; flex: 0 1 auto; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 600; }
|
|
1030
|
+
.iv-tr.q .iv-rm { flex: none; display: inline-flex; align-items: center; gap: 0; min-height: 0; max-width: 55%; white-space: nowrap; }
|
|
1031
|
+
.iv-tr.q .iv-dc { margin: 0 !important; white-space: nowrap; }
|
|
1032
|
+
.iv-dms { display: inline-flex; margin-right: 4px; color: var(--cz-ink2); }
|
|
1033
|
+
.iv-rav { width: 24px; height: 24px; margin-left: 10px; background: var(--cz-well); color: var(--cz-ink2); }
|
|
1034
|
+
/* the grip (a desktop, on hover): it sits in the row's left gutter */
|
|
1035
|
+
.iv-grip { position: absolute; left: -26px; top: 50%; width: 20px; height: 28px; margin-top: -14px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); cursor: grab; opacity: 0; border-radius: 6px; touch-action: none; }
|
|
1036
|
+
.iv-tr.q:hover .iv-grip { opacity: 1; }
|
|
1037
|
+
.iv-grip:hover { background: var(--cz-well); color: var(--cz-ink2); }
|
|
1038
|
+
@media (hover: none), (pointer: coarse) { .iv-grip { display: none; } }
|
|
1039
|
+
@media (max-width: 760px) {
|
|
1040
|
+
.iv-dst, .iv-rav, .iv-tr.q .iv-late, .iv-tr.q .vs-sl { display: none; }
|
|
1041
|
+
}
|
|
1042
|
+
/* the open row: a soft blue wash across the list's width */
|
|
1043
|
+
.iv-tr.iv-ed { box-sizing: border-box; flex-wrap: nowrap; align-items: flex-start; background: var(--cz-bluebg); margin: 0 -14px 0 -46px; padding: 10px 14px 12px 46px !important; width: calc(100% + 60px); border-top: 0 !important; }
|
|
1044
|
+
.iv-tr.iv-ed .iv-bxw { margin-top: 11px; }
|
|
1045
|
+
.iv-tr.iv-ed + .iv-tr { border-top: 0 !important; }
|
|
1046
|
+
.iv-tr.iv-ed > .w { gap: 8px; }
|
|
1047
|
+
.iv-edf { display: flex; }
|
|
1048
|
+
.iv-edn { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1.5px solid var(--cz-blue); background: var(--cz-card); color: var(--cz-ink); padding: 0 12px; font: inherit; font-size: var(--fs-3); }
|
|
1049
|
+
.iv-edn:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cz-blue) 22%, transparent); }
|
|
1050
|
+
.iv-ed.jr .iv-tt { white-space: normal; font-weight: 700; }
|
|
1051
|
+
.iv-edj { margin: 0; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); }
|
|
1052
|
+
.iv-edj span { color: var(--cz-ink3); font-weight: 600; }
|
|
1053
|
+
.iv-edl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
1054
|
+
.iv .iv-edc { height: 34px; padding: 0 12px !important; border-radius: 999px !important; background: var(--cz-card) !important; display: inline-flex !important; align-items: center; gap: 6px; color: var(--cz-ink) !important; font-size: var(--fs-2); box-shadow: 0 0 0 1px var(--cz-hair); white-space: nowrap; }
|
|
1055
|
+
.iv .iv-edc small { color: var(--cz-ink3); font-weight: 700; font-size: var(--fs-1); }
|
|
1056
|
+
.iv .iv-edc b { font-weight: 800; }
|
|
1057
|
+
.iv .iv-edc:hover, .iv .iv-edc[aria-expanded="true"] { box-shadow: 0 0 0 1.5px var(--cz-blue); }
|
|
1058
|
+
.iv .iv-edc.dash { background: transparent !important; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)) !important; color: var(--cz-ink2) !important; font-weight: 700; }
|
|
1059
|
+
.iv .iv-edc.ms[aria-expanded="true"], .iv .iv-edc.ms:not(.dash) { box-shadow: 0 0 0 1.5px var(--cz-blue); }
|
|
1060
|
+
.iv .iv-edst { padding: 0 8px 0 10px !important; gap: 2px; color: var(--cz-ink2) !important; }
|
|
1061
|
+
.iv-eds { color: var(--cz-ink3); font-weight: 700; }
|
|
1062
|
+
/* a phone keeps the line on one row: the chips drop their Start / Due words (the order says it; the names stay in aria-label) */
|
|
1063
|
+
@media (max-width: 760px) {
|
|
1064
|
+
.iv-edl { gap: 4px; flex-wrap: nowrap; }
|
|
1065
|
+
.iv .iv-edc { padding: 0 9px !important; }
|
|
1066
|
+
.iv .iv-edd small { display: none; }
|
|
1067
|
+
.iv-edl .iv-edm { min-width: 44px; }
|
|
1068
|
+
}
|
|
1069
|
+
.iv-edm { color: var(--cz-ink2); }
|
|
1070
|
+
/* + on an open stage: between the count and the chevron (StA1Rows) */
|
|
1071
|
+
.iv-ws.pl > .n { margin-right: 40px; }
|
|
1072
|
+
.iv-wsw > .iv-plus { position: absolute; right: 34px; top: 50%; margin: -16px 0 0 !important; z-index: 2; }
|
|
1073
|
+
.iv-plus.on { background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
1074
|
+
/* the add field at the top of the stage (StA5Add) */
|
|
1075
|
+
.iv-addin { margin: 0 -14px 0 -46px; padding: 10px 14px 4px 46px; background: var(--cz-bluebg); gap: 10px; }
|
|
1076
|
+
.iv-addin .iv-cb { margin-top: 0 !important; border-style: solid; }
|
|
1077
|
+
.iv-addin input { border: 1.5px solid var(--cz-blue); }
|
|
1078
|
+
.iv-addd { margin: 0 -14px 0 -46px; padding: 4px 14px 12px 46px; background: var(--cz-bluebg); }
|
|
1079
|
+
/* the drag (StA10Drag): the row lifts and follows the pointer; its slot stays as a dashed ghost; the target stage lights up; a blue line marks the drop */
|
|
1080
|
+
.iv-tr.iv-ghost { outline: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 50%, var(--cz-card)); outline-offset: -2px; opacity: .55; }
|
|
1081
|
+
.iv-fly { position: fixed; z-index: 1001; left: var(--fly-x, 0); top: var(--fly-y, 0); width: var(--fly-w, 320px); pointer-events: none; background: var(--cz-card); border-radius: 12px; padding: 7px 12px !important;
|
|
1082
|
+
box-shadow: 0 18px 40px -16px rgba(42,46,53,.45), 0 0 0 1px var(--cz-hair); display: flex; align-items: center; gap: 12px; font-family: var(--cz-sans); color: var(--cz-ink); }
|
|
1083
|
+
.iv-fly .iv-grip { position: static; opacity: 1; margin: 0; color: var(--cz-blueink); }
|
|
1084
|
+
.iv-fly .iv-tt { font-size: var(--fs-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1085
|
+
.iv-fly > .w { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
|
|
1086
|
+
.iv-fly .iv-rm { font-size: var(--fs-2); color: var(--cz-ink3); margin-left: auto; }
|
|
1087
|
+
.iv-wbs { position: relative; }
|
|
1088
|
+
.iv-dl { position: absolute; left: var(--dl-x, 14px); right: 12px; top: var(--dl-y, 0); height: 2px; margin-top: -1px; background: var(--cz-blue); pointer-events: none; z-index: 3; }
|
|
1089
|
+
.iv-dl::before { content: ""; position: absolute; left: -5px; top: -4px; width: 6px; height: 6px; border-radius: 50%; border: 2px solid var(--cz-blue); background: var(--cz-card); }
|
|
1090
|
+
.iv-ws.iv-tgt { background: var(--cz-bluebg) !important; }
|
|
1091
|
+
.iv-dtip { position: fixed; z-index: 1002; left: var(--fly-x, 0); top: var(--fly-y, 0); pointer-events: none; background: var(--cz-solid); color: var(--cz-onsolid); font-family: var(--cz-sans); font-size: var(--fs-2); font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
|
|
1092
|
+
body.iv-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
|
|
1093
|
+
/* ⋯ of the open row (StA2bMore) */
|
|
1094
|
+
.tkc.ivq .ive-m .o.dl:hover { color: var(--cz-red); }
|
|
1095
|
+
.tkc.ivq .ive-m .ck { color: var(--cz-ink2); }
|
|
1096
|
+
/* the open row has its own status chip: the box's caret stays out */
|
|
1097
|
+
.iv-tr.iv-ed .iv-car { display: none !important; }
|
|
@@ -43,6 +43,7 @@ import { cardHtml as smCard, mergedHtml as smMerged } from './split-merge.js';
|
|
|
43
43
|
import * as MI from './mission.js'; // the initiative as a mission, the stage line's place (batch 18 item 1)
|
|
44
44
|
import * as AD from './cozy-adler.js'; // Adler on the card: his face for the ask, his full body for a real win
|
|
45
45
|
import * as MD from './metric-drafts.js'; // the success measure Claude drafts from the PRD (batch 15 item 1, canvas Iq9Initiative)
|
|
46
|
+
import * as ED from './ini-edit.js'; // a task changed where it sits in the List: open in place, ⋯, + per stage, drag (batch 18 item 16)
|
|
46
47
|
|
|
47
48
|
const CSS = new URL('./ini-view.css', import.meta.url).href;
|
|
48
49
|
if (typeof document !== 'undefined' && document.head && !document.querySelector(`link[href="${CSS}"]`)) {
|
|
@@ -109,12 +110,14 @@ function missionBox(v, o, pri) {
|
|
|
109
110
|
+ '<span class="iv-mi-tip" role="tooltip" hidden></span></div>';
|
|
110
111
|
// in place (XvpE2Stages, Wawan 10:59): the stage's dates, ⋯ the stage picker, the next stage; then the milestones, the same list as the
|
|
111
112
|
// desktop's Milestones card (the picture already shows the stages)
|
|
113
|
+
// on a desktop the dates line always shows under the picture and the Milestones card holds the list (Wawan 11:58: the line was missing,
|
|
114
|
+
// and an open picture showed the milestones twice); on a phone both wait for the picture's tap
|
|
112
115
|
let below = '';
|
|
113
|
-
|
|
116
|
+
{
|
|
114
117
|
const more = o.stagePick ? `<button type="button" class="iv-ib iv-mo" data-iv-stagepick aria-haspopup="menu" aria-expanded="false" aria-label="${esc('Stage: ' + st.name + '. Change')}" title="Change the stage">${SVG(MORE, 18, 3)}</button>` : '';
|
|
115
118
|
const D = st.dates, dt = D && (D.start || D.end) ? [D.start, D.end].filter(Boolean).join(' – ') + (D.left ? ' · ' + D.left : '') : '';
|
|
116
119
|
const dates = dt ? (o.planDates ? `<button type="button" class="iv-dtc${D.over ? ' w' : ''}" data-iv-plandates aria-label="${esc('Plan dates: ' + dt + '. Change')}" title="Change the plan dates">${esc(dt)}</button>` : `<span class="iv-dtc${D.over ? ' w' : ''}">${esc(dt)}</span>`) : '';
|
|
117
|
-
below = `<div class="iv-mio"><div class="iv-mio-h">${dates}<span class="iv-
|
|
120
|
+
below = `<div class="iv-mio${open ? ' on' : ''}"><div class="iv-mio-h">${dates}<span class="iv-mio-b">${more}${pri ? '' : nextHtml(st, o, false)}</span></div>${msListHtml(v, o)}</div>`;
|
|
118
121
|
}
|
|
119
122
|
return `<div class="iv-sc iv-mis" aria-label="${esc(st.aria || 'Stage · ' + st.name)}">${head}${pic}${below}</div>`;
|
|
120
123
|
}
|
|
@@ -168,15 +171,33 @@ function msCardHtml(v, o) { const h = msListHtml(v, o); return h ? `<section cla
|
|
|
168
171
|
const cardHasAdler = (v) => AD.prefs()['adler.amount'] !== 'off' && ((v.summary.tone === 'you' && !!v.summary.primary) || !!v.summary.claude);
|
|
169
172
|
|
|
170
173
|
/* ── the WBS ── */
|
|
174
|
+
const GRIP = 'M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01';
|
|
171
175
|
function taskHtml(x, o, arch) {
|
|
172
176
|
// the box marks done in one press; its caret opens the status picker right under it (an archived task has only the caret)
|
|
173
177
|
const car = o.quick && x.uid ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" data-ms="${x.ms ? 1 : 0}" aria-haspopup="dialog" aria-label="${esc('Change the status: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '';
|
|
174
178
|
const cls = ['iv-cb', x.done ? 'on' : '', x.prog ? 'pr' : '', x.wont ? 'wo' : ''].filter(Boolean).join(' ');
|
|
175
|
-
const chk = x.jkey && !x.dr ? `<span class="iv-bxw"
|
|
179
|
+
const chk = x.jkey && !x.dr ? `<span class="iv-bxw">${TV.jqMark(x)}${arch ? car : ''}</span>` : x.dr ? `<span class="iv-bxw"><span class="iv-cb dr" aria-hidden="true"></span>${car}</span>` : x.canCheck && !arch ? `<span class="iv-bxw"><button type="button" class="${cls}" data-iv-check="${esc(x.uid)}" aria-pressed="${x.done}" aria-label="${esc((x.done ? 'Reopen: ' : 'Mark done: ') + x.title)}" title="${x.done ? 'Reopen' : 'Mark done'}">${x.done ? SVG(P.check, 12, 3) : ''}</button>${car}</span>`
|
|
176
180
|
: `<span class="iv-bxw"><span class="iv-cb off${x.done ? ' on' : ''}" aria-hidden="true">${x.done ? SVG(P.check, 12, 3) : ''}</span>${arch ? car : ''}</span>`;
|
|
177
|
-
// a task
|
|
178
|
-
|
|
179
|
-
const
|
|
181
|
+
// a task linked to the Jira ticket it names looks like the ticket rows beside it (batch 14 item 6): the Jira square, the key in blue.
|
|
182
|
+
// A key PMOS has not read is only text: a plain task with its box (0.442.0 hotfix)
|
|
183
|
+
const name = TV.keyName(x);
|
|
184
|
+
// batch 18 item 16 (StA2Edit): with quick changes on, a title press opens the row in place (one at a time); the task card moved to its ⋯
|
|
185
|
+
const edit = o.quick && x.uid && !arch && !!o.ivId;
|
|
186
|
+
if (edit && ED.openOf(o.ivId) === x.uid) return ED.rowHtml(x, o, chk, name);
|
|
187
|
+
// an open task drags inside its stage and to another stage (StA10Drag): a grip on hover on a desktop, a long press on the title on a phone
|
|
188
|
+
const lift = edit && o.stageMode && !x.closed;
|
|
189
|
+
const t = (edit ? `<button type="button" class="iv-tt" data-iv-edit="${esc(x.uid)}"${lift ? ' data-drag="1"' : ''}>${name}</button>` : o.openTask && x.uid && !x.dr ? `<button type="button" class="iv-tt" data-iv-task="${esc(x.uid)}">${name}</button>` : `<b class="iv-tt">${name}</b>`)
|
|
190
|
+
+ (edit && TV.msInDate(x) ? '' : TV.msGlyph(x)) + TV.addedMark(x);
|
|
191
|
+
if (edit) {
|
|
192
|
+
// one line (StA1Rows): the title, then at the right its days (a phone: the due day only; nothing without dates), the late days, the
|
|
193
|
+
// links' marks and the owner's face (a desktop)
|
|
194
|
+
const parts = [x.days ? TV.dateBtn(x, o) + (x.lateText ? `<span class="iv-late">, ${esc(x.lateText)}</span>` : '') + TV.slipHtml(x) : TV.msNoDate(x) ? TV.dateBtn(x, o) : '', LK.metaHtml(x, o.lk, o.quick)].filter(Boolean);
|
|
195
|
+
const av = x.av && x.owner && x.owner !== 'You' ? `<span class="iv-av iv-rav" role="img" aria-label="${esc('Owner: ' + x.owner)}" title="${esc(x.owner)}">${esc(x.av)}</span>` : '';
|
|
196
|
+
const grip = lift ? `<span class="iv-grip" data-iv-grip="${esc(x.uid)}" title="Drag to move" aria-hidden="true">${SVG(GRIP, 16, 3)}</span>` : '';
|
|
197
|
+
// Your groups (batch 11 item 20): a task still drags to another of the PM's groups
|
|
198
|
+
const gd = o.gdrag && !x.dr ? ` draggable="true" data-ig-drag="${esc(x.uid)}"` : '';
|
|
199
|
+
return `<div class="iv-tr q${x.closed ? ' done' : ''}${x.wont ? ' wo' : ''}" data-iv-r="${esc(x.uid)}"${gd}>${grip}${chk}<span class="w"><span class="iv-tn">${t}</span>${parts.length || av ? `<span class="iv-rm">${parts.join('<span class="iv-sep" aria-hidden="true"> · </span>')}${av}</span>` : ''}</span></div>`;
|
|
200
|
+
}
|
|
180
201
|
// the meta: In progress, the dates (a press: the start and due picker opens under them), the late days, the owner
|
|
181
202
|
let meta = x.sub ? `<span class="${x.late ? 'w' : ''}">${esc(x.sub)}</span>` : '';
|
|
182
203
|
if (o.quick && x.uid) {
|
|
@@ -201,8 +222,10 @@ function bodyHtml(v, sec, o) {
|
|
|
201
222
|
const byEp = new Map(); for (const k of sec.jira.open) { const e = k.epic || ''; if (!byEp.has(e)) byEp.set(e, []); byEp.get(e).push(k); }
|
|
202
223
|
const all = isOpen(v, sec.key + ':tk', false), shown = all ? sec.jira.open : sec.jira.open.slice(0, 3);
|
|
203
224
|
// the title opens the ticket; with quick changes on, its dates are a press too: the start and due kept in PMOS (batch 11 item 23)
|
|
204
|
-
|
|
205
|
-
|
|
225
|
+
// batch 18 item 16 (StA6Jira): its title opens it in place: Jira's title and status read-only, the start and due kept in PMOS
|
|
226
|
+
h += shown.map((k) => o.quick && o.ivId && ED.openOf(o.ivId) === k.key ? ED.ticketHtml(k, o)
|
|
227
|
+
: o.quick
|
|
228
|
+
? `<div class="iv-tr iv-tkr"><span class="iv-jq" aria-hidden="true"></span><span class="w"><button type="button" class="iv-tt" ${o.ivId ? 'data-iv-edit' : 'data-iv-ticket'}="${esc(k.key)}"><em>${esc(k.key)}</em> ${esc(k.title)}</button><span class="iv-rm"><span class="${k.warn ? 'w' : ''}">${esc(k.sub)}</span>${k.days ? '<span class="iv-sep" aria-hidden="true"> · </span>' : ''}${TV.dateBtn(TV.jiraRow(k), o)}</span></span></div>`
|
|
206
229
|
: `<button type="button" class="iv-tr iv-tk" data-iv-ticket="${esc(k.key)}"><span class="iv-jq" aria-hidden="true"></span><span class="w"><b class="iv-tt"><em>${esc(k.key)}</em> ${esc(k.title)}</b><span class="${k.warn ? 'w' : ''}">${esc(k.sub)}</span></span></button>`).join('');
|
|
207
230
|
if (sec.jira.open.length > shown.length) h += `<button type="button" class="iv-more" data-iv-fold="${esc(sec.key + ':tk')}" aria-expanded="false">${esc((sec.jira.open.length - shown.length) + ' more open' + (byEp.size > 1 ? ' · by epic' : ''))}${SVG(P.right, 14, 2)}</button>`;
|
|
208
231
|
h += `<p class="iv-q">${esc(sec.jira.done + ' of ' + sec.jira.total + ' done in Jira' + (sec.jira.at ? ' · ' + sec.jira.at : ''))}</p>`;
|
|
@@ -242,31 +265,40 @@ function markOf(sec) {
|
|
|
242
265
|
}
|
|
243
266
|
function sectionHtml(v, sec, o, inner) {
|
|
244
267
|
const key = 'sec:' + (sec.key || 'none'), op = isOpen(v, key, sec.open);
|
|
268
|
+
// a stage of the List by stage (batch 18 item 16): the drag's target, and on an open stage the + that adds a task into it (StA5Add)
|
|
269
|
+
const st = o.stageMode && !sec.stages && (sec.kind === 'stage' || sec.kind === 'none'), sk = esc(sec.key || '');
|
|
245
270
|
const has = sec.top.length || sec.groups.length || sec.done.length || (sec.archived || []).length || sec.jira || (sec.stages && sec.stages.length) || (sec.tk && sec.tk.length) || sec.tkEmpty;
|
|
246
271
|
const name = sec.label || sec.name;
|
|
247
|
-
const
|
|
272
|
+
const plus = st && op && has ? ED.plusHtml(sec, v.id || v.key || '', o) : '';
|
|
273
|
+
const row = `<button type="button" class="iv-ws${sec.kind === 'past' || sec.kind === 'later' ? ' mut' : ''}${inner ? ' in' : ''}${plus ? ' pl' : ''}"${st ? ` data-iv-sec="${sk}"` : ''} ${has ? `data-iv-fold="${esc(key)}" aria-expanded="${op}"` : 'disabled'}>${markOf(sec)}`
|
|
248
274
|
+ `<span class="w"><b>${esc(name)}</b>${sec.sub ? `<small class="${sec.subWarn ? 'w' : ''}">${esc(sec.sub)}</small>` : ''}</span>${sec.epicKey ? `<span class="ig-key">${esc(sec.epicKey)}</span>` : ''}${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? chev(op) : ''}</button>`;
|
|
249
275
|
// a group's own presses sit beside its fold: ⋯ on the PM's own group, the send icon on an epic (batch 11 item 20)
|
|
250
|
-
const tools = G.toolsHtml(sec), head = tools ? `<div class="iv-wsw">${row}${tools}</div>` : row;
|
|
276
|
+
const tools = G.toolsHtml(sec) + plus, head = tools ? `<div class="iv-wsw">${row}${tools}</div>` : row;
|
|
251
277
|
// the PM's own groups and Not in a group take a dragged task
|
|
252
278
|
const drop = (h) => (sec.mine != null && o.gdrag ? `<div class="ig-dz" data-ig-drop="${esc(sec.mine || '')}">${h}</div>` : h);
|
|
253
279
|
if (!op || !has) return drop(head);
|
|
254
280
|
// the folded lines (past stages, Later) open into their own stages, each a section of its own
|
|
255
|
-
const body = sec.stages ? sec.stages.map((s) => sectionHtml(v, s, o, true)).join('') : bodyHtml(v, sec, o);
|
|
256
|
-
return drop(head + `<div class="iv-wl">${body}</div>`);
|
|
281
|
+
const body = sec.stages ? sec.stages.map((s) => sectionHtml(v, s, o, true)).join('') : (st ? ED.addHtml(sec, v.id || v.key || '') : '') + bodyHtml(v, sec, o);
|
|
282
|
+
return drop(head + `<div class="iv-wl"${st ? ` data-iv-sec="${sk}"` : ''}>${body}</div>`);
|
|
257
283
|
}
|
|
258
284
|
function tasksHtml(v0, o) {
|
|
259
285
|
// the grouping the PM picked (batch 11 item 20): every view draws its groups as it draws the stages
|
|
260
286
|
const v = G.view(v0), T = v.tasks;
|
|
261
|
-
|
|
287
|
+
// + sits on each open stage (batch 18 item 16, say it once); the header keeps it while there is no stage list to add into (no task yet,
|
|
288
|
+
// or the tasks grouped another way)
|
|
289
|
+
const stageMode = !!o.quick && (!T.by || T.by === 'stage') && !T.only;
|
|
290
|
+
const add = o.add && (T.empty || !stageMode) ? `<button type="button" class="iv-ib" data-iv-add aria-label="Add a task to ${esc(v.title)}" title="Add a task">${SVG(P.plus, 16, 2.2)}</button>` : '';
|
|
262
291
|
// the view switch shows once there is a task to see another way (zero is silence)
|
|
263
292
|
const mode = T.empty ? 'list' : TV.viewMode();
|
|
264
293
|
// planned versus actual (batch 11 item 8): the version chip and the end slip after the count; Make live (seal) while a draft is shown
|
|
265
294
|
const cnt = VS.countText(v.vs, T.count, T.open + T.done);
|
|
266
295
|
// links (batch 11 item 15): the blue ✦ (proposals), the grey ✦ (quiet moves), the late count, between the count and the version chip
|
|
267
296
|
const lk = T.empty ? null : LK.of(v);
|
|
268
|
-
|
|
269
|
-
const
|
|
297
|
+
// the List by stage edits in place (batch 18 item 16): ivId names the open row's initiative, stageMode turns on the + and the drag
|
|
298
|
+
const ivId = o.quick ? v.id || v.key || '' : '';
|
|
299
|
+
if (ivId) ED.stagesSet(ivId, v0, v);
|
|
300
|
+
o = { ...o, lk, ivId, stageMode, addIn: !!(o.add && o.quick), jiraRead: v.jiraRead || v0.jiraRead || '' };
|
|
301
|
+
const head = `<div class="iv-th"><b>Tasks</b>${cnt ? `<span class="n">${esc(cnt)}</span>` : ''}${LK.headHtml(lk)}${VS.headHtml(v.vs)}<span class="iv-sp"></span>${T.empty ? '' : G.headHtml(v) + TV.viewBtnHtml(mode) + TV.fullBtnHtml(mode)}${VS.liveHtml(v.vs)}${add}</div>`
|
|
270
302
|
+ (o.adding ? `<form class="iv-addf" data-iv-addform><input id="ivAddTask" type="text" maxlength="160" autocomplete="off" placeholder="A task for ${esc(v.title)}${o.addHint ? esc(', ' + o.addHint) : ''}" aria-label="New task"><button type="submit" class="iv-go" aria-label="Add the task" title="Add (Enter). Esc cancels.">${SVG(P.check, 16, 2.2)}</button></form>` : '');
|
|
271
303
|
// while Claude looks for a new initiative elsewhere, Tasks waits for what it finds (PiA1)
|
|
272
304
|
if (T.empty && PP.lookHtml(v)) return head + PP.lookHtml(v);
|
|
@@ -339,7 +371,7 @@ export function viewHtml(v, o = {}) {
|
|
|
339
371
|
export function wireView(body, h) {
|
|
340
372
|
if (!body) return;
|
|
341
373
|
const idOf = () => { const n = body.querySelector('[data-iv]'); return n ? n.dataset.iv : null; };
|
|
342
|
-
body.__iv = LK.wrap(VS.wrap(h, body, (id) => SHOWN.get(id)), idOf);
|
|
374
|
+
body.__iv = LK.wrap(VS.wrap(ED.writes({ ...h, __id: idOf }), body, (id) => SHOWN.get(id)), idOf);
|
|
343
375
|
// the one blue ✦ after the title (pm/ini-props.js), drawn again with each draw of the initiative
|
|
344
376
|
const chip = () => { const id = idOf(); if (id && VIEWED.has(id)) PP.sync(VIEWED.get(id), body.__iv || {}); drafts(id); };
|
|
345
377
|
// the success measure Claude drafted: read once per page load, the view draws again when it arrives
|
|
@@ -389,6 +421,7 @@ export function wireView(body, h) {
|
|
|
389
421
|
if (d.md && MD.press(b, { redraw: H.redraw, toast: H.toast })) { e.preventDefault(); return; }
|
|
390
422
|
if (VS.press(b, d, root, H)) return;
|
|
391
423
|
if (G.press(b, d, root, H)) return;
|
|
424
|
+
if (ED.press(b, d, root, H, e)) return;
|
|
392
425
|
if (LK.press(b, d, root, { ...H, __dates: (x) => TV.press(x, { ivtBar: x.dataset.ivtBar }, root, H, e) })) return;
|
|
393
426
|
if (TV.press(b, d, root, { ...H, __v: SHOWN.get(id), __g: G.api(root, H) }, e)) return;
|
|
394
427
|
if (d.ivFold) { e.preventDefault(); const k = id + '|' + d.ivFold; FOLD.set(k, b.getAttribute('aria-expanded') !== 'true'); if (H.redraw) H.redraw(); return; }
|
|
@@ -419,6 +452,7 @@ export function wireView(body, h) {
|
|
|
419
452
|
if (t && H.addTask) H.addTask(t, inp);
|
|
420
453
|
});
|
|
421
454
|
G.wireDrag(body);
|
|
455
|
+
ED.wire(body);
|
|
422
456
|
TV.wireDrag(body, () => { LK.draw(body, true); const n = body.querySelector('[data-iv]'); if (n) LK.sweep(n.dataset.iv, body.__iv || {}); });
|
|
423
457
|
body.addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'ivAddTask') { e.stopPropagation(); const H = body.__iv || {}; if (H.addCancel) H.addCancel(); } });
|
|
424
458
|
}
|
|
@@ -489,4 +523,4 @@ function showIn(b, id, H, key, uid) {
|
|
|
489
523
|
}
|
|
490
524
|
|
|
491
525
|
/** For the tests: forget every fold the PM opened or shut. */
|
|
492
|
-
export const resetFolds = () => { LINE.clear(); FOLD.clear(); TV.resetViews(); VS.resetVersions(); LK.resetLinks(); G.resetGroups(); };
|
|
526
|
+
export const resetFolds = () => { LINE.clear(); FOLD.clear(); TV.resetViews(); VS.resetVersions(); LK.resetLinks(); G.resetGroups(); ED.reset(); };
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* each row's name, target and where it is measured; ✓ saves them (POST /api/metric-drafts/edit, one per changed row), × puts them back, and the
|
|
18
18
|
* chat icon asks Claude in Home for anything else. Discuss goes to Home's chat. Nothing is kept until the PM's ✓ keep. */
|
|
19
19
|
import { pmPost } from './http.js';
|
|
20
|
+
import { rhythmOf } from './goals-clear.js'; // the Kept toast says the goal's own rhythm (batch 18 item 11)
|
|
20
21
|
import { adler } from './cozy-adler.js'; // Claude drafted it unasked, so Adler holds the card (batch 16 item 2, canvas AdM3)
|
|
21
22
|
|
|
22
23
|
(function sheet() { // once, at import: the parts show on the Board and in Home's Viewer, and the look must come with them on both
|
|
@@ -196,7 +197,9 @@ export function press(b, h = {}) {
|
|
|
196
197
|
}
|
|
197
198
|
one.busy = false;
|
|
198
199
|
if (!r || !r.ok) { say((r && r.error) || (a === 'keep' ? 'Not kept. The server did not say why.' : 'Not undone. The server did not say why.')); redraw(); return; }
|
|
199
|
-
|
|
200
|
+
// batch 18 item 11: "Kept" names the goal's own rhythm (the server's rhythm.txt, else the drafted recipe), never "every morning"
|
|
201
|
+
if (a === 'keep') { const rh = r.rhythm && r.rhythm.txt ? r.rhythm.txt : (rhythmOf(rowsOf(one.d).find((x) => x.state === 'open' && (x.rhythm || x.recipe))) || {}).long;
|
|
202
|
+
say(scope === 'program' ? 'Kept. I read the goal ' + (rh || 'on its own rhythm') + '.' : 'Kept. I read the success measure ' + (rh || 'on its own rhythm') + ' after the release.'); }
|
|
200
203
|
else say('Undone. It is a proposal again.');
|
|
201
204
|
await again(scope, id, redraw);
|
|
202
205
|
})();
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
export const W = 340, H = 100;
|
|
26
26
|
const GY = 78; // the ground line
|
|
27
|
-
export const PX = W - 62, PY =
|
|
27
|
+
export const PX = W - 62, PY = 27; // the target planet, near the right end, high in the sky (Wawan 12:27: far enough to fly to)
|
|
28
28
|
const DX = W - 16; // the dish, at the right edge
|
|
29
29
|
const TX = 30; // the telescope, near the left end
|
|
30
30
|
export const HIT = 44; // a press's square, in px (the picture draws about 1 px a unit)
|
|
@@ -142,7 +142,7 @@ export function missionSvg(M, o = {}) {
|
|
|
142
142
|
const crowd = crowded(pointsOf(M));
|
|
143
143
|
let s = `<defs><linearGradient id="${id}k" x1="0" y1="0" x2="0" y2="1"><stop offset="0" class="mi-s0"/><stop offset="1" class="mi-s1"/></linearGradient>`
|
|
144
144
|
+ `<linearGradient id="${id}x" x1="0" x2="1"><stop offset="0" class="mi-t0"/><stop offset="1" class="mi-t1"/></linearGradient></defs>`;
|
|
145
|
-
s += `<rect x="0" y="0" width="${W}" height="${H}"
|
|
145
|
+
s += `<rect x="0" y="0" width="${W}" height="${H}" fill="url(#${id}k)"/>`; // the corners are the box's (ini-view.css .iv-mi)
|
|
146
146
|
// the stars
|
|
147
147
|
[[30, 12, 1], [84, 26, 0.8], [124, 9, 1.2], [160, 30, 0.9], [250, 12, 1], [292, 30, 0.8], [W - 26, 8, 1]].forEach(([x, y, r], k) => {
|
|
148
148
|
s += `<circle class="mi-tw mi-star mi-d${k}" transform-origin="${x} ${y}" cx="${x}" cy="${y}" r="${r}"/>`;
|
|
@@ -176,7 +176,9 @@ export function missionSvg(M, o = {}) {
|
|
|
176
176
|
+ '<rect x="-4" y="-2.6" width="15" height="5.2" rx="2" class="mi-wh mi-ln" stroke-width="1.1"/><rect x="10" y="-3.4" width="3" height="6.8" rx="1" class="mi-lens mi-ln" stroke-width=".9"/></g></g></g>';
|
|
177
177
|
if (seeking && !M.empty) s += `<line class="mi-beam" x1="${TX + 10}" y1="${GY - 19}" x2="${PX - 12}" y2="${PY + 4}" stroke-width="1.2" stroke-dasharray="2 5" aria-hidden="true"/>`;
|
|
178
178
|
// Plan to Build: the pad at the start of Build; the rocket is a blueprint, then built from the bottom up; past Build 50% it flies
|
|
179
|
-
|
|
179
|
+
// the pad stands in the middle, as the telescope stands left and the dish right (Wawan 12:26): the props keep their places, only the
|
|
180
|
+
// stages under them follow the dates
|
|
181
|
+
const bx = W / 2;
|
|
180
182
|
const fin = M.late ? 'mi-fin late' : 'mi-fin';
|
|
181
183
|
s += `<g aria-hidden="true"><rect x="${f1(bx - 12)}" y="${GY - 1}" width="24" height="3" rx="1.5" class="mi-pad"/>`
|
|
182
184
|
+ `<path d="M${f1(bx - 14)} ${GY} L${f1(bx - 14)} ${GY - 34} M${f1(bx - 14)} ${GY - 26} L${f1(bx - 6)} ${GY - 26} M${f1(bx - 14)} ${GY - 14} L${f1(bx - 6)} ${GY - 14}" fill="none" class="mi-padl" stroke-width="1.2"/></g>`;
|
|
@@ -191,7 +193,7 @@ export function missionSvg(M, o = {}) {
|
|
|
191
193
|
s += b + '</g>';
|
|
192
194
|
} else {
|
|
193
195
|
s += `<g class="mi-puff" aria-hidden="true"><circle cx="${f1(bx - 6)}" cy="${GY - 3}" r="3.5" class="mi-smoke"/><circle cx="${f1(bx + 5)}" cy="${GY - 4}" r="4" class="mi-smoke"/></g>`;
|
|
194
|
-
const p0 = [bx, GY - 20], c1 = [bx +
|
|
196
|
+
const p0 = [bx, GY - 20], c1 = [bx + 10, 4], p1 = [PX - 12, PY - 9]; // it comes down onto the planet's upper left
|
|
195
197
|
const bz = (u) => [(1 - u) ** 2 * p0[0] + 2 * (1 - u) * u * c1[0] + u * u * p1[0], (1 - u) ** 2 * p0[1] + 2 * (1 - u) * u * c1[1] + u * u * p1[1]];
|
|
196
198
|
const all = Array.from({ length: 41 }, (_, i) => bz(i / 40)), pts = Array.from({ length: 41 }, (_, i) => bz((i / 40) * M.fly));
|
|
197
199
|
let len = 0; for (let i = 0; i < 40; i++) len += Math.hypot(pts[i + 1][0] - pts[i][0], pts[i + 1][1] - pts[i][1]);
|
|
@@ -199,14 +201,16 @@ export function missionSvg(M, o = {}) {
|
|
|
199
201
|
if (!M.landed) s += `<path d="${d(all)}" fill="none" class="mi-path" stroke-width="1.4" stroke-dasharray="1.5 5" aria-hidden="true"/>`;
|
|
200
202
|
s += `<path class="mi-vn" d="${d(pts)}" fill="none" stroke="url(#${id}x)" stroke-width="${M.landed ? 2.4 : 3}" stroke-linecap="round" opacity="${M.landed ? 0.45 : 1}" pathLength="100" aria-hidden="true"/>`;
|
|
201
203
|
let rx, ry, a, flame = '';
|
|
202
|
-
if (M.landed) { rx = PX -
|
|
204
|
+
if (M.landed) { rx = PX - 5; ry = PY - 11; a = -12; }
|
|
203
205
|
else {
|
|
204
206
|
[rx, ry] = pts[40];
|
|
205
207
|
a = (Math.atan2(pts[40][1] - pts[38][1], pts[40][0] - pts[38][0]) * 180) / Math.PI + 90;
|
|
206
208
|
if (!M.hold) flame = '<g class="mi-flame"><path d="M-3.4 1 Q0 12 3.4 1Z" class="mi-fo"/><path d="M-1.8 1 Q0 7 1.8 1Z" class="mi-fy"/></g>';
|
|
207
209
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
// the farther it flies the smaller it looks (Wawan 12:27): from .8 on the pad's side to .4 at the planet
|
|
211
|
+
const sc = M.landed ? 0.4 : 0.8 - 0.4 * M.fly;
|
|
212
|
+
s += `<g class="${M.landed ? '' : 'mi-rk'}" role="img" aria-label="${M.landed ? 'Landed at the release' : 'Flying to the release'}"><g transform="translate(${f1(rx)} ${f1(ry)}) rotate(${a.toFixed(1)}) scale(${sc.toFixed(2)})">${flame}${rocketBody(fin)}</g></g>`;
|
|
213
|
+
if (M.landed) s += `<g aria-hidden="true"><rect x="${PX + 5}" y="${PY - 20}" width="1.4" height="9" class="mi-pole"/><path class="mi-flag" transform-origin="${PX + 6} ${PY - 19}" d="M${PX + 6.4} ${PY - 20} L${PX + 14} ${PY - 17.5} L${PX + 6.4} ${PY - 15}Z"/></g>`;
|
|
210
214
|
}
|
|
211
215
|
// Monitor: the dish listens; the last milestone lights it green
|
|
212
216
|
let dish = `<path d="M${DX} ${GY} L${DX} ${GY - 10}" class="mi-ln" stroke-width="1.2"/>`
|
|
@@ -1045,15 +1045,17 @@ function openTask(r, k) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
/** A new task from the initiative view's + (the same box Home's page draws): POST /api/boards/tasks/add. → true when it was added.
|
|
1047
1047
|
* section: the stage it finishes (the Next cell's +, "Add what finishes <stage>"): the task is placed under it (POST /api/boards/tasks/edit). */
|
|
1048
|
-
async function addTask(r, title, section, dates) {
|
|
1048
|
+
async function addTask(r, title, section, dates, name) {
|
|
1049
1049
|
const body = { ws: r.ws || M.board.ws, board: r.boardId || M.board.id };
|
|
1050
|
-
|
|
1050
|
+
// dates: a gap's + (batch 11 item 13) fills the task's start and due with the gap's days ahead; section: the stage it goes under (the
|
|
1051
|
+
// add route places it, batch 18 item 16)
|
|
1052
|
+
const res = await pmPost('/api/boards/tasks/add', { ...body, initiative: r.id, title, ...(dates && dates.start ? { start: dates.start } : {}), ...(dates && dates.due ? { due: dates.due } : {}), ...(section ? { section } : {}) }).catch(() => null);
|
|
1051
1053
|
if (!res || res.ok === false) { say((res && res.error) || 'The task was not added.'); return false; }
|
|
1052
1054
|
const uid = res.item && res.item.uid;
|
|
1053
|
-
//
|
|
1054
|
-
if (
|
|
1055
|
-
|
|
1056
|
-
|
|
1055
|
+
// the + on a stage (batch 18 item 16, StA5Add): "Added to Build" with Undo
|
|
1056
|
+
if (name && uid) say('Added to ' + name + '.', async () => { const u = await pmPost('/api/boards/tasks/delete', { ...body, task: uid, why: 'undo of add' }).catch(() => null); if (!u || u.ok === false) say((u && u.error) || 'The undo did not land.'); load(); });
|
|
1057
|
+
else say('Task added.');
|
|
1058
|
+
load();
|
|
1057
1059
|
return true;
|
|
1058
1060
|
}
|
|
1059
1061
|
/** The Next cell's icon (pm/bd-next.js): draft with Claude in Home's chat, move to the next stage, add a task to the stage, link the epic, read Jira. */
|