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
|
@@ -75,7 +75,7 @@ const S = {
|
|
|
75
75
|
doneOpen: false, sheet: false, rec: {}, pin: new Set(JSON.parse(store.get('pmos.home.pin') || '[]')),
|
|
76
76
|
cardFold: store.get('pmos.home.cardfold') === '1', // the card's checklist folded to one line (AgInitSpec), kept in this browser
|
|
77
77
|
// the one list (premium-uncovered-features): the filter, the picked product, which groups and initiatives are open, kept in this browser
|
|
78
|
-
filter: 'today', product: store.get('pmos.home.product') || null, kidsOff: new Set(), rest: new Set(),
|
|
78
|
+
filter: 'today', product: store.get('pmos.home.product') || null, kidsOff: new Set(), rest: new Set(), tasks: new Set(), cap: false,
|
|
79
79
|
pg: (() => { try { return JSON.parse(store.get('pmos.home.pg') || '{}') || {}; } catch { return {}; } })(),
|
|
80
80
|
eodHidden: store.get('pmos.home.eod') === L.dayOf(), phoneChat: false,
|
|
81
81
|
};
|
|
@@ -208,7 +208,7 @@ function homeListHtml() {
|
|
|
208
208
|
const nPick = M.products.length > 1 ? M.counts.products + ' products · ' + M.counts.initiatives + ' initiatives' : '';
|
|
209
209
|
const pins = H.needsOf(S.D).filter((r) => S.pin.has(r.key)).length;
|
|
210
210
|
return TD.listHtml(M, todayModel(), {
|
|
211
|
-
sel: S.sel, isOpen: open, pOpen, restOpen: (k) => S.rest.has(k), pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
|
|
211
|
+
sel: S.sel, isOpen: open, pOpen, restOpen: (k) => S.rest.has(k), cap: S.cap, tasksOpen: (k) => S.tasks.has(k), pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
|
|
212
212
|
product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative',
|
|
213
213
|
});
|
|
214
214
|
}
|
|
@@ -237,7 +237,8 @@ const TAG = { you: 'You', agent: 'Working', wait: 'Next', jira: 'Jira', risk: 'A
|
|
|
237
237
|
const itemHtml = (x, o = {}) => {
|
|
238
238
|
const k = x.kind === 'agent' && !o.role && !o.stalled ? 'wait' : x.kind; // an agent step with no agent at work on it waits: it is next
|
|
239
239
|
const tag = k === 'agent' && o.stalled ? 'Stuck' : TAG[k];
|
|
240
|
-
|
|
240
|
+
// the note (what the step waits on) is a line under the label, not only a title: a phone has no hover
|
|
241
|
+
return `<div class="hm-it ${esc(k)}"${x.note ? ` title="${esc(x.note)}"` : ''}>${markHtml(k, o.role)}<span class="l">${esc(x.label)}${x.note && k !== 'done' ? `<small>${esc(x.note)}</small>` : ''}</span>${k !== 'done' && tag ? `<span class="tag ${esc(k)}${tag === 'Stuck' ? ' stuck' : ''}">${tag}</span>` : ''}</div>`;
|
|
241
242
|
};
|
|
242
243
|
const MS = '<i class="cz-ms" aria-hidden="true"></i>'; // the milestone mark (◆), drawn as a shape
|
|
243
244
|
const msStep = (label) => !!(STEPS.find((s) => s.label === label) || {}).ms;
|
|
@@ -364,7 +365,7 @@ const chat = mountChat($('#hmChat'), {
|
|
|
364
365
|
unqueue: (sid, at) => { pmPost('/api/home-desk/queue-drop', { session: sid, at }); if (S.D.desk && S.D.desk.queued && S.D.desk.queued[sid]) S.D.desk.queued[sid] = S.D.desk.queued[sid].filter((x) => x.at !== at); },
|
|
365
366
|
onScope: (b) => menu(b, scopeItems(), 'Where this goes'),
|
|
366
367
|
onLink: (b, t) => menu(b, H.boardRows(S.D).map((r) => ({ label: r.title, sub: r.stage, go: () => link(t.sid, r.id) })), 'Link it to an initiative'),
|
|
367
|
-
onTo: (b) => menu(b, toItems(), '
|
|
368
|
+
onTo: (b, t) => menu(b, toItems(t), 'Send your messages to'), // @ and the To: chip: which conversation of this initiative you are writing in
|
|
368
369
|
workItem: (text, t) => workItem(text, t),
|
|
369
370
|
openTerminal: (sid) => openTerminal(sid),
|
|
370
371
|
viewerClosed: () => !VW.isOpen() && !isPhone(),
|
|
@@ -376,12 +377,13 @@ function scopeItems() {
|
|
|
376
377
|
return [{ label: 'All work', sub: 'Home', go: () => select(null) }, { label: H.productName(S.D) + ' · product', go: () => goIni('product') }]
|
|
377
378
|
.concat(H.boardRows(S.D).map((r) => ({ label: r.title, sub: [r.lane, r.stage].filter(Boolean).join(' · '), go: () => goIni(r.id) })));
|
|
378
379
|
}
|
|
379
|
-
function toItems() {
|
|
380
|
-
const id = S.ini;
|
|
380
|
+
function toItems(cur) {
|
|
381
|
+
const id = S.ini, at = cur && cur.key;
|
|
381
382
|
const ses = S.D.sessions.filter((s) => H.iniOfSession(s) === id && s.shown !== 'exited');
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
.concat(
|
|
383
|
+
const main = iniTarget(id);
|
|
384
|
+
return [{ label: 'The initiative’s chat', sub: 'Claude, with ' + iniTitle(id) + ' as its context', checked: at === main.key, go: () => openTarget(main) }]
|
|
385
|
+
.concat(ses.map((s) => { const r = H.roleOf(s, S.D.desk && S.D.desk.roles), st = sessionTarget(s); return { label: (s.hx && s.hx.title) || s.name, sub: r.name + ' · another session of this initiative', checked: at === st.key, go: () => openTarget(st) }; }))
|
|
386
|
+
.concat([{ label: 'A new session', sub: 'A fresh conversation in ' + iniTitle(id), go: () => newIn(id) }]);
|
|
385
387
|
}
|
|
386
388
|
async function link(sid, ini) {
|
|
387
389
|
const r = await pmPost('/api/session/initiative', { id: sid, initiative: ini });
|
|
@@ -415,8 +417,9 @@ function sessionTarget(s) {
|
|
|
415
417
|
return t;
|
|
416
418
|
}
|
|
417
419
|
function alsoOf(ini) {
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
+
// in an initiative's chat only that initiative's own next step shows; another initiative's is not "also" this conversation's
|
|
421
|
+
const other = H.needsOf(S.D).filter((r) => !(S.sel && S.sel === r.id));
|
|
422
|
+
const n = ini ? other.find((r) => r.ini === ini) : other[0];
|
|
420
423
|
return n ? { text: n.name, go: () => select(n.id) } : null;
|
|
421
424
|
}
|
|
422
425
|
/* HmDecide: a decision is recorded in the chat, on a card under the agent's question: the choices, Why (kept in the journal), Record,
|
|
@@ -578,7 +581,6 @@ function openReviewVw() {
|
|
|
578
581
|
S.sel = 'review'; drawList();
|
|
579
582
|
import('./home-review.js').then((M) => M.openReview({
|
|
580
583
|
VW, pmPost, toast, D: () => S.D, reload: () => load(), ws: () => boardWs(), iniTitle, now: NOW,
|
|
581
|
-
openWork: () => MORE.openMyWork(),
|
|
582
584
|
askAbout: (st, act) => {
|
|
583
585
|
S.phoneChat = isPhone();
|
|
584
586
|
const owner = st.owner ? ' It is ' + st.owner + '’s.' : ' It has no owner.';
|
|
@@ -590,16 +592,21 @@ function openReviewVw() {
|
|
|
590
592
|
},
|
|
591
593
|
}));
|
|
592
594
|
}
|
|
593
|
-
/*
|
|
595
|
+
/* New → A task: the PM names the initiative first. An initiative's task is added in its Tasks view (home-ini.js, the box there);
|
|
596
|
+
* "Not in an initiative" opens the capture box in the list, on the PM's own list (POST /api/pm-items/add). The box is not on Home otherwise. */
|
|
597
|
+
async function addTaskIn(id) {
|
|
598
|
+
if (!id) { S.cap = true; drawList(); const i = $('#hmCap'); if (i) i.focus(); return; }
|
|
599
|
+
await goIni(id);
|
|
600
|
+
if (S.ini !== id) return;
|
|
601
|
+
iniOverview('tasks');
|
|
602
|
+
setTimeout(() => { const n = document.querySelector('#czViewer #ovTask'); if (n) n.focus(); }, 0);
|
|
603
|
+
}
|
|
594
604
|
async function capture(text) {
|
|
595
605
|
const line = String(text || '').trim(); if (!line) return false;
|
|
596
|
-
const
|
|
597
|
-
const b = (S.D.board && S.D.board.board) || {};
|
|
598
|
-
const r = ini && b.id ? await pmPost('/api/boards/tasks/add', { ws: b.ws || WS || undefined, board: b.id, initiative: ini, title: line })
|
|
599
|
-
: await pmPost('/api/pm-items/add', { line });
|
|
606
|
+
const r = await pmPost('/api/pm-items/add', { line });
|
|
600
607
|
if (!r || r.ok !== true) { toast((r && r.error) || 'The task was not added.'); return false; }
|
|
601
|
-
toast(
|
|
602
|
-
|
|
608
|
+
toast('Added to your own list, under Not in an initiative.');
|
|
609
|
+
S.cap = false;
|
|
603
610
|
await load();
|
|
604
611
|
return true;
|
|
605
612
|
}
|
|
@@ -637,7 +644,7 @@ function reopenViewer() {
|
|
|
637
644
|
if (r) { select(r.id); return; }
|
|
638
645
|
if (S.ini === 'product') { openUpdateViewer(); return; }
|
|
639
646
|
if (S.ini) { openOverview(); return; }
|
|
640
|
-
|
|
647
|
+
openUpdateViewer(); // nothing picked on Home: the product's weekly update (My work is no longer a page of its own)
|
|
641
648
|
}
|
|
642
649
|
function factsHtml(rows) { return rows && rows.length ? `<dl class="hv-facts">${rows.map(([k, v]) => `<div><dt>${esc(k)}</dt><dd>${esc(v)}</dd></div>`).join('')}</dl>` : ''; }
|
|
643
650
|
function openNeedViewer(r, focusWhy) {
|
|
@@ -936,6 +943,8 @@ function newItems() {
|
|
|
936
943
|
const here = S.ini && S.ini !== 'product' ? S.ini : null;
|
|
937
944
|
const inis = H.boardRows(S.D);
|
|
938
945
|
return [
|
|
946
|
+
{ label: 'A task', sub: 'Choose its initiative first', go: (b) => menu(b, inis.filter(H.OPEN).map((r) => ({ label: r.title, sub: r.stage, go: () => addTaskIn(r.id) }))
|
|
947
|
+
.concat([{ sep: true }, { label: 'Not in an initiative', sub: 'Your own list', go: () => addTaskIn(null) }]), 'Under which initiative') },
|
|
939
948
|
{ label: 'Next step of an initiative', sub: 'Open where it waits', go: (b) => menu(b, inis.map((r) => ({ label: r.title, sub: r.stage, go: () => goIni(r.id) })), 'Which initiative') },
|
|
940
949
|
{ label: here ? 'New session in ' + iniTitle(here) : 'New session in an initiative', sub: 'A fresh chat with its own history', go: (b) => (here ? newIn(here) : menu(b, inis.map((r) => ({ label: r.title, sub: r.stage, go: () => newIn(r.id) })), 'In which initiative')) },
|
|
941
950
|
{ label: 'Quick ask', sub: 'Your own chat, about all work', go: () => { goHome(); chat.focus(); } },
|
|
@@ -948,6 +957,8 @@ function newIn(id) {
|
|
|
948
957
|
let n = 2; while (used.has('init:' + id + ':' + n)) n++;
|
|
949
958
|
if (S.ini !== id) { S.ini = id; drawList(); loadIni().then(drawList); syncUrl(); }
|
|
950
959
|
S.sel = null;
|
|
960
|
+
S.phoneChat = isPhone(); // on a phone the new session's chat shows over the list; without it the + looked like it did nothing
|
|
961
|
+
drawList();
|
|
951
962
|
openTarget({ ...iniTarget(id), key: 'init:' + id + ':' + n, title: 'New session · ' + iniTitle(id), empty: 'A new session in ' + iniTitle(id) + '. Say what it is for.' });
|
|
952
963
|
chat.focus();
|
|
953
964
|
}
|
|
@@ -956,6 +967,7 @@ function newLoose() {
|
|
|
956
967
|
const key = 'chat:loose-' + d.getFullYear() + p(d.getMonth() + 1) + p(d.getDate()) + '-' + p(d.getHours()) + p(d.getMinutes()) + p(d.getSeconds());
|
|
957
968
|
if (S.ini) { S.ini = null; drawList(); syncUrl(); }
|
|
958
969
|
S.sel = null;
|
|
970
|
+
S.phoneChat = isPhone(); drawList();
|
|
959
971
|
openTarget({ key, ws: WS || undefined, title: 'New chat', scope: { text: 'Loose', icon: I.chat, loose: true }, rich: false, placeholder: 'Message Claude', empty: 'A loose chat. Link it to an initiative when it turns into one.', onSent: () => setTimeout(load, 1500) });
|
|
960
972
|
chat.focus();
|
|
961
973
|
}
|
|
@@ -998,7 +1010,11 @@ function menu(anchor, items, label) {
|
|
|
998
1010
|
if (menu.anchor && menu.anchor !== anchor) menu.anchor.classList.remove('hm-anc');
|
|
999
1011
|
anchor.classList.add('hm-anc');
|
|
1000
1012
|
menu.anchor = anchor;
|
|
1001
|
-
|
|
1013
|
+
// on a phone the menu is a sheet at the bottom, unless the button that opened it is in the top half of the screen: then it drops from
|
|
1014
|
+
// that button (the ⋯ of the top bar, the + of Today), so the choice opens where the press was (testing fixes)
|
|
1015
|
+
const ar = anchor.getBoundingClientRect(), high = !!anchor.closest('.hm-top') || ar.bottom < innerHeight / 2;
|
|
1016
|
+
menuEl.classList.toggle('top', high);
|
|
1017
|
+
menuEl.style.top = high && innerWidth <= 760 ? Math.round(ar.bottom + 6) + 'px' : '';
|
|
1002
1018
|
const f = menuEl.querySelector('button'); if (f) f.focus();
|
|
1003
1019
|
}
|
|
1004
1020
|
function closeMenu() { if (menuEl.hidden) return; menuEl.hidden = true; menuEl.removeAttribute('data-esc-layer'); if (menu.anchor) menu.anchor.classList.remove('hm-anc'); if (menu.anchor && menu.anchor.isConnected) menu.anchor.focus(); }
|
|
@@ -1012,7 +1028,7 @@ document.addEventListener('click', (e) => { if (!menuEl.hidden && !menuEl.contai
|
|
|
1012
1028
|
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !menuEl.hidden) { e.stopPropagation(); closeMenu(); } else if (e.key === 'Escape' && S.sheet) sheet(false); }, true);
|
|
1013
1029
|
function moreMenu(anchor) {
|
|
1014
1030
|
const go = {
|
|
1015
|
-
|
|
1031
|
+
around: () => MORE.openAround(), inbox: () => MORE.openInbox(searchGo), eod: () => MORE.openEndOfDay(), cal: () => openCalendar(),
|
|
1016
1032
|
rec: () => MORE.openRecorder(), search: () => MORE.openSearch(searchGo), products: () => MORE.openProducts(), sources: () => MORE.openSources(), settings: () => MORE.openSettings(),
|
|
1017
1033
|
};
|
|
1018
1034
|
menu(anchor, MORE.moreItems.map(([k, l]) => ({ label: l, go: go[k] })), 'Waiting for design');
|
|
@@ -1050,11 +1066,12 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1050
1066
|
}
|
|
1051
1067
|
if (d.hmPg) { const open = b.getAttribute('aria-expanded') === 'true'; S.pg[d.hmPg] = !open; store.set('pmos.home.pg', JSON.stringify(S.pg)); drawList(); const f = $(`#hmList [data-hm-pg="${CSS.escape(d.hmPg)}"]`); if (f) f.focus(); return; }
|
|
1052
1068
|
if ('hmProd' in d) { goIni('product'); return; }
|
|
1069
|
+
if (d.hmTasks) { if (S.tasks.has(d.hmTasks)) S.tasks.delete(d.hmTasks); else S.tasks.add(d.hmTasks); drawList(); return; }
|
|
1053
1070
|
if (d.hmRest) { if (S.rest.has(d.hmRest)) S.rest.delete(d.hmRest); else S.rest.add(d.hmRest); drawList(); return; }
|
|
1054
1071
|
if (d.hmFilter) { S.filter = d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
|
|
1055
1072
|
if (d.hmCheck) { checkRow(d.hmCheck); return; }
|
|
1056
1073
|
if ('hmReview' in d) { openReviewVw(); return; }
|
|
1057
|
-
if ('
|
|
1074
|
+
if ('hmFocus' in d) { import('./home-work.js').then((M) => M.openFocus()); return; }
|
|
1058
1075
|
if ('hmPick' in d) { pickProduct(b); return; }
|
|
1059
1076
|
if ('hmCapmic' in d) { const i = $('#hmCap'); if (i) capMic(i, b); return; }
|
|
1060
1077
|
if (d.hmTc) { todayPress(d.hmTc, b); return; }
|
|
@@ -1076,6 +1093,7 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1076
1093
|
if ('hmElse' in d) { const f = S.lay && S.lay.elsewhere && S.lay.elsewhere.first; goHome(); if (f) select(f.id); return; }
|
|
1077
1094
|
if ('hmPerson' in d) addPerson();
|
|
1078
1095
|
};
|
|
1096
|
+
$('#hmList').addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'hmCap' && S.cap) { e.stopPropagation(); S.cap = false; drawList(); } });
|
|
1079
1097
|
$('#hmList').addEventListener('submit', async (e) => { // the capture box: Enter adds the task
|
|
1080
1098
|
if (e.target.id !== 'hmCapF') return;
|
|
1081
1099
|
e.preventDefault();
|
|
@@ -1127,9 +1145,12 @@ $('#hmUnfold').onclick = () => { S.folded = false; store.set('pmos.home.fold', n
|
|
|
1127
1145
|
function cta() {
|
|
1128
1146
|
if (S.ini === 'product') { const C = H.productCard(S.D); if (C.sent) openUpdateViewer(); else { select('n:update'); } return; }
|
|
1129
1147
|
const h = S.H || {};
|
|
1130
|
-
if (h.need) { select(h.need.id); return; }
|
|
1131
|
-
|
|
1132
|
-
|
|
1148
|
+
if (h.need && h.need.ini === S.ini) { select(h.need.id); return; }
|
|
1149
|
+
// the review step: this initiative's own findings (its review document), never another row
|
|
1150
|
+
const rv = h.step === 'review' && S.IM && S.IMid === S.ini ? (S.IM.docs.rows || []).find((d) => d.key === 'review' && d.path) : null;
|
|
1151
|
+
if (rv) { openFile({ name: rv.title, path: rv.path }); return; }
|
|
1152
|
+
S.phoneChat = isPhone(); drawList(); // on a phone the chat shows over the list, or the press looks like it did nothing
|
|
1153
|
+
openTarget(iniTarget(S.ini));
|
|
1133
1154
|
if (h.ask) chat.send(h.ask);
|
|
1134
1155
|
}
|
|
1135
1156
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* viewerClosed(), reopenViewer() } */
|
|
20
20
|
import { mdHtml, userHtml, toolLine, webKind } from './chat-md.js';
|
|
21
21
|
import { streamOf, runOf, roleOf, tintOf, hm } from './home-data.js';
|
|
22
|
-
import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches } from './goal-chat.js';
|
|
22
|
+
import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches, loadSlash } from './goal-chat.js';
|
|
23
23
|
import { splitReport, reportChipHtml, blockSig } from './report-chat.js';
|
|
24
24
|
import { turnsOf } from './chat-context.js';
|
|
25
25
|
import { askCardHtml, answerText } from './chat-ask.js';
|
|
@@ -51,6 +51,9 @@ export function mountChat(el, host) {
|
|
|
51
51
|
el.innerHTML = `<button type="button" class="hm-reopen" id="hmReopen" aria-label="Open the Viewer" title="Open the Viewer" hidden>${PANE}</button>`
|
|
52
52
|
+ '<div class="hm-log" id="hmLog" role="log" aria-live="polite"></div><div class="hm-foot" id="hmFoot"></div>';
|
|
53
53
|
const log = el.querySelector('#hmLog'), foot = el.querySelector('#hmFoot'), reopen = el.querySelector('#hmReopen');
|
|
54
|
+
loadSlash(host.pmGet).then(() => { if (el.querySelector('#hmSlash:not([hidden])')) drawSlash(); });
|
|
55
|
+
// when a hidden log is shown (the phone's chat over the list), a jump still owed is made then
|
|
56
|
+
if (typeof ResizeObserver === 'function') new ResizeObserver(() => { if (C.jump && log.clientHeight) { log.scrollTop = log.scrollHeight; if (C.conv) C.jump = false; } }).observe(log);
|
|
54
57
|
reopen.onclick = () => host.reopenViewer();
|
|
55
58
|
// the foot's height, for the place menu's button on a phone: it sits just above the box and its bars (cozy-home.css --hm-foot-h)
|
|
56
59
|
if (typeof ResizeObserver === 'function') new ResizeObserver(() => document.body.style.setProperty('--bd-hmfoot', Math.round(foot.getBoundingClientRect().height) + 'px')).observe(foot);
|
|
@@ -177,7 +180,9 @@ export function mountChat(el, host) {
|
|
|
177
180
|
if (!html) html = `<p class="hm-empty">${esc(t.empty || 'Ask anything. It works in a real Claude Code session.')}</p>`;
|
|
178
181
|
put(log, html);
|
|
179
182
|
C.items = items;
|
|
180
|
-
|
|
183
|
+
// a session opens at its latest message: the jump waits until the conversation is read and the log is shown (on a phone the chat
|
|
184
|
+
// can be drawn while hidden, where scrollTop does nothing and the session then opened at the top)
|
|
185
|
+
if (atEnd || C.jump) { log.scrollTop = log.scrollHeight; if (C.conv && log.clientHeight) C.jump = false; }
|
|
181
186
|
drawFoot(R);
|
|
182
187
|
reopen.hidden = !host.viewerClosed();
|
|
183
188
|
// the PM has seen what is here now
|
|
@@ -279,7 +284,7 @@ export function mountChat(el, host) {
|
|
|
279
284
|
const scope = !to && !wait ? `<button type="button" class="hm-chip" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span></button>` : '';
|
|
280
285
|
html = `${also}${strip}<form class="hm-box${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for ${esc(R.role.name)}" placeholder="${esc(ph)}"></textarea>`
|
|
281
286
|
+ `<div class="hm-tb">${add}`
|
|
282
|
-
+ `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button><button type="button" class="hm-tool" data-hm-at aria-label="
|
|
287
|
+
+ `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button><button type="button" class="hm-tool" data-hm-at aria-label="Choose which conversation reads this" title="Send to another session of this initiative"><b>@</b></button>`
|
|
283
288
|
+ to + wait + scope + `<span class="sp"></span>${host.viewerClosed() ? '<span class="hm-key">Enter sends · Shift+Enter for a new line</span>' : ''}`
|
|
284
289
|
+ `${mic}<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
|
|
285
290
|
+ filesRow()
|
|
@@ -467,7 +472,8 @@ export function mountChat(el, host) {
|
|
|
467
472
|
if (!list.length) { if (m) { m.hidden = true; m.removeAttribute('data-esc-layer'); } return; }
|
|
468
473
|
if (!m) { foot.insertAdjacentHTML('afterbegin', '<div class="hm-slash" id="hmSlash" role="listbox" aria-label="Commands"></div>'); m = el.querySelector('#hmSlash'); }
|
|
469
474
|
C.slashAt = Math.min(C.slashAt, list.length - 1);
|
|
470
|
-
m.innerHTML = list.map((x, i) => `<button type="button" role="option" aria-selected="${i === C.slashAt}" data-slash="${esc(x.cmd)}"><code>${esc(x.cmd)}</code
|
|
475
|
+
m.innerHTML = list.map((x, i) => `<button type="button" role="option" aria-selected="${i === C.slashAt}" data-slash="${esc(x.cmd)}"><span class="l1"><code>${esc(x.cmd)}</code>${x.name && x.name !== x.cmd.slice(1) ? `<b>${esc(x.name)}</b>` : ''}</span>${x.say ? `<em>${esc(x.say)}</em>` : ''}</button>`).join('');
|
|
476
|
+
const on = m.querySelector('[aria-selected="true"]'); if (on && on.scrollIntoView) on.scrollIntoView({ block: 'nearest' });
|
|
471
477
|
m.hidden = false; m.setAttribute('data-esc-layer', '');
|
|
472
478
|
}
|
|
473
479
|
function pickSlash(cmd) { const ta = foot.querySelector('textarea'); ta.value = cmd + ' '; C.slashAt = 0; drawSlash(); grow(ta); ta.focus(); }
|
|
@@ -116,7 +116,9 @@ const risky = (r) => r.late || /risk|late|stalled|blocked/.test(statusOf(r));
|
|
|
116
116
|
const anchorOf = (r) => (r.kr ? r.kr : /^health:/.test(String(r.anchor || '')) ? String(r.anchor) : r.anchor ? String(r.anchor) : 'No anchor');
|
|
117
117
|
export function productName(D) {
|
|
118
118
|
const b = D.board && D.board.board;
|
|
119
|
-
|
|
119
|
+
// a workspace id (a hex hash like 8f24f28c35) is never shown as the product's name (testing fixes)
|
|
120
|
+
const word = (x) => (x && !/^[0-9a-f]{8,}$/i.test(String(x)) ? x : '');
|
|
121
|
+
return (b && (word(b.product) || word(b.name) || word(b.ws))) || word(D.desk && D.desk.ws) || 'This product';
|
|
120
122
|
}
|
|
121
123
|
/** The product's KRs and budgets this week: one item per anchor, on track when none of its initiatives is late or at risk. */
|
|
122
124
|
export function productCard(D, now = Date.now()) {
|
|
@@ -20,7 +20,7 @@ export function dictate(box, o = {}) {
|
|
|
20
20
|
if (!Rec || !el0) { said({ on: false, error: 'This browser cannot turn speech into text. Type instead.' }); return { stop() {}, cancel() {}, on: () => false }; }
|
|
21
21
|
const before = el0.value || '';
|
|
22
22
|
const lead = before && !/\s$/.test(before) ? before + ' ' : before;
|
|
23
|
-
let finalText = '', interim = '', t0 = Date.now(), tick = null, stopped = false;
|
|
23
|
+
let finalText = '', interim = '', t0 = Date.now(), tick = null, stopped = false, ended = false;
|
|
24
24
|
const r = new Rec();
|
|
25
25
|
r.continuous = true; r.interimResults = true;
|
|
26
26
|
r.lang = (typeof navigator !== 'undefined' && navigator.language) || 'en-US';
|
|
@@ -38,11 +38,14 @@ export function dictate(box, o = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
put();
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
// end runs once. Stop and Discard end at once and do not wait for the recogniser's onend: on an iPhone onend can fail to come, and the
|
|
42
|
+
// sheet then stayed open, counting, with no way to stop or close it (testing fixes)
|
|
43
|
+
const end = () => { if (ended) return; ended = true; clearInterval(tick); state.on = false; if (!stopped && interim) finalText += (finalText ? ' ' : '') + interim.trim(); interim = ''; /* a stop keeps the words heard so far */
|
|
44
|
+
r.onresult = null; if (current === C) current = null; if (!stopped) put(); said({ on: false }); };
|
|
45
|
+
r.onerror = (e) => { if (e && e.error === 'aborted') return; end(); said({ on: false, error: e && e.error === 'not-allowed' ? 'The browser did not allow the microphone.' : 'Listening stopped.' }); };
|
|
43
46
|
r.onend = end;
|
|
44
47
|
const C = {
|
|
45
|
-
stop() { stopped = false; try { r.stop(); } catch { end(); }
|
|
48
|
+
stop() { stopped = false; try { r.stop(); } catch { /* ended */ } end(); },
|
|
46
49
|
cancel() { stopped = true; try { r.abort(); } catch { /* ended */ } const x = B(); if (x) { x.value = before; x.dispatchEvent(new Event('input', { bubbles: true })); } end(); },
|
|
47
50
|
on: () => state.on,
|
|
48
51
|
};
|
|
@@ -250,10 +250,11 @@ function tasksView(id, M) {
|
|
|
250
250
|
function docRowHtml(d, cur, later) {
|
|
251
251
|
if (later) return `<div class="hi-drow later" data-ov-doc="${esc(d.key)}"><span class="hi-dic dash">${SVG(I.doc, 16)}</span><span class="hi-dt">${esc(d.title)} · comes in ${esc(d.phase)}</span>${d.act && d.act.kind === 'draft' && !d.running ? `<button type="button" class="hi-btn sm ghost" data-ov-draft="${esc(d.key)}">Draft it now</button>` : ''}</div>`;
|
|
252
252
|
const [pt, pc] = MD.docPill(d, cur);
|
|
253
|
-
|
|
253
|
+
// a document with no file yet is never a dead press: it says what happens to it (data-ov-none), and offers the draft when PMOS can write it
|
|
254
|
+
const open = d.path && d.st === 'draft' && d.slot ? `data-ov-dread="${esc(d.key)}"` : d.path ? `data-ov-open="${esc(d.path)}" data-ov-name="${esc(d.title)}"` : `data-ov-none="${esc(d.key)}"`;
|
|
254
255
|
const meta = [d.when, d.by, d.link ? d.link.kind : ''].filter(Boolean).join(' · ') || d.what;
|
|
255
256
|
return `<div class="hi-drow${d.look ? ' look' : ''}" data-ov-doc="${esc(d.key)}">`
|
|
256
|
-
+ `<button type="button" class="hi-dmain" ${open
|
|
257
|
+
+ `<button type="button" class="hi-dmain" ${open} aria-label="${d.path ? 'Open ' : ''}${esc(d.title)}"><span class="hi-dic">${SVG(I.doc, 16)}</span><span class="hi-dtx"><b>${esc(d.title)}</b> <span class="hi-k">· ${esc(d.kind)}${d.core ? ' · core' : ''}</span><em>${esc(meta)}</em>${d.link ? `<small>${esc(d.link.kind + ': ' + d.link.url)}</small>` : ''}</span></button>`
|
|
257
258
|
+ (d.act && d.act.kind === 'draft' && !d.running && d.st === 'missing' ? `<button type="button" class="hi-btn sm" data-ov-draft="${esc(d.key)}">Draft it</button>` : `<span class="hi-pill ${pc}">${esc(pt)}</span>`) + '</div>';
|
|
258
259
|
}
|
|
259
260
|
function docsView(id, M) {
|
|
@@ -387,6 +388,15 @@ function wire(body, id) {
|
|
|
387
388
|
if (d.hiDmore) { X.doc.more.add(d.hiDmore); redrawView(); return; }
|
|
388
389
|
if (d.ovDraft) { after(await X.ctx.pmPost('/api/core-docs/draft', { ws: M.board.ws, scope: M.docs.scope, key: d.ovDraft }), 'The draft started. It waits for you to read.'); return; }
|
|
389
390
|
if (d.ovOpen) { X.ctx.openFile({ path: d.ovOpen, name: d.ovName }); return; }
|
|
391
|
+
if (d.ovNone) {
|
|
392
|
+
const doc = (M.docs.rows || []).find((x) => x.key === d.ovNone); if (!doc) return;
|
|
393
|
+
if (doc.running) { X.ctx.toast(doc.title + ' is being drafted now. It opens here when it is ready.'); return; }
|
|
394
|
+
const can = doc.act && doc.act.kind === 'draft';
|
|
395
|
+
if (can) menu(t, [{ label: 'Draft it now', sub: 'PMOS writes a first draft for you to read', go: async () => after(await X.ctx.pmPost('/api/core-docs/draft', { ws: M.board.ws, scope: M.docs.scope, key: doc.key }), 'The draft started. It waits for you to read.') }],
|
|
396
|
+
doc.title + ' has no file yet' + (doc.by ? ' · ' + doc.by : ''));
|
|
397
|
+
if (!can) X.ctx.toast(doc.title + ' has no file yet.' + (doc.by ? ' ' + doc.by + '.' : ''));
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
390
400
|
if (d.ovDread) {
|
|
391
401
|
const doc = (M.docs.rows || []).find((x) => x.key === d.ovDread); if (!doc) return;
|
|
392
402
|
const A = await import('./home-draft.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* grouped by product. This file turns what the routes answer into what the list draws, and touches no page, so a node test imports it:
|
|
6
6
|
* productsOf(D) the products the list shows: the board's own first, then every product Home reads (GET /api/briefing-premium products)
|
|
7
7
|
* and every product a next step names; each with its goals line ("2 of 4 goals on track")
|
|
8
|
-
* homeList(D, o) { greet, yours, filters, groups, untouched, filter } for the list column
|
|
8
|
+
* homeList(D, o) { greet, yours, filters, groups, untouched, focus, filter } for the list column
|
|
9
9
|
* todayCard(D, o) the Today card through the day: day (greeting and the day's load), soon (a meeting in 15 minutes or less), live
|
|
10
10
|
* (a meeting on now), rec (a recording that is no calendar meeting), eod (the end of a day with something open), clear
|
|
11
11
|
* staleInis(D, now, days) open initiatives with no change for `days` days or more, the longest first
|
|
@@ -59,13 +59,21 @@ export function productsOf(D) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/* ── rows ── */
|
|
62
|
+
export const TASKS_SHOWN = 3;
|
|
62
63
|
function taskHint(t, now, mine) {
|
|
63
64
|
const d = t.end ? dayDiff(t.end, now) : null;
|
|
64
65
|
const when = d == null ? '' : d === 0 ? 'due today' : d === 1 ? 'due tomorrow' : d < 0 ? plural(-d, 'day', 'days') + ' late' : 'due ' + shortDay(t.end);
|
|
65
66
|
if (!mine) return ['Waiting on ' + (/^agent:/.test(String(t.owner)) ? 'an agent' : t.owner), when].filter(Boolean).join(' · ');
|
|
66
67
|
return ['Task', t.status && t.status !== 'To do' ? t.status : '', when].filter(Boolean).join(' · ');
|
|
67
68
|
}
|
|
68
|
-
/**
|
|
69
|
+
/** How soon a task wants the PM, lower first: due today, a few days late, due this week, long late, later or no day.
|
|
70
|
+
* A task 100 days late is usually a plan that moved, not the thing to do tonight, so it never outranks today's. */
|
|
71
|
+
function urgency(t, now) {
|
|
72
|
+
if (!t.end) return [4, 0];
|
|
73
|
+
const d = dayDiff(t.end, now);
|
|
74
|
+
return d === 0 ? [0, 0] : d < 0 && d >= -7 ? [1, -d] : d > 0 && d <= 7 ? [2, d] : d < 0 ? [3, -d] : [4, d];
|
|
75
|
+
}
|
|
76
|
+
/** The PMOS tasks of an initiative that are not done: the PM's first, by urgency(), then the ones that wait on someone else. */
|
|
69
77
|
export function tasksOf(D, ini, now = Date.now()) {
|
|
70
78
|
const me = String((D.today && D.today.me) || '').toLowerCase();
|
|
71
79
|
const items = ((D.items && D.items.items) || []).filter((t) => t && t.src === 'pmos' && t.kind !== 'Epic' && t.ini === ini && t.status !== 'Done');
|
|
@@ -73,7 +81,8 @@ export function tasksOf(D, ini, now = Date.now()) {
|
|
|
73
81
|
const ow = String(t.owner || '').toLowerCase();
|
|
74
82
|
const mine = !ow || /^(pm|you)(:|$)/.test(ow) || (!!me && (ow === me || ow.startsWith(me + ' ')));
|
|
75
83
|
return { id: 't:' + t.uid, kind: 'task', ini, name: t.title, hint: taskHint(t, now, mine), state: mine ? 'quiet' : 'wait', mine, due: t.end || '', late: !!(t.end && dayDiff(t.end, now) < 0), task: t };
|
|
76
|
-
}).
|
|
84
|
+
}).map((r) => ({ ...r, rank: urgency(r.task, now) }))
|
|
85
|
+
.sort((a, b) => (b.mine - a.mine) || (a.rank[0] - b.rank[0]) || (a.rank[1] - b.rank[1]));
|
|
77
86
|
}
|
|
78
87
|
function meetRow(m, ini) {
|
|
79
88
|
return { id: 'm:' + (m.id || m.title), kind: 'meeting', ini: ini || null, name: m.title, hint: (m.state === 'now' ? 'Now' : hm(m.start)) + (ini ? ' meeting' : ' · not linked'), state: m.state === 'now' ? 'working' : 'quiet', icon: 'clock', meeting: m };
|
|
@@ -97,7 +106,8 @@ function iniRowOf(D, r, needs, now) {
|
|
|
97
106
|
const mine = tasks.filter((t) => t.mine).length;
|
|
98
107
|
const run = ses.filter((s) => s.state === 'working').length;
|
|
99
108
|
const right = turn ? 'your turn' + (mine ? ' · ' + plural(mine, 'task', 'tasks') : '') : mine ? plural(mine, 'task', 'tasks') : run ? run + ' running' : 'Nothing today';
|
|
100
|
-
|
|
109
|
+
// next steps, sessions and today's meetings always show; tasks show the TASKS_SHOWN most urgent, the rest behind "Show N more tasks"
|
|
110
|
+
const kids = [...steps, ...ses.sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0)), ...tasks.map((t, i) => (i < TASKS_SHOWN ? t : { ...t, extra: true })), ...meet];
|
|
101
111
|
const hint = r.made ? [cap1(r.lane), r.stage].filter(Boolean).join(' · ') : [cap1(r.lane || 'feature'), r.stage].filter(Boolean).join(' · ');
|
|
102
112
|
return { id: 'i:' + r.id, kind: 'ini', ini: r.id, name: r.title, hint, right, turn, busy: kids.length > 0, state: turn ? 'needs' : run ? 'working' : 'quiet', kids, board: r, updated: r.updated || '' };
|
|
103
113
|
}
|
|
@@ -166,7 +176,10 @@ export function homeList(D, o = {}) {
|
|
|
166
176
|
}
|
|
167
177
|
const yours = needs.length + mentionsOf(D).filter((m) => m.initiative && groups.some((g) => g.inis.concat(g.rest || []).some((i) => i.ini === m.initiative))).length;
|
|
168
178
|
const nIni = groups.filter((g) => g.kind === 'product').reduce((n, g) => n + g.count, 0);
|
|
169
|
-
|
|
179
|
+
// Focus (my-work-premium's focus): the suggestions left for today, else what the PM accepted; null when there is neither
|
|
180
|
+
const F = W && W.focus, sug = (F && F.suggestions) || [], acc = (F && F.accepted) || [];
|
|
181
|
+
const focus = sug.length || acc.length ? { suggested: sug.length, accepted: acc.length, title: sug.length ? sug[0].title + (sug[0].why ? ' · ' + sug[0].why : '') : acc.map((x) => x.title).join(' · ') } : null;
|
|
182
|
+
return { yours, greet: greeting(yours, now), products, primary, filters, filter: o.filter || 'today', groups, list, untouched, focus,
|
|
170
183
|
counts: { products: products.length, initiatives: nIni } };
|
|
171
184
|
}
|
|
172
185
|
|
|
@@ -221,8 +234,8 @@ export function todayCard(D, o = {}) {
|
|
|
221
234
|
const P = D.phoneDay && D.phoneDay.ok !== false ? D.phoneDay : null;
|
|
222
235
|
const block = needs.find((x) => x.row && /decision|blocked/.test(x.row.kind)) || needs[0] || null;
|
|
223
236
|
const rec = P && P.recap ? P.recap : null;
|
|
224
|
-
|
|
225
|
-
const doneLine =
|
|
237
|
+
// Done is counts, never a meeting's decision text: a decision is not a thing done, and only the ones the PM confirmed count (testing fixes)
|
|
238
|
+
const doneLine = rec ? [rec.done ? plural(rec.done, 'task', 'tasks') + ' done' : '', rec.decided ? plural(rec.decided, 'decision', 'decisions') + ' confirmed' : '', rec.finished ? plural(rec.finished, 'draft', 'drafts') + ' finished' : '', rec.to_confirm ? rec.to_confirm + ' from notes to confirm' : ''].filter(Boolean).join(' · ') : '';
|
|
226
239
|
const runs = (D.sessions || []).filter((s) => s.shown === 'working');
|
|
227
240
|
const over = runs.length ? (runs.length === 1 ? ((runs[0].hx && runs[0].hx.title) || runs[0].name) + ' runs.' : runs.length + ' sessions run.') + ' Results are in New for you by morning.' : '';
|
|
228
241
|
const tm = P && P.tomorrow ? P.tomorrow : null;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Each opens in the Viewer card (cozy-viewer.js), never the old dialog, and reads and writes through the routes the old pages used:
|
|
5
5
|
* openSettings() the designed Settings (pm/cozy-settings.js, premium-uncovered-features E3)
|
|
6
6
|
* openSources() the designed Sources (pm/cozy-sources.js, E3); readLine below gives its read lines
|
|
7
|
-
* openMyWork(tab) home-work.js:
|
|
7
|
+
* openMyWork(tab) home-work.js: the old My work page. Home no longer opens it (Home's list is the list); an item and Focus open alone;
|
|
8
8
|
* keys and swipe on the rows (GET /api/my-work-premium; the /api/pm-items, /api/pm-jobs and /api/my-work presses)
|
|
9
9
|
* openAround(key?) home-around.js: Around you is gone (premium-uncovered-features, HmAround); its views stay, opened from New for you
|
|
10
10
|
* openEndOfDay() GET /api/phone-day: what finished today, the recap and tomorrow's meetings
|
|
@@ -32,7 +32,7 @@ function card(o, draw) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export const moreItems = [
|
|
35
|
-
['
|
|
35
|
+
['eod', 'End of the day', 'cal'], ['cal', 'Calendar', 'cal'], ['rec', 'Record a note', 'mic'], ['products', 'Products', 'chart'],
|
|
36
36
|
];
|
|
37
37
|
|
|
38
38
|
/** The ⋯ list itself in the Viewer, for a page with no menu of its own: items are [label, open]. */
|
|
@@ -54,10 +54,15 @@ export function mountPhoneCard(o) {
|
|
|
54
54
|
return `<span class="label">Your morning</span>${big(top.length ? ['', 'One thing', 'Two things', 'Three things'][top.length] + ' this morning' : 'Nothing pressing this morning')}${items(top)}${S(waits)}${nx}`;
|
|
55
55
|
}
|
|
56
56
|
if (mo.kind === 'work') return `<span class="label">${mo.next ? 'Next: ' + esc(mo.next.title) + ' at ' + hm(mo.next.start) : 'No more meetings today'}</span>${big(fin.length ? 'Finished for you' : 'Nothing new from the agent')}${fin.length ? finRows(2) + S('Approving a draft waits for your computer.') : dayErr() || S('When the agent finishes a draft today, it shows here.')}${mo.fits.length ? fits(mo.fits) : ''}${mo.next ? `<div class="phacts">${open(mo.next)}</div>` : ''}`;
|
|
57
|
-
if (mo.kind === 'recap') {
|
|
58
|
-
const r = day && day.recap, one = mine[0];
|
|
59
|
-
const
|
|
60
|
-
|
|
57
|
+
if (mo.kind === 'recap') { // canvas HmPhone2's End of day: plain lines, one soft well for the one thing to do
|
|
58
|
+
const r = day && day.recap, one = mine[0], rest = mine.length - (one ? 1 : 0);
|
|
59
|
+
const KIND = { decision: 'Decided', done: 'Done', agent: 'Agent' };
|
|
60
|
+
const sum = r ? L([num(r.meetings, 'meeting', 'meetings'), num(r.decided, 'decision confirmed', 'decisions confirmed'), num(r.done, 'item done', 'items done')].join(' · ')) : dayErr();
|
|
61
|
+
const moved = r && (r.moved || []).length ? `<div class="phmv"><span class="label">What moved</span>${r.moved.map((x) => `<p><b>${esc(KIND[x.kind] || '')}</b><span>${esc(x.text)}</span>${x.sub ? `<em>${esc(x.sub)}</em>` : ''}</p>`).join('')}</div>` : '';
|
|
62
|
+
const conf = r && r.to_confirm ? `<p class="phs phq">${esc(num(r.to_confirm, 'decision', 'decisions'))} from today's notes ${r.to_confirm === 1 ? 'is' : 'are'} not confirmed yet, so ${r.to_confirm === 1 ? 'it does' : 'they do'} not count. Confirm them in the meeting's Replay.</p>` : '';
|
|
63
|
+
const open = one ? `<div class="phfit" data-id="${esc(one.id)}"><span class="label">One thing tonight · ${esc(one.label)}</span><b class="phtt">${esc(one.headline)}</b>${P.dec.has(one.id) ? `<p class="phok" role="status">${CHECK}<span>Done.</span></p><div class="phacts">${btn('Undo', 'phundo', one.id, true)}</div>` : `<div class="phacts">${btn(one.looks ? 'Confirm done' : 'Done', 'phdone', one.id)}</div>`}${P.err[one.id] ? `<p class="pherr" role="alert">${esc(P.err[one.id])}</p>` : ''}${rest ? S(num(rest, 'more is', 'more are') + ' still open. ' + (rest === 1 ? 'It comes' : 'They come') + ' first on Home tomorrow.') : ''}</div>`
|
|
64
|
+
: S('Nothing of yours is still open.');
|
|
65
|
+
return `<span class="label">Evening recap</span>${big('How today went')}${sum}${moved}${conf}${open}`;
|
|
61
66
|
}
|
|
62
67
|
const r = day && day.recap, tm = day && day.tomorrow;
|
|
63
68
|
return `<span class="label">End of day</span>${big(tm ? 'Tomorrow, ' + tm.label : 'Tomorrow, at a glance')}${r ? L('Today: ' + [num(r.meetings, 'meeting', 'meetings'), num(r.decided, 'decision', 'decisions'), num(r.done, 'item done', 'items done')].join(', ') + '.') : ''}${tm ? `<div class="phfit"><b class="phtt">${tm.meetings.length ? num(tm.meetings.length, 'meeting', 'meetings') : 'No meetings'}</b>${tm.meetings.slice(0, 5).map((x) => `<p class="phs">${hm(x.start)} · ${esc(x.title)}${who(x) ? ' · ' + esc(who(x)) : ''}</p>`).join('')}</div>` : dayErr()}${S(mine.length ? num(mine.length, 'item carries', 'items carry') + ' over. They open first on Home tomorrow.' : 'Nothing carries over.')}`;
|
|
@@ -14,7 +14,7 @@ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct
|
|
|
14
14
|
const dayLabel = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
15
15
|
const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many);
|
|
16
16
|
/** The seg over My work and the weekly review: which of the two the Viewer shows. */
|
|
17
|
-
export const tabsHtml = (
|
|
17
|
+
export const tabsHtml = () => ''; // My work is no longer a page of its own (Home's list is the list), so the review has no tab beside it
|
|
18
18
|
|
|
19
19
|
export function openReview(h) {
|
|
20
20
|
const st = { done: {}, picked: new Set(), msg: '', busy: false };
|
|
@@ -66,14 +66,13 @@ export function openReview(h) {
|
|
|
66
66
|
+ `<div class="cz-ladder" role="img" aria-label="${R.steps.filter((x) => x.done).length} of 4 steps done">${R.steps.map((s) => `<i class="${s.done ? 'done' : s.now ? 'now' : ''}"></i>`).join('')}</div>`
|
|
67
67
|
+ `<div class="ut-steps">${steps}</div><p class="ut-small ut-mut" role="status" id="rvMsg">${esc(st.msg)}</p><p class="ut-small ut-mut ut-foot">${esc(last)}</p></div>`;
|
|
68
68
|
};
|
|
69
|
-
const body = h.VW.open({ id: 'review', kind: '
|
|
69
|
+
const body = h.VW.open({ id: 'review', kind: 'Weekly review', title: 'Weekly review', icon: 'list', render: draw });
|
|
70
70
|
const say = (m) => { st.msg = m; const el = body.querySelector('#rvMsg'); if (el) el.textContent = m; };
|
|
71
71
|
const post = async (path, b) => { const r = await h.pmPost(path, b).catch(() => null); if (!r || r.ok !== true) { say((r && r.error) || 'Nothing was changed.'); return null; } return r; };
|
|
72
72
|
const redraw = async () => { await h.reload(); if (body.isConnected) draw(body); };
|
|
73
73
|
body.onclick = async (e) => {
|
|
74
74
|
const b = e.target.closest('button'); if (!b || b.disabled) return;
|
|
75
75
|
const d = b.dataset;
|
|
76
|
-
if (d.utTab === 'work') { h.openWork(); return; }
|
|
77
76
|
if (d.rvToday) { if (await post('/api/pm-items/flag', { id: d.rvToday, flagged: true })) { st.done[d.k] = 'today'; draw(body); } return; }
|
|
78
77
|
if (d.rvKeep) { if (await post('/api/pm-items/keep', { id: d.rvKeep })) { st.done[d.k] = 'kept'; draw(body); } return; }
|
|
79
78
|
if (d.rvDone) { if (await post('/api/pm-items/done', { id: d.rvDone })) { st.done[d.k] = 'done'; draw(body); } return; }
|
|
@@ -50,7 +50,10 @@ export function rowHtml(r, o) {
|
|
|
50
50
|
/** An initiative row: the chevron opens what sits under it, the title opens the initiative. */
|
|
51
51
|
function iniHtml(r, o) {
|
|
52
52
|
const open = o.isOpen(r.id);
|
|
53
|
-
const
|
|
53
|
+
const all = o.tasksOpen ? o.tasksOpen(r.id) : false, hid = r.kids.filter((k) => k.extra).length;
|
|
54
|
+
const kids = all ? r.kids : r.kids.filter((k) => !k.extra);
|
|
55
|
+
const more = hid ? `<button type="button" class="hm-more2" data-hm-tasks="${esc(r.id)}" aria-expanded="${all}">${all ? 'Show fewer tasks' : `Show ${hid} more ${hid === 1 ? 'task' : 'tasks'}`}</button>` : '';
|
|
56
|
+
const nest = open ? `<div class="hm-nest" role="group" aria-label="In ${esc(r.name)}">${kids.map((k) => rowHtml(k, { ...o, kid: true })).join('') || '<p class="hm-none">Nothing today.</p>'}${more}</div>` : '';
|
|
54
57
|
return `<div class="hm-r lr ini st-${esc(r.state)}${o.sel === r.id ? ' sel' : ''}" data-id="${esc(r.id)}"><button type="button" class="hm-tg" data-hm-kids="${esc(r.id)}" aria-expanded="${open}" aria-label="${open ? 'Hide' : 'Show'} what is in ${esc(r.name)}">${svg(open ? P.chevD : P.chevR, 14)}</button>`
|
|
55
58
|
+ `<button type="button" class="hm-rm" data-hm-sel="${esc(r.id)}"><span class="hm-rt"><b>${esc(r.name)}</b><em class="q">${esc(r.hint)}</em></span><span class="hm-rr${r.turn ? '' : ' q'}">${esc(r.right)}</span></button></div>${nest}`;
|
|
56
59
|
}
|
|
@@ -120,7 +123,9 @@ export function listHtml(M, T, o) {
|
|
|
120
123
|
+ (many ? `<button type="button" class="cz-pick hm-pk" data-hm-pick aria-haspopup="menu" aria-expanded="false">${esc(picked ? picked.name : 'All products')} ${svg(P.chevD, 14)}</button><button type="button" class="ut-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 16)}</button>`
|
|
121
124
|
: `<button type="button" class="hm-new" data-hm-new aria-haspopup="menu">${svg(P.plus, 14)}New</button>`) + '</div>';
|
|
122
125
|
const card = todayHtml(T, { greet: M.greet, sub: o.sub });
|
|
123
|
-
|
|
126
|
+
// Focus (once on the My work page): the agent's suggested focus for today, or what the PM accepted; it opens Focus and jobs
|
|
127
|
+
const fc = M.focus && (M.focus.suggested || M.focus.accepted) ? `<button type="button" class="cz-chip gh hm-fc" data-hm-focus aria-label="Focus and jobs: ${esc(M.focus.title)}" title="${esc(M.focus.title)}">Focus <em>${M.focus.suggested ? M.focus.suggested + ' suggested' : M.focus.accepted + ' in focus'}</em></button>` : '';
|
|
128
|
+
const flt = `<div class="hm-flt" role="group" aria-label="Show">${M.filters.map((f, i) => `<button type="button" class="cz-chip${f.key === M.filter ? ' on' : ' gh'}${i > 1 ? ' dk' : ''}" data-hm-filter="${f.key}" aria-pressed="${f.key === M.filter}">${esc(f.label)}${f.n ? ' ' + f.n : ''}</button>`).join('')}${fc}</div>`;
|
|
124
129
|
if (!o.ready) return head + card + '<p class="hm-none" role="status">Reading your work.</p>';
|
|
125
130
|
const errLine = `<p class="hm-none" role="status">Home could not read the repository: ${esc(o.err)}.</p>`;
|
|
126
131
|
if (o.err && !M.groups.some((g) => (g.kind === 'product' && g.count) || (g.rows && g.rows.length))) return head + card + errLine;
|
|
@@ -134,11 +139,10 @@ export function listHtml(M, T, o) {
|
|
|
134
139
|
if (R && R.open) body += `<section class="hm-pg" aria-label="This week"><div class="hm-ghd">This week<span class="n">Fri</span></div><div class="hm-r lr${o.sel === 'review' ? ' sel' : ''}" data-id="review"><button type="button" class="hm-rm" data-hm-review><span class="hm-tile wk">${svg(P.check, 16)}</span><span class="hm-rt"><b>Weekly review</b><em>${R.started ? 'Step ' + (R.at + 1) + ' of 4' : 'Four short steps'}</em></span></button></div></section>`;
|
|
135
140
|
body += M.groups.map((g) => (g.kind === 'product' ? productHtml(g, o) : looseHtml(g, o))).join('');
|
|
136
141
|
if (!M.groups.some((g) => (g.kind === 'product' && (g.count || g.flat.length)) || (g.rows && g.rows.length))) body += '<p class="hm-none">Nothing is open. A new initiative or a task you add shows here.</p>';
|
|
137
|
-
|
|
142
|
+
// the capture box shows only after New → A task → Not in an initiative (o.cap); an initiative's task is added in its Tasks view
|
|
143
|
+
if (o.cap) body += `<form class="hm-cap" id="hmCapF"><label class="vh" for="hmCap">Add a task to your own list</label><input id="hmCap" autocomplete="off" maxlength="250" placeholder="A task for your own list. Esc to cancel">`
|
|
138
144
|
+ (o.mic ? `<button type="button" class="ut-ib" data-hm-capmic aria-label="Say it instead" title="Say it instead">${svg(P.mic, 16)}</button>` : '') + '</form>';
|
|
139
145
|
if (M.untouched.n) body += `<button type="button" class="hm-un" data-hm-review><b>Untouched 14+ days · ${M.untouched.n}</b><span>Weekly review ${esc(M.untouched.day)}</span></button>`;
|
|
140
146
|
}
|
|
141
|
-
|
|
142
|
-
const all = `<div class="hm-r lr hm-all"><button type="button" class="hm-rm" data-hm-work><span class="hm-tile wk">${svg(P.list, 16)}</span><span class="hm-rt"><b>All of my work</b><em class="q">${esc([waiting + ' waiting', M.untouched.n + ' untouched'].join(' · '))}</em></span>${svg(P.chevR, 16)}</button></div>`;
|
|
143
|
-
return head + card + flt + body + all;
|
|
147
|
+
return head + card + flt + body;
|
|
144
148
|
}
|