create-pmos 0.399.0 → 0.401.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 +30 -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-adddoc-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +3 -3
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-sources-test.js +2 -0
- package/workspace/briefing-premium-test.js +6 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +29 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +24 -3
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/phone-companion.md +1 -1
- package/workspace/lib/core-docs.js +2 -2
- package/workspace/lib/route-modules.js +1 -9
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +8 -3
- package/workspace/premium-vw-cal-test.js +4 -1
- package/workspace/premium-vw-doc-test.js +1 -8
- package/workspace/premium-work-depth-test.js +2 -3
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/c3-base.js +47 -0
- package/workspace/public/pm/c3-capture.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/c3-sheet.js +1 -1
- package/workspace/public/pm/c3-toast.js +1 -1
- package/workspace/public/pm/console3.css +3 -0
- package/workspace/public/pm/cozy-home.css +21 -6
- package/workspace/public/pm/cozy-today.css +4 -3
- package/workspace/public/pm/cozy-viewer.js +4 -2
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-app.js +65 -33
- package/workspace/public/pm/home-chat.js +34 -29
- package/workspace/public/pm/home-data.js +10 -2
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +13 -3
- package/workspace/public/pm/home-list.js +18 -10
- package/workspace/public/pm/home-more.js +2 -2
- package/workspace/public/pm/home-phone-card.js +9 -4
- package/workspace/public/pm/home-review.js +2 -3
- package/workspace/public/pm/home-today.js +11 -8
- package/workspace/public/pm/home-work.js +13 -8
- package/workspace/public/pm/note-dock.js +1 -2
- package/workspace/public/pm/notes-links.js +1 -2
- package/workspace/public/pm/notes-task.js +3 -4
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/premium-vw-item.css +6 -0
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/replaced-tests.json +435 -0
- package/workspace/run-tests.js +323 -28
- package/workspace/server.js +15 -10
- package/workspace/test-files.json +4 -140
- package/workspace/test-lists/base.json +1 -2
- package/workspace/test-lists/c3-desktop-light-load.json +1 -2
- package/workspace/test-lists/c3-initiative-boards.json +1 -2
- package/workspace/test-lists/c3-meeting-focus.json +2 -12
- package/workspace/test-lists/c3-work-agent.json +1 -2
- package/workspace/test-lists/calendar-tidy-up.json +1 -2
- package/workspace/test-lists/console3-reports.json +1 -2
- package/workspace/test-lists/docs-three-way-sync.json +1 -2
- package/workspace/test-lists/extension-capture.json +5 -0
- package/workspace/test-lists/jira-wbs.json +1 -2
- package/workspace/test-lists/legacy-cleanup-a.json +9 -0
- package/workspace/test-lists/meeting-material.json +1 -2
- package/workspace/test-lists/meeting-notes.json +2 -36
- package/workspace/test-lists/meeting-replay.json +1 -2
- package/workspace/test-lists/mm-capture.json +2 -12
- package/workspace/test-lists/my-work.json +2 -10
- package/workspace/test-lists/onboarding-firstrun.json +2 -12
- package/workspace/test-lists/people-directory.json +1 -2
- package/workspace/test-lists/run2-a.json +1 -2
- package/workspace/test-lists/run2-d.json +2 -19
- package/workspace/test-lists/run3-b.json +1 -2
- package/workspace/test-lists/run3-c.json +2 -12
- package/workspace/test-lists/run4-b.json +1 -2
- package/workspace/test-lists/run4-d.json +1 -5
- package/workspace/test-lists/run5-c.json +1 -11
- package/workspace/test-lists/run6.json +1 -5
- package/workspace/test-lists/workspace-launch-flags.json +2 -12
- package/workspace/test-lists/workspace-profile-detection.json +2 -10
- package/workspace/test-timings.json +242 -123
- package/workspace/c3-briefing-test.js +0 -136
- package/workspace/c3-core-docs-test.js +0 -170
- package/workspace/c3-driver-fixture.js +0 -64
- package/workspace/c3-driver-test.js +0 -169
- package/workspace/c3-foundation-test.js +0 -163
- package/workspace/c3-ib-items-test.js +0 -114
- package/workspace/c3-ib-more-test.js +0 -146
- package/workspace/c3-ib-triage-backlog-test.js +0 -128
- package/workspace/c3-ini-harness.js +0 -66
- package/workspace/c3-ini-life-test.js +0 -167
- package/workspace/c3-initiatives-test.js +0 -186
- package/workspace/c3-light-load-test.js +0 -112
- package/workspace/c3-one-home-test.js +0 -149
- package/workspace/c3-phone-test.js +0 -289
- package/workspace/c3-quiet-test.js +0 -157
- package/workspace/c3-report-design-real-test.js +0 -264
- package/workspace/c3-report-design-test.js +0 -442
- package/workspace/c3-report-setup-test.js +0 -192
- package/workspace/c3-report-structure-real-test.js +0 -248
- package/workspace/c3-report-structure-test.js +0 -397
- package/workspace/c3-reports-test.js +0 -288
- package/workspace/c3-scan-test.js +0 -517
- package/workspace/c3-sessions-panel-test.js +0 -365
- package/workspace/c3-settings-test.js +0 -204
- package/workspace/c3-updates-test.js +0 -131
- package/workspace/c3-work-test.js +0 -260
- package/workspace/cut-stub.js +0 -40
- package/workspace/first-paint-audit.js +0 -160
- package/workspace/lib/c3-full-console.js +0 -15
- package/workspace/lib/engine/derived/trust.js +0 -3
- package/workspace/lib/engine/plan-forecast.js +0 -342
- package/workspace/lib/engine/report-families.js +0 -175
- package/workspace/lib/engine/truth-table.js +0 -57
- package/workspace/lib/routes-c3-init.js +0 -54
- package/workspace/lib/routes-c3-life.js +0 -120
- package/workspace/lib/routes-c3-timeline.js +0 -192
- package/workspace/lib/routes-forecast.js +0 -86
- package/workspace/lib/routes-releases.js +0 -130
- package/workspace/lib/routes-report-facts.js +0 -85
- package/workspace/lib/routes-report-families.js +0 -33
- package/workspace/lib/routes-signals.js +0 -51
- package/workspace/lib/routes-timeline.js +0 -197
- package/workspace/public/c3.html +0 -35
- package/workspace/public/index.html +0 -156
- package/workspace/public/pm/app.js +0 -831
- package/workspace/public/pm/bd-board.js +0 -159
- package/workspace/public/pm/bd-drag.js +0 -59
- package/workspace/public/pm/bd-model.js +0 -152
- package/workspace/public/pm/bd-timeline.js +0 -233
- package/workspace/public/pm/bd-tree.js +0 -244
- package/workspace/public/pm/board-copy.js +0 -59
- package/workspace/public/pm/board-read.js +0 -38
- package/workspace/public/pm/branches-sheet.js +0 -56
- package/workspace/public/pm/breakdown-api.js +0 -58
- package/workspace/public/pm/breakdown-copy.js +0 -138
- package/workspace/public/pm/briefing-deck.js +0 -441
- package/workspace/public/pm/briefing-model.js +0 -251
- package/workspace/public/pm/c3-ambient.js +0 -100
- package/workspace/public/pm/c3-audience-link.js +0 -21
- package/workspace/public/pm/c3-audience.js +0 -46
- package/workspace/public/pm/c3-boot.js +0 -13
- package/workspace/public/pm/c3-breakdown.js +0 -240
- package/workspace/public/pm/c3-brief-data.js +0 -11
- package/workspace/public/pm/c3-brief-mentions.js +0 -137
- package/workspace/public/pm/c3-brief-needs.js +0 -288
- package/workspace/public/pm/c3-brief-pulse.js +0 -112
- package/workspace/public/pm/c3-brief-summary.js +0 -139
- package/workspace/public/pm/c3-brief-today.js +0 -79
- package/workspace/public/pm/c3-brief.js +0 -279
- package/workspace/public/pm/c3-cal-strategy.js +0 -529
- package/workspace/public/pm/c3-calendar.js +0 -965
- package/workspace/public/pm/c3-calpop.js +0 -111
- package/workspace/public/pm/c3-case.js +0 -196
- package/workspace/public/pm/c3-core-docs.css +0 -18
- package/workspace/public/pm/c3-core-docs.js +0 -236
- package/workspace/public/pm/c3-daypart.js +0 -176
- package/workspace/public/pm/c3-demo-boards.js +0 -764
- package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
- package/workspace/public/pm/c3-demo-brief-page.js +0 -70
- package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
- package/workspace/public/pm/c3-demo-cal2.js +0 -66
- package/workspace/public/pm/c3-demo-cal3.js +0 -173
- package/workspace/public/pm/c3-demo-cal4.js +0 -169
- package/workspace/public/pm/c3-demo-cal5.js +0 -52
- package/workspace/public/pm/c3-demo-coredocs.js +0 -221
- package/workspace/public/pm/c3-demo-data.js +0 -552
- package/workspace/public/pm/c3-demo-focus.js +0 -181
- package/workspace/public/pm/c3-demo-init.js +0 -430
- package/workspace/public/pm/c3-demo-life.js +0 -77
- package/workspace/public/pm/c3-demo-material.js +0 -58
- package/workspace/public/pm/c3-demo-misc2.js +0 -34
- package/workspace/public/pm/c3-demo-phone.js +0 -48
- package/workspace/public/pm/c3-demo-plan2.js +0 -30
- package/workspace/public/pm/c3-demo-rd.js +0 -432
- package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
- package/workspace/public/pm/c3-demo-rep2.js +0 -130
- package/workspace/public/pm/c3-demo-rep3.js +0 -138
- package/workspace/public/pm/c3-demo-rs.js +0 -287
- package/workspace/public/pm/c3-demo-term.js +0 -153
- package/workspace/public/pm/c3-demo-time.js +0 -49
- package/workspace/public/pm/c3-demo-work-ix.js +0 -32
- package/workspace/public/pm/c3-demo.js +0 -131
- package/workspace/public/pm/c3-design-studio.js +0 -369
- package/workspace/public/pm/c3-doc-formats.js +0 -153
- package/workspace/public/pm/c3-doc-sheet.js +0 -1230
- package/workspace/public/pm/c3-dock.js +0 -206
- package/workspace/public/pm/c3-docs.js +0 -291
- package/workspace/public/pm/c3-driver-work.js +0 -110
- package/workspace/public/pm/c3-driver.css +0 -18
- package/workspace/public/pm/c3-driver.js +0 -298
- package/workspace/public/pm/c3-focus.css +0 -304
- package/workspace/public/pm/c3-focus.js +0 -983
- package/workspace/public/pm/c3-ib-docs.js +0 -92
- package/workspace/public/pm/c3-ib-initiatives.js +0 -201
- package/workspace/public/pm/c3-ib-items.js +0 -210
- package/workspace/public/pm/c3-ib-releases.js +0 -48
- package/workspace/public/pm/c3-ib-sprints.js +0 -201
- package/workspace/public/pm/c3-ib-triage.js +0 -177
- package/workspace/public/pm/c3-ii-tabs.js +0 -252
- package/workspace/public/pm/c3-ini-life.css +0 -34
- package/workspace/public/pm/c3-ini-life.js +0 -379
- package/workspace/public/pm/c3-ini-records.js +0 -197
- package/workspace/public/pm/c3-ini-timeline.js +0 -278
- package/workspace/public/pm/c3-ini-work.js +0 -139
- package/workspace/public/pm/c3-init-extras.js +0 -170
- package/workspace/public/pm/c3-initiatives.js +0 -852
- package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
- package/workspace/public/pm/c3-look.js +0 -27
- package/workspace/public/pm/c3-material.css +0 -22
- package/workspace/public/pm/c3-material.js +0 -321
- package/workspace/public/pm/c3-md.js +0 -3
- package/workspace/public/pm/c3-misc-panels.js +0 -89
- package/workspace/public/pm/c3-new-session.js +0 -110
- package/workspace/public/pm/c3-notes.js +0 -751
- package/workspace/public/pm/c3-phone-boot.js +0 -47
- package/workspace/public/pm/c3-phone-detail.js +0 -97
- package/workspace/public/pm/c3-phone-model.js +0 -3
- package/workspace/public/pm/c3-phone.css +0 -66
- package/workspace/public/pm/c3-phone.js +0 -444
- package/workspace/public/pm/c3-plan-panels.js +0 -163
- package/workspace/public/pm/c3-plan.js +0 -193
- package/workspace/public/pm/c3-quiet.css +0 -113
- package/workspace/public/pm/c3-quiet.js +0 -177
- package/workspace/public/pm/c3-replay.css +0 -133
- package/workspace/public/pm/c3-replay.js +0 -429
- package/workspace/public/pm/c3-report-deck.css +0 -163
- package/workspace/public/pm/c3-report-deck.js +0 -598
- package/workspace/public/pm/c3-report-frame.css +0 -20
- package/workspace/public/pm/c3-report-print.css +0 -20
- package/workspace/public/pm/c3-report-setup.css +0 -67
- package/workspace/public/pm/c3-report-setup.js +0 -298
- package/workspace/public/pm/c3-report-store.js +0 -244
- package/workspace/public/pm/c3-report-structure.css +0 -44
- package/workspace/public/pm/c3-report-structure.js +0 -473
- package/workspace/public/pm/c3-reports.css +0 -68
- package/workspace/public/pm/c3-reports.js +0 -377
- package/workspace/public/pm/c3-roadmap.js +0 -249
- package/workspace/public/pm/c3-scan-api.js +0 -167
- package/workspace/public/pm/c3-scan-next.js +0 -248
- package/workspace/public/pm/c3-scan-setup.js +0 -313
- package/workspace/public/pm/c3-scan-words.js +0 -41
- package/workspace/public/pm/c3-scan.css +0 -74
- package/workspace/public/pm/c3-scan.js +0 -93
- package/workspace/public/pm/c3-session-chat.js +0 -103
- package/workspace/public/pm/c3-session-conv.js +0 -165
- package/workspace/public/pm/c3-session-term.js +0 -216
- package/workspace/public/pm/c3-settings.css +0 -85
- package/workspace/public/pm/c3-settings.js +0 -1045
- package/workspace/public/pm/c3-shell.js +0 -628
- package/workspace/public/pm/c3-signals.js +0 -196
- package/workspace/public/pm/c3-strategy-panels.js +0 -45
- package/workspace/public/pm/c3-swipe.js +0 -230
- package/workspace/public/pm/c3-terminal-data.js +0 -48
- package/workspace/public/pm/c3-terminal-edge.js +0 -91
- package/workspace/public/pm/c3-terminal-icons.js +0 -40
- package/workspace/public/pm/c3-terminal-results.js +0 -141
- package/workspace/public/pm/c3-terminal.js +0 -52
- package/workspace/public/pm/c3-tickets.js +0 -163
- package/workspace/public/pm/c3-timeline.js +0 -201
- package/workspace/public/pm/calendar-views.js +0 -1049
- package/workspace/public/pm/console3-lift.md +0 -220
- package/workspace/public/pm/cozy-home.js +0 -172
- package/workspace/public/pm/cozy-initiative.css +0 -138
- package/workspace/public/pm/cycle-review.js +0 -125
- package/workspace/public/pm/data.js +0 -1577
- package/workspace/public/pm/dest-board.js +0 -444
- package/workspace/public/pm/dest-docs.js +0 -530
- package/workspace/public/pm/dest-initiatives.js +0 -162
- package/workspace/public/pm/dest-mywork.js +0 -307
- package/workspace/public/pm/dest-notes.js +0 -537
- package/workspace/public/pm/dest-people.js +0 -449
- package/workspace/public/pm/dest-reports.js +0 -383
- package/workspace/public/pm/dest-settings.js +0 -601
- package/workspace/public/pm/dest-today.js +0 -267
- package/workspace/public/pm/display-word.js +0 -56
- package/workspace/public/pm/doc-editor.js +0 -473
- package/workspace/public/pm/doc-graph.js +0 -272
- package/workspace/public/pm/doc-health-panel.js +0 -110
- package/workspace/public/pm/doc-rail.js +0 -167
- package/workspace/public/pm/doc-remote.js +0 -180
- package/workspace/public/pm/dock-sessions.js +0 -472
- package/workspace/public/pm/dock.js +0 -216
- package/workspace/public/pm/fixture.js +0 -821
- package/workspace/public/pm/flag-picker.js +0 -104
- package/workspace/public/pm/frame-copy.js +0 -278
- package/workspace/public/pm/freshness-line.js +0 -149
- package/workspace/public/pm/handoff-box.js +0 -82
- package/workspace/public/pm/initiative-list.js +0 -235
- package/workspace/public/pm/initiative-sheet.js +0 -331
- package/workspace/public/pm/initiatives-api.js +0 -95
- package/workspace/public/pm/initiatives-copy.js +0 -287
- package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
- package/workspace/public/pm/initiatives-timeline.js +0 -410
- package/workspace/public/pm/initiatives-ui.js +0 -291
- package/workspace/public/pm/item-sheet.js +0 -268
- package/workspace/public/pm/keep-card.js +0 -204
- package/workspace/public/pm/lifecycle-lens-model.js +0 -246
- package/workspace/public/pm/lifecycle-lens.js +0 -276
- package/workspace/public/pm/lifecycle.js +0 -111
- package/workspace/public/pm/mobile.css +0 -366
- package/workspace/public/pm/mobile.js +0 -581
- package/workspace/public/pm/modes-live.js +0 -453
- package/workspace/public/pm/modes.js +0 -147
- package/workspace/public/pm/my-work-card.js +0 -51
- package/workspace/public/pm/my-work-data.js +0 -36
- package/workspace/public/pm/new-initiative-sheet.js +0 -169
- package/workspace/public/pm/next-step-ui.js +0 -190
- package/workspace/public/pm/outbox-panel.js +0 -125
- package/workspace/public/pm/palette-copy.js +0 -55
- package/workspace/public/pm/palette.js +0 -343
- package/workspace/public/pm/panel-breakdown.js +0 -702
- package/workspace/public/pm/panel-cockpit.js +0 -425
- package/workspace/public/pm/panel-detail.js +0 -1513
- package/workspace/public/pm/panel-initiatives.js +0 -929
- package/workspace/public/pm/panel-newsess.js +0 -709
- package/workspace/public/pm/panel-repos.js +0 -741
- package/workspace/public/pm/panel-tabs.js +0 -1506
- package/workspace/public/pm/panel-trees.js +0 -204
- package/workspace/public/pm/people-link.js +0 -106
- package/workspace/public/pm/phone-deck.js +0 -167
- package/workspace/public/pm/pm-work-view.js +0 -1533
- package/workspace/public/pm/portfolio-report.js +0 -61
- package/workspace/public/pm/premium-acts.js +0 -280
- package/workspace/public/pm/premium-brief.js +0 -111
- package/workspace/public/pm/premium-chat.js +0 -22
- package/workspace/public/pm/premium-doc-sheet.js +0 -312
- package/workspace/public/pm/premium-initiative.js +0 -324
- package/workspace/public/pm/premium-insights.css +0 -228
- package/workspace/public/pm/premium-metric-tiles.js +0 -68
- package/workspace/public/pm/premium-report-brief.js +0 -132
- package/workspace/public/pm/premium-vw-rec.js +0 -67
- package/workspace/public/pm/premium-wide.css +0 -30
- package/workspace/public/pm/print.css +0 -44
- package/workspace/public/pm/provider-cards.js +0 -136
- package/workspace/public/pm/registry.js +0 -203
- package/workspace/public/pm/release-card.js +0 -110
- package/workspace/public/pm/releases-view.js +0 -248
- package/workspace/public/pm/report-families-view.js +0 -505
- package/workspace/public/pm/report-slides.js +0 -438
- package/workspace/public/pm/report-tab.js +0 -33
- package/workspace/public/pm/report-view.js +0 -337
- package/workspace/public/pm/reports-copy.js +0 -134
- package/workspace/public/pm/roadmap.js +0 -294
- package/workspace/public/pm/run-card.js +0 -260
- package/workspace/public/pm/sessions-panel.js +0 -219
- package/workspace/public/pm/sheet-jira.js +0 -353
- package/workspace/public/pm/shell-bell.js +0 -163
- package/workspace/public/pm/shell-model.js +0 -83
- package/workspace/public/pm/shell-phone.js +0 -124
- package/workspace/public/pm/shell-readaloud.js +0 -53
- package/workspace/public/pm/shell-recording.js +0 -274
- package/workspace/public/pm/shell-ticker.js +0 -90
- package/workspace/public/pm/sig-watch.js +0 -41
- package/workspace/public/pm/slide-confirm.js +0 -163
- package/workspace/public/pm/slides-copy.js +0 -52
- package/workspace/public/pm/status-banner.js +0 -95
- package/workspace/public/pm/tab-doc.js +0 -859
- package/workspace/public/pm/tab-gone.js +0 -21
- package/workspace/public/pm/tab-term.js +0 -1210
- package/workspace/public/pm/tab-web.js +0 -90
- package/workspace/public/pm/timeline-copy.js +0 -48
- package/workspace/public/pm/timeline-forecast-view.js +0 -164
- package/workspace/public/pm/today-agenda.js +0 -331
- package/workspace/public/pm/today-cards.js +0 -244
- package/workspace/public/pm/today-copy.js +0 -506
- package/workspace/public/pm/today-day.js +0 -1371
- package/workspace/public/pm/today-goals.js +0 -297
- package/workspace/public/pm/today-jobs.js +0 -84
- package/workspace/public/pm/today-mentions.js +0 -50
- package/workspace/public/pm/topbar.js +0 -202
- package/workspace/public/pm/triage-card.js +0 -60
- package/workspace/public/pm/undo-hold.js +0 -103
- package/workspace/public/pm/view-addrepo.js +0 -208
- package/workspace/public/pm/view-files.js +0 -197
- package/workspace/public/pm/view-livenotes.js +0 -399
- package/workspace/public/pm/view-today.js +0 -13
- package/workspace/public/pm/view-validate.js +0 -171
- package/workspace/public/pm/welcome.js +0 -391
- package/workspace/public/pm/work-place.js +0 -68
- package/workspace/public/pm/xlsx-read.js +0 -117
- package/workspace/public/welcome.html +0 -22
- package/workspace/test-lists/browser-suites-green.json +0 -5
- package/workspace/test-lists/c3-core-docs.json +0 -9
- package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
- package/workspace/test-lists/c3-ib-items.json +0 -9
- package/workspace/test-lists/c3-ib-more.json +0 -9
- package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
- package/workspace/test-lists/c3-ini-life.json +0 -9
- package/workspace/test-lists/c3-meeting-board.json +0 -5
- package/workspace/test-lists/c3-meeting-card.json +0 -5
- package/workspace/test-lists/c3-notes-place.json +0 -5
- package/workspace/test-lists/c3-notes-series.json +0 -5
- package/workspace/test-lists/calendar-time-page.json +0 -5
- package/workspace/test-lists/calpop.json +0 -4
- package/workspace/test-lists/console3-briefing.json +0 -9
- package/workspace/test-lists/console3-foundation.json +0 -9
- package/workspace/test-lists/console3-work-page.json +0 -9
- package/workspace/test-lists/premium-brief-parity.json +0 -9
- package/workspace/test-lists/report-design-studio-ui.json +0 -5
- package/workspace/test-lists/report-structure-ui.json +0 -11
- package/workspace/test-lists/report-workspace-ui.json +0 -5
- package/workspace/test-lists/run3-a.json +0 -5
- package/workspace/test-lists/run3-d.json +0 -6
- package/workspace/test-lists/run4-c.json +0 -13
- package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
- package/workspace/test-lists/today-mentions-cards.json +0 -5
- package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
/* pm/c3-roadmap.js — the Roadmap sub-view of Initiatives on /c3.html, on the mockup's own markup and CSS (console3.html: rmRow line 3765, genRm 3778,
|
|
2
|
-
* viewLeft 3840, viewRight 3848, roadSVG 3754, rmBar 4485, calSyncCard 3795).
|
|
3
|
-
* Left: the Plan lens and deck, an intro card with the plus (add a bet), then Now, Next and Later (`.card.sect.rmcol`) with a row per bet and a
|
|
4
|
-
* case file on tap. Right: By quarter (the SVG), Capacity (bets in flight, of the limit 4) and On your Calendar (dates that reach it).
|
|
5
|
-
* REAL: bets from GET /api/c3-init/roadmap (the bets records; capacity derived from people), writes through pmPost to /api/roadmap-ops/bet/add,
|
|
6
|
-
* /move and /take-off exactly as that route's header says. A move into a full column is answered with a PROPOSAL (which bet goes back); nothing
|
|
7
|
-
* moves until the PM presses "Confirm the swap" (confirmSwap: true). No bet record yet: each column shows the repository's own roadmap rows
|
|
8
|
-
* (ctx.rows) read-only and says so; nothing is invented. Dates on the Calendar card come from GET /api/forecast for the Now initiatives. */
|
|
9
|
-
import { el } from './dom.js';
|
|
10
|
-
import { pmGet, pmPost } from './http.js';
|
|
11
|
-
import { c3ic, c3ib } from './pm-work-view.js';
|
|
12
|
-
import { makeView, frame, hBars, card, emptyRow, short, dayLabel, rowShell, caseNode, markDone, say } from './c3-init-extras.js';
|
|
13
|
-
import { mountSlide } from './slide-confirm.js';
|
|
14
|
-
|
|
15
|
-
const COLS = ['now', 'next', 'later'];
|
|
16
|
-
const CL = { now: 'Now', next: 'Next', later: 'Later' };
|
|
17
|
-
const CS = { now: 'Committed, in build or about to be', next: 'Likely, one quarter out', later: 'Direction only, no date' };
|
|
18
|
-
const CI = { now: 'bolt', next: 'next', later: 'moon' };
|
|
19
|
-
const LIMIT = 4;
|
|
20
|
-
const NSV = 'http://www.w3.org/2000/svg';
|
|
21
|
-
const confColor = (c) => (c >= 0.7 ? 'var(--success)' : c >= 0.45 ? 'var(--warning)' : 'var(--destructive)');
|
|
22
|
-
const q0Of = (b) => (b.q0 != null ? b.q0 : b.horizon === 'now' ? 0 : b.horizon === 'next' ? 1 : 2);
|
|
23
|
-
const q1Of = (b) => (b.q1 != null ? b.q1 : b.horizon === 'later' ? 3 : q0Of(b));
|
|
24
|
-
const quarters = () => { const d = new Date(); let q = Math.floor(d.getMonth() / 3); let y = d.getFullYear(); const out = []; for (let i = 0; i < 4; i++) { out.push('Q' + (q + 1) + ' ' + String(y).slice(2)); q++; if (q > 3) { q = 0; y++; } } return out; };
|
|
25
|
-
|
|
26
|
-
/** A bet's delay word: the bet's own `risk` hint when it has one, else the repository row's health. Only Now bets show it. */
|
|
27
|
-
function riskOf(V, b) {
|
|
28
|
-
if (b.horizon !== 'now') return null;
|
|
29
|
-
const r = b.risk || (() => { const row = (V.ctx.rows || []).find((x) => x.id === b.initiative); const l = row && row.health && row.health.level; return l === 'at-risk' ? 'risk' : /off|block|delay|late/.test(l || '') ? 'late' : ''; })();
|
|
30
|
-
return r === 'late' ? { l: 'Delayed', c: 'bad', i: 'clock' } : r === 'risk' ? { l: 'At risk', c: 'warn', i: 'alert' } : null;
|
|
31
|
-
}
|
|
32
|
-
const krTitle = (V, id) => { const k = ((V.data.rd && V.data.rd.krs) || []).find((x) => x.id === id); return k ? k.title : id; };
|
|
33
|
-
const betsIn = (V) => (((V.data.rd && V.data.rd.bets) || []).filter((b) => !b.off && (!V.scope || b.initiative === V.scope)));
|
|
34
|
-
|
|
35
|
-
async function load(V) {
|
|
36
|
-
const rd = await pmGet('/api/c3-init/roadmap').catch(() => null);
|
|
37
|
-
if (V.disposed) return;
|
|
38
|
-
V.data.rd = rd && rd.ok ? rd : null; V.data.err = rd && rd.ok ? null : (rd && rd.error) || 'The roadmap could not be read.';
|
|
39
|
-
V.render();
|
|
40
|
-
const ids = (V.ctx.rows || []).filter((r) => r.horizon === 'now').map((r) => r.id).slice(0, 4);
|
|
41
|
-
const fcs = await Promise.all(ids.map((id) => pmGet('/api/forecast?initiative=' + encodeURIComponent(id)).catch(() => null)));
|
|
42
|
-
if (V.disposed) return;
|
|
43
|
-
V.data.fc = ids.map((id, i) => [id, fcs[i]]).filter(([, j]) => j && j.ok);
|
|
44
|
-
V.render();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async function press(V, path, body, done, at) {
|
|
48
|
-
const r = await pmPost(path, body);
|
|
49
|
-
if (V.disposed) return r;
|
|
50
|
-
if (r && r.ok && r.proposal) { V.proposal = { ...r.proposal }; V.open['rm:' + (r.proposal.move && r.proposal.move.id)] = true; V.note = ''; V.render(); return r; }
|
|
51
|
-
if (r && r.ok) { V.proposal = null; V.note = done || 'Done.'; V.err = ''; V.errAt = null; await load(V); return r; }
|
|
52
|
-
V.err = (r && r.error) || 'Not recorded.'; V.errAt = at || null; if (at) V.open['rm:' + at] = true; V.render(); return r;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const live = (V, col) => ((V.data.rd && V.data.rd.bets) || []).filter((x) => !x.off && x.horizon === col);
|
|
56
|
-
/** The lowest-confidence bet of a column: the one a full column sends back (the route's own rule). */
|
|
57
|
-
const weakest = (V, col, but) => live(V, col).filter((x) => x.rid !== but).sort((p, q) => (typeof p.confidence === 'number' ? p.confidence : 0.5) - (typeof q.confidence === 'number' ? q.confidence : 0.5))[0] || null;
|
|
58
|
-
|
|
59
|
-
/** Move a bet one column (the page press). A full column answers with a proposal: it is shown on the row for the PM to confirm, never applied here. */
|
|
60
|
-
async function moveBet(V, b, to, msg) {
|
|
61
|
-
V.proposal = null; V.err = '';
|
|
62
|
-
const from = b.horizon;
|
|
63
|
-
const r = await press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to }, msg, b.rid);
|
|
64
|
-
if (r && r.ok && !r.proposal) say(msg, () => press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to: from }, 'Moved back to ' + CL[from] + '.', b.rid));
|
|
65
|
-
return r;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* ── one row of a column ── */
|
|
69
|
-
function betRow(V, b) {
|
|
70
|
-
const risk = riskOf(V, b); const QL = quarters(); const key = 'rm:' + b.rid; const i = COLS.indexOf(b.horizon);
|
|
71
|
-
const conf = typeof b.confidence === 'number' ? b.confidence : null;
|
|
72
|
-
/* the swipe: right pulls it forward, left pushes it back (console3.html line 3881). A swipe never applies a swap: the route answers with a proposal and the row opens on it. */
|
|
73
|
-
const edge = () => say('Already at the edge');
|
|
74
|
-
const sw = {
|
|
75
|
-
labelRight: i > 0 ? 'pull it forward to ' + CL[COLS[Math.max(0, i - 1)]] : 'already at the edge', labelLeft: i < 2 ? 'push it back to ' + CL[COLS[Math.min(2, i + 1)]] : 'already at the edge', iconRight: 'next', iconLeft: 'moon',
|
|
76
|
-
onRight: () => (i > 0 ? moveBet(V, b, COLS[i - 1], 'Pulled forward to ' + CL[COLS[i - 1]] + '.') : edge()),
|
|
77
|
-
onLeft: () => (i < 2 ? moveBet(V, b, COLS[i + 1], 'Pushed back to ' + CL[COLS[i + 1]] + '.') : edge()),
|
|
78
|
-
};
|
|
79
|
-
return rowShell(V, { key, attrs: { 'data-rm': b.rid, 'data-id': b.rid }, icon: CI[b.horizon], title: b.title, sw, xpContent: caseFile(V, b),
|
|
80
|
-
chips: [conf == null ? null : el('span', { class: 'chip2', style: 'color:' + confColor(conf), title: 'Confidence' }, c3ic('target', 'sm'), Math.round(conf * 100) + '%'),
|
|
81
|
-
b.parent_kr ? el('span', { class: 'chip2' }, c3ic('flag', 'sm'), short(krTitle(V, b.parent_kr), 26)) : el('span', { class: 'st bad' }, c3ic('alert', 'sm'), 'No anchor'),
|
|
82
|
-
risk ? el('span', { class: 'st ' + risk.c }, c3ic(risk.i, 'sm'), risk.l) : null,
|
|
83
|
-
el('span', { class: 'tag' }, QL[q0Of(b)] + (q1Of(b) > q0Of(b) ? ' to ' + QL[q1Of(b)] : ''))] });
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** The case file of a bet (console3.html genRm, line 3778): the situation, the evidence with the capacity check, and each move with what it costs.
|
|
87
|
-
* The slide runs the picked move through the page-press routes; a move into a full column comes back as a swap proposal the PM confirms on its own slide. */
|
|
88
|
-
function caseFile(V, b) {
|
|
89
|
-
const i = COLS.indexOf(b.horizon); const conf = typeof b.confidence === 'number' ? b.confidence : null; const risk = riskOf(V, b); const key = 'rm:' + b.rid;
|
|
90
|
-
const here = live(V, b.horizon).length;
|
|
91
|
-
const chg = [['target', conf == null ? 'Confidence not rated (counts as 50 percent)' : 'Confidence ' + Math.round(conf * 100) + '%', 'agent'],
|
|
92
|
-
['flag', b.parent_kr ? 'Serves ' + krTitle(V, b.parent_kr) : 'No KR or health budget anchor', 'anchor', b.parent_kr ? '' : 'bad'],
|
|
93
|
-
['scale', CL[b.horizon] + ' holds ' + here + ' of ' + LIMIT + ' bets', 'capacity', here > LIMIT ? 'bad' : '']];
|
|
94
|
-
if (b.why) chg.push(['info', b.why, 'evidence']);
|
|
95
|
-
const sit = risk && b.horizon === 'now' ? 'This bet is on the roadmap as committed but its date is slipping. Decide whether the roadmap still believes the date.' : (b.why || 'Roadmap items move on evidence and capacity. Each option shows what it costs.');
|
|
96
|
-
const opts = [];
|
|
97
|
-
if (i > 0) {
|
|
98
|
-
const T = COLS[i - 1]; const full = T !== 'later' && live(V, T).length >= LIMIT; const vic = full ? weakest(V, T, b.rid) : null;
|
|
99
|
-
opts.push({ id: 'pf', l: 'Pull it forward to ' + CL[T], rec: !!b.parent_kr && conf != null && conf >= 0.7,
|
|
100
|
-
fx: [b.parent_kr ? ['check', 'Gets capacity and dates', 'ok'] : ['alert', 'No anchor: refused until it has one', 'bad'], ...(full ? [['alert', 'Pushes ' + (vic ? '“' + short(vic.title, 22) + '”' : 'something else') + ' back', 'warn']] : [['scale', CL[T] + ' would hold ' + (live(V, T).length + 1) + ' of ' + LIMIT, 'ok']])] });
|
|
101
|
-
}
|
|
102
|
-
for (const x of (b.options || [])) opts.push({ id: 'x:' + x.id, l: x.l, rec: !!x.rec, fx: x.fx || [] });
|
|
103
|
-
if (i < 2) opts.push({ id: 'pb', l: 'Push it back to ' + CL[COLS[i + 1]], rec: !b.parent_kr, fx: [['clock', 'Frees capacity in ' + CL[b.horizon], 'ok'], ...(b.horizon === 'now' ? [['alert', 'Dates already promised move too', 'warn']] : [])] });
|
|
104
|
-
opts.push({ id: 'off', l: 'Take it off the roadmap', fx: [['clock', 'Frees a slot', 'ok'], ['info', 'A reason is kept in the record', '']] });
|
|
105
|
-
opts.push({ id: 'k', l: 'Keep it where it is', rec: !opts.some((o) => o.rec) && !!b.parent_kr, fx: [] });
|
|
106
|
-
const model = { sit, conf: Math.round(60 + (conf == null ? 0.5 : conf) * 30), chg, opts, cta: 'Slide to confirm' };
|
|
107
|
-
const rm = V.reasons = V.reasons || {};
|
|
108
|
-
const reason = el('input', { type: 'text', placeholder: 'Why is it coming off?', 'aria-label': 'Why it comes off the roadmap', 'data-rm-reason': b.rid, value: rm[b.rid] || '', onInput: (e) => { rm[b.rid] = e.target.value; } });
|
|
109
|
-
const reasonBox = el('div', { class: 'wform', 'data-rm-off': b.rid }, reason, el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'The reason is kept in the record. Slide below to take it off.'));
|
|
110
|
-
reasonBox.hidden = (V.pick && V.pick[key]) !== 'off';
|
|
111
|
-
const onConfirm = async (o) => {
|
|
112
|
-
if (o.id === 'pf') return moveBet(V, b, COLS[i - 1], 'Moved to ' + CL[COLS[i - 1]] + '. The Calendar and Plan follow.');
|
|
113
|
-
if (o.id === 'pb') return moveBet(V, b, COLS[i + 1], 'Moved to ' + CL[COLS[i + 1]] + '.');
|
|
114
|
-
if (o.id === 'off') {
|
|
115
|
-
if (!(rm[b.rid] || '').trim()) { V.err = 'Say why it comes off: the reason is kept.'; V.errAt = b.rid; V.render(); return; }
|
|
116
|
-
return press(V, '/api/roadmap-ops/bet/take-off', { id: b.rid, reason: rm[b.rid].trim() }, 'Taken off the roadmap. The record stays.', b.rid);
|
|
117
|
-
}
|
|
118
|
-
if (o.id.startsWith('x:')) { const x = (b.options || []).find((q) => 'x:' + q.id === o.id); return markDone(V, key, (x && x.msg) || 'Recorded.'); }
|
|
119
|
-
return markDone(V, key, 'Kept where it is. No change.');
|
|
120
|
-
};
|
|
121
|
-
const mine = V.proposal && V.proposal.move && V.proposal.move.id === b.rid ? V.proposal : null;
|
|
122
|
-
const node = el('div', { 'data-rm-case': b.rid, onClick: (e) => e.stopPropagation() },
|
|
123
|
-
V.err && V.errAt === b.rid ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null,
|
|
124
|
-
mine ? swapProposal(V, b, mine) : null,
|
|
125
|
-
caseNode(V, key, model, { onConfirm }),
|
|
126
|
-
reasonBox);
|
|
127
|
-
// the reason box shows only while "Take it off" is the picked option
|
|
128
|
-
node.addEventListener('click', () => { reasonBox.hidden = (V.pick && V.pick[key]) !== 'off'; });
|
|
129
|
-
return node;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** The swap the route proposed: nothing has moved. Its own slide, bound to what the PM sees (the move and the bets sent back), applies it. */
|
|
133
|
-
function swapProposal(V, b, mine) {
|
|
134
|
-
const sendBack = mine.send_back.map((s) => '“' + s.title + '”' + (s.confidence == null ? '' : ' (' + Math.round(s.confidence * 100) + '%)') + ' to ' + CL[s.to]).join(', then ');
|
|
135
|
-
const host = el('div', { class: 'c3slide' });
|
|
136
|
-
const box = el('div', { class: 'fold w', role: 'status', 'data-rm-proposal': b.rid }, c3ic('scale', 'sm'),
|
|
137
|
-
el('span', null, 'Proposal, nothing moved yet: ' + CL[mine.move.to] + ' is full. To make room, send back ' + sendBack + '.'),
|
|
138
|
-
host,
|
|
139
|
-
el('div', { class: 'chips2' }, el('button', { type: 'button', class: 'pill', onClick: () => { V.proposal = null; V.render(); } }, c3ic('x', 'sm'), 'Leave it')));
|
|
140
|
-
mountSlide(host, { label: 'Slide to swap and move', hash: b.rid + '|' + mine.move.to + '|' + mine.send_back.map((s) => s.id).join(','),
|
|
141
|
-
onConfirm: () => press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to: mine.move.to, confirmSwap: true }, 'Swapped and moved to ' + CL[mine.move.to] + '.', b.rid) });
|
|
142
|
-
return box;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/** A repository row (no bet records yet): read-only, from ctx.rows. */
|
|
146
|
-
function repoRow(V, r) {
|
|
147
|
-
return el('li', { class: 'nrow', 'data-rm-repo': r.id },
|
|
148
|
-
el('span', { class: 'ki' }, c3ic(CI[r.horizon] || 'init')),
|
|
149
|
-
el('div', { class: 'nb' }, el('span', { class: 'tt' }, r.title || r.id),
|
|
150
|
-
el('div', { class: 'chips' }, r.anchor ? el('span', { class: 'chip2' }, c3ic('flag', 'sm'), short(r.anchor, 26)) : el('span', { class: 'st bad' }, c3ic('alert', 'sm'), 'No anchor'),
|
|
151
|
-
r.health && r.health.level && r.health.level !== 'on' ? el('span', { class: 'st warn' }, c3ic('alert', 'sm'), String(r.health.level).replace('-', ' ')) : null,
|
|
152
|
-
el('span', { class: 'tag' }, 'repository'))));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* ── the add form ── */
|
|
156
|
-
function addForm(V) {
|
|
157
|
-
const title = el('input', { type: 'text', placeholder: 'What is the bet?', 'aria-label': 'What is the bet', 'data-rm-new': 'title' });
|
|
158
|
-
const krs = (V.data.rd && V.data.rd.krs) || [];
|
|
159
|
-
const dl = el('datalist', { id: 'c3-rm-anchors' }, krs.map((k) => el('option', { value: k.id }, k.title)));
|
|
160
|
-
const anchor = el('input', { type: 'text', list: 'c3-rm-anchors', placeholder: 'Anchor: a KR id or health:<id>', 'aria-label': 'Anchor', 'data-rm-new': 'anchor' });
|
|
161
|
-
const col = el('select', { 'aria-label': 'Column', 'data-rm-new': 'horizon' }, el('option', { value: 'later' }, 'Later'), el('option', { value: 'next' }, 'Next'), el('option', { value: 'now' }, 'Now'));
|
|
162
|
-
const scoped = V.scope ? (V.ctx.rows || []).find((r) => r.id === V.scope) : null;
|
|
163
|
-
return el('div', { class: 'wform', 'data-rm-form': '' }, el('b', { style: 'font-size:var(--fs-3)' }, 'Add a bet'), title, anchor, dl, col,
|
|
164
|
-
el('div', { class: 'chips2' },
|
|
165
|
-
el('button', { type: 'button', class: 'pill', 'data-rm-save': '', onClick: () => {
|
|
166
|
-
if (!title.value.trim()) { V.err = 'Name the bet first.'; V.errAt = null; V.render(); return; }
|
|
167
|
-
const body = { title: title.value.trim(), anchor: anchor.value.trim(), horizon: col.value, ...(scoped ? { initiative: scoped.id } : {}) };
|
|
168
|
-
V.form = false; press(V, '/api/roadmap-ops/bet/add', body, 'Added to ' + CL[body.horizon] + '.', null);
|
|
169
|
-
} }, c3ic('check', 'sm'), 'Add it'),
|
|
170
|
-
el('button', { type: 'button', class: 'pill', onClick: () => { V.form = false; V.err = ''; V.render(); } }, c3ic('x', 'sm'), 'Cancel')));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/* ── By quarter: the mockup's roadSVG ── */
|
|
174
|
-
function roadSVG(V, L) {
|
|
175
|
-
const W = 560; const LW = 150; const QW = (W - LW) / 4; const rh = 34; const top = 26; const H = top + L.length * rh + 8; const QL = quarters();
|
|
176
|
-
const s = document.createElementNS(NSV, 'svg');
|
|
177
|
-
const add = (tag, a, txt) => { const n = document.createElementNS(NSV, tag); for (const k in a) n.setAttribute(k, a[k]); if (txt != null) n.textContent = txt; s.appendChild(n); return n; };
|
|
178
|
-
for (const [k, v] of Object.entries({ class: 'pg', viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Roadmap by quarter. Fainter bars are less certain.' })) s.setAttribute(k, v);
|
|
179
|
-
QL.forEach((q, i) => { add('line', { x1: LW + i * QW, x2: LW + i * QW, y1: 18, y2: H - 4, stroke: 'var(--border)' }); add('text', { x: LW + i * QW + QW / 2, y: 14, 'text-anchor': 'middle' }, q); });
|
|
180
|
-
add('rect', { x: LW + 3, y: 20, width: 6, height: H - 24, fill: 'var(--acc)', rx: 3 });
|
|
181
|
-
L.forEach((b, i) => {
|
|
182
|
-
const y = top + i * rh + rh / 2; const conf = typeof b.confidence === 'number' ? b.confidence : 0.5; const risk = riskOf(V, b);
|
|
183
|
-
const col = b.horizon === 'now' && risk ? (risk.c === 'bad' ? 'var(--destructive)' : 'var(--warning)') : 'var(--acc)';
|
|
184
|
-
const xs = LW + q0Of(b) * QW + 4; const xe = LW + (q1Of(b) + 1) * QW - 4;
|
|
185
|
-
add('text', { x: 0, y: y + 4, class: 't' }, short(b.title, 19));
|
|
186
|
-
add('rect', { x: xs, y: y - 8, width: xe - xs, height: 16, rx: 8, fill: col, 'fill-opacity': (0.15 + conf * 0.65).toFixed(2), ...(conf < 0.4 ? { stroke: col, 'stroke-dasharray': '4 3' } : {}) });
|
|
187
|
-
if (!b.parent_kr) add('text', { x: xs + 8, y: y + 4, style: 'fill:var(--destructive)' }, 'no anchor'); else add('text', { x: xs + 8, y: y + 4, style: 'fill:var(--foreground)' }, Math.round(conf * 100) + '%');
|
|
188
|
-
});
|
|
189
|
-
return s;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/* ── On your Calendar: dated items from the forecast of the Now initiatives ── */
|
|
193
|
-
function calendarCard(V) {
|
|
194
|
-
const dated = ((V.data.rd && V.data.rd.dated) || []).slice(); // optional (demo): the dated rows as the mockup lists them; real mode derives them from the forecast
|
|
195
|
-
for (const [id, j] of dated.length ? [] : V.data.fc || []) {
|
|
196
|
-
if (V.scope && id !== V.scope) continue;
|
|
197
|
-
const after = new Set((j.items || []).flatMap((x) => x.after || []));
|
|
198
|
-
for (const x of j.items || []) {
|
|
199
|
-
if (x.state === 'done') continue;
|
|
200
|
-
const f = x.forecast || {}; const late = f.status && f.status !== 'on time';
|
|
201
|
-
if (late || !after.has(x.id)) dated.push({ t: x.title, fe: f.end || x.due, plan: x.due, bad: !!late && f.status !== 'at risk' });
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
dated.sort((a, b) => String(a.fe).localeCompare(String(b.fe)));
|
|
205
|
-
return card('cal', 'On your Calendar', 'dates that reach it',
|
|
206
|
-
el('ul', { class: 'chgl' }, dated.length ? dated.slice(0, 6).map((d) => el('li', { class: d.bad ? 'bad' : 'ok' }, c3ic(d.bad ? 'clock' : 'check', 'sm'), el('span', null, d.t + ' · ' + dayLabel(d.fe) + (d.bad ? ' (plan ' + dayLabel(d.plan) + ')' : '')))) : [el('li', null, c3ic('check', 'sm'), el('span', null, 'Nothing dated.'))]),
|
|
207
|
-
el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Milestones and late dates appear in Calendar week and month. Meetings carry their initiative back here.'));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function render(V) {
|
|
211
|
-
V.more = V.more || {};
|
|
212
|
-
const rd = V.data.rd; const bets = betsIn(V); const hasBets = !!(rd && (rd.bets || []).some((b) => !b.off));
|
|
213
|
-
const byCol = (c) => bets.filter((b) => b.horizon === c).sort((a, z) => (a.rank || 0) - (z.rank || 0));
|
|
214
|
-
const nowN = byCol('now').length; const nextN = byCol('next').length;
|
|
215
|
-
const risky = byCol('now').find((b) => riskOf(V, b) && riskOf(V, b).c === 'bad') || byCol('now').find((b) => riskOf(V, b));
|
|
216
|
-
const repoRows = (V.ctx.rows || []).filter((r) => !V.scope || r.id === V.scope);
|
|
217
|
-
const total = hasBets ? bets.length : repoRows.length;
|
|
218
|
-
const head = !rd ? { icon: 'flag', h: V.data.err || 'Reading the roadmap', s: V.data.err ? 'The bets are read from the repository records.' : 'The bets and their capacity are being read.', ring: [0, LIMIT] }
|
|
219
|
-
: { icon: 'flag', h: hasBets ? nowN + ' bet' + (nowN === 1 ? '' : 's') + ' Now, room for ' + Math.max(0, LIMIT - nowN) + ' more' + (risky ? '. ' + risky.title + ' is the risk' : '') : 'No bets on the roadmap yet',
|
|
220
|
-
s: hasBets ? 'Move items on evidence and capacity. Each one names its goal.' : 'Add one with the plus. A bet needs a goal: a KR or a health budget. The initiatives below are the repository\'s own roadmap.', ring: [nowN, LIMIT] };
|
|
221
|
-
|
|
222
|
-
const intro = el('section', { class: 'card sect', 'data-rm-intro': '' },
|
|
223
|
-
el('div', { class: 'sh2' }, el('h2', null, c3ic('flag', 'sm'), 'Roadmap ', el('span', { class: 'bdg g' }, String(total))), el('span', { class: 'chips2' }, c3ib('Add a bet', 'plus', { 'data-a': 'rmform', 'data-rm-add': '', 'aria-expanded': String(!!V.form), onClick: () => { V.form = !V.form; V.err = ''; V.render(); } }, 'sm'))),
|
|
224
|
-
V.form ? addForm(V) : null,
|
|
225
|
-
el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Tap a bet to see where it can move and what each move costs. Swipe a row right to take the agent\u2019s suggestion, left to push it back. Every move checks the anchor and the capacity first.'),
|
|
226
|
-
V.note ? el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)', role: 'status', 'data-rm-note': '' }, V.note) : null,
|
|
227
|
-
V.err && !V.errAt ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null);
|
|
228
|
-
|
|
229
|
-
const cols = COLS.map((c) => {
|
|
230
|
-
const all = hasBets ? byCol(c).map((b) => betRow(V, b)) : repoRows.filter((r) => r.horizon === c).map((r) => repoRow(V, r));
|
|
231
|
-
const rows = V.more[c] ? all : all.slice(0, 15); // a repository has hundreds of initiatives: the first 15, then "Show all"
|
|
232
|
-
if (all.length > rows.length) rows.push(el('li', { class: 'fold' }, el('button', { type: 'button', class: 'pill', 'data-rm-showall': c, onClick: () => { V.more[c] = true; V.render(); } }, 'Show all ' + all.length)));
|
|
233
|
-
return el('section', { class: 'card sect rmcol', 'data-rm-col': c },
|
|
234
|
-
el('div', { class: 'sh2' }, el('h2', null, c3ic(CI[c], 'sm'), CL[c] + ' ', el('span', { class: 'bdg g' }, String(all.length))), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, CS[c])),
|
|
235
|
-
el('ul', { class: 'list' }, rows.length ? rows : [emptyRow('check', 'Nothing here.')]));
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
const right = [
|
|
239
|
-
card('flag', 'By quarter', 'fainter means less certain', bets.length ? roadSVG(V, bets) : el('div', { class: 'fold' }, c3ic('moon', 'sm'), 'No bets to chart yet.')),
|
|
240
|
-
card('user', 'Capacity', 'bets in flight', hBars([['Now', nowN / LIMIT, 'var(--acc)', nowN + ' of ' + LIMIT], ['Next', nextN / LIMIT, 'var(--purple)', nextN + ' of ' + LIMIT]]),
|
|
241
|
-
rd && rd.capacity && rd.capacity.over ? el('div', { class: 'fold w' }, c3ic('alert', 'sm'), 'A column holds more than ' + LIMIT + ' bets.') : null),
|
|
242
|
-
calendarCard(V),
|
|
243
|
-
];
|
|
244
|
-
frame(V, { head, left: [intro, ...cols], right });
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const view = makeView('roadmap', { init: (V) => load(V), render });
|
|
248
|
-
export const mount = view.mount;
|
|
249
|
-
export const dispose = view.dispose;
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
/* pm/c3-scan-api.js — every call the portfolio Horizon scan makes to the server, in ONE place (initiative horizon-scan-portfolio, PRD section 7).
|
|
2
|
-
* The pages never write a scan route name: they call a function here. If the server names a route or a field differently, change it here only.
|
|
3
|
-
*
|
|
4
|
-
* GET /api/scan/portfolio?ws getPortfolio(ws) the setting, watch list, last and next scan, open scan, reports, proposals
|
|
5
|
-
* GET /api/scan/report?ws&id getReport(ws, id) { report, markdown, body, written, proposals }
|
|
6
|
-
* POST /api/scan/watch postWatch(ws, body) { ws, op: keep|edit|remove|add, id?, name?, kind?, why?, boards?, restore? }
|
|
7
|
-
* POST /api/scan/setting postSetting(ws, body) { ws, cadence?, repo?, types? } types is an array of type keys
|
|
8
|
-
* POST /api/scan/now postNow(ws, sel) { ws, items: [id], repo, types: [key] }
|
|
9
|
-
* POST /api/scan/stop postStop(ws) { ws }
|
|
10
|
-
* POST /api/scan/proposal postProposal(ws, body) { ws, id, action: approve|change|dismiss|undo, fields?, why? } undo takes back a dismissal or a change, never an approval
|
|
11
|
-
*
|
|
12
|
-
* The page sends no `by`: the server takes the PM from the call path (http.js adds the nonce and the page Origin).
|
|
13
|
-
* The answers are read into one shape (readPortfolio): a field the server leaves out reads as empty, never as a thrown error.
|
|
14
|
-
* The names are the server's (lib/routes-scan.js header): items, proposals_waiting, open.scan, steps[].id, proposal.finding, dismissed_why, result.
|
|
15
|
-
* Pure parts (Node-testable): readPortfolio, readProposal, readOut, evidenceKind, scanNowWords, typeKeys, proposalFields, frontOf.
|
|
16
|
-
*/
|
|
17
|
-
import { pmGet, pmPost } from './http.js';
|
|
18
|
-
|
|
19
|
-
export const ROUTES = Object.freeze({
|
|
20
|
-
portfolio: '/api/scan/portfolio', report: '/api/scan/report', watch: '/api/scan/watch', setting: '/api/scan/setting',
|
|
21
|
-
now: '/api/scan/now', stop: '/api/scan/stop', proposal: '/api/scan/proposal',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
/** The report types, in the order the sheets show them. [key, name, help, repository only]. */
|
|
25
|
-
export const TYPES = [
|
|
26
|
-
['benchmark', 'Benchmark report', 'Compares our flow with named products, point by point.', false],
|
|
27
|
-
['competitive', 'Competitive analysis', 'Positioning, features, pricing signals, threats and openings.', false],
|
|
28
|
-
['insight', 'Insight report', 'Themes across boards from Jira, friction, notes and Slack, plus web trends.', false],
|
|
29
|
-
['productivity', 'Productivity report', 'Delivery health from the repository and Jira. No web.', true],
|
|
30
|
-
];
|
|
31
|
-
export const TYPE_KEYS = TYPES.map((t) => t[0]);
|
|
32
|
-
export const typeName = (k) => (TYPES.find((t) => t[0] === k) || [0, k])[1];
|
|
33
|
-
export const KINDS = ['product', 'domain', 'approach'];
|
|
34
|
-
|
|
35
|
-
/** A types answer as a list of keys: an array of keys, or an object of key to on/off. */
|
|
36
|
-
export function typeKeys(v) {
|
|
37
|
-
if (Array.isArray(v)) return TYPE_KEYS.filter((k) => v.includes(k));
|
|
38
|
-
if (v && typeof v === 'object') return TYPE_KEYS.filter((k) => v[k]);
|
|
39
|
-
return TYPE_KEYS.slice();
|
|
40
|
-
}
|
|
41
|
-
/** The kind of an evidence pointer: a public page (http or https), a Jira key, a path in the repository, or a note. The backend keeps only { label, ref }. */
|
|
42
|
-
export const evidenceKind = (ref) => {
|
|
43
|
-
const r = String(ref || '').trim();
|
|
44
|
-
return /^https?:\/\//i.test(r) ? 'web' : /^[A-Z][A-Z0-9_]+-\d+$/.test(r) ? 'jira' : /^[\w.-]+(\/[\w.@-]+)+$/.test(r) ? 'repo' : 'note';
|
|
45
|
-
};
|
|
46
|
-
/** The fields of a proposal under the backend's names, each as a string: create { title, board, lane, anchor, intent }, research { question, depth },
|
|
47
|
-
* attach { initiative }. `title` is the proposal's own title (a change edits it through `fields.title`). */
|
|
48
|
-
export function proposalFields(kind, f, title) {
|
|
49
|
-
const o = f && typeof f === 'object' ? f : {};
|
|
50
|
-
const str = (v) => (v == null ? '' : String(v));
|
|
51
|
-
if (kind === 'create') return { title: str(title), board: str(o.board), lane: str(o.lane), anchor: str(o.anchor), intent: str(o.intent) };
|
|
52
|
-
if (kind === 'research') return { question: str(o.question), depth: str(o.depth) || 'standard' };
|
|
53
|
-
return { initiative: str(o.initiative) };
|
|
54
|
-
}
|
|
55
|
-
/** What an approved proposal made or started, from a proposal's `result` (or the answer of the approve press): { id, board, stage, scan, report }. The initiative is a
|
|
56
|
-
* string on a stored proposal and an object in the approve answer. Null when there is none. */
|
|
57
|
-
export function readOut(res) {
|
|
58
|
-
if (!res || typeof res !== 'object') return null;
|
|
59
|
-
const i = res.initiative;
|
|
60
|
-
const id = typeof i === 'string' ? i : i && i.id ? String(i.id) : '';
|
|
61
|
-
return { id, board: String(res.board || ''), stage: String(res.stage || ''), scan: String(res.scan || ''), report: String(res.report || '') };
|
|
62
|
-
}
|
|
63
|
-
/** One proposal as the page uses it: the backend's fields, `from` (the finding it came from), `reason` (the dismissal), `out` (what approve made) and a state of
|
|
64
|
-
* open | done (approved) | dismissed. A research proposal that is approved while its scan is still open reads `running` (getReport sets that). */
|
|
65
|
-
export function readProposal(p) {
|
|
66
|
-
const kind = ['create', 'research', 'attach'].includes(p.kind) ? p.kind : 'create';
|
|
67
|
-
const state = p.state === 'approved' ? 'done' : p.state === 'dismissed' ? 'dismissed' : 'open';
|
|
68
|
-
return { id: String(p.id), report: String(p.report || ''), reportTitle: p.report_title || '', kind, title: p.title || '', why: p.why || '', from: p.finding || '',
|
|
69
|
-
evidence: (Array.isArray(p.evidence) ? p.evidence : []).map((e) => ({ label: String((e && e.label) || ''), ref: String((e && e.ref) || ''), kind: evidenceKind(e && e.ref) })).filter((e) => e.ref),
|
|
70
|
-
fields: proposalFields(kind, p.fields, p.title), state, changed: !!p.changed, reason: p.dismissed_why || '', out: readOut(p.result), steps: null, at: p.at || '', decidedAt: p.decided_at || '' };
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** The plain words for a refused Scan now: 409 running or quiet hours, 429 manual-limit. The server's own sentence is the fallback. */
|
|
74
|
-
export function scanNowWords(r) {
|
|
75
|
-
const why = r && r.why;
|
|
76
|
-
if (why === 'running') return 'A scan is running now. Wait for it to end, or stop it.';
|
|
77
|
-
if (why === 'quiet-hours') return 'Quiet hours hold, so a manual scan does not start now. Try again when they end.';
|
|
78
|
-
if (why === 'manual-limit') return 'You used all ' + ((r && r.limit) || 3) + ' manual scans today. The scheduled scan still runs. Try again tomorrow.';
|
|
79
|
-
return (r && r.error) || 'the workspace did not answer';
|
|
80
|
-
}
|
|
81
|
-
const readManual = (m) => ({ limit: Number(m && m.limit) || 3, used: Number(m && m.used) || 0, left: m && m.left != null ? Number(m.left) : 3, ok: !m || m.ok !== false, why: (m && m.why) || '', error: (m && m.error) || '' });
|
|
82
|
-
|
|
83
|
-
/** The portfolio answer in one shape. The names are the server's: items (suggested | kept), proposals_waiting as `waiting`, open.scan, steps[].id. */
|
|
84
|
-
export function readPortfolio(r) {
|
|
85
|
-
const s = (r && r.setting) || {};
|
|
86
|
-
const o = r && r.open;
|
|
87
|
-
return {
|
|
88
|
-
ok: !!(r && r.ok !== false), error: r && r.ok === false ? r.error || '' : '',
|
|
89
|
-
setting: { cadence: ['daily', 'weekly', 'off'].includes(s.cadence) ? s.cadence : 'daily', repo: s.repo !== false, types: typeKeys(s.types) },
|
|
90
|
-
items: (Array.isArray(r && r.items) ? r.items : []).map((w) => ({ id: String(w.id), kind: KINDS.includes(w.kind) ? w.kind : 'product', name: w.name || '', why: w.why || '',
|
|
91
|
-
boards: Array.isArray(w.boards) ? w.boards.map(String) : [], ini: w.ini || '', added: !!w.added, state: w.state === 'kept' ? 'kept' : 'suggested' })),
|
|
92
|
-
last: r && r.last ? { ...r.last } : null, next: (r && r.next) || '', manual: readManual(r && r.manual), switchedOff: !!(r && r.switched_off),
|
|
93
|
-
open: o ? { scan: String(o.scan || ''), mode: o.mode || 'scan', stopping: !!o.stopping, steps: (Array.isArray(o.steps) ? o.steps : []).map((x) => ({ id: String(x.id || ''), label: x.label || x.id || '', state: x.state || 'pending' })),
|
|
94
|
-
reports: Array.isArray(o.reports) ? o.reports : [], research: o.research || null } : null,
|
|
95
|
-
reports: (Array.isArray(r && r.reports) ? r.reports : []).map((x) => ({ id: String(x.id), type: x.type || '', label: x.label || '', title: x.title || '', path: x.path || '', scan: x.scan || '', at: x.at || '', parent: x.parent || '',
|
|
96
|
-
written: x.written === true, origin: x.origin || '', open: Number(x.proposals && x.proposals.open) || 0, total: Number(x.proposals && x.proposals.total) || 0 })),
|
|
97
|
-
waiting: Number(r && r.proposals_waiting) || 0,
|
|
98
|
-
proposals: (Array.isArray(r && r.proposals) ? r.proposals : []).map(readProposal),
|
|
99
|
-
boards: Array.isArray(r && r.boards) ? r.boards : null,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** The front matter of a markdown text as { key: value }, or {} when it has none. */
|
|
104
|
-
export function frontOf(text) {
|
|
105
|
-
const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(String(text || ''));
|
|
106
|
-
const out = {};
|
|
107
|
-
if (!m) return out;
|
|
108
|
-
for (const line of m[1].split(/\r?\n/)) { const k = /^([A-Za-z_][\w-]*):\s*(.*)$/.exec(line); if (k) out[k[1]] = k[2].replace(/^["']|["']$/g, '').trim(); }
|
|
109
|
-
return out;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/* ── reads ── */
|
|
113
|
-
const fail = (e) => ({ ok: false, error: (e && e.message) || 'the workspace did not answer' });
|
|
114
|
-
const q = (o) => new URLSearchParams(o).toString();
|
|
115
|
-
export async function getPortfolio(ws) {
|
|
116
|
-
const r = await pmGet(ROUTES.portfolio + '?' + q({ ws })).catch(fail);
|
|
117
|
-
return readPortfolio(r);
|
|
118
|
-
}
|
|
119
|
-
/** A report: { report, markdown, body, written, proposals }. A research proposal that was approved while its scan is still open reads `running`, with the steps of that scan. */
|
|
120
|
-
export async function getReport(ws, id) {
|
|
121
|
-
const r = await pmGet(ROUTES.report + '?' + q({ ws, id })).catch(fail);
|
|
122
|
-
if (!r || r.ok === false) return { ok: false, error: (r && r.error) || 'the report could not be read', report: null, markdown: '', body: '', written: false, proposals: [] };
|
|
123
|
-
const proposals = (Array.isArray(r.proposals) ? r.proposals : []).map(readProposal);
|
|
124
|
-
const live = proposals.filter((p) => p.kind === 'research' && p.state === 'done' && p.out && p.out.scan);
|
|
125
|
-
if (live.length) {
|
|
126
|
-
const d = await getPortfolio(ws);
|
|
127
|
-
if (d.ok && d.open) for (const p of live) if (d.open.scan === p.out.scan) { p.state = 'running'; p.steps = d.open.steps; }
|
|
128
|
-
}
|
|
129
|
-
return { ok: true, error: '', report: r.report || null, markdown: r.markdown || '', body: r.body || '', written: r.written === true, proposals };
|
|
130
|
-
}
|
|
131
|
-
/** The proposals the PM dismissed, newest first, read from the reports that hold a decided proposal (the portfolio answer lists only those still waiting). */
|
|
132
|
-
export async function getDismissed(ws, reports) {
|
|
133
|
-
const held = reports.filter((x) => x.total > x.open).slice(0, 12);
|
|
134
|
-
const all = await Promise.all(held.map((x) => getReport(ws, x.id)));
|
|
135
|
-
return all.flatMap((r) => (r.ok ? r.proposals : [])).filter((p) => p.state === 'dismissed').sort((a, b) => String(b.decidedAt).localeCompare(String(a.decidedAt)));
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* ── presses: each answers the server's JSON, or { ok:false, error } ── */
|
|
139
|
-
const post = (route, ws, body) => pmPost(route, { ws, ...(body || {}) }).catch(fail);
|
|
140
|
-
export const postWatch = (ws, body) => post(ROUTES.watch, ws, body);
|
|
141
|
-
export const postSetting = (ws, body) => post(ROUTES.setting, ws, body);
|
|
142
|
-
export const postNow = (ws, sel) => post(ROUTES.now, ws, { items: sel.items, repo: !!sel.repo, types: sel.types });
|
|
143
|
-
export const postStop = (ws) => post(ROUTES.stop, ws, {});
|
|
144
|
-
export const postProposal = (ws, body) => post(ROUTES.proposal, ws, body);
|
|
145
|
-
|
|
146
|
-
/** The boards of the workspace as [{ id, name }] (the page already reads this list for the Portfolio). */
|
|
147
|
-
export async function getBoards(ws) {
|
|
148
|
-
const b = await pmGet('/api/boards?' + q({ ws })).catch(fail);
|
|
149
|
-
return b && b.ok && Array.isArray(b.boards) ? b.boards.filter((x) => !ws || !x.ws || x.ws === ws).map((x) => ({ id: x.id, name: x.name || x.id })) : [];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* ── choices for the Change first form: the boards, the anchors and the initiatives the page already reads elsewhere ── */
|
|
153
|
-
export async function loadChoices(ws) {
|
|
154
|
-
const boards = await getBoards(ws);
|
|
155
|
-
const first = boards[0] ? boards[0].id : '';
|
|
156
|
-
const a = first ? await pmGet('/api/boards/anchors?' + q({ ws, board: first })).catch(fail) : null;
|
|
157
|
-
const anchors = a && a.ok && Array.isArray(a.anchors) ? a.anchors.map((x) => ({ value: x.value, label: x.label || x.value })) : [];
|
|
158
|
-
const per = await Promise.all(boards.map((x) => pmGet('/api/boards/items?' + q({ ws, board: x.id })).catch(fail)));
|
|
159
|
-
const initiatives = [];
|
|
160
|
-
per.forEach((r) => { if (r && r.ok && Array.isArray(r.initiatives)) for (const i of r.initiatives) if (i.id && !initiatives.some((y) => y.id === i.id)) initiatives.push({ id: i.id, title: i.title || '' }); });
|
|
161
|
-
return { boards, anchors, initiatives };
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* ── a change anywhere tells every part of the page that draws the scan ── */
|
|
165
|
-
const subs = new Set();
|
|
166
|
-
export const onScanChange = (fn) => { subs.add(fn); return () => subs.delete(fn); };
|
|
167
|
-
export const scanChanged = () => { for (const fn of [...subs]) { try { fn(); } catch { /* one part failing never stops the rest */ } } };
|