create-pmos 0.399.0 → 0.400.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 +18 -13
- 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 +2 -2
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-test.js +3 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +17 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +20 -2
- 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/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 +2 -2
- 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 +20 -5
- package/workspace/public/pm/cozy-today.css +5 -2
- 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 +47 -26
- package/workspace/public/pm/home-chat.js +10 -4
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +12 -2
- package/workspace/public/pm/home-list.js +20 -7
- 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 +10 -6
- package/workspace/public/pm/home-work.js +15 -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/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 +3 -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,203 +0,0 @@
|
|
|
1
|
-
/* pm/registry.js — where the planning layer's page modules plug into the shell (pm-os-absorb Runs 2 to 5).
|
|
2
|
-
*
|
|
3
|
-
* Four runs add screens at once. If each one edited app.js, panel-cockpit.js, view-today.js and panel-tabs.js, every
|
|
4
|
-
* merge would collide on the same lines. So the shell reads this registry once, in a few hook lines, and each run adds
|
|
5
|
-
* its own module files.
|
|
6
|
-
*
|
|
7
|
-
* ── DESTINATIONS: the four places of PRD R9, plus ⚙ ─────────────────────────────────────────────────────────────────
|
|
8
|
-
* Listed below before their modules exist. Run 3 (slice 3A) builds the frame that shows them as top-level places. Until
|
|
9
|
-
* that frame is the default, each one opens as a tab in panel 4 (kind 'dest', its id in the tab's `view` field), from
|
|
10
|
-
* ⌘K or from `window.pmApp.open(id)`. Wherever it is drawn, its host carries data-dest="<id>" (mountDestTab sets it; the
|
|
11
|
-
* frame mounts through mountDestTab too). A DESTINATION MODULE exports:
|
|
12
|
-
* mountDestination(host, ctx) called on EVERY render with the same host element. Idempotent: keep one persistent
|
|
13
|
-
* root per host, rebuild only when its own data changed, never while a drag is live.
|
|
14
|
-
* disposeDestination(host) optional; the tab closed or the frame let go of the host.
|
|
15
|
-
* ctx = { state, setState, FIXTURE, tab, openInitiative }
|
|
16
|
-
*
|
|
17
|
-
* ── EXTENSIONS: modules that only register ──────────────────────────────────────────────────────────────────────────
|
|
18
|
-
* Loaded at boot with the destinations, so a view or a Today source is in place before its host renders.
|
|
19
|
-
*
|
|
20
|
-
* ── THE REGISTRIES (call these from your own module, at import time) ─────────────────────────────────────────────────
|
|
21
|
-
* registerTodaySource({ id, kind, rank, cards(ctx) → Element[], count(ctx) → number })
|
|
22
|
-
* kind is the R12 card kind (1 to 8); rank orders sources inside Today (lower first). ctx = { all, repos,
|
|
23
|
-
* setState, open(repo, slug) }. count must equal cards().length for the same ctx: the nav badge and Today's
|
|
24
|
-
* header add the counts, and they must agree (Run 1 finding F8).
|
|
25
|
-
* registerTodayCard(rowKind, render(row, ctx) → Element)
|
|
26
|
-
* how ONE needs-row kind of a server provider (lib/needs-providers.js) is drawn on Today. The rows themselves come
|
|
27
|
-
* from /api/needs through provider-cards.js, the one Today source for every provider row, so the count is the
|
|
28
|
-
* server's row count and a run never counts its rows twice. A kind with no renderer is drawn from its `today`
|
|
29
|
-
* payload (cause, evidence, act). Use registerTodaySource only for a card the page computes itself.
|
|
30
|
-
* registerCommand({ id, label, hint, cli, run(), when() }) a ⌘K row; `cli` is the same act's CLI form (R11)
|
|
31
|
-
* registerBreakdownView(id, { label, mount(host, ctx), dispose(host) }) a Breakdown view next to Tree and Board
|
|
32
|
-
* registerInitiativesView(id, { label, mount(host, ctx), dispose(host) }) a view in Initiatives (Roadmap, List, …)
|
|
33
|
-
* ctx is ALWAYS initiativesViewCtx(…): { repo, ws, rows, sig, openInitiative, setState } — rows = the roadmap.json
|
|
34
|
-
* horizons rows (fixtures/initiatives-api/roadmap.json), sig = that GET's sig. 2D builds it; 4C reads it.
|
|
35
|
-
* setInitiativeOpener(fn) Run 2 points openInitiative at the initiative sheet; nobody else calls it
|
|
36
|
-
* openInitiative(repo, slug) the one way to open an initiative from any module
|
|
37
|
-
* An id registered twice keeps the first and logs an error: two runs must not claim one id.
|
|
38
|
-
*
|
|
39
|
-
* Fixture mode (the parity boards) loads nothing and registers nothing, so the prototype renders are unchanged.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
import { state, setState, FIXTURE } from './state.js';
|
|
43
|
-
import { pmGet } from './http.js';
|
|
44
|
-
import { empty, ensureComponentsCss } from './primitives.js';
|
|
45
|
-
|
|
46
|
-
export const DESTINATIONS = Object.freeze([
|
|
47
|
-
Object.freeze({ id: 'today', label: 'Agenda', key: 'g t', module: 'dest-today.js', run: 3 }),
|
|
48
|
-
// Not a pm-os-absorb run (run: null): initiative my-work added it — the work assigned to the PM, ranked and briefed.
|
|
49
|
-
Object.freeze({ id: 'mywork', label: 'My work', key: 'g w', module: 'dest-mywork.js', run: null }),
|
|
50
|
-
Object.freeze({ id: 'initiatives', label: 'Initiatives', key: 'g i', module: 'dest-initiatives.js', run: 2 }),
|
|
51
|
-
Object.freeze({ id: 'board', label: 'Board', key: 'g b', module: 'dest-board.js', run: 4 }),
|
|
52
|
-
Object.freeze({ id: 'reports', label: 'Reports', key: 'g r', module: 'dest-reports.js', run: 5 }),
|
|
53
|
-
// Not a pm-os-absorb run (run: null): docs-three-way-sync added it — is each linked document the same as its copies.
|
|
54
|
-
Object.freeze({ id: 'docs', label: 'Docs', key: 'g d', module: 'dest-docs.js', run: null }),
|
|
55
|
-
// Not a pm-os-absorb run (run: null): people-directory added it — the people the PM works with in a repository.
|
|
56
|
-
// Not a pm-os-absorb run (run: null): meeting-notes Run 12 added it — every meeting note by initiative, and the note.
|
|
57
|
-
Object.freeze({ id: 'notes', label: 'Notes', key: 'g n', module: 'dest-notes.js', run: null }),
|
|
58
|
-
Object.freeze({ id: 'people', label: 'People', key: 'g p', module: 'dest-people.js', run: null }),
|
|
59
|
-
Object.freeze({ id: 'settings', label: 'Settings', key: null, module: 'dest-settings.js', run: 3 }),
|
|
60
|
-
]);
|
|
61
|
-
export const EXTENSIONS = Object.freeze([
|
|
62
|
-
'provider-cards.js', // the base: every needs provider's rows as Today cards (Run 3, 3B, owns it after)
|
|
63
|
-
'bd-timeline.js', // Run 4 (4B): Breakdown › Timeline
|
|
64
|
-
'initiatives-timeline.js', // Run 4 (4C): Initiatives › Timeline
|
|
65
|
-
'my-work-card.js', // initiative my-work: Agenda's one card for the items that need a brief
|
|
66
|
-
]);
|
|
67
|
-
|
|
68
|
-
const loaded = {}; // module file name -> the module
|
|
69
|
-
const loadErrors = {}; // module file name -> why it did not load
|
|
70
|
-
const todaySources = [];
|
|
71
|
-
const commandList = [];
|
|
72
|
-
const bdViews = [];
|
|
73
|
-
const initViews = [];
|
|
74
|
-
const rowCards = new Map(); // needs-row kind -> render(row, ctx)
|
|
75
|
-
let opener = null;
|
|
76
|
-
|
|
77
|
-
const dup = (list, id, what) => {
|
|
78
|
-
if (!list.some((x) => x.id === id)) return false;
|
|
79
|
-
console.error('[pm] ' + what + ' ' + id + ' is registered twice; the first one is kept');
|
|
80
|
-
return true;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export function registerTodaySource(src) {
|
|
84
|
-
if (FIXTURE || !src || typeof src.id !== 'string' || typeof src.cards !== 'function' || dup(todaySources, src.id, 'Today source')) return;
|
|
85
|
-
todaySources.push({ rank: 100, count: (ctx) => src.cards(ctx).length, ...src });
|
|
86
|
-
todaySources.sort((a, b) => a.rank - b.rank || (a.id < b.id ? -1 : 1));
|
|
87
|
-
}
|
|
88
|
-
export function registerTodayCard(rowKind, render) {
|
|
89
|
-
if (FIXTURE || typeof rowKind !== 'string' || typeof render !== 'function') return;
|
|
90
|
-
if (rowCards.has(rowKind)) { console.error('[pm] Today card ' + rowKind + ' is registered twice; the first one is kept'); return; }
|
|
91
|
-
rowCards.set(rowKind, render);
|
|
92
|
-
}
|
|
93
|
-
export function registerCommand(cmd) {
|
|
94
|
-
if (FIXTURE || !cmd || typeof cmd.id !== 'string' || typeof cmd.run !== 'function' || dup(commandList, cmd.id, 'command')) return;
|
|
95
|
-
commandList.push(cmd);
|
|
96
|
-
}
|
|
97
|
-
export function registerBreakdownView(id, view) {
|
|
98
|
-
if (FIXTURE || typeof id !== 'string' || !view || typeof view.mount !== 'function' || dup(bdViews, id, 'Breakdown view')) return;
|
|
99
|
-
bdViews.push({ id, ...view });
|
|
100
|
-
}
|
|
101
|
-
export function registerInitiativesView(id, view) {
|
|
102
|
-
if (FIXTURE || typeof id !== 'string' || !view || typeof view.mount !== 'function' || dup(initViews, id, 'Initiatives view')) return;
|
|
103
|
-
initViews.push({ id, ...view });
|
|
104
|
-
}
|
|
105
|
-
/** The frozen keys of an Initiatives view's mount ctx, and the one way to build it (a missing key is null). */
|
|
106
|
-
export const INITIATIVES_VIEW_CTX_KEYS = Object.freeze(['repo', 'ws', 'rows', 'sig', 'openInitiative', 'setState']);
|
|
107
|
-
export function initiativesViewCtx(src) {
|
|
108
|
-
const o = {};
|
|
109
|
-
for (const k of INITIATIVES_VIEW_CTX_KEYS) o[k] = src && src[k] !== undefined ? src[k] : null;
|
|
110
|
-
return Object.freeze(o);
|
|
111
|
-
}
|
|
112
|
-
export function setInitiativeOpener(fn) { if (typeof fn === 'function') opener = fn; }
|
|
113
|
-
|
|
114
|
-
export function openInitiative(repo, slug) {
|
|
115
|
-
if (opener) return opener(repo, slug);
|
|
116
|
-
const repos = typeof window !== 'undefined' && window.pmApp && window.pmApp.mods ? window.pmApp.mods.repos : null;
|
|
117
|
-
if (repos && typeof repos.selectRepo === 'function' && repo) repos.selectRepo(repo);
|
|
118
|
-
setState({ sel: slug, detail: { kind: 'init' }, col2: true });
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* ── readers, for the shell's hook lines ───────────────────────────────────────────────────────────────────────────── */
|
|
122
|
-
|
|
123
|
-
const safe = (what, fn, fallback) => { try { return fn(); } catch (e) { console.error('[pm] ' + what + ' failed:', e); return fallback; } };
|
|
124
|
-
export const todayCards = (ctx) => (FIXTURE ? [] : todaySources.flatMap((s) => safe('Today source ' + s.id, () => s.cards(ctx) || [], [])));
|
|
125
|
-
export const todayCount = (ctx) => (FIXTURE ? 0 : todaySources.reduce((n, s) => n + safe('Today source ' + s.id, () => Number(s.count(ctx)) || 0, 0), 0));
|
|
126
|
-
export const commands = () => commandList.filter((c) => !c.when || safe('command ' + c.id, () => !!c.when(), false));
|
|
127
|
-
/** The renderer registered for a needs-row kind, or null (provider-cards.js then draws the row's `today` payload). */
|
|
128
|
-
export const todayCardFor = (rowKind) => rowCards.get(rowKind) || null;
|
|
129
|
-
export const breakdownViews = () => bdViews.slice();
|
|
130
|
-
export const initiativesViews = () => initViews.slice();
|
|
131
|
-
/** The destinations whose module is loaded, in order. */
|
|
132
|
-
export const destinations = () => DESTINATIONS.filter((d) => loaded[d.module]);
|
|
133
|
-
export const extensionErrors = () => ({ ...loadErrors });
|
|
134
|
-
|
|
135
|
-
/** Load every listed module that is on disk (the server says which: GET /api/pm-modules), once, at boot. */
|
|
136
|
-
let loading = null;
|
|
137
|
-
export function loadExtensions() {
|
|
138
|
-
if (FIXTURE) return Promise.resolve();
|
|
139
|
-
if (loading) return loading;
|
|
140
|
-
const want = [...DESTINATIONS.map((d) => d.module), ...EXTENSIONS];
|
|
141
|
-
loading = (async () => {
|
|
142
|
-
const j = await pmGet('/api/pm-modules?want=' + encodeURIComponent(want.join(',')));
|
|
143
|
-
const present = Array.isArray(j && j.present) ? j.present.filter((n) => want.includes(n)) : [];
|
|
144
|
-
await Promise.all(present.map(async (name) => {
|
|
145
|
-
try { loaded[name] = await import('./' + name); }
|
|
146
|
-
catch (e) { loadErrors[name] = String((e && e.message) || e); console.error('[pm] ' + name + ' failed to load:', e); }
|
|
147
|
-
}));
|
|
148
|
-
})();
|
|
149
|
-
return loading;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* ── the home of a destination: the frame, or (outside it) a tab in panel 4 ────────────────────────────────────────── */
|
|
153
|
-
|
|
154
|
-
const tabId = (id) => 'dest:' + id;
|
|
155
|
-
const hosts = new Map(); // tab id -> { host, mod }
|
|
156
|
-
let frameHome = null; // set by app.js when the frame is on (Run 3, slice 3A)
|
|
157
|
-
|
|
158
|
-
/** app.js (the frame): from now on a destination opens as a top-level place of the frame, not as a panel-4 tab. */
|
|
159
|
-
export function setFrameHome(fn) { frameHome = typeof fn === 'function' ? fn : null; }
|
|
160
|
-
|
|
161
|
-
/** Open destination `id`: in the frame, as the place on screen; outside it (fixture mode does not load this module, so
|
|
162
|
-
* this is ?layout=legacy), as a panel-4 tab, opened or focused. `params` may carry { repo, slug } for a destination that
|
|
163
|
-
* opens on one. Returns false for an id that names no destination. */
|
|
164
|
-
export function openDestination(id, params) {
|
|
165
|
-
const d = DESTINATIONS.find((x) => x.id === id);
|
|
166
|
-
if (!d) return false;
|
|
167
|
-
if (frameHome) return frameHome(id, params || {}) !== false;
|
|
168
|
-
const p = params || {};
|
|
169
|
-
const tid = tabId(id);
|
|
170
|
-
setState((s) => {
|
|
171
|
-
const tabs = s.tabs || [];
|
|
172
|
-
const tab = { id: tid, kind: 'dest', view: id, title: d.label, role: d.label.toLowerCase(), repo: p.repo || null, slug: p.slug || null };
|
|
173
|
-
return { tabs: tabs.some((t) => t.id === tid) ? tabs.map((t) => (t.id === tid ? { ...t, repo: tab.repo, slug: tab.slug } : t)) : [...tabs, tab], active: tid };
|
|
174
|
-
});
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/** Draw destination `tab.view` into its persistent host: the frame's host for that place (tab id 'frame:<id>'), or a
|
|
179
|
-
* 'dest' tab's pane (panel-tabs.js paneFor). The frame's tab also carries `scope`: 'repo', or 'all' when Repository ▾ is
|
|
180
|
-
* on All repositories (then `repo` is null). */
|
|
181
|
-
export function mountDestTab(host, tab) {
|
|
182
|
-
const d = DESTINATIONS.find((x) => x.id === tab.view);
|
|
183
|
-
host.setAttribute('data-dest', tab.view || ''); // the one hook a test finds a destination by, in a tab or the frame
|
|
184
|
-
const mod = d ? loaded[d.module] : null;
|
|
185
|
-
if (!mod || typeof mod.mountDestination !== 'function') {
|
|
186
|
-
const text = !d ? 'This tab names no destination.'
|
|
187
|
-
: loadErrors[d.module] ? d.label + ' could not load: ' + loadErrors[d.module]
|
|
188
|
-
: d.label + ' arrives in Run ' + d.run + '.';
|
|
189
|
-
ensureComponentsCss();
|
|
190
|
-
host.replaceChildren(empty({ text, attrs: { 'data-dest-missing': tab.view || '' } }));
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
hosts.set(tab.id, { host, mod });
|
|
194
|
-
safe('destination ' + d.id, () => mod.mountDestination(host, { state, setState, FIXTURE, tab, openInitiative }), null);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** panel-tabs.js reapClosedPanes: the tab closed. */
|
|
198
|
-
export function disposeDestTab(id) {
|
|
199
|
-
const h = hosts.get(id);
|
|
200
|
-
if (!h) return;
|
|
201
|
-
hosts.delete(id);
|
|
202
|
-
if (typeof h.mod.disposeDestination === 'function') safe('dispose ' + id, () => h.mod.disposeDestination(h.host), null);
|
|
203
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* pm/release-card.js — the Release card, on the Board and on Today (pm-os-absorb Run 4, slice 4D; PRD R12 kind 4, D86 point 2).
|
|
2
|
-
*
|
|
3
|
-
* releaseButton({ ws, initiative, batch, items, onDone }) the one Release button; a press posts /api/board/release
|
|
4
|
-
* releaseCard(release, { ws, onDone }) one ready batch as a card, for the Board
|
|
5
|
-
* grantScopes(onReady) the scopes a press can grant now, or null until they are read
|
|
6
|
-
*
|
|
7
|
-
* Importing this file registers the Today renderers for the needs-row kinds of lib/work-check-needs.js (registry.js
|
|
8
|
-
* registerTodayCard): `release`, `item-review` and `item-no-evidence`, so dest-board.js imports it and the cards exist at
|
|
9
|
-
* boot. An item row shows the item's title (the row's question) and opens the initiative that holds it. A Release is the PM's press: the page sends the press with
|
|
10
|
-
* pmPost, which carries the page's Origin (and, from Run 2, the launch nonce). The server mints ONE grant for the whole
|
|
11
|
-
* batch. Nothing here writes a record or starts a factory run, and the button never acts on its own.
|
|
12
|
-
*
|
|
13
|
-
* Until the grant writer is merged, /api/pm-modules lists no `release` scope. The button then shows disabled, with
|
|
14
|
-
* "Release arrives in Run 2." beside it, so a press is never made to fail on purpose.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { el } from './dom.js';
|
|
18
|
-
import { button, card, toast, ensureComponentsCss } from './primitives.js';
|
|
19
|
-
import { pmGet, pmPost } from './http.js';
|
|
20
|
-
import { FIXTURE, setState } from './state.js';
|
|
21
|
-
import { registerTodayCard } from './registry.js';
|
|
22
|
-
import { COPY } from './board-copy.js';
|
|
23
|
-
|
|
24
|
-
let scopes = null;
|
|
25
|
-
let reading = false;
|
|
26
|
-
const waiting = [];
|
|
27
|
-
|
|
28
|
-
/** The grant scopes a press can mint now (GET /api/pm-modules), or null until the first read ends. */
|
|
29
|
-
export function grantScopes(onReady) {
|
|
30
|
-
if (scopes) return scopes;
|
|
31
|
-
if (typeof onReady === 'function') waiting.push(onReady);
|
|
32
|
-
if (!reading && !FIXTURE) {
|
|
33
|
-
reading = true;
|
|
34
|
-
pmGet('/api/pm-modules?want=').then((j) => {
|
|
35
|
-
scopes = Array.isArray(j && j.grantScopes) ? j.grantScopes : [];
|
|
36
|
-
reading = false;
|
|
37
|
-
for (const fn of waiting.splice(0)) { try { fn(scopes); } catch (e) { console.error('[release-card]', e); } }
|
|
38
|
-
setState({});
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return scopes;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** True when the page knows the release scope cannot be granted yet. Unknown (not read) counts as grantable. */
|
|
45
|
-
const notYet = () => Array.isArray(scopes) && !scopes.includes('release');
|
|
46
|
-
|
|
47
|
-
/** One Release button. `onDone(out)` runs after a press that was granted. */
|
|
48
|
-
export function releaseButton({ ws, initiative, batch, items, onDone } = {}) {
|
|
49
|
-
const b = button({
|
|
50
|
-
label: COPY.release.press, variant: 'outline', size: 'sm',
|
|
51
|
-
attrs: { 'data-bo-release-press': `${initiative}:${batch}`, 'aria-label': COPY.release.pressLabel(initiative, batch) },
|
|
52
|
-
disabled: notYet(),
|
|
53
|
-
onClick: async () => {
|
|
54
|
-
if (b.disabled) return;
|
|
55
|
-
b.disabled = true;
|
|
56
|
-
const out = await pmPost('/api/board/release', { ws, initiative, batch });
|
|
57
|
-
if (!out || out.ok === false) {
|
|
58
|
-
toast({ text: COPY.release.failed((out && out.error) || 'the server did not answer'), tone: 'error' });
|
|
59
|
-
b.disabled = notYet();
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
toast({ text: COPY.release.pressed(out.items || items || 0) });
|
|
63
|
-
if (onDone) onDone(out);
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
return b;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** One ready batch as a card: the initiative, the batch, how many work items, and the Release button. */
|
|
70
|
-
export function releaseCard(r, { ws, onDone } = {}) {
|
|
71
|
-
ensureComponentsCss();
|
|
72
|
-
const waitingForRun = notYet();
|
|
73
|
-
return el('div', { class: 'bo-rel', 'data-bo-release': `${r.initiative}:${r.batch}` },
|
|
74
|
-
el('div', { class: 'bo-rel__main' },
|
|
75
|
-
el('div', { class: 'bo-rel__title' }, COPY.release.title(r.initiativeTitle || r.initiative)),
|
|
76
|
-
el('div', { class: 'bo-rel__meta' }, [COPY.release.batch(r.batch), COPY.release.items((r.items || []).length)].join(' · ')),
|
|
77
|
-
waitingForRun ? el('div', { class: 'bo-rel__wait', 'data-bo-release-wait': '' }, COPY.release.waiting) : null),
|
|
78
|
-
releaseButton({ ws, initiative: r.initiative, batch: r.batch, items: (r.items || []).length, onDone }));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Today: a needs row of kind `release` (lib/work-check-needs.js). Its run_id is work-check-needs:release:<initiative>:<batch>. */
|
|
82
|
-
function todayRelease(row, ctx) {
|
|
83
|
-
const m = /^work-check-needs:release:([^:]+):(.+)$/.exec(String(row.run_id || ''));
|
|
84
|
-
if (!m) return null;
|
|
85
|
-
const t = row.today && typeof row.today === 'object' ? row.today : {};
|
|
86
|
-
grantScopes();
|
|
87
|
-
return el('div', { class: 'bo-rel bo-rel--today', 'data-today-row': 'release', 'data-provider': row.provider || '', 'data-initiative': m[1] },
|
|
88
|
-
el('div', { class: 'bo-rel__main' },
|
|
89
|
-
el('div', { class: 'bo-rel__title', 'data-today-cause': '' }, row.question || t.cause || COPY.release.head),
|
|
90
|
-
el('div', { class: 'bo-rel__meta' }, [m[1], COPY.release.batch(m[2])].join(' · ')),
|
|
91
|
-
notYet() ? el('div', { class: 'bo-rel__wait', 'data-bo-release-wait': '' }, COPY.release.waiting) : null),
|
|
92
|
-
releaseButton({ ws: (ctx && ctx.ws) || row.ws, initiative: m[1], batch: m[2], onDone: () => setState({}) }));
|
|
93
|
-
}
|
|
94
|
-
registerTodayCard('release', todayRelease);
|
|
95
|
-
|
|
96
|
-
/* Today: an item row (item-review, item-no-evidence). The row's question names the item; the card opens its initiative. */
|
|
97
|
-
function todayItem(row, ctx) {
|
|
98
|
-
const t = row.today && typeof row.today === 'object' ? row.today : {};
|
|
99
|
-
const slug = row.initiative_id || null;
|
|
100
|
-
ensureComponentsCss();
|
|
101
|
-
return card({
|
|
102
|
-
title: row.question || t.cause || row.kind,
|
|
103
|
-
meta: [t.cause, slug, t.evidence].filter(Boolean),
|
|
104
|
-
onOpen: slug && ctx && ctx.open ? () => ctx.open(ctx.repo, slug) : undefined,
|
|
105
|
-
openLabel: slug ? COPY.aria.open(row.question || slug) : undefined,
|
|
106
|
-
attrs: { 'data-today-row': row.kind, 'data-provider': row.provider || '', 'data-initiative': slug || '' },
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
registerTodayCard('item-review', todayItem);
|
|
110
|
-
registerTodayCard('item-no-evidence', todayItem);
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
/* pm/releases-view.js — the Releases view of Initiatives (console3 wave A4, read side; R4b: on the console3 mockup's own markup and CSS).
|
|
2
|
-
*
|
|
3
|
-
* Lifted from console3.html (the Releases view, lines 4867 to 4945): the lens header `.lh` (iniInfo, line 4941), `.brief.sbb > .bcols`, the list
|
|
4
|
-
* `section.card.sect > .sh2 + ul.list` with a "New release" row (`.ki` with the soft accent and the plus) and one `li.nrow`
|
|
5
|
-
* per release (`.ki`, `.nb > .tt + .chips` with initiative chips, `.tag` tags, date chips and `.st` flags, `.xp > .xi` with the
|
|
6
|
-
* case file: `.case > .sit + .c3rel`), the create form as `.c3rel` (initiative pills, date and time `.c3dt` labels), the
|
|
7
|
-
* tag detection line, the gap flags as `.chgl` rows and the summary lines with their source `.tag`. Styles: pm/console3.css.
|
|
8
|
-
*
|
|
9
|
-
* What is real: GET /api/releases (releases, their tags, gap flags, summary lines, acceptance) and the writes through pmPost
|
|
10
|
-
* (/api/releases/create, /edit, /delete, /summary). A refused summary line is shown, not stored. There is no freeze warning here
|
|
11
|
-
* until a rule exists, and a release never creates a Jira tag: the PM's acceptance comes first, and that is recorded, not
|
|
12
|
-
* acted on. Not lifted: the mockup's invented releases and tags (C3.REL, C3.JV), the ticket table (the payload has no tickets),
|
|
13
|
-
* "shipped" (acceptance is not shipping), the ready-to-ship checks, the freeze chip and its example rule, the sync-from-Jira
|
|
14
|
-
* chips and demo buttons, the outward options (tag in Jira, update to a person, calendar hold: each needs the slide and the
|
|
15
|
-
* outbox, and none exists for a release), the promises card and the "Jira release tags" bars (no ticket counts per tag).
|
|
16
|
-
* Self-registers as the 'releases' Initiatives view, like Timeline. */
|
|
17
|
-
import { el } from './dom.js';
|
|
18
|
-
import { ensureComponentsCss } from './primitives.js';
|
|
19
|
-
import { pmGet, pmPost } from './http.js';
|
|
20
|
-
import { registerInitiativesView } from './registry.js';
|
|
21
|
-
import { ensureC3Css, c3ic, c3ring, c3Phone } from './pm-work-view.js';
|
|
22
|
-
import { card, hBars } from './c3-init-extras.js';
|
|
23
|
-
|
|
24
|
-
const views = new WeakMap();
|
|
25
|
-
const TYPES = [{ value: 'deploy', label: 'Deploy' }, { value: 'customer', label: 'Customer' }, { value: 'both', label: 'Deploy and customer' }];
|
|
26
|
-
const SOURCES = ['fact', 'estimate', 'assumption', 'reported'];
|
|
27
|
-
const FLAG_TEXT = { initiative_ticket_without_tag: 'Ticket without a release tag', tagged_ticket_without_initiative: 'Tagged ticket with no initiative' };
|
|
28
|
-
const iso = (d, t) => (d ? new Date(d + 'T' + (t || '00:00')).toISOString() : null);
|
|
29
|
-
const dim = (t, extra) => el('span', { class: 'dim mono', style: 'font-size:var(--fs-2)' + (extra || '') }, t);
|
|
30
|
-
const when = (v) => (v ? v.replace('T', ' ').replace(/:\d\dZ$/, 'Z') : 'not set');
|
|
31
|
-
const DOW = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
32
|
-
/** The mockup's c3dfmt: "Thu 1 Oct, 12:00" in the viewer's time. */
|
|
33
|
-
const dfmt = (v) => { const d = v ? new Date(v) : null; if (!d || isNaN(d)) return 'no date'; return DOW[d.getDay()] + ' ' + d.getDate() + ' ' + MON[d.getMonth()] + ', ' + String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0'); };
|
|
34
|
-
const nameOfRel = (V, r) => r.name || (r.initiative_ids.length ? r.initiative_ids.map((id) => titleOf(V, id)).join(' and ') : r.id);
|
|
35
|
-
|
|
36
|
-
function scopeIds(ctx) { return (ctx.rows || []).map((r) => r.id).filter(Boolean); }
|
|
37
|
-
const shown = (V, r) => !r.initiative_ids.length || r.initiative_ids.some((id) => V.ids.includes(id));
|
|
38
|
-
const titleOf = (V, id) => { const r = (V.ctx.rows || []).find((x) => x.id === id); return (r && r.title) || id; };
|
|
39
|
-
|
|
40
|
-
function summaryEditor(V, r) {
|
|
41
|
-
const lines = (r.summary && r.summary.length ? r.summary : [{ text: '', source: 'estimate' }]).map((l) => ({ ...l }));
|
|
42
|
-
const box = el('div', { class: 'c3rel', 'data-rel-summary': r.id });
|
|
43
|
-
const note = el('div', { class: 'fold w', 'data-rel-refused': '' });
|
|
44
|
-
note.hidden = true;
|
|
45
|
-
const draw = (refused = []) => {
|
|
46
|
-
box.replaceChildren(...lines.map((l, i) => {
|
|
47
|
-
const input = el('input', { type: 'text', value: l.text || '', 'aria-label': 'Line ' + (i + 1), autocomplete: 'off' });
|
|
48
|
-
input.addEventListener('change', () => { l.text = input.value; });
|
|
49
|
-
const sel = el('select', { 'aria-label': 'Source of line ' + (i + 1) },
|
|
50
|
-
[{ value: '', label: 'Source needed' }, ...SOURCES.map((s) => ({ value: s, label: s })), ...(l.source && !SOURCES.includes(l.source) ? [{ value: l.source, label: l.source }] : [])].map((o) => el('option', { value: o.value }, o.label)));
|
|
51
|
-
sel.value = l.source || '';
|
|
52
|
-
sel.addEventListener('change', () => { l.source = sel.value || undefined; });
|
|
53
|
-
return el('div', { class: 'form row', 'data-rel-line': i, 'data-refused': refused.includes(i) ? 'true' : null }, input, sel);
|
|
54
|
-
}));
|
|
55
|
-
note.hidden = !refused.length;
|
|
56
|
-
if (refused.length) note.replaceChildren(c3ic('alert', 'sm'), 'Not saved. Line ' + refused.map((i) => i + 1).join(', ') + ' needs a source: fact, estimate, assumption, reported or a ticket key.');
|
|
57
|
-
};
|
|
58
|
-
draw();
|
|
59
|
-
const save = async () => {
|
|
60
|
-
const a = await pmPost('/api/releases/summary', { id: r.id, lines });
|
|
61
|
-
if (a && a.ok) { await load(V); return; }
|
|
62
|
-
draw(a && a.refused ? a.refused : []);
|
|
63
|
-
if (!(a && a.refused)) { note.hidden = false; note.replaceChildren(c3ic('alert', 'sm'), (a && a.error) || 'Not saved.'); }
|
|
64
|
-
};
|
|
65
|
-
return el('div', { class: 'c3rel' },
|
|
66
|
-
el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)' }, 'Summary: each line cites a source'), box, note,
|
|
67
|
-
el('div', { class: 'chips2' },
|
|
68
|
-
el('button', { type: 'button', class: 'pill', onClick: () => { lines.push({ text: '', source: 'estimate' }); draw(); } }, c3ic('plus', 'sm'), 'Add line'),
|
|
69
|
-
el('button', { type: 'button', class: 'pill', 'data-rel-save-summary': r.id, onClick: save }, c3ic('check', 'sm'), 'Save summary')));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** The release's case file (the mockup's C3.cases.rl): what the release is, the tag, the gaps, the summary, and the presses. */
|
|
73
|
-
function caseFile(V, r) {
|
|
74
|
-
const flags = r.gapFlags || [];
|
|
75
|
-
const t = r.tags || { detected: [], reason: 'board not set' };
|
|
76
|
-
return el('div', { class: 'case', style: '--tc:var(--acc)' },
|
|
77
|
-
el('p', { class: 'sit' }, 'Deploy ' + when(r.deploy_at) + '. Release ' + when(r.release_at) + '. Initiatives: ' + (r.initiative_ids.map((id) => titleOf(V, id)).join(', ') || 'none') + '.'),
|
|
78
|
-
el('div', { class: 'c3rel' },
|
|
79
|
-
el('div', { class: 'chips2', 'data-rel-tags': r.id }, dim('Jira tag'), t.detected.length ? t.detected.map((x) => el('span', { class: 'tag', title: 'Jira release tag' }, x)) : dim(t.reason)),
|
|
80
|
-
el('div', { 'data-rel-flags': r.id }, flags.length
|
|
81
|
-
? el('ul', { class: 'chgl' }, flags.map((f) => el('li', { class: 'warn' }, c3ic('alert', 'sm'), el('span', null, (FLAG_TEXT[f.flag] || f.flag) + ': ' + f.ticket), el('span', { class: 'tag' }, 'gap'))))
|
|
82
|
-
: el('div', { class: 'fold' }, c3ic('check', 'sm'), 'No gaps between tickets and tags.')),
|
|
83
|
-
summaryEditor(V, r),
|
|
84
|
-
el('div', { class: 'chips2' },
|
|
85
|
-
el('button', { type: 'button', class: 'pill', 'data-rel-accept': r.id,
|
|
86
|
-
onClick: async () => { await pmPost('/api/releases/edit', { id: r.id, fields: { accepted: !r.accepted_at } }); await load(V); } }, c3ic(r.accepted_at ? 'undo' : 'check', 'sm'), r.accepted_at ? 'Withdraw acceptance' : 'Record acceptance'),
|
|
87
|
-
!r.initiative_ids.length ? el('button', { type: 'button', class: 'pill', 'data-rel-delete': r.id,
|
|
88
|
-
onClick: async () => { await pmPost('/api/releases/delete', { id: r.id }); await load(V); } }, c3ic('trash', 'sm'), 'Delete') : null)),
|
|
89
|
-
el('div', { class: 'cft' }, el('span', null, c3ic('shield', 'sm'), 'A release never creates a Jira tag. The PM’s acceptance comes first, and that is recorded, not acted on.')));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function toggler(V, id, li, xp) {
|
|
93
|
-
const flip = () => { V.open[id] = !V.open[id]; li.setAttribute('aria-expanded', String(!!V.open[id])); xp.classList.toggle('open', !!V.open[id]); };
|
|
94
|
-
li.addEventListener('click', (e) => { if (!e.target.closest('.xi')) flip(); });
|
|
95
|
-
li.addEventListener('keydown', (e) => { if (e.target === li && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); flip(); } });
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function relRow(V, r) {
|
|
99
|
-
const flags = r.gapFlags || [];
|
|
100
|
-
const t = r.tags || { detected: [] };
|
|
101
|
-
const op = !!V.open[r.id];
|
|
102
|
-
const li = el('li', { class: 'nrow', 'data-row': '', 'data-rel': r.id, tabindex: '0', 'aria-expanded': String(op) });
|
|
103
|
-
const xp = el('div', { class: 'xp' + (op ? ' open' : '') }, el('div', { class: 'xi' }, caseFile(V, r)));
|
|
104
|
-
toggler(V, r.id, li, xp);
|
|
105
|
-
li.append(
|
|
106
|
-
el('span', { class: 'ki', style: r.accepted_at ? 'color:var(--success)' : null }, c3ic(r.accepted_at ? 'check' : 'out')),
|
|
107
|
-
el('div', { class: 'nb' },
|
|
108
|
-
el('span', { class: 'tt' }, nameOfRel(V, r)),
|
|
109
|
-
el('div', { class: 'chips' },
|
|
110
|
-
r.initiative_ids.map((id) => el('span', { class: 'chip2' }, c3ic('init', 'sm'), titleOf(V, id))),
|
|
111
|
-
(t.detected || []).map((x) => el('span', { class: 'tag', title: 'Jira release tag' }, x)),
|
|
112
|
-
el('span', { class: 'chip2' }, c3ic('cal', 'sm'), dfmt(r.release_at)),
|
|
113
|
-
r.accepted_at ? el('span', { class: 'st ok' }, c3ic('check', 'sm'), 'accepted by the PM') : (t.detected || []).length ? null : el('span', { class: 'st warn' }, c3ic('alert', 'sm'), 'not accepted: no Jira tag yet'),
|
|
114
|
-
flags.length ? el('span', { class: 'st warn' }, c3ic('alert', 'sm'), flags.length + ' gap' + (flags.length === 1 ? '' : 's')) : null,
|
|
115
|
-
r.progress && r.progress.total ? [el('div', { class: 'pbar', style: 'width:70px' }, el('i', { style: 'width:' + Math.round(r.progress.done / r.progress.total * 100) + '%' })), el('span', { class: 'mono dim', style: 'font-size:var(--fs-2)' }, r.progress.done + ' of ' + r.progress.total)] : null),
|
|
116
|
-
xp));
|
|
117
|
-
return li;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/** The mockup's "New release" row and its wizard (c3wizard, line 4903) as a form: initiatives, type, deploy and release times. */
|
|
121
|
-
function newRow(V) {
|
|
122
|
-
const F = V.form;
|
|
123
|
-
const op = !!V.open.__new;
|
|
124
|
-
const li = el('li', { class: 'nrow', 'data-row': '', tabindex: '0', 'aria-expanded': String(op), 'data-rel-new': '' });
|
|
125
|
-
const err = el('div', { class: 'fold w', 'data-rel-error': '' });
|
|
126
|
-
err.hidden = true;
|
|
127
|
-
const pickRow = el('div', { class: 'chips2', role: 'group', 'aria-label': 'Initiatives' }, dim('initiatives'), V.ctx.rows.map((r) => {
|
|
128
|
-
const b = el('button', { type: 'button', class: 'pill', 'aria-pressed': String(F.picked.has(r.id)), 'data-rel-pick': r.id, onClick: () => { F.picked.has(r.id) ? F.picked.delete(r.id) : F.picked.add(r.id); b.setAttribute('aria-pressed', String(F.picked.has(r.id))); } }, r.title || r.id);
|
|
129
|
-
return b;
|
|
130
|
-
}));
|
|
131
|
-
const typeRow = el('div', { class: 'chips2', role: 'group', 'aria-label': 'Type' }, dim('type'), TYPES.map((t) => {
|
|
132
|
-
const b = el('button', { type: 'button', class: 'pill', 'aria-pressed': String(F.type === t.value), 'data-rel-type': t.value, onClick: () => { F.type = t.value; typeRow.querySelectorAll('button').forEach((x) => x.setAttribute('aria-pressed', String(x === b))); } }, t.label);
|
|
133
|
-
return b;
|
|
134
|
-
}));
|
|
135
|
-
const dt = (label, key, note) => {
|
|
136
|
-
const d = el('input', { type: 'date', value: F[key][0], 'aria-label': label + ' date' }); d.addEventListener('change', () => { F[key][0] = d.value; });
|
|
137
|
-
const t = el('input', { type: 'time', value: F[key][1], 'aria-label': label + ' time' }); t.addEventListener('change', () => { F[key][1] = t.value; });
|
|
138
|
-
return el('label', { class: 'c3dt' }, el('span', { class: 'dim mono' }, label), d, t, el('span', { class: 'dim mono' }, note));
|
|
139
|
-
};
|
|
140
|
-
const create = el('button', { type: 'button', class: 'pill', 'data-rel-create-go': '', onClick: async () => {
|
|
141
|
-
const a = await pmPost('/api/releases/create', { initiative_ids: [...F.picked], type: F.type, deploy_at: iso(F.deploy[0], F.deploy[1]), release_at: iso(F.rel[0], F.rel[1]) });
|
|
142
|
-
if (a && a.ok) { V.form = newForm(); V.open.__new = false; await load(V); } else { err.hidden = false; err.replaceChildren(c3ic('alert', 'sm'), (a && a.error) || 'Not created.'); }
|
|
143
|
-
} }, c3ic('plus', 'sm'), 'Create release');
|
|
144
|
-
const xp = el('div', { class: 'xp' + (op ? ' open' : '') }, el('div', { class: 'xi' }, el('div', { class: 'case', 'data-rel-create': '', style: '--tc:var(--acc)' },
|
|
145
|
-
el('p', { class: 'sit' }, 'Which initiatives ship together? Pick one, or several. The release is recorded here only; nothing changes in Jira.'),
|
|
146
|
-
el('div', { class: 'c3rel' }, pickRow, typeRow, dt('Deploy', 'deploy', 'engineering ships it'), dt('Release', 'rel', 'customers see it'), err, el('div', { class: 'chips2' }, create)))));
|
|
147
|
-
toggler(V, '__new', li, xp);
|
|
148
|
-
li.append(el('span', { class: 'ki', style: 'background:var(--accw);color:var(--acc)' }, c3ic('plus')),
|
|
149
|
-
el('div', { class: 'nb' }, el('span', { class: 'tt' }, 'New release'), el('div', { class: 'chips' }, dim('pick initiatives, a type and the deploy and release times')), xp));
|
|
150
|
-
return li;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const newForm = () => ({ picked: new Set(), type: 'deploy', deploy: ['', ''], rel: ['', ''] });
|
|
154
|
-
|
|
155
|
-
/** The mockup's Releases list (c3relList): the New release row and one row per release. */
|
|
156
|
-
function listCard(V) {
|
|
157
|
-
const list = V.releases.filter((r) => shown(V, r));
|
|
158
|
-
const rows = [newRow(V), ...(list.length ? list.map((r) => relRow(V, r)) : [el('li', { class: 'fold', 'data-rel-empty': '' }, c3ic('check', 'sm'), 'No releases yet.')])];
|
|
159
|
-
return el('section', { class: 'card sect', 'data-rel-list': '' },
|
|
160
|
-
el('div', { class: 'sh2' }, el('h2', null, c3ic('out', 'sm'), 'Releases ', el('span', { class: 'bdg g' }, String(list.length))), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'tied to initiatives and a Jira tag')),
|
|
161
|
-
el('ul', { class: 'list' }, rows));
|
|
162
|
-
}
|
|
163
|
-
const TAG_COLORS = ['var(--acc)', 'var(--success)', 'var(--purple)', 'var(--warning)'];
|
|
164
|
-
/** The mockup's "Jira release tags: tickets per tag". The ticket counts come from `tag_tickets` where the server sends them (the demo does); otherwise the tags
|
|
165
|
-
* the releases carry are listed with no count, and with no board set the card says so. Nothing is counted here. */
|
|
166
|
-
function tagsCard(V) {
|
|
167
|
-
const tt = V.tagTickets;
|
|
168
|
-
let body;
|
|
169
|
-
if (tt && tt.length) body = hBars(tt.map((v, i) => [v.tag, v.total ? v.done / v.total || 0.03 : 0.03, TAG_COLORS[i % 4], v.done + ' of ' + v.total + ' done' + (v.date ? ' · ' + v.date : '')]));
|
|
170
|
-
else {
|
|
171
|
-
const tags = [...new Set(V.releases.flatMap((r) => (r.tags && r.tags.detected) || []))];
|
|
172
|
-
body = tags.length ? el('div', { class: 'chips2', 'data-rel-tag-list': '' }, tags.map((t) => el('span', { class: 'tag', title: 'Jira release tag' }, t)))
|
|
173
|
-
: el('div', { class: 'fold', 'data-rel-tags-empty': '' }, c3ic('moon', 'sm'), V.board ? 'No release tag is detected on the board yet.' : 'Jira board: not set, so no release tag is read.');
|
|
174
|
-
}
|
|
175
|
-
const s = card('out', 'Jira release tags', 'tickets per tag', body, el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, tt && tt.length ? 'Read from Jira. Fact.' : 'Ticket counts per tag are not read here.'));
|
|
176
|
-
s.setAttribute('data-rel-tags-card', '');
|
|
177
|
-
return s;
|
|
178
|
-
}
|
|
179
|
-
function rulesCard(V) {
|
|
180
|
-
const demo = V.rules;
|
|
181
|
-
const rows = demo
|
|
182
|
-
? [['clock', 'Change freeze: ' + demo.freeze, 'example'], ['doc', 'Tag name: ' + demo.tag, 'example'], ['shield', 'Acceptance before a tag is created: not decided', 'open']]
|
|
183
|
-
: [['clock', 'Change freeze: no rule is set, so none is checked', 'open'], ['doc', 'Tag name: no rule is set, and no tag is created from here', 'open'], ['shield', 'Acceptance before a tag is created: the PM’s acceptance is recorded, and no tag is created from here', 'recorded']];
|
|
184
|
-
const s = card('lock', 'Open rules', demo ? 'example values, yours to set' : 'yours to set', el('ul', { class: 'chgl' }, rows.map((r) => el('li', { class: 'warn' }, c3ic(r[0], 'sm'), el('span', null, r[1]), el('span', { class: 'tag' }, r[2])))));
|
|
185
|
-
s.setAttribute('data-rel-rules', '');
|
|
186
|
-
return s;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function render(V) {
|
|
190
|
-
if (V.redraw) { V.redraw(); return; }
|
|
191
|
-
const list = V.releases.filter((r) => shown(V, r));
|
|
192
|
-
const accepted = list.filter((r) => r.accepted_at).length;
|
|
193
|
-
const head = el('div', { class: 'lh' },
|
|
194
|
-
el('span', { class: 'ki' }, c3ic('out')),
|
|
195
|
-
el('div', { style: 'min-width:0' },
|
|
196
|
-
el('b', null, list.length + ' release' + (list.length === 1 ? '' : 's') + ', ' + accepted + ' accepted by the PM'),
|
|
197
|
-
el('div', { class: 'dim', 'data-rel-board': '' }, V.board ? 'Jira board: ' + V.board.name : 'Jira board: not set')),
|
|
198
|
-
c3ring(accepted, Math.max(1, list.length), 44, accepted + '/' + list.length));
|
|
199
|
-
V.root.replaceChildren(el('div', { class: 'calwrap' }, el('div', { class: 'calbody' },
|
|
200
|
-
head,
|
|
201
|
-
V.error ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.error) : null,
|
|
202
|
-
el('div', { class: 'brief sbb' }, el('div', { class: 'bcols' }, el('div', { class: 'bcol l' }, listCard(V)), el('div', { class: 'bcol r' }, tagsCard(V), rulesCard(V)))))));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
async function load(V) {
|
|
206
|
-
const fx = window.__c3demo && window.__c3planfx && window.__c3planfx.releases;
|
|
207
|
-
const a = fx ? JSON.parse(JSON.stringify(fx)) : await pmGet('/api/releases');
|
|
208
|
-
if (V.disposed) return;
|
|
209
|
-
if (a && a.ok) { V.releases = a.releases || []; V.board = a.board || null; V.tagTickets = a.tag_tickets || null; V.rules = fx ? fx.rules : null; V.error = null; V.ready = true; } else V.error = (a && a.error) || 'Releases could not be read.';
|
|
210
|
-
render(V);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/** The Lifecycle Deliver stage: the same list, tags and rules, drawn inside that lens (c3-lifecycle-panels.js). `host` is the lens's V; `scope` an initiative id or null.
|
|
214
|
-
* The state lives on host.__rel, so a write (create, summary, acceptance) reloads and asks the lens to draw again. */
|
|
215
|
-
export function releasePanels(host, scope) {
|
|
216
|
-
let V = host.__rel;
|
|
217
|
-
if (!V) {
|
|
218
|
-
V = host.__rel = { ctx: host.ctx, ids: scopeIds(host.ctx), releases: [], board: null, tagTickets: null, rules: null, error: null, ready: false, disposed: false, open: {}, form: newForm(), redraw: () => { if (!host.disposed && host.render) host.render(); } };
|
|
219
|
-
load(V);
|
|
220
|
-
}
|
|
221
|
-
V.ctx = host.ctx; V.ids = scope ? [scope] : scopeIds(host.ctx);
|
|
222
|
-
if (!V.ready && !V.error) return { left: [el('section', { class: 'card sect' }, el('div', { class: 'fold', 'data-rel-loading': '' }, c3ic('clock', 'sm'), 'Reading the releases…'))], right: [] };
|
|
223
|
-
return { left: [listCard(V)], right: [tagsCard(V), rulesCard(V)] };
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export function mountReleases(host, ctx) {
|
|
227
|
-
let V = views.get(host);
|
|
228
|
-
if (V && V.ctx.ws !== ctx.ws) { disposeReleases(host); V = null; }
|
|
229
|
-
if (V) { V.ctx = ctx; V.ids = scopeIds(ctx); if (host.firstChild !== V.root) host.replaceChildren(V.root); return; }
|
|
230
|
-
ensureComponentsCss();
|
|
231
|
-
ensureC3Css();
|
|
232
|
-
V = { ctx, ids: scopeIds(ctx), root: el('div', { class: 'c3', 'data-in-view': 'releases' }), releases: [], board: null, error: null, disposed: false, open: {}, form: newForm() };
|
|
233
|
-
V.stopPhone = c3Phone(V.root);
|
|
234
|
-
views.set(host, V);
|
|
235
|
-
host.replaceChildren(V.root);
|
|
236
|
-
load(V);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export function disposeReleases(host) {
|
|
240
|
-
const V = views.get(host);
|
|
241
|
-
if (!V) return;
|
|
242
|
-
V.disposed = true;
|
|
243
|
-
if (V.stopPhone) V.stopPhone();
|
|
244
|
-
views.delete(host);
|
|
245
|
-
if (V.root.parentNode === host) V.root.remove();
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
registerInitiativesView('releases', { label: 'Releases', mount: mountReleases, dispose: disposeReleases });
|