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,552 +0,0 @@
|
|
|
1
|
-
/* pm/c3-demo-data.js — the fixtures of the /c3.html demo mode (?demo=1). Every value here is the console3 mockup's own sample content
|
|
2
|
-
* (prototype/pmos-console-handoff/mockups/console3.html: CARDS, TIX, KRS, SIGS, the S.items table and the meetings), shaped as the
|
|
3
|
-
* response of the real route it stands in for. Nothing here is real state; c3-demo.js serves it and shows the "Demo data" pill.
|
|
4
|
-
* The mockup's "now" is Thu 8 Oct 2026, 08:12 (c3-demo.js freezes the page clock there).
|
|
5
|
-
*
|
|
6
|
-
* Fields the real routes do not send and the views draw only when present (demo-only, additive): on a briefing card `sub`, `kpis`,
|
|
7
|
-
* `factsX`, `pov`, `hero.rich`, `move.suggested.conf`; on the briefing `needs`; on a work item `mock_row` (which switches on `kind`, `time`, `mins`, `src`, `init`,
|
|
8
|
-
* `agent_move`, `left`) and `resolves_title`; on a calendar event `mock_routine`, `mock_hot`, `mock_decide_by`; on the forecast `mock_status_w`; on the calendar response `free_gaps`. */
|
|
9
|
-
import { buildWork, arrives } from './work-place.js';
|
|
10
|
-
|
|
11
|
-
export const NOW_ISO = '2026-10-08T08:12:00';
|
|
12
|
-
export const TODAY = '2026-10-08';
|
|
13
|
-
const DAY = 86400000;
|
|
14
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
15
|
-
/* the mockup counts days from 14 Sep: day 24 is Thu 8 Oct, day 40 is 24 Oct, day 47 is 31 Oct */
|
|
16
|
-
const dOf = (n) => new Date(Date.UTC(2026, 8, 14 + n)).toISOString().slice(0, 10);
|
|
17
|
-
const addDays = (iso, n) => new Date(Date.parse(iso + 'T00:00:00Z') + n * DAY).toISOString().slice(0, 10);
|
|
18
|
-
const ymd = (s) => String(s).slice(0, 10).split('-').map(Number);
|
|
19
|
-
const utcOf = (s) => { const [y, m, d] = ymd(s); return Date.UTC(y, m - 1, d); };
|
|
20
|
-
|
|
21
|
-
/* ── workspaces, the dock: acme/checkout and its branches and sessions ─────────────────────────────────────────────────────────── */
|
|
22
|
-
|
|
23
|
-
export const WS_ID = '881665c933';
|
|
24
|
-
export function workspaces() {
|
|
25
|
-
const w = (id, name, root, extra) => ({ id, name, label: null, initials: null, profile: 'pm-artifacts', root, home: false, shape: 'pmos', sessions: 0, repo_key: root, repo_name: name, ...(extra || {}) });
|
|
26
|
-
return { workspaces: [w(WS_ID, 'acme/checkout', '/demo/acme/checkout', { home: true, branch: 'main' }), w('demo00research', 'acme/research', '/demo/acme/research'),
|
|
27
|
-
w('demo000search', 'acme/search', '/demo/acme/search'), w('demo0000pmos', 'wawancsui/pmos', '/demo/wawancsui/pmos')] };
|
|
28
|
-
}
|
|
29
|
-
const T_MAIN = '/demo/acme/checkout'; const T_V2 = '/demo/acme/checkout-v2'; const T_SSO = '/demo/acme/checkout-sso'; const T_TRI = '/demo/acme/checkout-triage';
|
|
30
|
-
export function worktrees() {
|
|
31
|
-
const t = (dir, branch, main) => ({ dir, branch, main: !!main, missing: false, ws: WS_ID, sessions: 0, removable: false, reasons: [] });
|
|
32
|
-
return { ok: true, repoRoot: T_MAIN, worktrees: [t(T_MAIN, 'main', true), t(T_V2, 'initiative/checkout-v2'), t(T_SSO, 'initiative/sso'), t(T_TRI, 'automation/triage')] };
|
|
33
|
-
}
|
|
34
|
-
const NOWMS = Date.parse(NOW_ISO);
|
|
35
|
-
export function sessions() {
|
|
36
|
-
const s = (id, name, tree, shown, createdMin, lastMin, line, label, agent) => ({ id, ws: WS_ID, name, agent: agent || 'cloud', state: 'working', shown, label, created: new Date(NOWMS - createdMin * 60000).toISOString(), lastOutputAt: NOWMS - lastMin * 60000,
|
|
37
|
-
model: 'cloud', model_line: line, cwd: '.', tree, automatic: false, origin: null });
|
|
38
|
-
return { sessions: [
|
|
39
|
-
{ ...s('s1', 'Prepare my day', '/demo/wawancsui/pmos', 'exited', 80, 73, '38k tokens · wrote the briefing only', 'ended', 'cloud'), ws: 'demo0000pmos' },
|
|
40
|
-
s('s2', 'PRD section 4 redraft', T_V2, 'working', 38, 2, '41k tokens · writes PRD draft only · cannot send', 'working', 'cloud'),
|
|
41
|
-
{ ...s('s3', 'Interview guide', '/demo/acme/research', 'needs', 12, 9, '18k tokens · writes guide draft only', 'needs you', 'codex'), ws: 'demo00research' },
|
|
42
|
-
s('s4', 'Triage Jira tickets', T_TRI, 'quiet', 180, 180, '22k tokens · proposes only, applies nothing in Jira', 'idle 3 h', 'local'),
|
|
43
|
-
{ ...s('s5', 'EN-418 index job', '/demo/acme/search', 'blocked', 120, 1000, '61k tokens · read only', 'blocked', 'cloud'), ws: 'demo000search' },
|
|
44
|
-
] };
|
|
45
|
-
}
|
|
46
|
-
export const transcript = (id) => ({ ok: true, text: id === 's2' ? 'Reading the 3-flow scope\nRewriting section 4\nWaiting for the scope decision before saving' : 'Proposed closing 6 duplicates\nProposed owners for 3 tickets\nNothing applied in Jira' });
|
|
47
|
-
|
|
48
|
-
/* ── runs (the dock's "Runs and results"): one on a card, one started by me, one past ─────────────────────────────────────────── */
|
|
49
|
-
|
|
50
|
-
export function runs() {
|
|
51
|
-
const card = (state, title, extra) => ({ state, title, steps: [], ask: null, permission: null, attention: null, failure: null, recover: [], problems: [], unlabelled: 0, fallbackText: null, result: null, claims: [], blocked: null, nextMoves: [], fallback: null, asked: null, permissions: [], ...(extra || {}) });
|
|
52
|
-
const iso = (m) => new Date(NOWMS - m * 60000).toISOString();
|
|
53
|
-
return { ok: true,
|
|
54
|
-
groups: {
|
|
55
|
-
onCard: [{ id: 's2', plan_item: null, name: 'PRD section 4 redraft', origin: 'card', cardId: 'decision', startedAt: iso(38), endedAt: null }],
|
|
56
|
-
startedByMe: [{ id: 's4', plan_item: null, name: 'Triage Jira tickets', origin: 'manual', cardId: null, startedAt: iso(180), endedAt: null }],
|
|
57
|
-
past: [{ id: 's1', plan_item: null, name: 'Prepare my day', origin: 'automation', cardId: null, startedAt: iso(80), endedAt: iso(73) }],
|
|
58
|
-
automatic: [], automaticHidden: true,
|
|
59
|
-
},
|
|
60
|
-
cards: {
|
|
61
|
-
s2: card('working', 'Rewriting section 4 for the 3-flow scope'),
|
|
62
|
-
s4: card('working', 'Proposing owners for 3 tickets'),
|
|
63
|
-
s1: card('done', 'Built the briefing: 5 cards', { claims: [{ text: 'Read Jira, Confluence, Calendar, Slack', basis: 'fact', source: 'run log', ok: true }, { text: 'Wrote the briefing only', basis: 'fact', source: 'run log', ok: true }] }),
|
|
64
|
-
} };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* ── the Briefing cards, per scope (the tab the deck sits on) ──────────────────────────────────────────────────────────────────── */
|
|
68
|
-
|
|
69
|
-
const C = { ok: 'var(--success)', warn: 'var(--warning)', bad: 'var(--destructive)', acc: 'var(--acc)', mfg: 'var(--muted-foreground)', opp: 'var(--purple)' };
|
|
70
|
-
const card = (key, tag, headline, sub, rich, o) => ({ key, tag, headline, sub, hero: { kind: 'rows', points: null, rich }, facts: [], ...(o || {}) });
|
|
71
|
-
|
|
72
|
-
const DECISION = card('decision', 'Critical', 'Cut Checkout v2 to 3 flows to hold 24 Oct?', 'Dara needs it before Sprint planning. Jira shows 3 blockers on the full scope.',
|
|
73
|
-
{ kind: 'chain', ring: { frac: 0.36, lines: ['5h 48m', 'left'], tone: C.acc }, steps: [['Decide', 'by 14:00', C.acc], ['Sprint planning', 'blocked', C.bad], ['Ship 24 Oct', 'at risk', C.warn]] },
|
|
74
|
-
{ pov: 'Decision', kpis: [['5h 48m', 'left', C.acc], ['3', 'blockers', C.bad], ['82%', 'confidence', C.ok]], factsX: [['user', 'Dara is waiting'], ['alert', '3 blockers on full scope']],
|
|
75
|
-
move: { suggested: { id: 'cut', label: 'Cut to 3 flows', conf: 82 }, options: [{ id: 'cut', label: 'Cut to 3 flows', slipAfter: 0 }, { id: 'add', label: 'Cut and add one engineer', slipAfter: 0 }, { id: 'keep', label: 'Keep the full scope', slipAfter: 7 }], note: 'Dara\'s estimate for flow 4 is a range of 3 to 6 days.' },
|
|
76
|
-
deadline: { days: 0.24, source: 'calendar', text: 'Sprint planning at 14:00, 5h 48m left' }, waitsFor: 'Dara', why: { text: 'Sprint planning cannot start until scope is decided; the 24 Oct date depends on it.', impact: 0.9, urgency: 0.85, irreversible: 0.4, score: 0.82 },
|
|
77
|
-
pinned: false });
|
|
78
|
-
const METRIC = card('metric', 'Just in', 'Conversion is down 0.2 points', 'Landed at 07:30. The biggest loss is cart to address: 45% of carts stop.',
|
|
79
|
-
{ kind: 'num', big: '3.1', unit: '%', delta: '-0.2 pts since last week', tone: C.bad, arr: [3.5, 3.4, 3.4, 3.3, 3.3, 3.2, 3.1], target: 4 },
|
|
80
|
-
{ pov: 'Early signal', kpis: [['3.1%', 'now', C.bad], ['4.0%', 'target', C.mfg], ['45%', 'lost at address', C.warn]], factsX: [['bolt', 'Data landed 07:30'], ['alert', 'Mobile shows the same pattern']],
|
|
81
|
-
move: { suggested: { id: 'x', label: 'Draft an experiment for the address step', conf: 71 }, options: [{ id: 'x', label: 'Draft an experiment for the address step' }, { id: 'w', label: 'Watch 3 more days' }, { id: 't', label: 'Tell Priya in the 10:30 update' }], note: 'One week of data. A seasonal dip is not ruled out.' },
|
|
82
|
-
deadline: null, why: { text: 'Conversion is the earliest warning on the checkout bet.', impact: 0.8, urgency: 0.6, irreversible: 0.2, score: 0.71 } });
|
|
83
|
-
const DATE = card('date', 'Critical', 'Checkout v2 may slip 7 days', 'Forecast Oct 31 vs promised Oct 24 (+7 days). Scope is the cause, not capacity.',
|
|
84
|
-
{ kind: 'rows', rows: [['target', 'Promised to leadership on 2 Oct', '', '24 Oct'], ['alert', 'Forecast on the full scope', 'bad', '31 Oct'], ['scale', 'Cause: scope, not capacity', 'warn', '']] },
|
|
85
|
-
{ pov: 'Deadline moved', kpis: [['+7 d', 'vs promise', C.bad], ['24 Oct', 'promised', 'var(--foreground)'], ['74%', 'confidence', C.acc]], factsX: [['target', 'Promised to leadership on 2 Oct'], ['alert', 'Cause: scope, not capacity']],
|
|
86
|
-
move: { suggested: { id: 'warn', label: 'Warn Priya now, with the fix attached', conf: 74 }, options: [{ id: 'warn', label: 'Warn Priya now, with the fix attached' }, { id: 'wait', label: 'Wait for the 14:00 decision' }] }, deadline: null });
|
|
87
|
-
const INSIGHT = card('insight', 'Opportunity', 'Label printing is the main pain', '3 of 3 calls name it so far. Interview 3 is today at 13:00.',
|
|
88
|
-
{ kind: 'bars', bars: [['Labels are the main pain', 1, C.ok, '3 of 3'], ['Customers miss the 30-day window', 0.67, C.warn, '2 of 3'], ['Support is a workaround', 0, 'var(--ring)', 'untested']] },
|
|
89
|
-
{ pov: 'Discovery', kpis: [['3 of 3', 'calls agree', C.ok], ['2 of 5', 'interviews done', C.acc], ['76%', 'confidence', C.opp]], factsX: [['cal', 'Interview 3 at 13:00'], ['target', 'Stop rule after interview 5']],
|
|
90
|
-
move: { suggested: { id: 'a', label: 'Add a support-route question to interview 3', conf: 76 }, options: [{ id: 'a', label: 'Add a support-route question to interview 3' }, { id: 'k', label: 'Keep the guide as it is' }] } });
|
|
91
|
-
const SSO = card('sso', 'Big win', 'SSO is live with 3 customers', 'No incidents in 7 days. Release on 14 Oct is on track.',
|
|
92
|
-
{ kind: 'ring', done: 5, total: 8, cap: '5 of 8 gates', sub: 'release checklist' },
|
|
93
|
-
{ pov: 'Milestone', kpis: [['3', 'customers live', C.ok], ['0', 'incidents', C.ok], ['5 of 8', 'gates', C.acc]], factsX: [['user', 'Marta and Priya have not heard yet'], ['flag', 'First enterprise milestone']],
|
|
94
|
-
move: { suggested: { id: 's', label: 'Lead the weekly status with it', conf: 90 }, options: [{ id: 's', label: 'Lead the weekly status with it' }, { id: 'n', label: 'Send Marta and Priya a note now' }, { id: 'h', label: 'Hold until the release' }] } });
|
|
95
|
-
const SEARCH = card('search', 'Small win', 'Search got 28% faster', 'p95 latency fell from 420 to 300 ms after the 6 Oct merge.',
|
|
96
|
-
{ kind: 'num', big: '300', unit: 'ms', delta: '-120 ms since the merge', tone: C.ok, arr: [420, 418, 410, 405, 300, 296, 300], target: 350 },
|
|
97
|
-
{ pov: 'Milestone', kpis: [['-28%', 'p95 latency', C.ok], ['300 ms', 'now', 'var(--foreground)'], ['350 ms', 'target', C.mfg]], factsX: [['check', 'Merged 6 Oct, CI green'], ['report', 'Measured over 7 days']],
|
|
98
|
-
move: { suggested: { id: 'b', label: 'Bank it in Friday\'s report', conf: 93 }, options: [{ id: 'b', label: 'Bank it in Friday\'s report' }, { id: 's', label: 'Skip' }] } });
|
|
99
|
-
const BOARD = card('board', 'Opportunity', 'The board update is 70% ready', 'Three sections wait on Thursday\'s numbers. It sends on 20 Dec.',
|
|
100
|
-
{ kind: 'ring', done: 7, total: 10, cap: '7 of 10 sections', sub: '3 wait on numbers' },
|
|
101
|
-
{ pov: 'Prep', kpis: [['70%', 'ready', C.acc], ['3', 'waiting', C.warn], ['20 Dec', 'sends', 'var(--foreground)']], factsX: [['clock', 'Sends 20 Dec'], ['spark', 'The agent is filling the rest']],
|
|
102
|
-
move: { suggested: { id: 'f', label: 'Let the agent fill from Thursday\'s numbers', conf: 79 }, options: [{ id: 'f', label: 'Let the agent fill from Thursday\'s numbers' }, { id: 'r', label: 'Review the sections yourself first' }] } });
|
|
103
|
-
|
|
104
|
-
/* the Calendar tab's headline deck (the mockup's CARDS.calendar, c5 and c6): a Conflict and a Prep at risk, from the demo's own day */
|
|
105
|
-
const CAL_CF = card('cf', 'Small win', 'Customer interview runs into Sprint planning', '13:00 to 14:00, then 14:00 to 15:00. There is no break between them.',
|
|
106
|
-
{ kind: 'tiles', tiles: [['0 min', 'break', C.bad], ['14:10', 'planning could start', C.ok], ['80%', 'confidence', C.acc]] },
|
|
107
|
-
{ pov: 'Conflict', kpis: [['0 min', 'buffer', C.bad], ['14:10', 'proposed start', C.ok]], factsX: [['clock', 'You are free again at 15:30']], move: { suggested: { id: 's', label: 'Start Sprint planning at 14:10', conf: 80 }, options: [{ id: 's', label: 'Start Sprint planning at 14:10' }] } });
|
|
108
|
-
const CAL_PR = card('pr', 'Critical', 'Sprint planning has little time to prepare', 'One prep step is left and no free working time remains before 14:00.',
|
|
109
|
-
{ kind: 'tiles', tiles: [['1', 'step left', C.bad], ['0 min', 'free before', C.warn], ['70%', 'confidence', C.acc]] },
|
|
110
|
-
{ pov: 'Prep at risk', kpis: [['1', 'prep step', C.bad], ['0 min', 'free', C.warn]], factsX: [['clock', 'Starts 14:00']], move: { suggested: { id: 'b', label: 'Block time before Sprint planning', conf: 70 }, options: [{ id: 'b', label: 'Block time before Sprint planning' }] } });
|
|
111
|
-
|
|
112
|
-
/* Work tab (the deck per view: Inbox, Today, Upcoming, Waiting, Someday, Review). The decisions the mockup's Triage cards pointed at
|
|
113
|
-
* ("5 need a real decision", "The agent drafted 3 replies") live in Briefing · Needs you now, so no Work card names them. */
|
|
114
|
-
const WORK_KI = card('ki', 'Small win', 'Three items have no date yet', 'One has waited two weeks. Give each a day, a Not before date, or park it in Someday.',
|
|
115
|
-
{ kind: 'rows', rows: [['inbox', 'Read the competitor pricing teardown', '', 'yesterday'], ['inbox', 'Book five user interviews for returns discovery', '', 'Tue'], ['alert', 'Idea: weekly digest for partner admins', 'warn', '14 days']] },
|
|
116
|
-
{ kpis: [['3', 'to decide', C.acc], ['14 d', 'oldest', C.warn]], factsX: [['inbox', 'Capture now, decide later']] });
|
|
117
|
-
const WORK_KRV = card('krv', 'Review', 'Three items wait for your weekly review', 'Nobody touched them for a week or more. The oldest is 20 days.',
|
|
118
|
-
{ kind: 'bars', bars: [['Clean up the Checkout Jira labels', 1, C.warn, '20 d'], ['Idea: weekly digest for partner admins', 0.7, C.warn, '14 d'], ['Annual-plan label', 0.45, C.acc, '9 d']] },
|
|
119
|
-
{ eyebrow: { label: 'Review', icon: 'eye' }, kpis: [['3', 'to review', C.acc], ['20 d', 'oldest', C.warn]], factsX: [['eye', 'One at a time: keep, change or drop']] });
|
|
120
|
-
|
|
121
|
-
/* Work tab, the other views (the mockup's workCards: Today, Week, Waiting, Later) */
|
|
122
|
-
const mv = (id, label, conf, more) => ({ suggested: { id, label, conf }, options: [{ id, label }, ...(more || [])] });
|
|
123
|
-
const WK_KO = card('ko', 'Critical', 'Do these three first', 'Focus has three jobs for today, each with the reason.',
|
|
124
|
-
{ kind: 'axis', focus: [11.25, 13], now: 8.2, marks: [[10.5, '10:30', C.bad, 19], [13, '13:00', C.acc, 27], [14, '14:00', C.bad, 19]] },
|
|
125
|
-
{ kpis: [['5', 'for today', C.acc], ['1.8 h', 'focus time', C.opp], ['78%', 'confidence', C.ok]], factsX: [['target', 'Hold the 24 Oct date'], ['clock', 'Best window 11:15']], move: mv('lk', 'Accept Focus and block 11:15 to 13:00', 78) });
|
|
126
|
-
const WK_KR = card('kr', 'Critical', 'Two promises are late', 'The timeline to Dara was due yesterday and the call with Priya is 2 days late.',
|
|
127
|
-
{ kind: 'rows', rows: [['alert', 'Send the revised Checkout v2 timeline…', 'bad', '1 d late'], ['alert', 'Call Priya about the Q4 budget variance', 'bad', '2 d late']] },
|
|
128
|
-
{ kpis: [['2', 'late', C.bad], ['1', 'outside PMOS', C.opp], ['80%', 'confidence', C.ok]], factsX: [['alert', 'Both are promises']], move: mv('es', 'Do the timeline first, then call Priya', 80) });
|
|
129
|
-
const WK_KW = card('kw', 'Just in', '2 things wait on others', 'Dara is 2 days silent on the keys. A nudge is drafted for each.',
|
|
130
|
-
{ kind: 'bars', bars: [['Dara: Payments sandbox keys', 1, C.bad, 'asked Tue'], ['Lee: Annual-plan label', 0.4, C.warn, 'asked Wed']] },
|
|
131
|
-
{ kpis: [['2', 'waiting', C.warn], ['2 d', 'oldest', C.bad], ['82%', 'confidence', C.ok]], factsX: [['user', 'Dara, Lee'], ['out', 'Nudges go to Review']], move: mv('nu', 'Nudge both (drafted)', 82) });
|
|
132
|
-
const WK_KL = card('kl', 'Opportunity', 'Today is 1.5 h of work against 1.8 h of focus', 'Move the two lowest-priority items to tomorrow and the day fits.',
|
|
133
|
-
{ kind: 'tiles', tiles: [['1.5 h', 'planned', C.acc], ['1.8 h', 'focus time', C.ok], ['0 h', 'over', C.bad]] },
|
|
134
|
-
{ kpis: [['2', 'to move', C.warn], ['0', 'promises hurt', C.ok], ['72%', 'confidence', C.acc]], factsX: [['clock', 'Capacity is the constraint']], move: mv('mv', 'Move the two lowest to tomorrow', 72) });
|
|
135
|
-
const WK_KDN = card('kdn', 'Big win', '0 done so far today', 'Each one closed without a context switch.', { kind: 'ring', done: 0, total: 5, size: 96, cap: '0 closed', sub: '5 still open' },
|
|
136
|
-
{ kpis: [['1', 'facts', C.acc]], factsX: [['check', 'Momentum is good']] });
|
|
137
|
-
const DAYS7 = (dots) => ['Thu 8', 'Fri 9', 'Mon 12', 'Tue 13', 'Wed 14', 'Thu 15', 'Fri 16'].map((d, i) => [d, dots.includes(i)]);
|
|
138
|
-
const WK_KWK = card('kwk', 'Upcoming', '5 items land in the next 7 days', 'Two happen outside PMOS. One waits for its Not before date on Monday.', { kind: 'days', days: DAYS7([1, 2, 3, 4]) },
|
|
139
|
-
{ eyebrow: { label: 'Upcoming', icon: 'cal' }, kpis: [['5', 'facts', C.acc]], factsX: [['cal', 'Next: Fri 9 Oct']] });
|
|
140
|
-
const WK_KJB = card('kjb', 'Jobs', '4 jobs to be done, in progress', 'Work grouped by the outcome it serves, not by where it came from.',
|
|
141
|
-
{ kind: 'bars', bars: [['Hold the 24 Oct date', 1 / 6, C.acc, '1 of 6'], ['Keep leadership informed', 0, C.acc, '0 of 1'], ['Learn why returns hurt', 0, C.acc, '0 of 3'], ['Keep customer promises', 0, C.acc, '0 of 1']] },
|
|
142
|
-
{ eyebrow: { label: 'Jobs', icon: 'target' }, kpis: [['4', 'facts', C.acc]], factsX: [['target', 'JTBD']] });
|
|
143
|
-
const WK_KPR = card('kpr', 'Opportunity', 'A customer promise falls on Monday', 'Confirm the SSO date to Marta after the freeze. It is yours and dated.', { kind: 'days', days: DAYS7([2]) },
|
|
144
|
-
{ kpis: [['86%', 'confidence', C.acc], ['2', 'options', C.opp], ['2', 'evidence', C.ok]], factsX: [['user', 'Marta'], ['flag', 'Keeps trust']], move: mv('td', 'Bring it into Today for Monday', 86) });
|
|
145
|
-
const WT_KAG = card('kag', 'Critical', 'Dara has been silent for 2 days', 'The sandbox keys block Checkout v2 and SSO billing. The nudge is drafted.',
|
|
146
|
-
{ kind: 'bars', bars: [['Dara: Payments sandbox keys', 1, C.bad, 'asked Tue'], ['Lee: Annual-plan label', 0.4, C.warn, 'asked Wed']] },
|
|
147
|
-
{ kpis: [['84%', 'confidence', C.acc], ['2', 'options', C.opp], ['2', 'evidence', C.ok]], factsX: [['user', 'Dara, Lee'], ['out', 'Nudges go to Review']], move: mv('nu', 'Nudge Dara now (drafted)', 84) });
|
|
148
|
-
const WT_KCH = card('kch', 'Opportunity', 'Chase two people in one step', 'Both nudges are drafted and polite. You send them.',
|
|
149
|
-
{ kind: 'bars', bars: [['Dara: Payments sandbox keys', 1, C.bad, 'asked Tue'], ['Lee: Annual-plan label', 0.4, C.warn, 'asked Wed']] },
|
|
150
|
-
{ kpis: [['82%', 'confidence', C.acc], ['2', 'options', C.opp], ['2', 'evidence', C.ok]], factsX: [['out', 'Goes to Review first']], move: mv('nu', 'Nudge both (drafted)', 82) });
|
|
151
|
-
const WT_KDP = card('kdp', 'Dependencies', '2 external dependencies', 'Two replies stand between you and the date.',
|
|
152
|
-
{ kind: 'bars', bars: [['Payments sandbox keys', 1, C.bad, 'asked Tue'], ['Annual-plan label', 0.6, C.warn, 'asked Wed']] },
|
|
153
|
-
{ eyebrow: { label: 'Dependencies', icon: 'wait' }, kpis: [['2', 'facts', C.acc]], factsX: [['init', 'Checkout v2']] });
|
|
154
|
-
const LT_KLP = card('klp', 'Opportunity', 'The Q1 discovery plan is ready to promote', 'Planning starts in November and the returns findings arrive this week.', { kind: 'days', days: DAYS7([2]) },
|
|
155
|
-
{ kpis: [['68%', 'confidence', C.acc], ['2', 'options', C.opp], ['1', 'evidence', C.ok]], factsX: [['spark', 'Has a window now']], move: mv('pr', 'Promote to this week', 68) });
|
|
156
|
-
const LT_KLS = card('kls', 'Small win', 'Nothing is stale', 'No someday item is older than 30 days.', { kind: 'ring', done: 1, total: 1, size: 96, cap: 'All fresh', sub: 'reviewed monthly' },
|
|
157
|
-
{ kpis: [['1', 'facts', C.acc]], factsX: [['check', 'Next review 1 Nov']] });
|
|
158
|
-
const WK_KEV = card('kev', 'Just in', '5 open at the end of the day', "Say Not yet, schedule or drop each one. Carry-overs lead tomorrow's briefing.",
|
|
159
|
-
{ kind: 'rows', rows: [['moon', 'Update the Checkout v2 risk log', '', '2026-10-08'], ['moon', 'Talk to Dara about QA capacity for t…', '', '2026-10-08'], ['moon', 'Prep the one-pager for the Search r…', '', 'flagged']] },
|
|
160
|
-
{ eyebrow: { label: 'Evening review', icon: 'moon' }, kpis: [['5', 'open', C.acc]], factsX: [['moon', 'Evening review']], move: mv('mg', 'Not yet: all to tomorrow', 80) });
|
|
161
|
-
/* the deck the Work tab asks for, by view (scope "work:<view>"); Close on Today adds the evening card first, as the mockup's S.tod === 'e' does.
|
|
162
|
-
* triage, week and later are the old lens names: the shell asks for "work:triage" before the view reports its own. */
|
|
163
|
-
const WORK_LENS = { inbox: [WORK_KI, WK_KJB], today: [WK_KO, WK_KR, WK_KW, WK_KL, WK_KDN], upcoming: [WK_KWK, WK_KPR, WK_KJB], waiting: [WT_KAG, WT_KCH, WT_KDP], someday: [LT_KLS, LT_KLP], review: [WORK_KRV, LT_KLS] };
|
|
164
|
-
WORK_LENS.triage = WORK_LENS.inbox; WORK_LENS.week = WORK_LENS.upcoming; WORK_LENS.later = WORK_LENS.someday;
|
|
165
|
-
|
|
166
|
-
/* Initiatives tab (the mockup's iniCards, Strategize) */
|
|
167
|
-
const INI_DIR = card('ydir', 'Year direction', 'North star is 4% behind and widening', 'It leaves tolerance in Dec \'26 and reaches the pivot line in Mar \'27.',
|
|
168
|
-
{ kind: 'multi', lines: [{ pts: [10.4, 10.7, 10.9, 11.2, 11.6, 12.2, 12.6, 13.0, 13.4, 13.8, 14.2, 14.6, 15.0, 15.4, 15.8, 16.2, 16.6, 17.0], color: 'var(--ring)', width: 2, dash: '4 3' }, { pts: [10.3, 10.5, 10.6, 10.8, 10.9, 11.0, 11.1], color: 'var(--acc)', width: 3 },
|
|
169
|
-
{ from: 6, pts: [11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0, 12.1, 12.2], color: 'var(--warning)', width: 3, dash: '2 5' }], labels: [['now', 0.34, 'b'], ['plan', 1, 't'], ['at today\'s pace', 1, 'bw']] },
|
|
170
|
-
{ eyebrow: { label: 'Year direction', icon: 'target' }, kpis: [['72%', 'confidence', C.acc], ['3', 'options', C.opp], ['3', 'evidence', C.ok]], factsX: [['clock', '3 drifting'], ['eye', '4 on watch'], ['up', '1 upside']], pov: 'PRODUCT',
|
|
171
|
-
move: { suggested: { id: 'adj', label: 'Adjust: shift effort to Enterprise and Retain', conf: 72 }, options: [{ id: 'adj', label: 'Adjust: shift effort to Enterprise and Retain' }] } });
|
|
172
|
-
const INI_MAT = card('ymat', 'Maturity', 'Two pillars one stage short', 'Convert and Onboard decide whether the year lands.',
|
|
173
|
-
{ kind: 'bars', bars: [['Convert', 0.6, C.warn, 'Prove -> Repeat'], ['Onboard', 0.4, C.warn, 'Discover -> Prove'], ['Enterprise', 1, C.ok, 'Scale'], ['Retain', 0.9, C.ok, 'Scale']] }, { factsX: [['flag', 'Target: September 2027']] });
|
|
174
|
-
const INI_SIG = card('ysig', 'Critical', 'Conversion is the earliest warning', 'Below 3.0% for 2 weeks is the pivot trigger.',
|
|
175
|
-
{ kind: 'num', big: '2.9', unit: '%', delta: 'lands here at this slope', tone: C.bad, arr: [3.5, 3.4, 3.4, 3.3, 3.3, 3.2, 3.1], target: 4 }, { factsX: [['clock', 'About 2 weeks to the trigger'], ['alert', 'Cart to address loses 45%']] });
|
|
176
|
-
|
|
177
|
-
/* Reports tab (the mockup's repCards, Project / Leadership) */
|
|
178
|
-
const REP_LEAD = card('rp1', 'Critical', 'Friday\'s status says 31 Oct, you told them 24 Oct', 'The report leads with the answer and asks for one decision.',
|
|
179
|
-
{ kind: 'rows', rows: [['alert', 'Forecast 31 Oct', 'bad', '+7 d'], ['scale', 'Ask: cut to 3 flows', 'warn', '14:00'], ['check', '0 of 6 sections approved', '', '']] },
|
|
180
|
-
{ pov: 'LEADERSHIP', kpis: [['64%', 'confidence', C.acc], ['3', 'options', C.opp], ['3', 'evidence', C.ok]], factsX: [['out', 'Send after the decision']],
|
|
181
|
-
move: { suggested: { id: 'r', label: 'Resolve the flagged sections first', conf: 64 }, options: [{ id: 'r', label: 'Resolve the flagged sections first' }] } });
|
|
182
|
-
const REP_NEXT = card('rp2', 'Opportunity', 'Leadership has not heard SSO is live', 'Lead the weekly status with it.',
|
|
183
|
-
{ kind: 'rows', rows: [['flag', 'SSO beta live with 3 customers', 'ok', ''], ['out', 'Weekly status goes out Friday', '', '16:30']] }, { pov: 'LEADERSHIP', kpis: [['80%', 'confidence', C.ok]], factsX: [['flag', 'First enterprise milestone']] });
|
|
184
|
-
|
|
185
|
-
const unfilled = (c) => ({ ...c });
|
|
186
|
-
const PLAN_BRIEF = [DECISION, METRIC, DATE, INSIGHT, SSO].map(unfilled);
|
|
187
|
-
const BY_SCOPE = {
|
|
188
|
-
brief: PLAN_BRIEF,
|
|
189
|
-
cal: [CAL_CF, CAL_PR],
|
|
190
|
-
work: [WK_KO, WK_KR, WORK_KI, WORK_KRV, WK_KDN],
|
|
191
|
-
init: [INI_DIR, INI_MAT, INI_SIG, { ...SSO, key: 'ysso' }, { ...BOARD, key: 'ybd' }],
|
|
192
|
-
rep: [REP_LEAD, REP_NEXT, { ...SEARCH, key: 'rsr' }], // report-specific cards only: the Reports page draws this deck above its tabs, and one home holds (the board and SSO cards live on Briefing and Initiatives)
|
|
193
|
-
};
|
|
194
|
-
const LENS_ORDER = {
|
|
195
|
-
Plan: ['decision', 'metric', 'date', 'insight', 'sso'],
|
|
196
|
-
Unblock: ['decision', 'insight', 'date', 'metric', 'board'],
|
|
197
|
-
Close: ['decision', 'date', 'sso', 'search', 'metric'],
|
|
198
|
-
Reflect: ['sso', 'search', 'board', 'metric', 'insight'],
|
|
199
|
-
};
|
|
200
|
-
const ALL = Object.fromEntries([DECISION, METRIC, DATE, INSIGHT, SSO, SEARCH, BOARD].map((c) => [c.key, c]));
|
|
201
|
-
|
|
202
|
-
/* the Needs-you list: the mockup's inbox rows (needs()), in its order */
|
|
203
|
-
const NEEDS = [
|
|
204
|
-
{ key: 'i2', kind: 'reply', headline: 'Confirm the 1 Oct numbers before the 10:30 update', left: { text: '2h 18m left', pct: 0.3, tone: 'warn' }, p: 'P1', time: '10:30', who: 'P', src: 'Slack', icon: 'reply' },
|
|
205
|
-
{ key: 'i6', kind: 'review', headline: 'Review the 13:00 interview guide', left: { text: '4h 48m left', pct: 0.55, tone: 'acc' }, p: 'P2', time: '13:00', branch: 'returns-guide', src: 'Agent', icon: 'eye' },
|
|
206
|
-
{ key: 'i3', kind: 'decide', headline: 'Assign owners to 2 unowned workshop actions', p: 'P2', time: 'today', src: 'Image', icon: 'scale' },
|
|
207
|
-
{ key: 'i4', kind: 'review', headline: 'Approve pricing-page copy before handoff', p: 'P2', time: 'Fri', who: 'L', old: true, src: 'Figma', icon: 'eye' },
|
|
208
|
-
{ key: 'i5', kind: 'review', headline: 'Confirm the growth assumption in the Q4 forecast', p: 'P2', time: 'Fri', src: 'Sheets', icon: 'eye' },
|
|
209
|
-
{ key: 'i7', quick: true, kind: 'reply', headline: 'Pick interview slots with 3 customers', p: 'P3', time: 'this week', who: 'M', src: 'Gmail', icon: 'reply' },
|
|
210
|
-
{ key: 'i8', kind: 'decide', headline: 'Self-serve onboarding: continue or park?', p: 'P3', time: 'this week', src: 'Notes', icon: 'scale' },
|
|
211
|
-
{ key: 'i15', quick: true, kind: 'reply', headline: 'Say yes to Sam: ship the logging change', p: 'P3', time: 'today', who: 'S', src: 'Slack', icon: 'reply' },
|
|
212
|
-
{ key: 'i16', quick: true, kind: 'reply', headline: 'Accept the 15 Oct interview invite', p: 'P3', time: 'today', src: 'Gmail', icon: 'reply' },
|
|
213
|
-
];
|
|
214
|
-
|
|
215
|
-
/* the mockup's Review drafts (S.drafts), "6 handled for you" (HX and the handled rows) and "Data you can lean on" (CF), as the Briefing draws them */
|
|
216
|
-
const REVIEW = { working: 1, skims: 6, rows: [
|
|
217
|
-
{ id: 'd1', lvl: 0, rec: 'o', t: 'Reply to Marta: SSO 14 Oct, SCIM in Nov', out: true, to: 'M', toName: 'Marta · Customer success', n: 2 },
|
|
218
|
-
{ id: 'd2', lvl: 0, rec: 'o', t: 'Weekly status for leadership', out: true, to: 'P', toName: 'Priya · VP Product', n: 4, old: 1, conflict: true, sess: true },
|
|
219
|
-
{ id: 'd3', lvl: 2, rec: 'r', t: 'Prep note for 10:30 Checkout sync', n: 3 },
|
|
220
|
-
{ id: 'd4', lvl: 2, rec: 'r', t: 'Close 6 duplicate tickets, assign 3 more', basis: 'Jira', sess: true },
|
|
221
|
-
{ id: 'd5', lvl: 2, rec: 'r', t: "Summary of Tuesday's customer call", docs: ['doc'], basis: '1 call, a lead not a finding' },
|
|
222
|
-
{ id: 'd6', lvl: 2, rec: 'r', t: 'Clean diagram of the whiteboard flow', docs: ['img'], basis: '1 image' },
|
|
223
|
-
{ id: 'd7', lvl: 2, rec: 'r', t: 'Fix: set the PRD ship date to 24 Oct', docs: ['doc'], basis: 'Jira field wins' },
|
|
224
|
-
{ id: 'd8', lvl: 2, rec: 'r', t: 'Fix: set the PRD baseline to 3.1%', docs: ['sheet'], basis: 'Analytics sheet wins' },
|
|
225
|
-
] };
|
|
226
|
-
const HANDLED = { note: 'nothing needs a look', rows: [
|
|
227
|
-
{ t: 'Prepared 5 meetings: agenda, context and pre-read drafts', d: ['Agenda, context and pre-read for 5 meetings. Nothing was sent.', 'Playbook: meeting prep · auto · 14 days, 0 reverts', '12 sources read, 2 older than 3 days and marked', 'Delete the drafts. No one saw them.'] },
|
|
228
|
-
{ t: 'Archived 3 FYI items and attached context to 9 others', d: ['Archived 3 FYI items and linked context to 9 others.', 'Playbook: inbox triage · auto · 9 days, 1 priority note', 'Sender and subject matched your past archives', 'Restore from Archive, one tap each.'] },
|
|
229
|
-
{ t: 'Marked the PRD draft done: PR merged 6 Oct', d: ['Marked the PRD task done after its PR merged.', 'Rule: a merged PR closes its task · auto', 'Merged 6 Oct, CI green', 'Reopen the task. The PR is untouched.'] },
|
|
230
|
-
{ t: 'Checked 10 sources: 9 fresh, 1 old', d: ['Checked 10 sources: 9 fresh, 1 old.', 'Playbook: source check · auto · read-only', 'Figma was last read Tue 17:10', 'Nothing to undo. Nothing was changed.'] },
|
|
231
|
-
{ t: "Re-ranked your list after Priya's 07:58 message", d: ['Re-ranked your list after a message from Priya.', 'Rule: a person with a deadline raises priority · auto', 'Priya, 07:58: needs numbers before 10:30', 'Ranking returns to the earlier order.'] },
|
|
232
|
-
{ t: 'Held 3 interview slots that avoid your standing meetings', d: ['Held 3 interview slots that avoid your standing meetings.', 'Playbook: scheduling · approve mode · held, not accepted', 'No overlaps; 2 alternates kept', 'Release the holds. Marta is not told.'] },
|
|
233
|
-
] };
|
|
234
|
-
const TRUST = { fresh: '9 of 10 sources fresh', stale: 'Figma was last read Tue 17:10. Its items are marked old.', items: [
|
|
235
|
-
{ fact: 'Checkout v2 ship date', win: 'Jira 24 Oct', lose: 'PRD 31 Oct' }, { fact: 'Conversion baseline', win: 'Analytics sheet 3.1%', lose: 'PRD 3.4%' }] };
|
|
236
|
-
export function briefing(url) {
|
|
237
|
-
const q = new URL(url, location.origin).searchParams;
|
|
238
|
-
const lens = ['Plan', 'Unblock', 'Close', 'Reflect'].includes(q.get('lens')) ? q.get('lens') : 'Plan';
|
|
239
|
-
const scope = q.get('scope') || 'brief';
|
|
240
|
-
let cards = (BY_SCOPE[scope] || PLAN_BRIEF);
|
|
241
|
-
const wl = /^work:(\w+)$/.exec(scope || '');
|
|
242
|
-
if (wl && WORK_LENS[wl[1]]) { cards = WORK_LENS[wl[1]].slice(); if (wl[1] === 'today' && lens === 'Close') cards = [WK_KEV, ...cards].slice(0, 5); }
|
|
243
|
-
if (scope === 'brief') cards = LENS_ORDER[lens].map((k) => ALL[k]);
|
|
244
|
-
else if (lens !== 'Plan' && !wl) cards = cards.slice().reverse();
|
|
245
|
-
return { ok: true, scope, lens, zoom: q.get('zoom') || 'week', cards: cards.map((c) => ({ ...c })), ticker: [], banner: null, unread: 2, kept_out: scope === 'brief' ? '3 FYI · raised 1 from a person with a deadline' : undefined, review: scope === 'brief' ? REVIEW : undefined, handled: scope === 'brief' ? HANDLED : undefined, trust: scope === 'brief' ? TRUST : undefined, foot: scope === 'brief' ? { left: 'used as is 68% · P1 missed 0', right: 'drag a row → done, ← later · tap to open · j k move' } : undefined, needs: scope === 'brief' ? NEEDS : undefined };
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* ── the calendar ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
249
|
-
|
|
250
|
-
const MEET = [
|
|
251
|
-
{ id: 'm1', t: 'Standup', s: 9.5, e: 10, kind: 'ready', routine: true },
|
|
252
|
-
{ id: 'm2', t: 'Checkout sync', s: 10.5, e: 11.25, kind: 'prep ready' },
|
|
253
|
-
{ id: 'm3', t: 'Customer interview', s: 13, e: 14, kind: 'review prep' },
|
|
254
|
-
{ id: 'm4', t: 'Sprint planning', s: 14, e: 15, kind: 'blocked on your decision', hot: true, decide_by: '14:00', att: ['Dara', 'Priya', 'Sam'] },
|
|
255
|
-
{ id: 'm5', t: 'Leadership update', s: 16.5, e: 17, kind: 'ready' },
|
|
256
|
-
];
|
|
257
|
-
const hh = (x) => pad(Math.floor(x)) + ':' + pad(Math.round((x % 1) * 60));
|
|
258
|
-
const ev = (date, m) => ({ id: m.id + '@' + date, title: m.t, at: date + 'T' + hh(m.s) + ':00', end: date + 'T' + hh(m.e) + ':00', kind: m.kind, ...(m.att ? { attendees: m.att } : {}), ...(m.routine ? { mock_routine: true } : {}), ...(m.hot ? { mock_hot: true, mock_decide_by: m.decide_by } : {}) });
|
|
259
|
-
function eventsOn(date) {
|
|
260
|
-
const dow = new Date(utcOf(date)).getUTCDay();
|
|
261
|
-
if (date === TODAY) return MEET.map((m) => ev(date, m));
|
|
262
|
-
if (dow === 0 || dow === 6) return [];
|
|
263
|
-
const base = [{ id: 'm1', t: 'Standup', s: 9.5, e: 10, kind: 'ready', routine: true }];
|
|
264
|
-
if (dow === 1 || dow === 3) base.push({ id: 'm2', t: 'Checkout sync', s: 10.5, e: 11.25, kind: 'ready' });
|
|
265
|
-
if (dow === 2) base.push({ id: 'm3', t: 'Customer interview', s: 13, e: 14, kind: 'ready' });
|
|
266
|
-
if (dow === 5) base.push({ id: 'm5', t: 'Weekly status to leadership', s: 16, e: 16.5, kind: 'ready' });
|
|
267
|
-
return base.map((m) => ev(date, m));
|
|
268
|
-
}
|
|
269
|
-
function rangeOf(view, date) {
|
|
270
|
-
const [y, m, d] = ymd(date);
|
|
271
|
-
const iso = (t) => t.toISOString().slice(0, 10);
|
|
272
|
-
if (view === 'day') return { start: date, end: date, unit: 'day' };
|
|
273
|
-
if (view === 'week') { const o = (new Date(Date.UTC(y, m - 1, d)).getUTCDay() + 6) % 7; const s = addDays(date, -o); return { start: s, end: addDays(s, 6), unit: 'day' }; }
|
|
274
|
-
if (view === 'month') return { start: iso(new Date(Date.UTC(y, m - 1, 1))), end: iso(new Date(Date.UTC(y, m, 0))), unit: 'day' };
|
|
275
|
-
if (view === 'quarter') { const q0 = Math.floor((m - 1) / 3) * 3; return { start: iso(new Date(Date.UTC(y, q0, 1))), end: iso(new Date(Date.UTC(y, q0 + 3, 0))), unit: 'week' }; }
|
|
276
|
-
return { start: y + '-01-01', end: y + '-12-31', unit: 'month' };
|
|
277
|
-
}
|
|
278
|
-
const ROWS = [
|
|
279
|
-
{ id: 'checkout', pulse: { c: 'red', why: 'Forecast Oct 31 vs promised Oct 24 (+7 days)' }, title: 'Checkout v2', planned: { start: dOf(17), end: dOf(40) }, forecast: { start: dOf(17), end: dOf(47) }, promised: dOf(40), status: 'delayed', slip_days: 7, tolerance_days: 2 },
|
|
280
|
-
{ id: 'sso', pulse: { c: 'amber', why: '3 of 8 release checks open, 6 days to go' }, title: 'SSO', planned: { start: dOf(1), end: dOf(30) }, forecast: { start: dOf(1), end: dOf(30) }, promised: dOf(30), status: 'on time', slip_days: 0, tolerance_days: 2 },
|
|
281
|
-
{ id: 'search', pulse: { c: 'amber', why: 'EN-418 blocked on platform, no reply since Tue' }, title: 'Search relevance', planned: { start: dOf(6), end: dOf(46) }, forecast: { start: dOf(6), end: dOf(46) }, promised: dOf(46), status: 'at risk', slip_days: 0, tolerance_days: 2 },
|
|
282
|
-
{ id: 'returns', pulse: { c: 'green', why: 'Learning on schedule. Stop rule has a review date.' }, title: 'Returns experience', planned: { start: dOf(10), end: dOf(31) }, forecast: { start: dOf(10), end: dOf(31) }, promised: dOf(31), status: 'on time', slip_days: 0, tolerance_days: 2 },
|
|
283
|
-
{ id: 'onb', pulse: { c: 'park', why: 'No movement in 9 days. Stop rule found no signals. Continue or park?' }, title: 'Self-serve onboarding', planned: null, forecast: null, promised: null, status: 'no plan', slip_days: 0, tolerance_days: null },
|
|
284
|
-
];
|
|
285
|
-
const KRS = [
|
|
286
|
-
{ kr: 'Conversion', metric: 'Checkout conversion, %', expected: 3.75, actual: 3.1, shortfall: 0.17, early_warning: true },
|
|
287
|
-
{ kr: 'Retention, day 30', metric: 'Day-30 retention, %', expected: 42.9, actual: 41.5, shortfall: 0.1, early_warning: true },
|
|
288
|
-
{ kr: 'Enterprise design partners', metric: 'Partners live', expected: 3, actual: 3, shortfall: 0, early_warning: false },
|
|
289
|
-
{ kr: 'Returns discovery decided', metric: 'Interviews done, of 5', expected: 2.5, actual: 2, shortfall: 0.08, early_warning: false },
|
|
290
|
-
];
|
|
291
|
-
/* the mockup's dated events beyond today: promises, interviews, releases, reviews (its S.items, TIX and SIGS tables) */
|
|
292
|
-
const MILESTONES = [
|
|
293
|
-
['2026-10-09', 'Copy freeze (Lee)'], ['2026-10-09', 'Weekly status to leadership, 15:00'], ['2026-10-12', 'SSO freeze'], ['2026-10-12', 'Confirm the SSO date to Marta'], ['2026-10-13', 'Interview 5: park or continue Returns'],
|
|
294
|
-
['2026-10-14', 'SSO general release'], ['2026-10-15', 'Customer interview (accepted invite)'], ['2026-10-16', 'Next update to leadership'], ['2026-10-21', 'A11y audit slot, if scope is cut'], ['2026-10-24', 'Ship Checkout v2 (promised)'],
|
|
295
|
-
['2026-10-28', 'A11y audit slot, full scope'], ['2026-10-31', 'Checkout v2 forecast on the full scope'], ['2026-11-06', 'Search relevance beta'], ['2026-11-16', 'Q1 discovery plan'], ['2026-12-14', 'Board update review'], ['2026-12-20', 'Quarterly review, board update sends'],
|
|
296
|
-
];
|
|
297
|
-
const milestonesIn = (a, b) => MILESTONES.filter(([d]) => d >= a && d <= b).map(([d, t], i) => ({ id: 'ms-' + d + '-' + i, title: t, at: d + 'T10:00:00', end: d + 'T11:00:00', kind: 'milestone' }));
|
|
298
|
-
/* the mockup's STRAT (console3.html line 1677): the year pane (a row per pillar, a column per quarter) and the five-year pane (pillar by year) */
|
|
299
|
-
const MOCK_WEEK = [{ d: 'Thu 8', v: 3.8, lk: 3.3, mk: [] }, { d: 'Fri 9', v: 2.5, lk: 1, mk: [['copy', 'Copy freeze']] }, { d: 'Mon 12', v: 3, lk: 2, mk: [['promise', 'SSO date to Marta']] },
|
|
300
|
-
{ d: 'Tue 13', v: 2.5, lk: 2, mk: [['learn', 'Interview 5: review the stop rule']] }, { d: 'Wed 14', v: 2.5, lk: 2, mk: [['ship', 'SSO release']] }, { d: 'Thu 15', v: 1.5, lk: 1, mk: [] }, { d: 'Fri 16', v: 2.5, lk: 1, mk: [['report', 'Leadership weekly']] }];
|
|
301
|
-
const MOCK_YEAR = { quarters: ["Q4 '26", "Q1 '27", "Q2 '27", "Q3 '27"], pillars: [
|
|
302
|
-
{ n: 'Convert', icon: 'target', cells: [[['Checkout v2', 'bad'], ['Search relevance', 'warn']], [['Checkout v2.1: saved cards', null]], [['Wallet payments discovery', null]], [['Payment methods build', null]]] },
|
|
303
|
-
{ n: 'Retain', icon: 'repo', cells: [[['Returns discovery', 'ok']], [['Returns label printing', null]], [['Returns build', null]], [['Exchanges discovery', null]]] },
|
|
304
|
-
{ n: 'Onboard', icon: 'user', cells: [[['Continue or park?', 'park']], [['Onboarding discovery, if kept', null]], [['Guided setup build', null]], []] },
|
|
305
|
-
{ n: 'Enterprise', icon: 'shield', cells: [[['SSO release, SCIM', 'warn']], [['Audit logs discovery', null]], [['Audit logs build', null]], [['Roles', null]]] },
|
|
306
|
-
] };
|
|
307
|
-
const MOCK_FIVE = { years: ['Y1', 'Y2', 'Y3', 'Y4', 'Y5'], pillars: [
|
|
308
|
-
{ n: 'Convert', icon: 'target', cols: [['2', 'Checkout v2, Search relevance'], ['', 'Payment methods and wallets'], ['', 'One-page checkout in every channel'], ['', 'Checkout as an embeddable platform'], ['', 'Checkout that adapts to each shopper']] },
|
|
309
|
-
{ n: 'Retain', icon: 'repo', cols: [['1', 'Returns experience'], ['', 'Exchanges and store credit'], ['', 'A post-purchase hub'], ['', 'Returns prevention'], ['', 'Post-purchase that prevents returns']] },
|
|
310
|
-
{ n: 'Onboard', icon: 'user', cols: [['1', 'Self-serve onboarding'], ['', 'Guided setup for new merchants'], ['', 'Templates by industry'], ['', 'Zero-touch setup'], ['', 'Setup finished before the first call']] },
|
|
311
|
-
{ n: 'Enterprise', icon: 'shield', cols: [['1', 'SSO'], ['', 'Audit logs and roles'], ['', 'Multi-region'], ['', 'Compliance suite'], ['', 'An enterprise marketplace']] },
|
|
312
|
-
] };
|
|
313
|
-
export function calendarViews(url) {
|
|
314
|
-
const q = new URL(url, location.origin).searchParams;
|
|
315
|
-
const view = ['day', 'week', 'month', 'quarter', 'year'].includes(q.get('view')) ? q.get('view') : 'week';
|
|
316
|
-
const date = /^\d{4}-\d{2}-\d{2}$/.test(q.get('date') || '') ? q.get('date') : TODAY;
|
|
317
|
-
const r = rangeOf(view, date);
|
|
318
|
-
const cells = [];
|
|
319
|
-
const dayEvents = (d) => [...eventsOn(d), ...milestonesIn(d, d)].filter((e, i, a) => a.findIndex((x) => x.title === e.title && x.at === e.at) === i);
|
|
320
|
-
if (r.unit === 'day') for (let d = r.start; d <= r.end; d = addDays(d, 1)) cells.push({ key: d, start: d, end: d, events: dayEvents(d) });
|
|
321
|
-
else if (r.unit === 'week') {
|
|
322
|
-
const o = (new Date(utcOf(r.start)).getUTCDay() + 6) % 7;
|
|
323
|
-
for (let s = addDays(r.start, -o); s <= r.end; s = addDays(s, 7)) cells.push({ key: s, start: s, end: addDays(s, 6), events: [...(s <= TODAY && TODAY <= addDays(s, 6) ? MEET.map((m) => ev(TODAY, m)) : []), ...milestonesIn(s, addDays(s, 6))] });
|
|
324
|
-
} else {
|
|
325
|
-
const y = ymd(date)[0];
|
|
326
|
-
for (let m = 1; m <= 12; m++) { const s = y + '-' + pad(m) + '-01'; const e = new Date(Date.UTC(y, m, 0)).toISOString().slice(0, 10); cells.push({ key: y + '-' + pad(m), start: s, end: e, events: milestonesIn(s, e) }); }
|
|
327
|
-
}
|
|
328
|
-
const days = Math.round((utcOf(r.end) - utcOf(r.start)) / DAY) + 1;
|
|
329
|
-
const strat = view === 'quarter' || view === 'year' ? {
|
|
330
|
-
north_star: { progress: 0.62, scored: 4, total: 4, initiatives: { total: 5, done: 1 } },
|
|
331
|
-
deviations: KRS.filter((k) => k.actual != null), unscored: [],
|
|
332
|
-
pivot: { signal: false, reason: 'A pivot needs 3 checks behind the line and not closing. Conversion has fallen six weeks in a row: one more check behind the line makes it a signal.' }, reason: null,
|
|
333
|
-
} : null;
|
|
334
|
-
const day = view === 'day' && date === TODAY;
|
|
335
|
-
const scope = q.get('scope');
|
|
336
|
-
return { ok: true, view, range: { view, date, start: r.start, end: r.end, days }, unit: r.unit, cells, gantt: ROWS.map((g) => ({ ...g })), strategy: strat, events_source: 'calendar-memory', today: TODAY,
|
|
337
|
-
mock_marks: view === 'quarter' ? { dates: ['2026-12-10', '2026-12-20'], label: 'board review and update' } : undefined,
|
|
338
|
-
mock_week: view === 'week' ? MOCK_WEEK : undefined,
|
|
339
|
-
ribbon_heads: { week: { i: 'cal', h: 'Thu is the heaviest day: 3.8 h of meetings', s: '12 of 18 h are tied to a promise or a decision. The rest is routine.', ring: [12, 18] },
|
|
340
|
-
quarter: { i: 'init', h: '1 red, 2 amber, 1 green. Checkout v2 swings the quarter', s: 'Promised dates against forecast. Tap a row to open the initiative.', ring: [1, 4] },
|
|
341
|
-
year: { i: 'target', h: 'Enterprise carries the most bets in Q1 and Q2', s: 'Q4: 2 of 5 delivered. Tap a dot to open the initiative.', ring: [2, 5] },
|
|
342
|
-
five: { i: 'flag', h: 'Direction, not a plan', s: '12.4k to 120k weekly accounts by 2031. Detail fades after year one on purpose.', ring: [1, 5] } },
|
|
343
|
-
mock_year: view === 'year' ? MOCK_YEAR : undefined, mock_five: view === 'year' ? MOCK_FIVE : undefined,
|
|
344
|
-
span: day ? [8, 17.5] : null,
|
|
345
|
-
free_gaps: day ? [[11.25, 13, '1.8 h free'], [15, 16.5, '1.5 h free']] : null,
|
|
346
|
-
lens_head: day ? (scope === 'cal' ? { h: 'Sprint planning at 14:00 matters most', s: '5 meetings, 3.8 h. Best focus window: 1.8 h from 11:15.', ring: [0, 5] }
|
|
347
|
-
: { h: 'Sprint planning at 14:00 matters most', s: 'It cannot start until you decide. 3 of 5 meetings are prepped.', ring: [3, 5] }) : null,
|
|
348
|
-
selected: day ? { id: 'm4', title: 'Sprint planning', time: '14:00 to 15:00', text: 'Checkout v2: the sprint cannot start until scope is decided. The 24 Oct date depends on it.', status: 'Blocked on your decision', tone: 'bad', who: ['D', 'L', 'S'] } : null };
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/* ── work items: the PM's own work (initiative console3-work-page) and the four jobs ───────────────────────────────────────────────
|
|
352
|
-
* One home (PRD R9): the decisions and approvals the mockup listed in Work ("Approve pricing-page copy", "Say yes to Sam", the Review
|
|
353
|
-
* drafts, the scope decision) live in Briefing · Needs you and are not Work items. What is left is the PM's own to-do, with the console3
|
|
354
|
-
* feedback mockup's flavour: things done outside PMOS (talk to, call, set up a meeting), a "not before" date, a flag, a link to the
|
|
355
|
-
* team task an item advances, and one offline item with proof that it looks done. The answer is placed by work-place.js, the same rule
|
|
356
|
-
* the server applies, so the demo shows `work`, `review`, `focus` and `counts` in the real route's shape. */
|
|
357
|
-
|
|
358
|
-
const JOBS = [
|
|
359
|
-
{ id: 'j1', when: 'the scope is too big for the date', want: 'a decision fast and a clear plan', so: 'we ship on 24 Oct', mock_name: 'Hold the 24 Oct date' },
|
|
360
|
-
{ id: 'j2', when: 'leadership asks for numbers', want: 'one answer that is true', so: 'their picture stays accurate', mock_name: 'Keep leadership informed' },
|
|
361
|
-
{ id: 'j3', when: 'customers return items', want: 'to see where it hurts', so: 'we fix the right thing', mock_name: 'Learn why returns hurt' },
|
|
362
|
-
{ id: 'j4', when: 'I promise a customer a date', want: 'to keep it or tell them early', so: 'trust holds', mock_name: 'Keep customer promises' },
|
|
363
|
-
];
|
|
364
|
-
let seq = 0;
|
|
365
|
-
const it = (title, o) => ({ title, due: null, priority: null, waiting_on: null, job: null, id: 'item-demo' + String(++seq).padStart(3, '0'), source: 'local', created_at: '2026-10-08T05:00:00.000Z', touched_at: '2026-10-07T16:00:00.000Z', steps: [], ...(o || {}) });
|
|
366
|
-
const at = (d) => d + 'T09:00:00.000Z';
|
|
367
|
-
/* Today: overdue, due today and flagged */
|
|
368
|
-
const W_TIMELINE = it('Send the revised Checkout v2 timeline to Dara', { due: '2026-10-07', priority: 'P1', job: 'j1', mock_row: true, kind: 'do', mins: 10, src: 'Jira', init: 'Checkout v2', agent_move: true });
|
|
369
|
-
const W_QA = it('Talk to Dara about QA capacity for the beta', { kind: 'offline', person: 'Dara', due: TODAY, flagged: true, job: 'j1',
|
|
370
|
-
evidence: 'Dara wrote in #checkout at 07:40: "QA plan agreed, 2 testers from Monday".' });
|
|
371
|
-
const W_CALL = it('Call Priya about the Q4 budget variance', { kind: 'offline', person: 'Priya', due: '2026-10-06', not_yet_count: 1, job: 'j2', touched_at: at('2026-10-06') });
|
|
372
|
-
const W_RISK = it('Update the Checkout v2 risk log', { due: TODAY, priority: 'P2', job: 'j1' });
|
|
373
|
-
const W_PAGER = it('Prep the one-pager for the Search relevance review', { flagged: true, resolves: 'search-beta-pack', resolves_title: 'Search relevance beta: review pack' });
|
|
374
|
-
/* Upcoming: the next 7 days, then Later */
|
|
375
|
-
const W_SAM = it('Set up a meeting with Sam about the logging rollout', { kind: 'offline', person: 'Sam', due: '2026-10-09' });
|
|
376
|
-
const W_SSO = it('Confirm the SSO date to Marta', { due: '2026-10-12', priority: 'P2', job: 'j4' });
|
|
377
|
-
const W_NOTES = it('Write release notes for SSO 1.0', { defer: '2026-10-12', due: '2026-10-14', resolves: 'sso-ga-checklist', resolves_title: 'SSO general release checklist' });
|
|
378
|
-
const W_SALES = it('Share returns insights with sales', { due: '2026-10-13', job: 'j3' });
|
|
379
|
-
const W_TAGS = it('Ask Marta for the top ten support tags', { kind: 'offline', person: 'Marta', due: '2026-10-14', job: 'j3', resolves: 'returns-interview-5' });
|
|
380
|
-
const W_Q1 = it('Write the Q1 discovery plan', { due: '2026-11-16' });
|
|
381
|
-
/* Inbox: captured, no date yet */
|
|
382
|
-
const W_TEAR = it('Read the competitor pricing teardown', { created_at: '2026-10-07T15:20:00.000Z' });
|
|
383
|
-
const W_BOOK = it('Book five user interviews for returns discovery', { job: 'j3', created_at: '2026-10-06T10:00:00.000Z', touched_at: at('2026-10-06') });
|
|
384
|
-
const W_IDEA = it('Idea: weekly digest for partner admins', { created_at: '2026-09-24T11:00:00.000Z', touched_at: at('2026-09-24') });
|
|
385
|
-
/* Waiting and Someday */
|
|
386
|
-
const W_KEYS = it('Payments sandbox keys', { waiting_on: 'Dara', due: '2026-10-06', job: 'j1', priority: 'P2', touched_at: at('2026-10-06') });
|
|
387
|
-
const W_LABEL = it('Annual-plan label', { waiting_on: 'Lee', due: '2026-10-07', job: 'j1', priority: 'P3', touched_at: at('2026-09-29') });
|
|
388
|
-
const W_JIRA = it('Clean up the Checkout Jira labels', { parked: true, created_at: '2026-09-10T09:00:00.000Z', touched_at: at('2026-09-18') });
|
|
389
|
-
const W_NOMEET = it('Try a no-meeting Wednesday', { parked: true, touched_at: at('2026-10-02') });
|
|
390
|
-
/* done yesterday: counts in its job, and Work › Done lists it under Yesterday */
|
|
391
|
-
const W_PRD = it('Send revised PRD to Dara', { due: '2026-10-07', job: 'j1', done: true, done_at: '2026-10-07T17:10:00.000Z' });
|
|
392
|
-
const ITEMS = [W_TIMELINE, W_QA, W_CALL, W_RISK, W_PAGER, W_SAM, W_SSO, W_NOTES, W_SALES, W_TAGS, W_Q1, W_TEAR, W_BOOK, W_IDEA, W_KEYS, W_LABEL, W_JIRA, W_NOMEET, W_PRD];
|
|
393
|
-
/* Focus: up to three jobs for today, each with the reason (rules first: an overdue promise, an offline item due, a flag) */
|
|
394
|
-
const DAY_FOCUS = { suggestions: [
|
|
395
|
-
{ key: 'job:j1', title: 'Hold the 24 Oct date', why: 'An overdue promise: the revised timeline to Dara was due yesterday.', item_ids: [W_TIMELINE.id, W_QA.id, W_RISK.id], job: 'j1' },
|
|
396
|
-
{ key: 'item:' + W_CALL.id, title: 'Call Priya about the Q4 budget variance', why: 'Outside PMOS and 2 days overdue. You moved it once.', item_ids: [W_CALL.id], job: 'j2' },
|
|
397
|
-
{ key: 'item:' + W_PAGER.id, title: 'Prep the one-pager for the Search relevance review', why: 'You flagged it for today.', item_ids: [W_PAGER.id] },
|
|
398
|
-
], accepted: [] };
|
|
399
|
-
export function pmItems() {
|
|
400
|
-
const { work, review, counts } = buildWork(ITEMS, TODAY, 7);
|
|
401
|
-
const jobs = JOBS.map((j) => { const its = ITEMS.filter((i) => i.job === j.id); return { ...j, done: its.filter((i) => i.done).length, total: its.length }; });
|
|
402
|
-
/* the old five lists, kept for the readers that still use them (the shell's Work badge, the Calendar's dated tasks) */
|
|
403
|
-
const week = addDays(TODAY, 7);
|
|
404
|
-
const lists = { triage: work.inbox, today: work.today, week: work.upcoming.filter((i) => arrives(i, TODAY) <= week), waiting: work.waiting,
|
|
405
|
-
later: [...work.upcoming.filter((i) => arrives(i, TODAY) > week), ...work.someday] };
|
|
406
|
-
const due_today = [
|
|
407
|
-
{ id: 'i9', title: 'Payments sandbox keys', sub: 'asked Tue · Checkout v2', right: '2 d late', tone: 'bad' },
|
|
408
|
-
{ id: 'i2', title: 'Confirm the 1 Oct numbers before the 10:30 update', sub: '10:30 · Checkout v2', right: '2h 18m left', tone: 'warn', left: { text: '2h 18m left', pct: 0.3, tone: 'warn' } },
|
|
409
|
-
{ id: 'i1', title: 'Cut Checkout v2 to 3 core flows to hold 24 Oct?', sub: '14:00 · Checkout v2', right: 'At risk', tone: 'warn', left: { text: '5h 48m left', pct: 0.36, tone: 'acc' } },
|
|
410
|
-
{ id: 'i6', title: 'Review the 13:00 interview guide', sub: '13:00 · Returns experience', right: '4h 48m left', tone: 'warn', left: { text: '4h 48m left', pct: 0.55, tone: 'acc' } },
|
|
411
|
-
];
|
|
412
|
-
return { ok: true, today: TODAY, lists, work, review, review_days: 7, focus: DAY_FOCUS, counts, jobs, items: ITEMS, due_today };
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/* ── initiatives (the roadmap rows the Initiatives tab reads), forecast, releases ──────────────────────────────────────────────── */
|
|
416
|
-
|
|
417
|
-
const NINE = ['discover', 'ideate', 'strategize', 'prioritize', 'plan', 'build', 'deliver', 'monitor', 'evaluate'];
|
|
418
|
-
const NL = { discover: 'Discover', ideate: 'Ideate', strategize: 'Strategize', prioritize: 'Prioritize', plan: 'Plan', build: 'Build', deliver: 'Deliver', monitor: 'Monitor', evaluate: 'Evaluate' };
|
|
419
|
-
function nine(cur, done, skip) { return NINE.map((k) => ({ key: k, label: NL[k], status: skip.includes(k) ? 'skipped' : k === cur ? 'current' : done.includes(k) ? 'done' : NINE.indexOf(k) > NINE.indexOf(cur) ? 'pending' : 'no-signal' })); }
|
|
420
|
-
const row = (id, title, lane, anchor, horizon, stageId, curStage, doneS, skip, health, pr) => ({ id, title, lane, anchor, anchor_kind: anchor.startsWith('health') ? 'health' : 'kr', horizon, rank: 0, confirmed: true, dormant: false, check_by: null,
|
|
421
|
-
stage: { id: stageId, label: stageId }, display: { word: curStage, stage: stageId, waitingOn: null, act: null, idleDays: 0, line2: '' }, health: { level: health, reasons: [] }, progress: { done: pr[0], total: pr[1], label: pr[0] + ' of ' + pr[1] },
|
|
422
|
-
next_due: null, last_activity: '2026-10-07T16:00:00.000Z', nine_stages: nine(curStage, doneS, skip) });
|
|
423
|
-
const ROADMAP = [
|
|
424
|
-
row('checkout', 'Checkout v2', 'feature', 'KR1', 'now', 'build', 'build', ['discover', 'ideate', 'strategize', 'prioritize', 'plan'], [], 'at-risk', [1, 7]),
|
|
425
|
-
row('sso', 'SSO', 'feature', 'KR3', 'now', 'handoff', 'deliver', ['discover', 'ideate', 'strategize', 'prioritize', 'plan', 'build'], [], 'on', [3, 8]),
|
|
426
|
-
row('search', 'Search relevance', 'feature', 'health:search', 'now', 'build', 'monitor', ['discover', 'ideate', 'strategize', 'prioritize', 'plan', 'build', 'deliver'], [], 'at-risk', [3, 8]),
|
|
427
|
-
row('returns', 'Returns experience', 'discovery', 'KR2', 'now', 'intake', 'discover', [], ['plan', 'build', 'deliver', 'monitor'], 'on', [2, 5]),
|
|
428
|
-
row('onb', 'Self-serve onboarding', 'discovery', 'KR2', 'later', 'intake', 'discover', [], ['plan', 'build', 'deliver', 'monitor'], 'at-risk', [0, 1]),
|
|
429
|
-
];
|
|
430
|
-
/* the mockup's north star (NSA, nsPlan, nsProj), early signals (SIGS) and maturity table (MATP): the Strategize lens of Lifecycle */
|
|
431
|
-
const NSA = [9.4, 9.8, 10.2, 10.5, 10.9, 11.2, 11.5, 11.7, 11.9, 12.1, 12.15, 12.28, 12.4];
|
|
432
|
-
const nsPlan = (i) => (i <= 12 ? 9.4 + (12.9 - 9.4) * (i / 12) : 12.9 + (18 - 12.9) * ((i - 12) / 11));
|
|
433
|
-
const nsSlope = (NSA[12] - NSA[9]) / 3;
|
|
434
|
-
const nsProj = (i) => NSA[12] + nsSlope * (i - 12);
|
|
435
|
-
const nsCross = (f) => { for (let i = 13; i <= 23; i++) if (nsProj(i) < nsPlan(i) * f) return i; return -1; };
|
|
436
|
-
const MNS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
437
|
-
const mlab = (i) => MNS[(i + 9) % 12] + ' \'' + (25 + Math.floor((i + 9) / 12));
|
|
438
|
-
function strategy() {
|
|
439
|
-
const plan = []; const proj = []; for (let i = 0; i <= 23; i++) { plan[i] = nsPlan(i); proj[i] = nsProj(i); }
|
|
440
|
-
const months = []; for (let i = 6; i <= 23; i += 3) months.push([i, mlab(i)]);
|
|
441
|
-
return {
|
|
442
|
-
head: { h: 'North star 4% behind plan, gap widening', s: 'Leaves tolerance in ' + mlab(nsCross(0.92)) + '. Two of four pillars on course for September.', ring: [2, 4] },
|
|
443
|
-
north: { i0: 6, i1: 23, now: 12, min: 8, max: 19, ticks: [10, 14, 18], actual: NSA, plan, proj, leaves: nsCross(0.92), pivot: nsCross(0.85), months, sub: '4% against plan today' },
|
|
444
|
-
signals: [
|
|
445
|
-
{ sev: 'drift', t: 'Conversion has fallen six weeks in a row', ev: '3.5% to 3.1%. The address step loses 45% of carts.', thr: 'Below 3.0% for 2 weeks: pivot the checkout bet', ttt: 'about 2 weeks', sp: [3.5, 3.4, 3.4, 3.3, 3.3, 3.2, 3.1] },
|
|
446
|
-
{ sev: 'drift', t: 'Retention is flat while the top pain is returns', ev: 'Day 30 at 41.5% against 45%. 3 of 3 calls name label printing.', thr: 'No lift after interview 5: pull Returns forward', ttt: '5 days', sp: [41, 41.2, 41.4, 41.3, 41.5, 41.4, 41.5] },
|
|
447
|
-
{ sev: 'drift', t: 'Checkout v2 critical path is 7 days late', ev: 'Sandbox keys and the a11y slot move the ship date from 24 to 31 Oct.', thr: 'More than 5 days late: warn leadership', ttt: 'tripped', sp: [0, 0, 2, 4, 7, 7] },
|
|
448
|
-
{ sev: 'watch', t: 'Scope keeps changing on Checkout v2', ev: 'Scope changed 3 times in 4 weeks.', thr: 'A fourth change: re-baseline the plan', ttt: 'next change', sp: [1, 1, 2, 2, 3, 3, 3] },
|
|
449
|
-
{ sev: 'up', t: 'Enterprise pull is stronger than planned', ev: '3 design partners live. 2 more asked for SCIM early.', thr: '5 partners by Dec: make Enterprise a Q1 bet', ttt: 'on course', sp: [0, 0, 1, 1, 2, 3, 3] },
|
|
450
|
-
],
|
|
451
|
-
maturity: { stages: ['Discover', 'Prove', 'Repeat', 'Scale', 'Lead'], pillars: [
|
|
452
|
-
{ n: 'Convert', now: 2, tgt: 4, proj: 3, ev: '3 of 7 criteria met', nx: 'Conversion at 3.8% or more for 4 weeks' }, { n: 'Retain', now: 2, tgt: 3, proj: 3, ev: '2 of 6 criteria met', nx: 'Returns contact rate at 0.5' },
|
|
453
|
-
{ n: 'Onboard', now: 1, tgt: 2, proj: 1, ev: '0 of 5 criteria met', nx: 'a revived onboarding bet' }, { n: 'Enterprise', now: 2, tgt: 3, proj: 3, ev: '4 of 6 criteria met', nx: '5 design partners live' }] },
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
export function roadmap(ws) {
|
|
457
|
-
return { ok: true, ws, view: 'roadmap', sig: { placements: 'none', items: 'none', measurements: 'none', records: 'demo' }, now: NOW_ISO + 'Z', rules: { stall_days: 5, dormant_days: 45, report_cycle_days: 14, now_cap: null },
|
|
458
|
-
header: { now: { count: 4, kr: 4, health: 0, cap: null }, next: { count: 0 }, later: { count: 1, dormant: 0 } }, horizons: { now: ROADMAP.filter((r) => r.horizon === 'now'), next: [], later: ROADMAP.filter((r) => r.horizon === 'later') },
|
|
459
|
-
dormant: [], proposals: [], flags: [], scan: null, unrecorded: [], strategy: strategy() };
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/* the mockup's TIX, by initiative: start and end are day numbers (14 Sep = 0). */
|
|
463
|
-
const TIX = [
|
|
464
|
-
['CHK-139', 'Pricing page copy', 'checkout', 'done', 1, 7, []], ['CHK-141', 'Payments sandbox keys', 'checkout', 'doing', 3, 10, [], 2], ['CHK-142', 'Saved-card removal', 'checkout', 'todo', 11, 17, ['CHK-141']],
|
|
465
|
-
['CHK-143', 'Address autocomplete', 'checkout', 'todo', 11, 20, ['CHK-141']], ['CHK-144', 'A11y audit slot', 'checkout', 'todo', 21, 24, ['CHK-142'], 0, 28], ['CHK-145', 'Ship Checkout v2', 'checkout', 'todo', 24, 24, ['CHK-144', 'CHK-143'], 0, 0, true],
|
|
466
|
-
['EN-418', 'Index job fix', 'search', 'doing', 2, 12, [], 3], ['EN-421', 'Ranking weights v2', 'search', 'todo', 13, 24, ['EN-418']], ['EN-425', 'Relevance beta', 'search', 'todo', 25, 30, ['EN-421'], 0, 0, true],
|
|
467
|
-
['RET-11', 'Interview 3', 'returns', 'doing', 8, 8, []], ['RET-12', 'Interview 4 slot', 'returns', 'todo', 9, 12, []], ['RET-13', 'Interview 5', 'returns', 'todo', 13, 13, ['RET-12']], ['RET-14', 'Synthesis and stop rule', 'returns', 'todo', 14, 15, ['RET-13'], 0, 0, true],
|
|
468
|
-
['SSO-32', 'Beta feedback round', 'sso', 'done', 1, 6, []], ['SSO-31', 'SCIM docs', 'sso', 'doing', 3, 12, []], ['SSO-33', 'Confirm date to Marta', 'sso', 'todo', 12, 12, []], ['SSO-34', 'SSO general release', 'sso', 'todo', 14, 14, ['SSO-31', 'SSO-33'], 0, 0, true],
|
|
469
|
-
['ONB-2', 'Continue or park decision', 'onb', 'todo', 8, 12, []],
|
|
470
|
-
];
|
|
471
|
-
const TD = 24;
|
|
472
|
-
export function forecast(initiative) {
|
|
473
|
-
const rows = TIX.filter((t) => t[2] === initiative);
|
|
474
|
-
const P = {};
|
|
475
|
-
const items = rows.map(([k, title, , state, s, e, dep, slip, slot, ms]) => {
|
|
476
|
-
let fs = s; let fe = e; let dm = -1; let st;
|
|
477
|
-
if (state === 'done') { P[k] = { fe: e }; st = 'on time'; fs = s; fe = e; }
|
|
478
|
-
else {
|
|
479
|
-
dep.forEach((d) => { if (P[d]) dm = Math.max(dm, P[d].fe); });
|
|
480
|
-
const dur = e - s;
|
|
481
|
-
if (slot) fs = Math.max(fs, slot);
|
|
482
|
-
if (dm >= 0 && !ms) fs = Math.max(fs, dm + 1);
|
|
483
|
-
fe = ms ? Math.max(e, dm) : fs + dur + (slip || 0);
|
|
484
|
-
P[k] = { fe };
|
|
485
|
-
st = fe > e ? (e < TD ? 'overdue' : 'delayed') : 'on time';
|
|
486
|
-
}
|
|
487
|
-
return { id: k, title, state, start: dOf(s), due: dOf(e), after: dep, forecast: { start: dOf(fs), end: dOf(fe), status: st, slip_days: Math.max(0, fe - e) } };
|
|
488
|
-
});
|
|
489
|
-
const crit = initiative === 'checkout' ? ['CHK-141', 'CHK-142', 'CHK-144', 'CHK-145'] : [];
|
|
490
|
-
const cap = initiative === 'checkout' ? {
|
|
491
|
-
weeks: ['2026-10-05', '2026-10-12'],
|
|
492
|
-
people: [{ id: 'Dara', points_per_week: 8, weeks: [{ week: '2026-10-05', load: 7, over: false }, { week: '2026-10-12', load: 11, over: true }] },
|
|
493
|
-
{ id: 'Lee', points_per_week: 10, weeks: [{ week: '2026-10-05', load: 4, over: false }, { week: '2026-10-12', load: 8, over: false }] },
|
|
494
|
-
{ id: 'Wawan', points_per_week: 8, weeks: [{ week: '2026-10-05', load: 3, over: false }, { week: '2026-10-12', load: 5, over: false }] }], over: ['Dara'] } : { weeks: ['2026-10-05', '2026-10-12'], people: [], over: [] };
|
|
495
|
-
const prop = initiative === 'checkout' ? { proposal: true, applied: false, moves: [{ item: 'CHK-143', points: 3, from: 'Dara', to: 'Sam', week: '2026-10-12', reason: 'Dara is 3 points over capacity that week' }] } : { proposal: true, applied: false, moves: [] };
|
|
496
|
-
return { ok: true, mock_status_w: 124, initiative, today: TODAY, items, critical: crit, critical_days: crit.length ? 21 : 0, problems: [], capacity: cap, proposal: prop };
|
|
497
|
-
}
|
|
498
|
-
export function forecastAt(initiative, date) {
|
|
499
|
-
const f = forecast(initiative);
|
|
500
|
-
return { ok: true, initiative, date, items: f.items.filter((i) => i.start <= date || date >= addDays(TODAY, -14)).map((i) => ({ id: i.id, title: i.title, state: i.state, due: i.due })) };
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
export function releases() {
|
|
504
|
-
return { ok: true, board: { name: 'Checkout board' }, releases: [
|
|
505
|
-
{ id: 'rel-sso-14oct', type: 'both', initiative_ids: ['sso'], deploy_at: '2026-10-14T09:00:00Z', release_at: '2026-10-14T12:00:00Z', accepted_at: null, tags: { detected: ['SSO-1.0'], reason: null }, gapFlags: [{ flag: 'initiative_ticket_without_tag', ticket: 'SSO-33' }],
|
|
506
|
-
summary: [{ text: 'SSO beta live with 3 customers, 0 incidents in 7 days', source: 'fact' }, { text: 'SCIM follows in November (EN-412)', source: 'EN-412' }] },
|
|
507
|
-
{ id: 'rel-checkout-24oct', type: 'deploy', initiative_ids: ['checkout'], deploy_at: '2026-10-24T09:00:00Z', release_at: '2026-10-24T12:00:00Z', accepted_at: null, tags: { detected: [], reason: 'no Jira tag yet' }, gapFlags: [], summary: [] },
|
|
508
|
-
] };
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/* ── reports ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
512
|
-
|
|
513
|
-
export const reportFamilies = () => JSON.parse("{\"ok\":true,\"families\":[{\"id\":\"project\",\"name\":\"Project\",\"intent\":\"Decide and unblock\",\"purpose\":\"Will we hit the date, what blocks us, what do you need to decide\",\"cadence\":\"Weekly and on change\",\"variants\":[{\"id\":\"leadership\",\"name\":\"Leadership\",\"audience\":\"Leadership\",\"gate\":\"block\"},{\"id\":\"engineering\",\"name\":\"Engineering\",\"audience\":\"Engineering\",\"gate\":\"warn\"},{\"id\":\"customer-success\",\"name\":\"Customer success\",\"audience\":\"Customer success\",\"gate\":\"strict\",\"external\":true}],\"sections\":[\"headline\",\"progress\",\"risks\",\"decisions_needed\",\"blockers\",\"asks\"]},{\"id\":\"product\",\"name\":\"Product\",\"intent\":\"Align and invest\",\"purpose\":\"Align the audience on outcomes and where to invest.\",\"cadence\":\"per planning cycle\",\"variants\":[{\"id\":\"executives\",\"name\":\"Executives\",\"audience\":\"Executives\",\"gate\":\"block\"},{\"id\":\"product-council\",\"name\":\"Product council\",\"audience\":\"Product council\",\"gate\":\"block\"},{\"id\":\"team\",\"name\":\"Team\",\"audience\":\"Team\",\"gate\":\"warn\"}],\"sections\":[\"outcomes\",\"bets\",\"tradeoffs\",\"investment_asks\"]},{\"id\":\"communications\",\"name\":\"Communications\",\"intent\":\"Inform, enable, ask\",\"purpose\":\"Tell people what they need, give them what they need to act, and ask.\",\"cadence\":\"on demand\",\"variants\":[{\"id\":\"message-queue\",\"name\":\"Message queue\",\"audience\":\"Per message\",\"gate\":\"warn\"},{\"id\":\"who-holds-what\",\"name\":\"Who holds what\",\"audience\":\"PM\",\"gate\":\"warn\"},{\"id\":\"external\",\"name\":\"External message\",\"audience\":\"External\",\"gate\":\"strict\",\"external\":true,\"needs_approval\":true}],\"sections\":[\"message_queue\",\"who_holds_what\",\"asks\"],\"needs_approval_external\":true},{\"id\":\"periodic\",\"name\":\"Periodic\",\"intent\":\"Rhythm\",\"purpose\":\"Keep a steady rhythm; one template, with the change since last time.\",\"cadence\":\"weekly, monthly, quarterly, per retro\",\"variants\":[{\"id\":\"weekly-digest\",\"name\":\"Weekly digest\",\"audience\":\"Team\",\"gate\":\"warn\",\"cadence\":\"weekly\"},{\"id\":\"monthly-review\",\"name\":\"Monthly review\",\"audience\":\"Leadership\",\"gate\":\"block\",\"cadence\":\"monthly\"},{\"id\":\"quarterly-board-update\",\"name\":\"Quarterly board update\",\"audience\":\"Board\",\"gate\":\"block\",\"cadence\":\"quarterly\"},{\"id\":\"retro\",\"name\":\"Retro\",\"audience\":\"Team\",\"gate\":\"warn\",\"cadence\":\"per retro\"}],\"sections\":[\"since_last_time\",\"highlights\",\"metrics\",\"next\"],\"template\":\"same template; change since last time\"}],\"labels\":[\"fact\",\"cited\",\"reported\",\"estimate\",\"assumption\",\"judgement\"],\"required\":{\"fact\":[\"source\"],\"cited\":[\"source\"],\"reported\":[\"by\",\"at\"],\"estimate\":[\"method\",\"range\"],\"assumption\":[\"owner\",\"falsifier\",\"review_by\"],\"judgement\":[\"by\"]}}");
|
|
514
|
-
const claim = (text, basis, source, ok = true) => ({ text, basis, source, ok });
|
|
515
|
-
export function reportFacts() {
|
|
516
|
-
const sec = (name, title, claims) => ({ name, title, claims });
|
|
517
|
-
return { ok: true, facts: {
|
|
518
|
-
project: [sec('headline', 'Headline', [claim('Forecast 31 Oct against 24 Oct promised', 'fact', 'Jira field')]), sec('progress', 'Progress', [claim('SSO beta live with 3 customers', 'fact', 'Jira')]),
|
|
519
|
-
sec('risks', 'Risks', [claim('Payments sandbox keys are 2 days late', 'fact', 'Jira')]), sec('decisions_needed', 'Decisions needed', [claim('Cut to 3 flows to hold 24 Oct', 'estimate', 'Dara, 3 to 6 days', false)]),
|
|
520
|
-
sec('blockers', 'Blockers', [claim('Accessibility audit slot not before 28 Oct', 'fact', 'Calendar')]), sec('asks', 'Asks', [claim('Priya approves one engineer if scope is kept', 'assumption', 'owner Wawan', false)])],
|
|
521
|
-
product: [sec('outcomes', 'Outcomes', [claim('North star is 4% behind plan and the gap is widening', 'fact', 'analytics')]), sec('bets', 'Bets', [claim('6 bets across 4 pillars, 2 at risk', 'fact', 'Jira')]),
|
|
522
|
-
sec('tradeoffs', 'Trade-offs', [claim('Q4 demand is 54 person-weeks against 48 of capacity', 'estimate', 'plan, 8 to 12 weeks', false)]), sec('investment_asks', 'Investment asks', [claim('Shift 10 points of capacity from Convert to Onboard', 'assumption', 'owner Wawan', false)])],
|
|
523
|
-
communications: [sec('message_queue', 'Message queue', [claim('Reply to Marta: SSO 14 Oct, SCIM in Nov', 'fact', 'Jira field')]), sec('who_holds_what', 'Who holds what', [claim('Priya holds Ship 24 Oct, on track (now outdated)', 'fact', 'Slack, 2 Oct')]),
|
|
524
|
-
sec('asks', 'Asks', [claim('Dara: sandbox keys by Friday', 'fact', 'Jira')])],
|
|
525
|
-
periodic: [sec('since_last_time', 'Since last time', [claim('SSO beta live with 3 customers', 'fact', 'Jira')]), sec('highlights', 'Highlights', [claim('Search is 28% faster', 'fact', 'analytics')]), sec('metrics', 'Metrics', [claim('Conversion 3.1% against 4.0% target', 'fact', 'analytics')]), sec('next', 'Next', [claim('Interview 5 on 13 Oct decides park or continue', 'fact', 'Calendar')])],
|
|
526
|
-
truthTable: [{ person: 'Priya', claims: [{ id: 'tt1', text: 'Ship 24 Oct, on track', state: 'stale' }] }, { person: 'Marta', claims: [{ id: 'tt2', text: 'SSO 14 Oct', state: 'true' }] }, { person: 'Lee', claims: [{ id: 'tt3', text: 'Copy freeze 9 Oct', state: 'true' }] }, { person: 'Dara', claims: [{ id: 'tt4', text: 'Ship 24 Oct', state: 'contradicted' }] }],
|
|
527
|
-
heads: { project: { h: 'Checkout v2 status for Leadership: 0 of 6 sections approved', s: 'Will we hit the date, what blocks us, what do you need to decide.', ring: [0, 6] } },
|
|
528
|
-
audience: { project: 'Sponsors and the delivery team' },
|
|
529
|
-
reports: [{ id: 'pj1', title: 'Checkout v2 status', due: 'Fri 9 Oct, 15:00' }, { id: 'pj2', title: 'SSO beta status', due: 'Fri 9 Oct, 15:00' }, { id: 'pj3', title: 'Search relevance status', due: 'Fri 9 Oct, 15:00' }],
|
|
530
|
-
badges: { communications: 6 },
|
|
531
|
-
doc: { title: 'Checkout v2 status', aud: 'Leadership', send: '0 of 6 approved. Slide to send, or swipe sections first.', rows: [
|
|
532
|
-
{ id: 'a', h: 'Bottom line', t: 'Checkout v2 will ship 31 Oct, 7 days after the promised 24 Oct, unless scope is cut to 3 flows today.', by: 'Agent', st: 'ok' },
|
|
533
|
-
{ id: 'b', h: 'Status against the promise', t: 'Red. Promised 24 Oct, forecast 31 Oct. The cause is scope, not capacity: 33 points became 46 in three additions.', by: 'Agent', st: 'ok' },
|
|
534
|
-
{ id: 'c', h: 'What changed since last report', t: 'The a11y audit slot moved from 23 to 28 Oct. Saved-card removal and the audit were added by the agent after review gates and accepted by you.', by: 'Agent', st: 'ok' },
|
|
535
|
-
{ id: 'd', h: 'Top risks', t: 'Vendor sandbox keys are 2 days late with no reply. The audit vendor has no slot before 28 Oct.', by: 'Agent', st: 'ok' },
|
|
536
|
-
{ id: 'e', h: 'Decision we need', t: 'Cut to 3 flows, which holds 24 Oct and is recommended, or accept 31 Oct. Needed by 14:00 today.', by: 'You', st: 'check' },
|
|
537
|
-
{ id: 'f', h: 'Confidence', t: 'Medium, 78%. The vendor may deliver the keys sooner. If they do not reply by Friday the date moves again.', by: 'Agent', st: 'check' }] },
|
|
538
|
-
sent: [['Fri 2 Oct', 'Checkout v2 status', 'Leadership', 'opened by 5 of 6', 'Said: ship 24 Oct, on track'], ['Fri 2 Oct', 'SSO beta status', 'Customer success', 'opened by 3 of 3', '']],
|
|
539
|
-
forecast_history: { title: 'Checkout v2', promised: 24, points: [['14 Sep', 24], ['25 Sep', 24], ['30 Sep', 26], ['5 Oct', 28], ['8 Oct', 31]] } } };
|
|
540
|
-
}
|
|
541
|
-
export function reportCheck(body) {
|
|
542
|
-
const names = (body.sections || []).map((s) => s.name);
|
|
543
|
-
const need = new Set(['decisions_needed', 'asks']);
|
|
544
|
-
return { ok: true, gate: 'block', reasons: [], warnings: ['2 sections need your input before this can go out.'], sections: names.map((n) => ({ name: n, traced: need.has(n) ? 0 : 1, stale_source: 0, needs_input: need.has(n) ? 1 : 0 })) };
|
|
545
|
-
}
|
|
546
|
-
export function outbox() {
|
|
547
|
-
const e = (id, recipient, channel, origin, body, ok) => ({ id, recipient, channel, origin, state: 'drafted', body, hash: 'a1b2c3d4e5f6a7b8c9d0' + id, claims: { ok, refused: ok ? [] : ['SSO is on track'] }, last_result: null });
|
|
548
|
-
return { ok: true, channels: ['jira-write', 'calendar-hold', 'customer-note'], entries: [
|
|
549
|
-
e('ob1', 'Marta', 'customer-note', 'agent', 'Hi Marta, SSO is on track for 14 Oct [fact]. SCIM follows in November (EN-412).', true),
|
|
550
|
-
e('ob2', 'Priya', 'jira-write', 'agent', 'Weekly status: SSO is on track', false),
|
|
551
|
-
] };
|
|
552
|
-
}
|