create-pmos 0.399.0 → 0.401.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +30 -25
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +3 -3
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-sources-test.js +2 -0
- package/workspace/briefing-premium-test.js +6 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +29 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +24 -3
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/phone-companion.md +1 -1
- package/workspace/lib/core-docs.js +2 -2
- package/workspace/lib/route-modules.js +1 -9
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +8 -3
- package/workspace/premium-vw-cal-test.js +4 -1
- package/workspace/premium-vw-doc-test.js +1 -8
- package/workspace/premium-work-depth-test.js +2 -3
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/c3-base.js +47 -0
- package/workspace/public/pm/c3-capture.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/c3-sheet.js +1 -1
- package/workspace/public/pm/c3-toast.js +1 -1
- package/workspace/public/pm/console3.css +3 -0
- package/workspace/public/pm/cozy-home.css +21 -6
- package/workspace/public/pm/cozy-today.css +4 -3
- package/workspace/public/pm/cozy-viewer.js +4 -2
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-app.js +65 -33
- package/workspace/public/pm/home-chat.js +34 -29
- package/workspace/public/pm/home-data.js +10 -2
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +13 -3
- package/workspace/public/pm/home-list.js +18 -10
- package/workspace/public/pm/home-more.js +2 -2
- package/workspace/public/pm/home-phone-card.js +9 -4
- package/workspace/public/pm/home-review.js +2 -3
- package/workspace/public/pm/home-today.js +11 -8
- package/workspace/public/pm/home-work.js +13 -8
- package/workspace/public/pm/note-dock.js +1 -2
- package/workspace/public/pm/notes-links.js +1 -2
- package/workspace/public/pm/notes-task.js +3 -4
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/premium-vw-item.css +6 -0
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/replaced-tests.json +435 -0
- package/workspace/run-tests.js +323 -28
- package/workspace/server.js +15 -10
- package/workspace/test-files.json +4 -140
- package/workspace/test-lists/base.json +1 -2
- package/workspace/test-lists/c3-desktop-light-load.json +1 -2
- package/workspace/test-lists/c3-initiative-boards.json +1 -2
- package/workspace/test-lists/c3-meeting-focus.json +2 -12
- package/workspace/test-lists/c3-work-agent.json +1 -2
- package/workspace/test-lists/calendar-tidy-up.json +1 -2
- package/workspace/test-lists/console3-reports.json +1 -2
- package/workspace/test-lists/docs-three-way-sync.json +1 -2
- package/workspace/test-lists/extension-capture.json +5 -0
- package/workspace/test-lists/jira-wbs.json +1 -2
- package/workspace/test-lists/legacy-cleanup-a.json +9 -0
- package/workspace/test-lists/meeting-material.json +1 -2
- package/workspace/test-lists/meeting-notes.json +2 -36
- package/workspace/test-lists/meeting-replay.json +1 -2
- package/workspace/test-lists/mm-capture.json +2 -12
- package/workspace/test-lists/my-work.json +2 -10
- package/workspace/test-lists/onboarding-firstrun.json +2 -12
- package/workspace/test-lists/people-directory.json +1 -2
- package/workspace/test-lists/run2-a.json +1 -2
- package/workspace/test-lists/run2-d.json +2 -19
- package/workspace/test-lists/run3-b.json +1 -2
- package/workspace/test-lists/run3-c.json +2 -12
- package/workspace/test-lists/run4-b.json +1 -2
- package/workspace/test-lists/run4-d.json +1 -5
- package/workspace/test-lists/run5-c.json +1 -11
- package/workspace/test-lists/run6.json +1 -5
- package/workspace/test-lists/workspace-launch-flags.json +2 -12
- package/workspace/test-lists/workspace-profile-detection.json +2 -10
- package/workspace/test-timings.json +242 -123
- package/workspace/c3-briefing-test.js +0 -136
- package/workspace/c3-core-docs-test.js +0 -170
- package/workspace/c3-driver-fixture.js +0 -64
- package/workspace/c3-driver-test.js +0 -169
- package/workspace/c3-foundation-test.js +0 -163
- package/workspace/c3-ib-items-test.js +0 -114
- package/workspace/c3-ib-more-test.js +0 -146
- package/workspace/c3-ib-triage-backlog-test.js +0 -128
- package/workspace/c3-ini-harness.js +0 -66
- package/workspace/c3-ini-life-test.js +0 -167
- package/workspace/c3-initiatives-test.js +0 -186
- package/workspace/c3-light-load-test.js +0 -112
- package/workspace/c3-one-home-test.js +0 -149
- package/workspace/c3-phone-test.js +0 -289
- package/workspace/c3-quiet-test.js +0 -157
- package/workspace/c3-report-design-real-test.js +0 -264
- package/workspace/c3-report-design-test.js +0 -442
- package/workspace/c3-report-setup-test.js +0 -192
- package/workspace/c3-report-structure-real-test.js +0 -248
- package/workspace/c3-report-structure-test.js +0 -397
- package/workspace/c3-reports-test.js +0 -288
- package/workspace/c3-scan-test.js +0 -517
- package/workspace/c3-sessions-panel-test.js +0 -365
- package/workspace/c3-settings-test.js +0 -204
- package/workspace/c3-updates-test.js +0 -131
- package/workspace/c3-work-test.js +0 -260
- package/workspace/cut-stub.js +0 -40
- package/workspace/first-paint-audit.js +0 -160
- package/workspace/lib/c3-full-console.js +0 -15
- package/workspace/lib/engine/derived/trust.js +0 -3
- package/workspace/lib/engine/plan-forecast.js +0 -342
- package/workspace/lib/engine/report-families.js +0 -175
- package/workspace/lib/engine/truth-table.js +0 -57
- package/workspace/lib/routes-c3-init.js +0 -54
- package/workspace/lib/routes-c3-life.js +0 -120
- package/workspace/lib/routes-c3-timeline.js +0 -192
- package/workspace/lib/routes-forecast.js +0 -86
- package/workspace/lib/routes-releases.js +0 -130
- package/workspace/lib/routes-report-facts.js +0 -85
- package/workspace/lib/routes-report-families.js +0 -33
- package/workspace/lib/routes-signals.js +0 -51
- package/workspace/lib/routes-timeline.js +0 -197
- package/workspace/public/c3.html +0 -35
- package/workspace/public/index.html +0 -156
- package/workspace/public/pm/app.js +0 -831
- package/workspace/public/pm/bd-board.js +0 -159
- package/workspace/public/pm/bd-drag.js +0 -59
- package/workspace/public/pm/bd-model.js +0 -152
- package/workspace/public/pm/bd-timeline.js +0 -233
- package/workspace/public/pm/bd-tree.js +0 -244
- package/workspace/public/pm/board-copy.js +0 -59
- package/workspace/public/pm/board-read.js +0 -38
- package/workspace/public/pm/branches-sheet.js +0 -56
- package/workspace/public/pm/breakdown-api.js +0 -58
- package/workspace/public/pm/breakdown-copy.js +0 -138
- package/workspace/public/pm/briefing-deck.js +0 -441
- package/workspace/public/pm/briefing-model.js +0 -251
- package/workspace/public/pm/c3-ambient.js +0 -100
- package/workspace/public/pm/c3-audience-link.js +0 -21
- package/workspace/public/pm/c3-audience.js +0 -46
- package/workspace/public/pm/c3-boot.js +0 -13
- package/workspace/public/pm/c3-breakdown.js +0 -240
- package/workspace/public/pm/c3-brief-data.js +0 -11
- package/workspace/public/pm/c3-brief-mentions.js +0 -137
- package/workspace/public/pm/c3-brief-needs.js +0 -288
- package/workspace/public/pm/c3-brief-pulse.js +0 -112
- package/workspace/public/pm/c3-brief-summary.js +0 -139
- package/workspace/public/pm/c3-brief-today.js +0 -79
- package/workspace/public/pm/c3-brief.js +0 -279
- package/workspace/public/pm/c3-cal-strategy.js +0 -529
- package/workspace/public/pm/c3-calendar.js +0 -965
- package/workspace/public/pm/c3-calpop.js +0 -111
- package/workspace/public/pm/c3-case.js +0 -196
- package/workspace/public/pm/c3-core-docs.css +0 -18
- package/workspace/public/pm/c3-core-docs.js +0 -236
- package/workspace/public/pm/c3-daypart.js +0 -176
- package/workspace/public/pm/c3-demo-boards.js +0 -764
- package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
- package/workspace/public/pm/c3-demo-brief-page.js +0 -70
- package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
- package/workspace/public/pm/c3-demo-cal2.js +0 -66
- package/workspace/public/pm/c3-demo-cal3.js +0 -173
- package/workspace/public/pm/c3-demo-cal4.js +0 -169
- package/workspace/public/pm/c3-demo-cal5.js +0 -52
- package/workspace/public/pm/c3-demo-coredocs.js +0 -221
- package/workspace/public/pm/c3-demo-data.js +0 -552
- package/workspace/public/pm/c3-demo-focus.js +0 -181
- package/workspace/public/pm/c3-demo-init.js +0 -430
- package/workspace/public/pm/c3-demo-life.js +0 -77
- package/workspace/public/pm/c3-demo-material.js +0 -58
- package/workspace/public/pm/c3-demo-misc2.js +0 -34
- package/workspace/public/pm/c3-demo-phone.js +0 -48
- package/workspace/public/pm/c3-demo-plan2.js +0 -30
- package/workspace/public/pm/c3-demo-rd.js +0 -432
- package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
- package/workspace/public/pm/c3-demo-rep2.js +0 -130
- package/workspace/public/pm/c3-demo-rep3.js +0 -138
- package/workspace/public/pm/c3-demo-rs.js +0 -287
- package/workspace/public/pm/c3-demo-term.js +0 -153
- package/workspace/public/pm/c3-demo-time.js +0 -49
- package/workspace/public/pm/c3-demo-work-ix.js +0 -32
- package/workspace/public/pm/c3-demo.js +0 -131
- package/workspace/public/pm/c3-design-studio.js +0 -369
- package/workspace/public/pm/c3-doc-formats.js +0 -153
- package/workspace/public/pm/c3-doc-sheet.js +0 -1230
- package/workspace/public/pm/c3-dock.js +0 -206
- package/workspace/public/pm/c3-docs.js +0 -291
- package/workspace/public/pm/c3-driver-work.js +0 -110
- package/workspace/public/pm/c3-driver.css +0 -18
- package/workspace/public/pm/c3-driver.js +0 -298
- package/workspace/public/pm/c3-focus.css +0 -304
- package/workspace/public/pm/c3-focus.js +0 -983
- package/workspace/public/pm/c3-ib-docs.js +0 -92
- package/workspace/public/pm/c3-ib-initiatives.js +0 -201
- package/workspace/public/pm/c3-ib-items.js +0 -210
- package/workspace/public/pm/c3-ib-releases.js +0 -48
- package/workspace/public/pm/c3-ib-sprints.js +0 -201
- package/workspace/public/pm/c3-ib-triage.js +0 -177
- package/workspace/public/pm/c3-ii-tabs.js +0 -252
- package/workspace/public/pm/c3-ini-life.css +0 -34
- package/workspace/public/pm/c3-ini-life.js +0 -379
- package/workspace/public/pm/c3-ini-records.js +0 -197
- package/workspace/public/pm/c3-ini-timeline.js +0 -278
- package/workspace/public/pm/c3-ini-work.js +0 -139
- package/workspace/public/pm/c3-init-extras.js +0 -170
- package/workspace/public/pm/c3-initiatives.js +0 -852
- package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
- package/workspace/public/pm/c3-look.js +0 -27
- package/workspace/public/pm/c3-material.css +0 -22
- package/workspace/public/pm/c3-material.js +0 -321
- package/workspace/public/pm/c3-md.js +0 -3
- package/workspace/public/pm/c3-misc-panels.js +0 -89
- package/workspace/public/pm/c3-new-session.js +0 -110
- package/workspace/public/pm/c3-notes.js +0 -751
- package/workspace/public/pm/c3-phone-boot.js +0 -47
- package/workspace/public/pm/c3-phone-detail.js +0 -97
- package/workspace/public/pm/c3-phone-model.js +0 -3
- package/workspace/public/pm/c3-phone.css +0 -66
- package/workspace/public/pm/c3-phone.js +0 -444
- package/workspace/public/pm/c3-plan-panels.js +0 -163
- package/workspace/public/pm/c3-plan.js +0 -193
- package/workspace/public/pm/c3-quiet.css +0 -113
- package/workspace/public/pm/c3-quiet.js +0 -177
- package/workspace/public/pm/c3-replay.css +0 -133
- package/workspace/public/pm/c3-replay.js +0 -429
- package/workspace/public/pm/c3-report-deck.css +0 -163
- package/workspace/public/pm/c3-report-deck.js +0 -598
- package/workspace/public/pm/c3-report-frame.css +0 -20
- package/workspace/public/pm/c3-report-print.css +0 -20
- package/workspace/public/pm/c3-report-setup.css +0 -67
- package/workspace/public/pm/c3-report-setup.js +0 -298
- package/workspace/public/pm/c3-report-store.js +0 -244
- package/workspace/public/pm/c3-report-structure.css +0 -44
- package/workspace/public/pm/c3-report-structure.js +0 -473
- package/workspace/public/pm/c3-reports.css +0 -68
- package/workspace/public/pm/c3-reports.js +0 -377
- package/workspace/public/pm/c3-roadmap.js +0 -249
- package/workspace/public/pm/c3-scan-api.js +0 -167
- package/workspace/public/pm/c3-scan-next.js +0 -248
- package/workspace/public/pm/c3-scan-setup.js +0 -313
- package/workspace/public/pm/c3-scan-words.js +0 -41
- package/workspace/public/pm/c3-scan.css +0 -74
- package/workspace/public/pm/c3-scan.js +0 -93
- package/workspace/public/pm/c3-session-chat.js +0 -103
- package/workspace/public/pm/c3-session-conv.js +0 -165
- package/workspace/public/pm/c3-session-term.js +0 -216
- package/workspace/public/pm/c3-settings.css +0 -85
- package/workspace/public/pm/c3-settings.js +0 -1045
- package/workspace/public/pm/c3-shell.js +0 -628
- package/workspace/public/pm/c3-signals.js +0 -196
- package/workspace/public/pm/c3-strategy-panels.js +0 -45
- package/workspace/public/pm/c3-swipe.js +0 -230
- package/workspace/public/pm/c3-terminal-data.js +0 -48
- package/workspace/public/pm/c3-terminal-edge.js +0 -91
- package/workspace/public/pm/c3-terminal-icons.js +0 -40
- package/workspace/public/pm/c3-terminal-results.js +0 -141
- package/workspace/public/pm/c3-terminal.js +0 -52
- package/workspace/public/pm/c3-tickets.js +0 -163
- package/workspace/public/pm/c3-timeline.js +0 -201
- package/workspace/public/pm/calendar-views.js +0 -1049
- package/workspace/public/pm/console3-lift.md +0 -220
- package/workspace/public/pm/cozy-home.js +0 -172
- package/workspace/public/pm/cozy-initiative.css +0 -138
- package/workspace/public/pm/cycle-review.js +0 -125
- package/workspace/public/pm/data.js +0 -1577
- package/workspace/public/pm/dest-board.js +0 -444
- package/workspace/public/pm/dest-docs.js +0 -530
- package/workspace/public/pm/dest-initiatives.js +0 -162
- package/workspace/public/pm/dest-mywork.js +0 -307
- package/workspace/public/pm/dest-notes.js +0 -537
- package/workspace/public/pm/dest-people.js +0 -449
- package/workspace/public/pm/dest-reports.js +0 -383
- package/workspace/public/pm/dest-settings.js +0 -601
- package/workspace/public/pm/dest-today.js +0 -267
- package/workspace/public/pm/display-word.js +0 -56
- package/workspace/public/pm/doc-editor.js +0 -473
- package/workspace/public/pm/doc-graph.js +0 -272
- package/workspace/public/pm/doc-health-panel.js +0 -110
- package/workspace/public/pm/doc-rail.js +0 -167
- package/workspace/public/pm/doc-remote.js +0 -180
- package/workspace/public/pm/dock-sessions.js +0 -472
- package/workspace/public/pm/dock.js +0 -216
- package/workspace/public/pm/fixture.js +0 -821
- package/workspace/public/pm/flag-picker.js +0 -104
- package/workspace/public/pm/frame-copy.js +0 -278
- package/workspace/public/pm/freshness-line.js +0 -149
- package/workspace/public/pm/handoff-box.js +0 -82
- package/workspace/public/pm/initiative-list.js +0 -235
- package/workspace/public/pm/initiative-sheet.js +0 -331
- package/workspace/public/pm/initiatives-api.js +0 -95
- package/workspace/public/pm/initiatives-copy.js +0 -287
- package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
- package/workspace/public/pm/initiatives-timeline.js +0 -410
- package/workspace/public/pm/initiatives-ui.js +0 -291
- package/workspace/public/pm/item-sheet.js +0 -268
- package/workspace/public/pm/keep-card.js +0 -204
- package/workspace/public/pm/lifecycle-lens-model.js +0 -246
- package/workspace/public/pm/lifecycle-lens.js +0 -276
- package/workspace/public/pm/lifecycle.js +0 -111
- package/workspace/public/pm/mobile.css +0 -366
- package/workspace/public/pm/mobile.js +0 -581
- package/workspace/public/pm/modes-live.js +0 -453
- package/workspace/public/pm/modes.js +0 -147
- package/workspace/public/pm/my-work-card.js +0 -51
- package/workspace/public/pm/my-work-data.js +0 -36
- package/workspace/public/pm/new-initiative-sheet.js +0 -169
- package/workspace/public/pm/next-step-ui.js +0 -190
- package/workspace/public/pm/outbox-panel.js +0 -125
- package/workspace/public/pm/palette-copy.js +0 -55
- package/workspace/public/pm/palette.js +0 -343
- package/workspace/public/pm/panel-breakdown.js +0 -702
- package/workspace/public/pm/panel-cockpit.js +0 -425
- package/workspace/public/pm/panel-detail.js +0 -1513
- package/workspace/public/pm/panel-initiatives.js +0 -929
- package/workspace/public/pm/panel-newsess.js +0 -709
- package/workspace/public/pm/panel-repos.js +0 -741
- package/workspace/public/pm/panel-tabs.js +0 -1506
- package/workspace/public/pm/panel-trees.js +0 -204
- package/workspace/public/pm/people-link.js +0 -106
- package/workspace/public/pm/phone-deck.js +0 -167
- package/workspace/public/pm/pm-work-view.js +0 -1533
- package/workspace/public/pm/portfolio-report.js +0 -61
- package/workspace/public/pm/premium-acts.js +0 -280
- package/workspace/public/pm/premium-brief.js +0 -111
- package/workspace/public/pm/premium-chat.js +0 -22
- package/workspace/public/pm/premium-doc-sheet.js +0 -312
- package/workspace/public/pm/premium-initiative.js +0 -324
- package/workspace/public/pm/premium-insights.css +0 -228
- package/workspace/public/pm/premium-metric-tiles.js +0 -68
- package/workspace/public/pm/premium-report-brief.js +0 -132
- package/workspace/public/pm/premium-vw-rec.js +0 -67
- package/workspace/public/pm/premium-wide.css +0 -30
- package/workspace/public/pm/print.css +0 -44
- package/workspace/public/pm/provider-cards.js +0 -136
- package/workspace/public/pm/registry.js +0 -203
- package/workspace/public/pm/release-card.js +0 -110
- package/workspace/public/pm/releases-view.js +0 -248
- package/workspace/public/pm/report-families-view.js +0 -505
- package/workspace/public/pm/report-slides.js +0 -438
- package/workspace/public/pm/report-tab.js +0 -33
- package/workspace/public/pm/report-view.js +0 -337
- package/workspace/public/pm/reports-copy.js +0 -134
- package/workspace/public/pm/roadmap.js +0 -294
- package/workspace/public/pm/run-card.js +0 -260
- package/workspace/public/pm/sessions-panel.js +0 -219
- package/workspace/public/pm/sheet-jira.js +0 -353
- package/workspace/public/pm/shell-bell.js +0 -163
- package/workspace/public/pm/shell-model.js +0 -83
- package/workspace/public/pm/shell-phone.js +0 -124
- package/workspace/public/pm/shell-readaloud.js +0 -53
- package/workspace/public/pm/shell-recording.js +0 -274
- package/workspace/public/pm/shell-ticker.js +0 -90
- package/workspace/public/pm/sig-watch.js +0 -41
- package/workspace/public/pm/slide-confirm.js +0 -163
- package/workspace/public/pm/slides-copy.js +0 -52
- package/workspace/public/pm/status-banner.js +0 -95
- package/workspace/public/pm/tab-doc.js +0 -859
- package/workspace/public/pm/tab-gone.js +0 -21
- package/workspace/public/pm/tab-term.js +0 -1210
- package/workspace/public/pm/tab-web.js +0 -90
- package/workspace/public/pm/timeline-copy.js +0 -48
- package/workspace/public/pm/timeline-forecast-view.js +0 -164
- package/workspace/public/pm/today-agenda.js +0 -331
- package/workspace/public/pm/today-cards.js +0 -244
- package/workspace/public/pm/today-copy.js +0 -506
- package/workspace/public/pm/today-day.js +0 -1371
- package/workspace/public/pm/today-goals.js +0 -297
- package/workspace/public/pm/today-jobs.js +0 -84
- package/workspace/public/pm/today-mentions.js +0 -50
- package/workspace/public/pm/topbar.js +0 -202
- package/workspace/public/pm/triage-card.js +0 -60
- package/workspace/public/pm/undo-hold.js +0 -103
- package/workspace/public/pm/view-addrepo.js +0 -208
- package/workspace/public/pm/view-files.js +0 -197
- package/workspace/public/pm/view-livenotes.js +0 -399
- package/workspace/public/pm/view-today.js +0 -13
- package/workspace/public/pm/view-validate.js +0 -171
- package/workspace/public/pm/welcome.js +0 -391
- package/workspace/public/pm/work-place.js +0 -68
- package/workspace/public/pm/xlsx-read.js +0 -117
- package/workspace/public/welcome.html +0 -22
- package/workspace/test-lists/browser-suites-green.json +0 -5
- package/workspace/test-lists/c3-core-docs.json +0 -9
- package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
- package/workspace/test-lists/c3-ib-items.json +0 -9
- package/workspace/test-lists/c3-ib-more.json +0 -9
- package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
- package/workspace/test-lists/c3-ini-life.json +0 -9
- package/workspace/test-lists/c3-meeting-board.json +0 -5
- package/workspace/test-lists/c3-meeting-card.json +0 -5
- package/workspace/test-lists/c3-notes-place.json +0 -5
- package/workspace/test-lists/c3-notes-series.json +0 -5
- package/workspace/test-lists/calendar-time-page.json +0 -5
- package/workspace/test-lists/calpop.json +0 -4
- package/workspace/test-lists/console3-briefing.json +0 -9
- package/workspace/test-lists/console3-foundation.json +0 -9
- package/workspace/test-lists/console3-work-page.json +0 -9
- package/workspace/test-lists/premium-brief-parity.json +0 -9
- package/workspace/test-lists/report-design-studio-ui.json +0 -5
- package/workspace/test-lists/report-structure-ui.json +0 -11
- package/workspace/test-lists/report-workspace-ui.json +0 -5
- package/workspace/test-lists/run3-a.json +0 -5
- package/workspace/test-lists/run3-d.json +0 -6
- package/workspace/test-lists/run4-c.json +0 -13
- package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
- package/workspace/test-lists/today-mentions-cards.json +0 -5
- package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
|
@@ -52,14 +52,16 @@ const svg = (d, w) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBo
|
|
|
52
52
|
const V = { el: null, cur: null, back: null, subs: [] };
|
|
53
53
|
|
|
54
54
|
/** The header's markup for one item; pure, so a unit test can read it. */
|
|
55
|
+
/** "PRD" over "PRD", or "File · plans/x.md" over "x.md": the kind is left out when it only repeats the title */
|
|
56
|
+
const sameAs = (kind, title) => { const k = String(kind || '').trim().toLowerCase().replace(/^file · /, ''), t = String(title || '').trim().toLowerCase(); return !!t && (k === t || k.split('/').pop() === t || k.split('/').pop().replace(/\.[a-z]+$/, '') === t); };
|
|
55
57
|
export function headHtml(it) {
|
|
56
58
|
const o = it || {};
|
|
57
59
|
const nm = o.full ? 'Open full' : 'Open in a new tab', ico = o.full ? OPEN_FULL : OPEN_NEW, cls = o.full ? 'cz-vw-ib cz-vw-wide' : 'cz-vw-ib';
|
|
58
60
|
const tab = o.url
|
|
59
61
|
? `<button type="button" class="${cls}" data-cz-vw="tab" aria-label="${nm}" title="${nm}">${svg(ico, 16)}</button>`
|
|
60
|
-
:
|
|
62
|
+
: ''; // no greyed "Open in a new tab" when there is nothing to open: it read as a second share button (testing fixes)
|
|
61
63
|
return `<span class="cz-vw-tile" aria-hidden="true">${svg(path(o.icon), 18)}</span>`
|
|
62
|
-
+ `<div class="cz-vw-t${o.full ? ' cz-vw-t2' : ''}"
|
|
64
|
+
+ `<div class="cz-vw-t${o.full ? ' cz-vw-t2' : ''}">${o.kind && !sameAs(o.kind, o.title) ? `<p class="cz-vw-kind">${esc(o.kind)}</p>` : ''}<h3 class="cz-vw-title" id="czVwTitle">${esc(o.title || '')}</h3></div>`
|
|
63
65
|
+ tab
|
|
64
66
|
+ `<button type="button" class="cz-vw-ib" data-cz-vw="close" aria-label="Close the viewer" title="Close the viewer">${svg(CLOSE, 16)}</button>`;
|
|
65
67
|
}
|
|
@@ -252,3 +252,12 @@ body.cz { margin: 0; font-family: var(--cz-sans); color: var(--cz-ink); backgrou
|
|
|
252
252
|
--well:var(--cz-well);--solid:var(--cz-blueink);--on-solid:var(--cz-card);--spot:var(--cz-bluebg);--bad:var(--cz-red);--sans:var(--cz-sans);--mono:var(--cz-mono);--card-shadow:var(--cz-lift)}
|
|
253
253
|
/* the report slide kicker (ReportPanel.dc.html): 20px, 700 */
|
|
254
254
|
.sl-cv[data-th="report"] .r-kicker .sl-tx{display:inline-block;width:auto;height:auto;padding:6px 16px;border-radius:8px;background:var(--sso);color:var(--sfg);font-size:20px;font-weight:700;letter-spacing:.06em}
|
|
255
|
+
|
|
256
|
+
/* testing fixes: a phone zooms the page into any field typed in under 16 px, and the page then sits off the screen's right edge with
|
|
257
|
+
the keyboard open. On a touch screen every field is at least 16 px. */
|
|
258
|
+
@media (hover: none) and (pointer: coarse) {
|
|
259
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { font-size: 16px !important; }
|
|
260
|
+
}
|
|
261
|
+
/* testing fixes: nothing may widen the page on a phone (a menu past the right edge made the whole page zoom out) */
|
|
262
|
+
/* on body only: an overflow set on html stops body.cz-home's overflow:hidden from reaching the viewport, and the whole page then scrolls */
|
|
263
|
+
@media (max-width: 760px) { body { overflow-x: clip; } }
|
|
@@ -9,8 +9,12 @@ export const SLASH = [
|
|
|
9
9
|
{ cmd: '/compact', name: 'Compact the conversation', say: 'Claude Code summarises the conversation so far to free room.' },
|
|
10
10
|
{ cmd: '/clear', name: 'Clear the conversation', say: 'Claude Code starts again with an empty context in the same session.' },
|
|
11
11
|
];
|
|
12
|
+
/* every command Claude Code takes (GET /api/slash-commands: its own, the workspace's and the PM's commands and skills), read once;
|
|
13
|
+
* until it answers, and when it cannot, the three above */
|
|
14
|
+
let ALL = null;
|
|
15
|
+
export function loadSlash(get) { if (ALL || !get) return Promise.resolve(ALL); return get('/api/slash-commands').then((r) => { if (r && r.ok && Array.isArray(r.commands) && r.commands.length) ALL = r.commands; return ALL; }).catch(() => null); }
|
|
12
16
|
/** The menu items for what is in the box, or [] when the menu stays shut (no leading `/`, or a space typed). */
|
|
13
|
-
export const slashMatches = (v) => (/^\/[a-
|
|
17
|
+
export const slashMatches = (v) => (/^\/[a-z0-9:_.-]*$/i.test(String(v || '')) ? (ALL || SLASH).filter((x) => x.cmd.toLowerCase().startsWith(String(v).toLowerCase())) : []);
|
|
14
18
|
|
|
15
19
|
/** { text, block }: the words with the last `pmos-goal` block taken out, and that block parsed (null when there is none or it does not parse). */
|
|
16
20
|
export function splitGoal(text) {
|
|
@@ -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
|
};
|
|
@@ -98,7 +98,7 @@ async function load() {
|
|
|
98
98
|
const D = S.D;
|
|
99
99
|
D.brief = brief && brief.ok && brief.model ? brief.model : null;
|
|
100
100
|
D.board = board && board.ok && board.model ? board.model : null;
|
|
101
|
-
D.sessions = ses &&
|
|
101
|
+
D.sessions = H.homeSessions(ses && ses.sessions);
|
|
102
102
|
D.desk = desk && desk.ok ? desk : null;
|
|
103
103
|
D.today = today && today.ok ? today : null;
|
|
104
104
|
D.schedules = sch && Array.isArray(sch.schedules) ? sch : null;
|
|
@@ -147,7 +147,7 @@ function poll() {
|
|
|
147
147
|
pollT = setTimeout(async () => {
|
|
148
148
|
if (!document.hidden) {
|
|
149
149
|
const [ses, desk] = await Promise.all([pmGet('/api/sessions'), pmGet('/api/home-desk' + wsQ())]);
|
|
150
|
-
if (ses && Array.isArray(ses.sessions)) S.D.sessions = ses.sessions;
|
|
150
|
+
if (ses && Array.isArray(ses.sessions)) S.D.sessions = H.homeSessions(ses.sessions);
|
|
151
151
|
if (desk && desk.ok) S.D.desk = desk;
|
|
152
152
|
S.D.now = Date.now();
|
|
153
153
|
drawList(); drawTop();
|
|
@@ -208,8 +208,8 @@ 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] : '',
|
|
212
|
-
product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative',
|
|
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
|
+
product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative', phone: isPhone(),
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -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;
|
|
@@ -318,9 +319,10 @@ function drawList() {
|
|
|
318
319
|
const fh = elseHtml();
|
|
319
320
|
if (ft.__h !== fh) { ft.__h = fh; ft.innerHTML = fh; }
|
|
320
321
|
iniList(sc);
|
|
321
|
-
// the first-run card after an import tops the list
|
|
322
|
+
// the first-run card after an import tops the list. The phone moment card is not in the list: it is the detail of the greeting
|
|
323
|
+
// at the top, and opens in the Viewer when the greeting is pressed (testing fixes: in the list it took a screen of room)
|
|
322
324
|
if (FST && sc.firstElementChild !== FST) sc.prepend(FST);
|
|
323
|
-
if (PHC &&
|
|
325
|
+
if (PHC && PHC.el.parentNode === sc) PHC.el.remove();
|
|
324
326
|
document.body.classList.toggle('hm-folded', S.folded && !isPhone());
|
|
325
327
|
document.body.classList.toggle('hm-plist', isPhone() && !S.phoneChat); // a phone: the list is the page until a row opens its conversation (HmPhone)
|
|
326
328
|
}
|
|
@@ -364,7 +366,7 @@ const chat = mountChat($('#hmChat'), {
|
|
|
364
366
|
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
367
|
onScope: (b) => menu(b, scopeItems(), 'Where this goes'),
|
|
366
368
|
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(), '
|
|
369
|
+
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
370
|
workItem: (text, t) => workItem(text, t),
|
|
369
371
|
openTerminal: (sid) => openTerminal(sid),
|
|
370
372
|
viewerClosed: () => !VW.isOpen() && !isPhone(),
|
|
@@ -376,12 +378,13 @@ function scopeItems() {
|
|
|
376
378
|
return [{ label: 'All work', sub: 'Home', go: () => select(null) }, { label: H.productName(S.D) + ' · product', go: () => goIni('product') }]
|
|
377
379
|
.concat(H.boardRows(S.D).map((r) => ({ label: r.title, sub: [r.lane, r.stage].filter(Boolean).join(' · '), go: () => goIni(r.id) })));
|
|
378
380
|
}
|
|
379
|
-
function toItems() {
|
|
380
|
-
const id = S.ini;
|
|
381
|
+
function toItems(cur) {
|
|
382
|
+
const id = S.ini, at = cur && cur.key;
|
|
381
383
|
const ses = S.D.sessions.filter((s) => H.iniOfSession(s) === id && s.shown !== 'exited');
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
.concat(
|
|
384
|
+
const main = iniTarget(id);
|
|
385
|
+
return [{ label: 'The initiative’s chat', sub: 'Claude, with ' + iniTitle(id) + ' as its context', checked: at === main.key, go: () => openTarget(main) }]
|
|
386
|
+
.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) }; }))
|
|
387
|
+
.concat([{ label: 'A new session', sub: 'A fresh conversation in ' + iniTitle(id), go: () => newIn(id) }]);
|
|
385
388
|
}
|
|
386
389
|
async function link(sid, ini) {
|
|
387
390
|
const r = await pmPost('/api/session/initiative', { id: sid, initiative: ini });
|
|
@@ -415,8 +418,9 @@ function sessionTarget(s) {
|
|
|
415
418
|
return t;
|
|
416
419
|
}
|
|
417
420
|
function alsoOf(ini) {
|
|
418
|
-
|
|
419
|
-
const
|
|
421
|
+
// in an initiative's chat only that initiative's own next step shows; another initiative's is not "also" this conversation's
|
|
422
|
+
const other = H.needsOf(S.D).filter((r) => !(S.sel && S.sel === r.id));
|
|
423
|
+
const n = ini ? other.find((r) => r.ini === ini) : other[0];
|
|
420
424
|
return n ? { text: n.name, go: () => select(n.id) } : null;
|
|
421
425
|
}
|
|
422
426
|
/* 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 +582,6 @@ function openReviewVw() {
|
|
|
578
582
|
S.sel = 'review'; drawList();
|
|
579
583
|
import('./home-review.js').then((M) => M.openReview({
|
|
580
584
|
VW, pmPost, toast, D: () => S.D, reload: () => load(), ws: () => boardWs(), iniTitle, now: NOW,
|
|
581
|
-
openWork: () => MORE.openMyWork(),
|
|
582
585
|
askAbout: (st, act) => {
|
|
583
586
|
S.phoneChat = isPhone();
|
|
584
587
|
const owner = st.owner ? ' It is ' + st.owner + '’s.' : ' It has no owner.';
|
|
@@ -590,16 +593,21 @@ function openReviewVw() {
|
|
|
590
593
|
},
|
|
591
594
|
}));
|
|
592
595
|
}
|
|
593
|
-
/*
|
|
596
|
+
/* 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);
|
|
597
|
+
* "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. */
|
|
598
|
+
async function addTaskIn(id) {
|
|
599
|
+
if (!id) { S.cap = true; drawList(); const i = $('#hmCap'); if (i) i.focus(); return; }
|
|
600
|
+
await goIni(id);
|
|
601
|
+
if (S.ini !== id) return;
|
|
602
|
+
iniOverview('tasks');
|
|
603
|
+
setTimeout(() => { const n = document.querySelector('#czViewer #ovTask'); if (n) n.focus(); }, 0);
|
|
604
|
+
}
|
|
594
605
|
async function capture(text) {
|
|
595
606
|
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 });
|
|
607
|
+
const r = await pmPost('/api/pm-items/add', { line });
|
|
600
608
|
if (!r || r.ok !== true) { toast((r && r.error) || 'The task was not added.'); return false; }
|
|
601
|
-
toast(
|
|
602
|
-
|
|
609
|
+
toast('Added to your own list, under Not in an initiative.');
|
|
610
|
+
S.cap = false;
|
|
603
611
|
await load();
|
|
604
612
|
return true;
|
|
605
613
|
}
|
|
@@ -637,7 +645,7 @@ function reopenViewer() {
|
|
|
637
645
|
if (r) { select(r.id); return; }
|
|
638
646
|
if (S.ini === 'product') { openUpdateViewer(); return; }
|
|
639
647
|
if (S.ini) { openOverview(); return; }
|
|
640
|
-
|
|
648
|
+
openUpdateViewer(); // nothing picked on Home: the product's weekly update (My work is no longer a page of its own)
|
|
641
649
|
}
|
|
642
650
|
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
651
|
function openNeedViewer(r, focusWhy) {
|
|
@@ -914,6 +922,15 @@ async function openMeeting(m) {
|
|
|
914
922
|
if (typeof v.openMeeting === 'function') return v.openMeeting(m.note ? { note: m.note } : m, { ws: deskWs() });
|
|
915
923
|
try { const M = await import('./premium-vw-mtg.js'); return M.openMeeting(m.note ? { note: m.note } : m, { ws: deskWs() }); } catch { return VW.placeholder('Meeting', { icon: 'meet' }); }
|
|
916
924
|
}
|
|
925
|
+
/** A phone: the greeting's detail, the moment card of the day (home-phone-card.js) in the Viewer, with the calendar one press on. */
|
|
926
|
+
function openMoment() {
|
|
927
|
+
VW.open({ id: 'moment', kind: 'Your day', title: L.greetWord(), icon: 'cal', render: (body) => {
|
|
928
|
+
body.append(PHC.el);
|
|
929
|
+
body.insertAdjacentHTML('beforeend', '<p class="ut-acts hm-mcal"><button type="button" class="ut-btn sm soft" data-hm-mcal>Open the calendar</button></p>');
|
|
930
|
+
body.onclick = (e) => { if (e.target.closest('[data-hm-mcal]')) openCalendar(); };
|
|
931
|
+
PHC.read(true);
|
|
932
|
+
} });
|
|
933
|
+
}
|
|
917
934
|
async function openCalendar() {
|
|
918
935
|
const v = await V();
|
|
919
936
|
if (typeof v.openCalendar === 'function') return v.openCalendar({ ws: deskWs(), view: 'day' });
|
|
@@ -936,6 +953,8 @@ function newItems() {
|
|
|
936
953
|
const here = S.ini && S.ini !== 'product' ? S.ini : null;
|
|
937
954
|
const inis = H.boardRows(S.D);
|
|
938
955
|
return [
|
|
956
|
+
{ 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) }))
|
|
957
|
+
.concat([{ sep: true }, { label: 'Not in an initiative', sub: 'Your own list', go: () => addTaskIn(null) }]), 'Under which initiative') },
|
|
939
958
|
{ 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
959
|
{ 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
960
|
{ label: 'Quick ask', sub: 'Your own chat, about all work', go: () => { goHome(); chat.focus(); } },
|
|
@@ -948,6 +967,8 @@ function newIn(id) {
|
|
|
948
967
|
let n = 2; while (used.has('init:' + id + ':' + n)) n++;
|
|
949
968
|
if (S.ini !== id) { S.ini = id; drawList(); loadIni().then(drawList); syncUrl(); }
|
|
950
969
|
S.sel = null;
|
|
970
|
+
S.phoneChat = isPhone(); // on a phone the new session's chat shows over the list; without it the + looked like it did nothing
|
|
971
|
+
drawList();
|
|
951
972
|
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
973
|
chat.focus();
|
|
953
974
|
}
|
|
@@ -956,6 +977,7 @@ function newLoose() {
|
|
|
956
977
|
const key = 'chat:loose-' + d.getFullYear() + p(d.getMonth() + 1) + p(d.getDate()) + '-' + p(d.getHours()) + p(d.getMinutes()) + p(d.getSeconds());
|
|
957
978
|
if (S.ini) { S.ini = null; drawList(); syncUrl(); }
|
|
958
979
|
S.sel = null;
|
|
980
|
+
S.phoneChat = isPhone(); drawList();
|
|
959
981
|
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
982
|
chat.focus();
|
|
961
983
|
}
|
|
@@ -998,7 +1020,11 @@ function menu(anchor, items, label) {
|
|
|
998
1020
|
if (menu.anchor && menu.anchor !== anchor) menu.anchor.classList.remove('hm-anc');
|
|
999
1021
|
anchor.classList.add('hm-anc');
|
|
1000
1022
|
menu.anchor = anchor;
|
|
1001
|
-
|
|
1023
|
+
// 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
|
|
1024
|
+
// that button (the ⋯ of the top bar, the + of Today), so the choice opens where the press was (testing fixes)
|
|
1025
|
+
const ar = anchor.getBoundingClientRect(), high = !!anchor.closest('.hm-top') || ar.bottom < innerHeight / 2;
|
|
1026
|
+
menuEl.classList.toggle('top', high);
|
|
1027
|
+
menuEl.style.top = high && innerWidth <= 760 ? Math.round(ar.bottom + 6) + 'px' : '';
|
|
1002
1028
|
const f = menuEl.querySelector('button'); if (f) f.focus();
|
|
1003
1029
|
}
|
|
1004
1030
|
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 +1038,7 @@ document.addEventListener('click', (e) => { if (!menuEl.hidden && !menuEl.contai
|
|
|
1012
1038
|
document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !menuEl.hidden) { e.stopPropagation(); closeMenu(); } else if (e.key === 'Escape' && S.sheet) sheet(false); }, true);
|
|
1013
1039
|
function moreMenu(anchor) {
|
|
1014
1040
|
const go = {
|
|
1015
|
-
|
|
1041
|
+
around: () => MORE.openAround(), inbox: () => MORE.openInbox(searchGo), eod: () => MORE.openEndOfDay(), cal: () => openCalendar(),
|
|
1016
1042
|
rec: () => MORE.openRecorder(), search: () => MORE.openSearch(searchGo), products: () => MORE.openProducts(), sources: () => MORE.openSources(), settings: () => MORE.openSettings(),
|
|
1017
1043
|
};
|
|
1018
1044
|
menu(anchor, MORE.moreItems.map(([k, l]) => ({ label: l, go: go[k] })), 'Waiting for design');
|
|
@@ -1035,6 +1061,8 @@ $('#hmNeeds').onclick = () => sheet(!S.sheet);
|
|
|
1035
1061
|
// a phone: the back bar of a conversation returns to the list, which is the page (HmPhone2)
|
|
1036
1062
|
// My work's "Weekly review" (home-work.js) asks Home, which holds the data the review reads
|
|
1037
1063
|
addEventListener('hm:review', (e) => { e.preventDefault(); openReviewVw(); });
|
|
1064
|
+
// a phone: the day's moment card opens on the greeting's press, and on this event from any other place that asks for the day
|
|
1065
|
+
addEventListener('hm:day', () => { if (isPhone() && PHC) openMoment(); });
|
|
1038
1066
|
$('#hmBack').onclick = () => { S.phoneChat = false; S.sel = null; drawList(); syncUrl(); const f = $('#hmList .hm-rm'); if (f) f.focus(); };
|
|
1039
1067
|
$('#hmMoreP').onclick = (e) => moreMenu(e.currentTarget);
|
|
1040
1068
|
$('#hmDesk').onclick = (e) => { if (S.sheet && e.target === $('#hmDesk')) sheet(false); }; // a press beside the sheet closes it; Escape and the N need you button do too
|
|
@@ -1050,11 +1078,11 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1050
1078
|
}
|
|
1051
1079
|
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
1080
|
if ('hmProd' in d) { goIni('product'); return; }
|
|
1081
|
+
if (d.hmTasks) { if (S.tasks.has(d.hmTasks)) S.tasks.delete(d.hmTasks); else S.tasks.add(d.hmTasks); drawList(); return; }
|
|
1053
1082
|
if (d.hmRest) { if (S.rest.has(d.hmRest)) S.rest.delete(d.hmRest); else S.rest.add(d.hmRest); drawList(); return; }
|
|
1054
|
-
if (d.hmFilter) { S.filter = d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
|
|
1083
|
+
if (d.hmFilter) { S.filter = S.filter === d.hmFilter ? 'today' : d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
|
|
1055
1084
|
if (d.hmCheck) { checkRow(d.hmCheck); return; }
|
|
1056
1085
|
if ('hmReview' in d) { openReviewVw(); return; }
|
|
1057
|
-
if ('hmWork' in d) { MORE.openMyWork(); return; }
|
|
1058
1086
|
if ('hmPick' in d) { pickProduct(b); return; }
|
|
1059
1087
|
if ('hmCapmic' in d) { const i = $('#hmCap'); if (i) capMic(i, b); return; }
|
|
1060
1088
|
if (d.hmTc) { todayPress(d.hmTc, b); return; }
|
|
@@ -1076,6 +1104,7 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1076
1104
|
if ('hmElse' in d) { const f = S.lay && S.lay.elsewhere && S.lay.elsewhere.first; goHome(); if (f) select(f.id); return; }
|
|
1077
1105
|
if ('hmPerson' in d) addPerson();
|
|
1078
1106
|
};
|
|
1107
|
+
$('#hmList').addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'hmCap' && S.cap) { e.stopPropagation(); S.cap = false; drawList(); } });
|
|
1079
1108
|
$('#hmList').addEventListener('submit', async (e) => { // the capture box: Enter adds the task
|
|
1080
1109
|
if (e.target.id !== 'hmCapF') return;
|
|
1081
1110
|
e.preventDefault();
|
|
@@ -1099,7 +1128,7 @@ function capMic(input, b) {
|
|
|
1099
1128
|
/* the Today card's presses (HmDay, HmMic): the calendar, the meeting's prep, the live meeting, the recording, the end of the day */
|
|
1100
1129
|
async function todayPress(k, b) {
|
|
1101
1130
|
const T = todayModel();
|
|
1102
|
-
if (k === 'cal') { openCalendar(); return; }
|
|
1131
|
+
if (k === 'cal') { if (isPhone() && PHC) openMoment(); else openCalendar(); return; }
|
|
1103
1132
|
if ((k === 'prep' || k === 'open') && T.meeting) { openMeeting(T.meeting); return; }
|
|
1104
1133
|
if (k === 'record') { MORE.openRecorder().then(() => drawList()); return; }
|
|
1105
1134
|
if (k === 'hl') { const r = REC && await REC.highlight(); toast(r && r.ok ? 'Highlighting the last 30 seconds and the next ones.' : (r && r.error) || 'The highlight did not start.'); return; }
|
|
@@ -1127,9 +1156,12 @@ $('#hmUnfold').onclick = () => { S.folded = false; store.set('pmos.home.fold', n
|
|
|
1127
1156
|
function cta() {
|
|
1128
1157
|
if (S.ini === 'product') { const C = H.productCard(S.D); if (C.sent) openUpdateViewer(); else { select('n:update'); } return; }
|
|
1129
1158
|
const h = S.H || {};
|
|
1130
|
-
if (h.need) { select(h.need.id); return; }
|
|
1131
|
-
|
|
1132
|
-
|
|
1159
|
+
if (h.need && h.need.ini === S.ini) { select(h.need.id); return; }
|
|
1160
|
+
// the review step: this initiative's own findings (its review document), never another row
|
|
1161
|
+
const rv = h.step === 'review' && S.IM && S.IMid === S.ini ? (S.IM.docs.rows || []).find((d) => d.key === 'review' && d.path) : null;
|
|
1162
|
+
if (rv) { openFile({ name: rv.title, path: rv.path }); return; }
|
|
1163
|
+
S.phoneChat = isPhone(); drawList(); // on a phone the chat shows over the list, or the press looks like it did nothing
|
|
1164
|
+
openTarget(iniTarget(S.ini));
|
|
1133
1165
|
if (h.ask) chat.send(h.ask);
|
|
1134
1166
|
}
|
|
1135
1167
|
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* No header on the docked desk. The stream: the role's avatar and name over each agent message with Copy, Retry and Make a work-item; the
|
|
4
4
|
* PM's bubbles with "You · HH:MM"; "Worked …" folds (under the message that asks, while it asks); a Today divider; "New since you left"; "N earlier messages · show"; the agent's step
|
|
5
5
|
* checklist while it works (from its own TodoWrite list); a permission card with the change before → after, Allow and Deny. Over the box: the
|
|
6
|
-
* run strip with Stop, and "Also waiting on you".
|
|
7
|
-
*
|
|
8
|
-
* the conversation.
|
|
6
|
+
* run strip with Stop, and "Also waiting on you". One box for every conversation (+, /, @ in an initiative, the In:/To: chip, the key hint,
|
|
7
|
+
* ↑ send). The + menu holds Attach a file, the Notes and the terminal of the conversation, and Link to an initiative for a loose session.
|
|
9
8
|
* The mic is part of the input (canvas HmMic): press it and speak, the words appear as text in the box with a small blue dot while it
|
|
10
9
|
* listens, press it again to stop, edit, send. On a phone it opens the "Speak to Claude" sheet (HmPhone): Discard, or stop and send.
|
|
11
10
|
* Nothing is saved as audio (home-dictate.js). A card the target brings (intro.card, the decision card of HmDecide) draws under the intro.
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
* viewerClosed(), reopenViewer() } */
|
|
20
19
|
import { mdHtml, userHtml, toolLine, webKind } from './chat-md.js';
|
|
21
20
|
import { streamOf, runOf, roleOf, tintOf, hm } from './home-data.js';
|
|
22
|
-
import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches } from './goal-chat.js';
|
|
21
|
+
import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches, loadSlash } from './goal-chat.js';
|
|
23
22
|
import { splitReport, reportChipHtml, blockSig } from './report-chat.js';
|
|
24
23
|
import { turnsOf } from './chat-context.js';
|
|
25
24
|
import { askCardHtml, answerText } from './chat-ask.js';
|
|
@@ -51,6 +50,12 @@ export function mountChat(el, host) {
|
|
|
51
50
|
el.innerHTML = `<button type="button" class="hm-reopen" id="hmReopen" aria-label="Open the Viewer" title="Open the Viewer" hidden>${PANE}</button>`
|
|
52
51
|
+ '<div class="hm-log" id="hmLog" role="log" aria-live="polite"></div><div class="hm-foot" id="hmFoot"></div>';
|
|
53
52
|
const log = el.querySelector('#hmLog'), foot = el.querySelector('#hmFoot'), reopen = el.querySelector('#hmReopen');
|
|
53
|
+
loadSlash(host.pmGet).then(() => { if (el.querySelector('#hmSlash:not([hidden])')) drawSlash(); });
|
|
54
|
+
// when a hidden log is shown (the phone's chat over the list), a jump still owed is made then
|
|
55
|
+
// On a phone the chat is the page: the log grows and the page scrolls, so "the end" is the page's end (testing fixes: a chat opened at its oldest message)
|
|
56
|
+
const pageScrolls = () => log.scrollHeight <= log.clientHeight + 1;
|
|
57
|
+
const toEnd = () => { log.scrollTop = log.scrollHeight; if (log.clientHeight && pageScrolls()) { const se = document.scrollingElement || document.documentElement; se.scrollTop = se.scrollHeight; } };
|
|
58
|
+
if (typeof ResizeObserver === 'function') new ResizeObserver(() => { if (C.jump && log.clientHeight) { toEnd(); if (C.conv) C.jump = false; } }).observe(log);
|
|
54
59
|
reopen.onclick = () => host.reopenViewer();
|
|
55
60
|
// 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
61
|
if (typeof ResizeObserver === 'function') new ResizeObserver(() => document.body.style.setProperty('--bd-hmfoot', Math.round(foot.getBoundingClientRect().height) + 'px')).observe(foot);
|
|
@@ -169,7 +174,8 @@ export function mountChat(el, host) {
|
|
|
169
174
|
R.waiting = !!C.conv && !C.conv.ask && C.conv.turn !== 'agent' && C.conv.turn !== 'tool';
|
|
170
175
|
const ctx = new Map(turnsOf(msgs, R.waiting || (C.conv && C.conv.state === 'ended')).filter((x) => x.done).map((x) => [x.at, x.items]));
|
|
171
176
|
R.chips = (mi) => (ctx.get(mi) ? chipsOf(ctx.get(mi)) : '');
|
|
172
|
-
const
|
|
177
|
+
const se = document.scrollingElement || document.documentElement;
|
|
178
|
+
const atEnd = pageScrolls() ? se.scrollHeight - se.scrollTop - innerHeight < 80 : log.scrollHeight - log.scrollTop - log.clientHeight < 80;
|
|
173
179
|
const goal = C.th && C.th.goal;
|
|
174
180
|
let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro) : '') + items.map((it, i) => msgHtml(it, i, R)).join('') + (goalProgressHtml(goal) ? goalChipHtml(goal) : '') + liveHtml(R) + askHtml(R) + queuedHtml();
|
|
175
181
|
if (C.th && C.th.working) html += `<p class="hm-note" role="status">The agent is answering. You can write again when it has.</p>`;
|
|
@@ -177,7 +183,9 @@ export function mountChat(el, host) {
|
|
|
177
183
|
if (!html) html = `<p class="hm-empty">${esc(t.empty || 'Ask anything. It works in a real Claude Code session.')}</p>`;
|
|
178
184
|
put(log, html);
|
|
179
185
|
C.items = items;
|
|
180
|
-
|
|
186
|
+
// 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
|
|
187
|
+
// can be drawn while hidden, where scrollTop does nothing and the session then opened at the top)
|
|
188
|
+
if (atEnd || C.jump) { toEnd(); if (C.conv && log.clientHeight) C.jump = false; }
|
|
181
189
|
drawFoot(R);
|
|
182
190
|
reopen.hidden = !host.viewerClosed();
|
|
183
191
|
// the PM has seen what is here now
|
|
@@ -269,27 +277,23 @@ export function mountChat(el, host) {
|
|
|
269
277
|
const mic = canDictate() ? `<button type="button" class="ut-mic${on ? ' on' : ''}" data-hm-mic aria-pressed="${on}" aria-label="${on ? 'Stop listening' : C.spoke ? 'Speak more' : 'Speak instead of typing'}" title="${on ? 'Stop listening' : 'Speak instead of typing'}">${SVG(on ? SQ : MIC, on ? 12 : 18)}</button>` : '';
|
|
270
278
|
const dot = on ? '<span class="ut-live" role="status"><span class="ut-rec b" aria-hidden="true"></span><span class="vh">Listening</span></span>' : '';
|
|
271
279
|
const attach = t.key ? '<button type="button" role="menuitem" data-hm-file><b>Attach a file</b><em>Or paste or drop it on the conversation</em></button>' : '';
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
+ (sc.loose && t.sid ? '<button type="button" class="hm-link" data-hm-link>Link to an initiative</button>' : '') + `<span class="sp"></span>${add}</div>`
|
|
290
|
-
+ filesRow() + `<form class="hm-basic${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for Claude" placeholder="${esc(ph)}"></textarea>${mic}<button type="submit" class="hm-go" aria-label="Send to Claude" title="Send">${SVG(ARROW, 18)}</button></form>`
|
|
291
|
-
+ '<p class="hm-hint">It works in a real Claude Code session: it can read, change files, run commands and take slash commands.</p>';
|
|
292
|
-
}
|
|
280
|
+
// One box everywhere (testing fixes: a loose chat and an initiative's chat drew two different boxes): +, / and @ (in an initiative), the
|
|
281
|
+
// To: or In: chip, the mic and ↑ send. A loose session's "Link to an initiative" is in the + menu, and no hint line repeats under the box.
|
|
282
|
+
const link = sc.loose && t.sid ? '<button type="button" role="menuitem" data-hm-link><b>Link to an initiative</b><em>Move this chat under one</em></button>' : '';
|
|
283
|
+
const addOpen = !!C.addOpen && !!(attach || notesBtn || term || link);
|
|
284
|
+
const add = attach || notesBtn || term || link ? `<span class="hm-mw hm-addw"><button type="button" class="hm-tool" id="hmAdd" data-hm-add aria-haspopup="menu" aria-expanded="${addOpen}" aria-label="${t.key ? 'Attach a file, notes and more' : 'More'}" title="${t.key ? 'Attach a file' : 'More'}">${SVG(PLUS)}</button>`
|
|
285
|
+
+ `<span class="hm-pmenu hm-addm" role="menu" aria-label="Add"${addOpen ? ' data-esc-layer' : ' hidden'}>${attach}${notesBtn}${term}${link}</span>${t.key ? '<input type="file" id="hmFile" multiple hidden>' : ''}</span>` : '';
|
|
286
|
+
const wait = C.conv && C.conv.ask && t.also ? `<button type="button" class="hm-chip" data-hm-also><i class="dot" aria-hidden="true"></i><span>1 more next step</span></button>` : '';
|
|
287
|
+
const to = t.to && !wait ? `<button type="button" class="hm-chip to" data-hm-to aria-label="Who reads this: ${esc(t.to.name)}. Change">${avHtml(t.to, 20)}<span>To: ${esc(t.to.name)}</span></button>` : '';
|
|
288
|
+
const scope = !to && !wait ? `<button type="button" class="hm-chip${sc.loose ? ' loose' : ''}" 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>` : '';
|
|
289
|
+
const at = t.ini ? '<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>' : '';
|
|
290
|
+
const 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>`
|
|
291
|
+
+ `<div class="hm-tb">${add}`
|
|
292
|
+
+ `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button>${at}`
|
|
293
|
+
+ to + wait + scope + `<span class="sp"></span>${host.viewerClosed() ? '<span class="hm-key">Enter sends · Shift+Enter for a new line</span>' : ''}`
|
|
294
|
+
+ `${mic}<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
|
|
295
|
+
+ filesRow()
|
|
296
|
+
+ '</form>';
|
|
293
297
|
if (foot.__h !== html) {
|
|
294
298
|
const focused = document.activeElement && document.activeElement.id === 'hmIn';
|
|
295
299
|
foot.__h = html; foot.innerHTML = html;
|
|
@@ -395,7 +399,7 @@ export function mountChat(el, host) {
|
|
|
395
399
|
if ('hmAlso' in d) { if (C.t.also && C.t.also.go) C.t.also.go(); return; }
|
|
396
400
|
if ('hmNotes' in d) { openNotesHere(); return; }
|
|
397
401
|
if ('hmScope' in d) { host.onScope(b); return; }
|
|
398
|
-
if ('hmLink' in d) { host.onLink(b, C.t); return; }
|
|
402
|
+
if ('hmLink' in d) { host.onLink(foot.querySelector('#hmAdd') || b, C.t); return; } // the + menu has closed: the list opens from the +
|
|
399
403
|
if ('hmTo' in d || 'hmAt' in d) { host.onTo(b, C.t); return; }
|
|
400
404
|
if ('hmSlash' in d) { const ta = foot.querySelector('textarea'); if (!ta.value.startsWith('/')) ta.value = '/' + ta.value; ta.focus(); drawSlash(); return; }
|
|
401
405
|
if (d.hmUnfile) {
|
|
@@ -467,7 +471,8 @@ export function mountChat(el, host) {
|
|
|
467
471
|
if (!list.length) { if (m) { m.hidden = true; m.removeAttribute('data-esc-layer'); } return; }
|
|
468
472
|
if (!m) { foot.insertAdjacentHTML('afterbegin', '<div class="hm-slash" id="hmSlash" role="listbox" aria-label="Commands"></div>'); m = el.querySelector('#hmSlash'); }
|
|
469
473
|
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
|
|
474
|
+
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('');
|
|
475
|
+
const on = m.querySelector('[aria-selected="true"]'); if (on && on.scrollIntoView) on.scrollIntoView({ block: 'nearest' });
|
|
471
476
|
m.hidden = false; m.setAttribute('data-esc-layer', '');
|
|
472
477
|
}
|
|
473
478
|
function pickSlash(cmd) { const ta = foot.querySelector('textarea'); ta.value = cmd + ' '; C.slashAt = 0; drawSlash(); grow(ta); ta.focus(); }
|
|
@@ -60,8 +60,14 @@ export function sessionRow(s, roles) {
|
|
|
60
60
|
const st = stateOf(s);
|
|
61
61
|
const name = s.hx && s.hx.title ? s.hx.title : s.name || 'Session';
|
|
62
62
|
return { id: 's:' + s.id, kind: 'session', sid: s.id, key: keyOfSession(s), ini: iniOfSession(s), name, state: st, initial: role.initial, role,
|
|
63
|
-
hint: role.name
|
|
63
|
+
hint: role.name, icon: 'chat', created: s.created || '' }; // the state is the dot beside the row, not a word (testing fixes)
|
|
64
64
|
}
|
|
65
|
+
/** The sessions as Home reads them. A session PMOS started (a skill, a background job) reads 'needs' as soon as its prompt is done:
|
|
66
|
+
* its turn ending asks nothing of the PM, so it is a finished run, quiet, and never a row that waits on the PM (testing fixes).
|
|
67
|
+
* A permission prompt ('blocked') still is. */
|
|
68
|
+
// A session PMOS started itself shows on Home only while it works or asks the PM something (a permission or a question): one that
|
|
69
|
+
// finished its prompt is not shown at all (testing fixes; Wawan on the canvas, 2026-10-23)
|
|
70
|
+
export const homeSessions = (list) => (Array.isArray(list) ? list : []).filter((s) => !(s && s.automatic && ['needs', 'quiet', 'exited'].includes(s.shown) && !s.ask));
|
|
65
71
|
|
|
66
72
|
/* ── needs you ── */
|
|
67
73
|
const NEED_ICON = { decision: 'gate', blocked: 'warn', waited: 'clock', src: 'doc', ev: 'gate' };
|
|
@@ -116,7 +122,9 @@ const risky = (r) => r.late || /risk|late|stalled|blocked/.test(statusOf(r));
|
|
|
116
122
|
const anchorOf = (r) => (r.kr ? r.kr : /^health:/.test(String(r.anchor || '')) ? String(r.anchor) : r.anchor ? String(r.anchor) : 'No anchor');
|
|
117
123
|
export function productName(D) {
|
|
118
124
|
const b = D.board && D.board.board;
|
|
119
|
-
|
|
125
|
+
// a workspace id (a hex hash like 8f24f28c35) is never shown as the product's name (testing fixes)
|
|
126
|
+
const word = (x) => (x && !/^[0-9a-f]{8,}$/i.test(String(x)) ? x : '');
|
|
127
|
+
return (b && (word(b.product) || word(b.name) || word(b.ws))) || word(D.desk && D.desk.ws) || 'This product';
|
|
120
128
|
}
|
|
121
129
|
/** 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
130
|
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,11 +250,12 @@ 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
|
-
+ (d.act && d.act.kind === 'draft' && !d.running && d.st
|
|
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>`
|
|
258
|
+
+ (d.act && d.act.kind === 'draft' && !d.running && !d.path && d.st !== 'stale' ? `<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) {
|
|
260
261
|
const rows = MD.docRows(M), cur = MD.phaseOf(M.acts && M.acts.stage);
|
|
@@ -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');
|