create-pmos 0.399.0 → 0.401.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +30 -25
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +3 -3
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-sources-test.js +2 -0
- package/workspace/briefing-premium-test.js +6 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +29 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +24 -3
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/phone-companion.md +1 -1
- package/workspace/lib/core-docs.js +2 -2
- package/workspace/lib/route-modules.js +1 -9
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +8 -3
- package/workspace/premium-vw-cal-test.js +4 -1
- package/workspace/premium-vw-doc-test.js +1 -8
- package/workspace/premium-work-depth-test.js +2 -3
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/c3-base.js +47 -0
- package/workspace/public/pm/c3-capture.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/c3-sheet.js +1 -1
- package/workspace/public/pm/c3-toast.js +1 -1
- package/workspace/public/pm/console3.css +3 -0
- package/workspace/public/pm/cozy-home.css +21 -6
- package/workspace/public/pm/cozy-today.css +4 -3
- package/workspace/public/pm/cozy-viewer.js +4 -2
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-app.js +65 -33
- package/workspace/public/pm/home-chat.js +34 -29
- package/workspace/public/pm/home-data.js +10 -2
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +13 -3
- package/workspace/public/pm/home-list.js +18 -10
- package/workspace/public/pm/home-more.js +2 -2
- package/workspace/public/pm/home-phone-card.js +9 -4
- package/workspace/public/pm/home-review.js +2 -3
- package/workspace/public/pm/home-today.js +11 -8
- package/workspace/public/pm/home-work.js +13 -8
- package/workspace/public/pm/note-dock.js +1 -2
- package/workspace/public/pm/notes-links.js +1 -2
- package/workspace/public/pm/notes-task.js +3 -4
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/premium-vw-item.css +6 -0
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/replaced-tests.json +435 -0
- package/workspace/run-tests.js +323 -28
- package/workspace/server.js +15 -10
- package/workspace/test-files.json +4 -140
- package/workspace/test-lists/base.json +1 -2
- package/workspace/test-lists/c3-desktop-light-load.json +1 -2
- package/workspace/test-lists/c3-initiative-boards.json +1 -2
- package/workspace/test-lists/c3-meeting-focus.json +2 -12
- package/workspace/test-lists/c3-work-agent.json +1 -2
- package/workspace/test-lists/calendar-tidy-up.json +1 -2
- package/workspace/test-lists/console3-reports.json +1 -2
- package/workspace/test-lists/docs-three-way-sync.json +1 -2
- package/workspace/test-lists/extension-capture.json +5 -0
- package/workspace/test-lists/jira-wbs.json +1 -2
- package/workspace/test-lists/legacy-cleanup-a.json +9 -0
- package/workspace/test-lists/meeting-material.json +1 -2
- package/workspace/test-lists/meeting-notes.json +2 -36
- package/workspace/test-lists/meeting-replay.json +1 -2
- package/workspace/test-lists/mm-capture.json +2 -12
- package/workspace/test-lists/my-work.json +2 -10
- package/workspace/test-lists/onboarding-firstrun.json +2 -12
- package/workspace/test-lists/people-directory.json +1 -2
- package/workspace/test-lists/run2-a.json +1 -2
- package/workspace/test-lists/run2-d.json +2 -19
- package/workspace/test-lists/run3-b.json +1 -2
- package/workspace/test-lists/run3-c.json +2 -12
- package/workspace/test-lists/run4-b.json +1 -2
- package/workspace/test-lists/run4-d.json +1 -5
- package/workspace/test-lists/run5-c.json +1 -11
- package/workspace/test-lists/run6.json +1 -5
- package/workspace/test-lists/workspace-launch-flags.json +2 -12
- package/workspace/test-lists/workspace-profile-detection.json +2 -10
- package/workspace/test-timings.json +242 -123
- package/workspace/c3-briefing-test.js +0 -136
- package/workspace/c3-core-docs-test.js +0 -170
- package/workspace/c3-driver-fixture.js +0 -64
- package/workspace/c3-driver-test.js +0 -169
- package/workspace/c3-foundation-test.js +0 -163
- package/workspace/c3-ib-items-test.js +0 -114
- package/workspace/c3-ib-more-test.js +0 -146
- package/workspace/c3-ib-triage-backlog-test.js +0 -128
- package/workspace/c3-ini-harness.js +0 -66
- package/workspace/c3-ini-life-test.js +0 -167
- package/workspace/c3-initiatives-test.js +0 -186
- package/workspace/c3-light-load-test.js +0 -112
- package/workspace/c3-one-home-test.js +0 -149
- package/workspace/c3-phone-test.js +0 -289
- package/workspace/c3-quiet-test.js +0 -157
- package/workspace/c3-report-design-real-test.js +0 -264
- package/workspace/c3-report-design-test.js +0 -442
- package/workspace/c3-report-setup-test.js +0 -192
- package/workspace/c3-report-structure-real-test.js +0 -248
- package/workspace/c3-report-structure-test.js +0 -397
- package/workspace/c3-reports-test.js +0 -288
- package/workspace/c3-scan-test.js +0 -517
- package/workspace/c3-sessions-panel-test.js +0 -365
- package/workspace/c3-settings-test.js +0 -204
- package/workspace/c3-updates-test.js +0 -131
- package/workspace/c3-work-test.js +0 -260
- package/workspace/cut-stub.js +0 -40
- package/workspace/first-paint-audit.js +0 -160
- package/workspace/lib/c3-full-console.js +0 -15
- package/workspace/lib/engine/derived/trust.js +0 -3
- package/workspace/lib/engine/plan-forecast.js +0 -342
- package/workspace/lib/engine/report-families.js +0 -175
- package/workspace/lib/engine/truth-table.js +0 -57
- package/workspace/lib/routes-c3-init.js +0 -54
- package/workspace/lib/routes-c3-life.js +0 -120
- package/workspace/lib/routes-c3-timeline.js +0 -192
- package/workspace/lib/routes-forecast.js +0 -86
- package/workspace/lib/routes-releases.js +0 -130
- package/workspace/lib/routes-report-facts.js +0 -85
- package/workspace/lib/routes-report-families.js +0 -33
- package/workspace/lib/routes-signals.js +0 -51
- package/workspace/lib/routes-timeline.js +0 -197
- package/workspace/public/c3.html +0 -35
- package/workspace/public/index.html +0 -156
- package/workspace/public/pm/app.js +0 -831
- package/workspace/public/pm/bd-board.js +0 -159
- package/workspace/public/pm/bd-drag.js +0 -59
- package/workspace/public/pm/bd-model.js +0 -152
- package/workspace/public/pm/bd-timeline.js +0 -233
- package/workspace/public/pm/bd-tree.js +0 -244
- package/workspace/public/pm/board-copy.js +0 -59
- package/workspace/public/pm/board-read.js +0 -38
- package/workspace/public/pm/branches-sheet.js +0 -56
- package/workspace/public/pm/breakdown-api.js +0 -58
- package/workspace/public/pm/breakdown-copy.js +0 -138
- package/workspace/public/pm/briefing-deck.js +0 -441
- package/workspace/public/pm/briefing-model.js +0 -251
- package/workspace/public/pm/c3-ambient.js +0 -100
- package/workspace/public/pm/c3-audience-link.js +0 -21
- package/workspace/public/pm/c3-audience.js +0 -46
- package/workspace/public/pm/c3-boot.js +0 -13
- package/workspace/public/pm/c3-breakdown.js +0 -240
- package/workspace/public/pm/c3-brief-data.js +0 -11
- package/workspace/public/pm/c3-brief-mentions.js +0 -137
- package/workspace/public/pm/c3-brief-needs.js +0 -288
- package/workspace/public/pm/c3-brief-pulse.js +0 -112
- package/workspace/public/pm/c3-brief-summary.js +0 -139
- package/workspace/public/pm/c3-brief-today.js +0 -79
- package/workspace/public/pm/c3-brief.js +0 -279
- package/workspace/public/pm/c3-cal-strategy.js +0 -529
- package/workspace/public/pm/c3-calendar.js +0 -965
- package/workspace/public/pm/c3-calpop.js +0 -111
- package/workspace/public/pm/c3-case.js +0 -196
- package/workspace/public/pm/c3-core-docs.css +0 -18
- package/workspace/public/pm/c3-core-docs.js +0 -236
- package/workspace/public/pm/c3-daypart.js +0 -176
- package/workspace/public/pm/c3-demo-boards.js +0 -764
- package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
- package/workspace/public/pm/c3-demo-brief-page.js +0 -70
- package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
- package/workspace/public/pm/c3-demo-cal2.js +0 -66
- package/workspace/public/pm/c3-demo-cal3.js +0 -173
- package/workspace/public/pm/c3-demo-cal4.js +0 -169
- package/workspace/public/pm/c3-demo-cal5.js +0 -52
- package/workspace/public/pm/c3-demo-coredocs.js +0 -221
- package/workspace/public/pm/c3-demo-data.js +0 -552
- package/workspace/public/pm/c3-demo-focus.js +0 -181
- package/workspace/public/pm/c3-demo-init.js +0 -430
- package/workspace/public/pm/c3-demo-life.js +0 -77
- package/workspace/public/pm/c3-demo-material.js +0 -58
- package/workspace/public/pm/c3-demo-misc2.js +0 -34
- package/workspace/public/pm/c3-demo-phone.js +0 -48
- package/workspace/public/pm/c3-demo-plan2.js +0 -30
- package/workspace/public/pm/c3-demo-rd.js +0 -432
- package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
- package/workspace/public/pm/c3-demo-rep2.js +0 -130
- package/workspace/public/pm/c3-demo-rep3.js +0 -138
- package/workspace/public/pm/c3-demo-rs.js +0 -287
- package/workspace/public/pm/c3-demo-term.js +0 -153
- package/workspace/public/pm/c3-demo-time.js +0 -49
- package/workspace/public/pm/c3-demo-work-ix.js +0 -32
- package/workspace/public/pm/c3-demo.js +0 -131
- package/workspace/public/pm/c3-design-studio.js +0 -369
- package/workspace/public/pm/c3-doc-formats.js +0 -153
- package/workspace/public/pm/c3-doc-sheet.js +0 -1230
- package/workspace/public/pm/c3-dock.js +0 -206
- package/workspace/public/pm/c3-docs.js +0 -291
- package/workspace/public/pm/c3-driver-work.js +0 -110
- package/workspace/public/pm/c3-driver.css +0 -18
- package/workspace/public/pm/c3-driver.js +0 -298
- package/workspace/public/pm/c3-focus.css +0 -304
- package/workspace/public/pm/c3-focus.js +0 -983
- package/workspace/public/pm/c3-ib-docs.js +0 -92
- package/workspace/public/pm/c3-ib-initiatives.js +0 -201
- package/workspace/public/pm/c3-ib-items.js +0 -210
- package/workspace/public/pm/c3-ib-releases.js +0 -48
- package/workspace/public/pm/c3-ib-sprints.js +0 -201
- package/workspace/public/pm/c3-ib-triage.js +0 -177
- package/workspace/public/pm/c3-ii-tabs.js +0 -252
- package/workspace/public/pm/c3-ini-life.css +0 -34
- package/workspace/public/pm/c3-ini-life.js +0 -379
- package/workspace/public/pm/c3-ini-records.js +0 -197
- package/workspace/public/pm/c3-ini-timeline.js +0 -278
- package/workspace/public/pm/c3-ini-work.js +0 -139
- package/workspace/public/pm/c3-init-extras.js +0 -170
- package/workspace/public/pm/c3-initiatives.js +0 -852
- package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
- package/workspace/public/pm/c3-look.js +0 -27
- package/workspace/public/pm/c3-material.css +0 -22
- package/workspace/public/pm/c3-material.js +0 -321
- package/workspace/public/pm/c3-md.js +0 -3
- package/workspace/public/pm/c3-misc-panels.js +0 -89
- package/workspace/public/pm/c3-new-session.js +0 -110
- package/workspace/public/pm/c3-notes.js +0 -751
- package/workspace/public/pm/c3-phone-boot.js +0 -47
- package/workspace/public/pm/c3-phone-detail.js +0 -97
- package/workspace/public/pm/c3-phone-model.js +0 -3
- package/workspace/public/pm/c3-phone.css +0 -66
- package/workspace/public/pm/c3-phone.js +0 -444
- package/workspace/public/pm/c3-plan-panels.js +0 -163
- package/workspace/public/pm/c3-plan.js +0 -193
- package/workspace/public/pm/c3-quiet.css +0 -113
- package/workspace/public/pm/c3-quiet.js +0 -177
- package/workspace/public/pm/c3-replay.css +0 -133
- package/workspace/public/pm/c3-replay.js +0 -429
- package/workspace/public/pm/c3-report-deck.css +0 -163
- package/workspace/public/pm/c3-report-deck.js +0 -598
- package/workspace/public/pm/c3-report-frame.css +0 -20
- package/workspace/public/pm/c3-report-print.css +0 -20
- package/workspace/public/pm/c3-report-setup.css +0 -67
- package/workspace/public/pm/c3-report-setup.js +0 -298
- package/workspace/public/pm/c3-report-store.js +0 -244
- package/workspace/public/pm/c3-report-structure.css +0 -44
- package/workspace/public/pm/c3-report-structure.js +0 -473
- package/workspace/public/pm/c3-reports.css +0 -68
- package/workspace/public/pm/c3-reports.js +0 -377
- package/workspace/public/pm/c3-roadmap.js +0 -249
- package/workspace/public/pm/c3-scan-api.js +0 -167
- package/workspace/public/pm/c3-scan-next.js +0 -248
- package/workspace/public/pm/c3-scan-setup.js +0 -313
- package/workspace/public/pm/c3-scan-words.js +0 -41
- package/workspace/public/pm/c3-scan.css +0 -74
- package/workspace/public/pm/c3-scan.js +0 -93
- package/workspace/public/pm/c3-session-chat.js +0 -103
- package/workspace/public/pm/c3-session-conv.js +0 -165
- package/workspace/public/pm/c3-session-term.js +0 -216
- package/workspace/public/pm/c3-settings.css +0 -85
- package/workspace/public/pm/c3-settings.js +0 -1045
- package/workspace/public/pm/c3-shell.js +0 -628
- package/workspace/public/pm/c3-signals.js +0 -196
- package/workspace/public/pm/c3-strategy-panels.js +0 -45
- package/workspace/public/pm/c3-swipe.js +0 -230
- package/workspace/public/pm/c3-terminal-data.js +0 -48
- package/workspace/public/pm/c3-terminal-edge.js +0 -91
- package/workspace/public/pm/c3-terminal-icons.js +0 -40
- package/workspace/public/pm/c3-terminal-results.js +0 -141
- package/workspace/public/pm/c3-terminal.js +0 -52
- package/workspace/public/pm/c3-tickets.js +0 -163
- package/workspace/public/pm/c3-timeline.js +0 -201
- package/workspace/public/pm/calendar-views.js +0 -1049
- package/workspace/public/pm/console3-lift.md +0 -220
- package/workspace/public/pm/cozy-home.js +0 -172
- package/workspace/public/pm/cozy-initiative.css +0 -138
- package/workspace/public/pm/cycle-review.js +0 -125
- package/workspace/public/pm/data.js +0 -1577
- package/workspace/public/pm/dest-board.js +0 -444
- package/workspace/public/pm/dest-docs.js +0 -530
- package/workspace/public/pm/dest-initiatives.js +0 -162
- package/workspace/public/pm/dest-mywork.js +0 -307
- package/workspace/public/pm/dest-notes.js +0 -537
- package/workspace/public/pm/dest-people.js +0 -449
- package/workspace/public/pm/dest-reports.js +0 -383
- package/workspace/public/pm/dest-settings.js +0 -601
- package/workspace/public/pm/dest-today.js +0 -267
- package/workspace/public/pm/display-word.js +0 -56
- package/workspace/public/pm/doc-editor.js +0 -473
- package/workspace/public/pm/doc-graph.js +0 -272
- package/workspace/public/pm/doc-health-panel.js +0 -110
- package/workspace/public/pm/doc-rail.js +0 -167
- package/workspace/public/pm/doc-remote.js +0 -180
- package/workspace/public/pm/dock-sessions.js +0 -472
- package/workspace/public/pm/dock.js +0 -216
- package/workspace/public/pm/fixture.js +0 -821
- package/workspace/public/pm/flag-picker.js +0 -104
- package/workspace/public/pm/frame-copy.js +0 -278
- package/workspace/public/pm/freshness-line.js +0 -149
- package/workspace/public/pm/handoff-box.js +0 -82
- package/workspace/public/pm/initiative-list.js +0 -235
- package/workspace/public/pm/initiative-sheet.js +0 -331
- package/workspace/public/pm/initiatives-api.js +0 -95
- package/workspace/public/pm/initiatives-copy.js +0 -287
- package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
- package/workspace/public/pm/initiatives-timeline.js +0 -410
- package/workspace/public/pm/initiatives-ui.js +0 -291
- package/workspace/public/pm/item-sheet.js +0 -268
- package/workspace/public/pm/keep-card.js +0 -204
- package/workspace/public/pm/lifecycle-lens-model.js +0 -246
- package/workspace/public/pm/lifecycle-lens.js +0 -276
- package/workspace/public/pm/lifecycle.js +0 -111
- package/workspace/public/pm/mobile.css +0 -366
- package/workspace/public/pm/mobile.js +0 -581
- package/workspace/public/pm/modes-live.js +0 -453
- package/workspace/public/pm/modes.js +0 -147
- package/workspace/public/pm/my-work-card.js +0 -51
- package/workspace/public/pm/my-work-data.js +0 -36
- package/workspace/public/pm/new-initiative-sheet.js +0 -169
- package/workspace/public/pm/next-step-ui.js +0 -190
- package/workspace/public/pm/outbox-panel.js +0 -125
- package/workspace/public/pm/palette-copy.js +0 -55
- package/workspace/public/pm/palette.js +0 -343
- package/workspace/public/pm/panel-breakdown.js +0 -702
- package/workspace/public/pm/panel-cockpit.js +0 -425
- package/workspace/public/pm/panel-detail.js +0 -1513
- package/workspace/public/pm/panel-initiatives.js +0 -929
- package/workspace/public/pm/panel-newsess.js +0 -709
- package/workspace/public/pm/panel-repos.js +0 -741
- package/workspace/public/pm/panel-tabs.js +0 -1506
- package/workspace/public/pm/panel-trees.js +0 -204
- package/workspace/public/pm/people-link.js +0 -106
- package/workspace/public/pm/phone-deck.js +0 -167
- package/workspace/public/pm/pm-work-view.js +0 -1533
- package/workspace/public/pm/portfolio-report.js +0 -61
- package/workspace/public/pm/premium-acts.js +0 -280
- package/workspace/public/pm/premium-brief.js +0 -111
- package/workspace/public/pm/premium-chat.js +0 -22
- package/workspace/public/pm/premium-doc-sheet.js +0 -312
- package/workspace/public/pm/premium-initiative.js +0 -324
- package/workspace/public/pm/premium-insights.css +0 -228
- package/workspace/public/pm/premium-metric-tiles.js +0 -68
- package/workspace/public/pm/premium-report-brief.js +0 -132
- package/workspace/public/pm/premium-vw-rec.js +0 -67
- package/workspace/public/pm/premium-wide.css +0 -30
- package/workspace/public/pm/print.css +0 -44
- package/workspace/public/pm/provider-cards.js +0 -136
- package/workspace/public/pm/registry.js +0 -203
- package/workspace/public/pm/release-card.js +0 -110
- package/workspace/public/pm/releases-view.js +0 -248
- package/workspace/public/pm/report-families-view.js +0 -505
- package/workspace/public/pm/report-slides.js +0 -438
- package/workspace/public/pm/report-tab.js +0 -33
- package/workspace/public/pm/report-view.js +0 -337
- package/workspace/public/pm/reports-copy.js +0 -134
- package/workspace/public/pm/roadmap.js +0 -294
- package/workspace/public/pm/run-card.js +0 -260
- package/workspace/public/pm/sessions-panel.js +0 -219
- package/workspace/public/pm/sheet-jira.js +0 -353
- package/workspace/public/pm/shell-bell.js +0 -163
- package/workspace/public/pm/shell-model.js +0 -83
- package/workspace/public/pm/shell-phone.js +0 -124
- package/workspace/public/pm/shell-readaloud.js +0 -53
- package/workspace/public/pm/shell-recording.js +0 -274
- package/workspace/public/pm/shell-ticker.js +0 -90
- package/workspace/public/pm/sig-watch.js +0 -41
- package/workspace/public/pm/slide-confirm.js +0 -163
- package/workspace/public/pm/slides-copy.js +0 -52
- package/workspace/public/pm/status-banner.js +0 -95
- package/workspace/public/pm/tab-doc.js +0 -859
- package/workspace/public/pm/tab-gone.js +0 -21
- package/workspace/public/pm/tab-term.js +0 -1210
- package/workspace/public/pm/tab-web.js +0 -90
- package/workspace/public/pm/timeline-copy.js +0 -48
- package/workspace/public/pm/timeline-forecast-view.js +0 -164
- package/workspace/public/pm/today-agenda.js +0 -331
- package/workspace/public/pm/today-cards.js +0 -244
- package/workspace/public/pm/today-copy.js +0 -506
- package/workspace/public/pm/today-day.js +0 -1371
- package/workspace/public/pm/today-goals.js +0 -297
- package/workspace/public/pm/today-jobs.js +0 -84
- package/workspace/public/pm/today-mentions.js +0 -50
- package/workspace/public/pm/topbar.js +0 -202
- package/workspace/public/pm/triage-card.js +0 -60
- package/workspace/public/pm/undo-hold.js +0 -103
- package/workspace/public/pm/view-addrepo.js +0 -208
- package/workspace/public/pm/view-files.js +0 -197
- package/workspace/public/pm/view-livenotes.js +0 -399
- package/workspace/public/pm/view-today.js +0 -13
- package/workspace/public/pm/view-validate.js +0 -171
- package/workspace/public/pm/welcome.js +0 -391
- package/workspace/public/pm/work-place.js +0 -68
- package/workspace/public/pm/xlsx-read.js +0 -117
- package/workspace/public/welcome.html +0 -22
- package/workspace/test-lists/browser-suites-green.json +0 -5
- package/workspace/test-lists/c3-core-docs.json +0 -9
- package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
- package/workspace/test-lists/c3-ib-items.json +0 -9
- package/workspace/test-lists/c3-ib-more.json +0 -9
- package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
- package/workspace/test-lists/c3-ini-life.json +0 -9
- package/workspace/test-lists/c3-meeting-board.json +0 -5
- package/workspace/test-lists/c3-meeting-card.json +0 -5
- package/workspace/test-lists/c3-notes-place.json +0 -5
- package/workspace/test-lists/c3-notes-series.json +0 -5
- package/workspace/test-lists/calendar-time-page.json +0 -5
- package/workspace/test-lists/calpop.json +0 -4
- package/workspace/test-lists/console3-briefing.json +0 -9
- package/workspace/test-lists/console3-foundation.json +0 -9
- package/workspace/test-lists/console3-work-page.json +0 -9
- package/workspace/test-lists/premium-brief-parity.json +0 -9
- package/workspace/test-lists/report-design-studio-ui.json +0 -5
- package/workspace/test-lists/report-structure-ui.json +0 -11
- package/workspace/test-lists/report-workspace-ui.json +0 -5
- package/workspace/test-lists/run3-a.json +0 -5
- package/workspace/test-lists/run3-d.json +0 -6
- package/workspace/test-lists/run4-c.json +0 -13
- package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
- package/workspace/test-lists/today-mentions-cards.json +0 -5
- package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
/* modes-live.js — the live renderers that stay after the R29 cuts (overhaul-r4, trimmed in pm-os-absorb Run 3, slice 3D).
|
|
2
|
-
*
|
|
3
|
-
* validate — the Validate page's list: the repository's consent, Jev's plan and run, and the claims ledger. Reached
|
|
4
|
-
* from Settings.
|
|
5
|
-
* skill tab — mountSkillTab / skillDetailLive: one skill, read or edited in a dock tab (started from + Session).
|
|
6
|
-
* transcript — mountTranscriptTab: one recorded conversation, read-only.
|
|
7
|
-
*
|
|
8
|
-
* The Portfolio, Scheduled, Memory, Skills and Knowledge lists, the guide list and the morning brief are gone (R29).
|
|
9
|
-
* Every list states its read: loading, failed (with the reason), or a successful read of nothing.
|
|
10
|
-
* Fixture mode never reaches this module (modes.js routes here only when !FIXTURE).
|
|
11
|
-
*/
|
|
12
|
-
import { el, setChildren } from './dom.js';
|
|
13
|
-
import { state, setState } from './state.js';
|
|
14
|
-
|
|
15
|
-
const iv = (v) => el('span', null, v === null || v === undefined ? '' : String(v));
|
|
16
|
-
const LABEL = 'padding:10px 14px 4px;font-family:var(--mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted-foreground)';
|
|
17
|
-
const ROW = 'display:block;width:100%;padding:7px 14px;min-height:40px;text-align:left;border-bottom:1px solid oklch(1 0 0 / 5%)';
|
|
18
|
-
const BTN = 'font-family:var(--mono);font-size:10.5px;padding:3px 9px;border:1px solid var(--border);color:var(--muted-foreground);min-height:26px';
|
|
19
|
-
const NOTE = 'padding:8px 14px;font-size:11.5px;color:var(--muted-foreground);line-height:1.5';
|
|
20
|
-
|
|
21
|
-
/* one cached read per endpoint; `reload(key)` drops it so the next render refetches.
|
|
22
|
-
*
|
|
23
|
-
* AN ANSWER OLDER THAN A RELOAD IS DROPPED. `reload` follows a write (a saved setting, a dismissed
|
|
24
|
-
* item). A read that was already in flight when the write went out carries the state from BEFORE it,
|
|
25
|
-
* and it used to land after the fresh read and overwrite it — then count as fresh for 15 s. Measured
|
|
26
|
-
* on Today: quiet hours saved, the note shown, and 1.5 s later the note gone while the server held
|
|
27
|
-
* the setting (pm-r22-test.js, about 1 run in 8). `gen` counts reloads per key; a response whose
|
|
28
|
-
* generation is out of date is not written. */
|
|
29
|
-
const cache = new Map();
|
|
30
|
-
const gen = new Map();
|
|
31
|
-
function read(key, url) {
|
|
32
|
-
const hit = cache.get(key);
|
|
33
|
-
if (hit && (hit.state !== 'ok' || Date.now() - hit.at < 15000)) return hit;
|
|
34
|
-
if (!hit || hit.state === 'ok') {
|
|
35
|
-
const next = { state: hit ? hit.state : 'loading', data: hit ? hit.data : null, at: hit ? hit.at : 0 };
|
|
36
|
-
cache.set(key, next);
|
|
37
|
-
const g = gen.get(key) || 0;
|
|
38
|
-
const current = () => (gen.get(key) || 0) === g;
|
|
39
|
-
fetch(url).then(readJson).then(
|
|
40
|
-
(data) => { if (!current()) return; cache.set(key, { state: data && data.ok === false ? 'error' : 'ok', data, error: data && data.error, at: Date.now() }); setState({}); },
|
|
41
|
-
(e) => { if (!current()) return; cache.set(key, { state: 'error', error: (e && e.message) || String(e), at: Date.now() }); setState({}); },
|
|
42
|
-
);
|
|
43
|
-
return next;
|
|
44
|
-
}
|
|
45
|
-
return hit;
|
|
46
|
-
}
|
|
47
|
-
const reload = (key) => { gen.set(key, (gen.get(key) || 0) + 1); cache.delete(key); };
|
|
48
|
-
/* A route this server does not have answers 404 with the plain text `not found`. Parsing that as JSON
|
|
49
|
-
* showed the PM "Unexpected token 'o', \"not found\" is not valid JSON" — true, and no help. The usual
|
|
50
|
-
* cause is a server still running code older than the page, so say that and the one command. */
|
|
51
|
-
function readJson(r) {
|
|
52
|
-
return r.text().then((t) => {
|
|
53
|
-
try { return JSON.parse(t); } catch {
|
|
54
|
-
throw new Error(r.status === 404
|
|
55
|
-
? 'this server does not have that route — it is probably running an older version than the page. Run `pmos` again to restart it'
|
|
56
|
-
: 'the server answered ' + r.status + ' with something that is not JSON');
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
const post = (url, body) => fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) })
|
|
61
|
-
.then(readJson).catch((e) => ({ ok: false, error: (e && e.message) || String(e) }));
|
|
62
|
-
function status(r, what) {
|
|
63
|
-
if (r.state === 'loading' && !r.data) return el('div', { style: NOTE }, iv('reading ' + what + ' …'));
|
|
64
|
-
if (r.state === 'error') return el('div', { style: NOTE + ';color:var(--destructive)' }, iv(what + ' could not be read — ' + (r.error || 'error')));
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
async function openDocIn(ws, path, repo) {
|
|
68
|
-
const ini = await import('./panel-initiatives.js');
|
|
69
|
-
const tree = ws ? { ws, branch: null, linked: true } : null;
|
|
70
|
-
if (repo && repo !== state.product) {
|
|
71
|
-
const repos = await import('./panel-repos.js');
|
|
72
|
-
repos.selectRepo(repo);
|
|
73
|
-
}
|
|
74
|
-
ini.openDoc(null, path, 'FILE', tree);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
let dataMod = null;
|
|
78
|
-
import('./data.js').then((m) => { dataMod = m; setState({}); }).catch(() => { dataMod = null; });
|
|
79
|
-
/** A skill opens in a tab, like a Markdown file: it sits beside the terminals and survives a mode switch. */
|
|
80
|
-
async function openSkillTab(sk) {
|
|
81
|
-
const ini = await import('./panel-initiatives.js');
|
|
82
|
-
ini.openTab({ id: 'skill:' + sk.id, kind: 'skill', title: sk.label || sk.skill || sk.id, skillId: sk.id, repo: state.product || null, slug: null, role: 'SKILL' });
|
|
83
|
-
}
|
|
84
|
-
/** The body of a conversation tab (panel 4): one recorded conversation, read-only. The text is the live session's, or
|
|
85
|
-
* the saved record once the session has ended; the line above it says where it is kept. */
|
|
86
|
-
export function mountTranscriptTab(host, tab) {
|
|
87
|
-
const r = read('conv:' + tab.convId, '/api/transcript?id=' + encodeURIComponent(tab.convId || ''));
|
|
88
|
-
const st = status(r, 'this conversation');
|
|
89
|
-
const kids = [];
|
|
90
|
-
if (st) kids.push(st);
|
|
91
|
-
else {
|
|
92
|
-
const d = r.data;
|
|
93
|
-
kids.push(el('div', { 'data-r16': 'transcript-head', style: 'padding:12px 14px 4px;font-size:11.5px;color:var(--muted-foreground)' },
|
|
94
|
-
iv((d.live ? 'live — ' : 'ended — ') + (d.name || d.id) + (d.initiative ? ' · initiative ' + d.initiative : '') + (d.cut ? ' · the start was cut (long session)' : '') + ' · ' + (d.stored || ''))));
|
|
95
|
-
kids.push(el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r16': 'transcript-refresh', onClick: () => { reload('conv:' + tab.convId); setState({}); } }, 'refresh'));
|
|
96
|
-
kids.push(el('pre', { 'data-r16': 'transcript-text', style: 'margin:0;padding:10px 14px 18px;font-family:var(--mono);font-size:11.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--foreground)' },
|
|
97
|
-
iv(d.text && d.text.trim() ? d.text : '(this conversation recorded no text)')));
|
|
98
|
-
}
|
|
99
|
-
setChildren(host, [el('div', { style: 'flex:1;min-height:0;overflow-y:auto;background:var(--background);color:var(--foreground)' }, kids)]);
|
|
100
|
-
return host;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** The body of a skill tab (panel 4). Rebuilt on each paint, like the task tab; the draft lives in `skillDraft`. */
|
|
104
|
-
export function mountSkillTab(host, tab) {
|
|
105
|
-
const body = el('div', { style: 'flex:1;min-height:0;overflow-y:auto;background:var(--background);color:var(--foreground)' }, skillDetailLive({ kind: 'skill', id: tab.skillId, tab: true }));
|
|
106
|
-
setChildren(host, [body]);
|
|
107
|
-
return host;
|
|
108
|
-
}
|
|
109
|
-
/* The detail of one skill (panel 3). The text is read from the server on open. Your own skills are
|
|
110
|
-
* editable and save in place; a builtin or an approved discovered skill is read-only, and "make my own
|
|
111
|
-
* copy" writes an editable one beside it, so the original is never changed under a review. */
|
|
112
|
-
let skillDraft = { id: null, text: null }; let skillNote = null;
|
|
113
|
-
export function skillDetailLive(det) {
|
|
114
|
-
const id = det && det.id;
|
|
115
|
-
const wsId = dataMod && state.product ? dataMod.wsOf(state.product) : null;
|
|
116
|
-
const r = read('skill:' + id, '/api/skills/read?id=' + encodeURIComponent(id || '') + (wsId ? '&ws=' + encodeURIComponent(wsId) : ''));
|
|
117
|
-
const st = status(r, 'this skill');
|
|
118
|
-
if (st) return [st];
|
|
119
|
-
const d = r.data;
|
|
120
|
-
if (skillDraft.id !== id) skillDraft = { id, text: null };
|
|
121
|
-
const text = skillDraft.text !== null ? skillDraft.text : d.text;
|
|
122
|
-
const dirty = skillDraft.text !== null && skillDraft.text !== d.text;
|
|
123
|
-
const out = [el('div', { style: 'padding:14px 14px 6px' },
|
|
124
|
-
el('div', { style: 'font-family:var(--mono);font-size:13px' }, iv(d.label)),
|
|
125
|
-
el('div', { style: 'font-size:11.5px;color:var(--muted-foreground);margin-top:2px' }, iv(d.source + (d.editable ? ' · yours — edit it below' : ' · read-only') + ' · ' + d.file)),
|
|
126
|
-
el('div', { style: 'font-size:12px;margin-top:6px' }, iv(d.description)),
|
|
127
|
-
(d.output || []).length ? el('div', { style: 'font-size:11px;color:var(--muted-foreground);margin-top:6px' }, iv('always produces: ' + d.output.join(' · '))) : null)];
|
|
128
|
-
out.push(el('div', { style: 'padding:6px 14px' }, el('textarea', { 'data-r13': 'skill-text', spellcheck: 'false', readonly: d.editable ? null : 'readonly',
|
|
129
|
-
style: 'width:100%;min-height:340px;font-family:var(--mono);font-size:11.5px;line-height:1.5;background:var(--secondary);border:1px solid var(--border);color:var(--foreground);padding:8px;resize:vertical',
|
|
130
|
-
onInput: (e) => { skillDraft = { id, text: e.target.value }; } }, text)));
|
|
131
|
-
out.push(el('div', { style: 'display:flex;gap:6px;align-items:center;padding:6px 14px 14px;flex-wrap:wrap' },
|
|
132
|
-
d.editable ? el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r13': 'skill-save', onClick: async () => {
|
|
133
|
-
const res = await post('/api/skills/save', { id, text: skillDraft.text !== null ? skillDraft.text : d.text });
|
|
134
|
-
skillNote = res && res.ok ? 'saved' : ((res && res.error) || 'not saved');
|
|
135
|
-
if (res && res.ok) { skillDraft = { id, text: null }; reload('skill:' + id); reload('skills:' + (wsId || '')); }
|
|
136
|
-
setState({});
|
|
137
|
-
} }, 'save') : el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r13': 'skill-copy', onClick: async () => {
|
|
138
|
-
const res = await post('/api/skills/copy', { id, ws: wsId });
|
|
139
|
-
if (res && res.ok) {
|
|
140
|
-
skillNote = 'copied as ' + res.id + ' — it is yours to edit'; reload('skills:' + (wsId || ''));
|
|
141
|
-
if (det && det.tab) openSkillTab({ id: res.id, label: res.id }); else setState({ detail: { kind: 'skill', id: res.id } });
|
|
142
|
-
}
|
|
143
|
-
else { skillNote = (res && res.error) || 'not copied'; setState({}); }
|
|
144
|
-
} }, 'make my own copy to edit'),
|
|
145
|
-
dirty ? el('span', { style: 'font-size:11px;color:var(--muted-foreground)' }, 'unsaved changes') : null,
|
|
146
|
-
skillNote ? el('span', { 'data-r13': 'skill-note', style: 'font-size:11px;color:var(--muted-foreground)' }, iv(skillNote)) : null));
|
|
147
|
-
return out;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* ── D79 — validate the selected repository with TypeSafe's Jev, on a press ───────────────────────────────────
|
|
151
|
-
* Four things on one page, in the order the PM meets them: the key (never shown again once saved), this
|
|
152
|
-
* repository's consent switch (off until the PM turns it on), the plan (what would be sent, before anything
|
|
153
|
-
* is) and the findings. A finding is advice with a confidence; nothing here edits a file, and a verdict is not
|
|
154
|
-
* an acceptance. The key is typed into a password field and sent once; no route returns it. */
|
|
155
|
-
let vNote = null; // { tone: 'ok'|'bad'|'mut', text }
|
|
156
|
-
let vPlan = null; // the last plan, for the repository it was made for
|
|
157
|
-
let vBusy = false;
|
|
158
|
-
const vSay = (tone, text) => { vNote = { tone, text }; setState({}); };
|
|
159
|
-
const vWs = () => (dataMod && state.product ? dataMod.wsOf(state.product) : null);
|
|
160
|
-
const TONE = { bad: 'var(--destructive)', ok: 'var(--foreground)', mut: 'var(--muted-foreground)' };
|
|
161
|
-
|
|
162
|
-
async function vSaveKey(input) {
|
|
163
|
-
const key = input && input.value ? input.value : '';
|
|
164
|
-
if (!key.trim()) { vSay('bad', 'type or paste the key first'); return; }
|
|
165
|
-
const out = await fetch('/api/typesafe/key', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ key }) }).then(readJson).catch((e) => ({ ok: false, error: e.message }));
|
|
166
|
-
if (input) input.value = '';
|
|
167
|
-
reload('typesafe'); reload('vrepo');
|
|
168
|
-
vSay(out && out.ok ? 'ok' : 'bad', out && out.ok ? 'the key is saved on this machine and is not shown again' : ((out && out.error) || 'the key was not saved'));
|
|
169
|
-
}
|
|
170
|
-
async function vClearKey() {
|
|
171
|
-
const out = await fetch('/api/typesafe/key', { method: 'DELETE' }).then(readJson).catch((e) => ({ ok: false, error: e.message }));
|
|
172
|
-
reload('typesafe'); reload('vrepo'); vPlan = null;
|
|
173
|
-
vSay(out && out.ok ? 'ok' : 'bad', out && out.ok ? 'the key is removed; nothing will be sent' : ((out && out.error) || 'the key was not removed'));
|
|
174
|
-
}
|
|
175
|
-
async function vConsent(on) {
|
|
176
|
-
const ws = vWs(); if (!ws) return vSay('bad', 'select a repository first');
|
|
177
|
-
const out = await post('/api/validate/repo', { ws, consent: on });
|
|
178
|
-
reload('vrepo'); vPlan = null;
|
|
179
|
-
vSay(out && out.ok ? 'ok' : 'bad', out && out.ok ? (on ? 'validation is on for this repository' : 'validation is off; nothing from this repository will be sent') : ((out && out.error) || 'not saved'));
|
|
180
|
-
}
|
|
181
|
-
/* prompt-model-routing Run 3 — the third D84 gate: route this repository's prompts with Jev. With it on (and the key and
|
|
182
|
-
* consent above), the cockpit mod in each terminal switches the model for a prompt when Jev decides its tier. */
|
|
183
|
-
async function vRoute(on) {
|
|
184
|
-
const ws = vWs(); if (!ws) return vSay('bad', 'select a repository first');
|
|
185
|
-
const out = await post('/api/model/route/switch', { ws, route: on });
|
|
186
|
-
reload('vrepo');
|
|
187
|
-
vSay(out && out.ok ? 'ok' : 'bad', out && out.ok ? (on ? (out.open ? 'routing prompts with Jev is on: each prompt is checked before it runs' : 'routing prompts with Jev is on, but not active yet: ' + out.sentence) : 'routing prompts with Jev is off; no prompt is sent') : ((out && out.error) || 'not saved'));
|
|
188
|
-
}
|
|
189
|
-
async function vExclude(text) {
|
|
190
|
-
const ws = vWs(); if (!ws) return;
|
|
191
|
-
const exclude = String(text || '').split(/[\n,]/).map((x) => x.trim()).filter(Boolean);
|
|
192
|
-
const out = await post('/api/validate/repo', { ws, exclude });
|
|
193
|
-
reload('vrepo'); vPlan = null;
|
|
194
|
-
vSay(out && out.ok ? 'ok' : 'bad', out && out.ok ? 'excluded paths saved (' + exclude.length + ')' : ((out && out.error) || 'not saved'));
|
|
195
|
-
}
|
|
196
|
-
async function vMakePlan() {
|
|
197
|
-
const ws = vWs(); if (!ws) return vSay('bad', 'select a repository first');
|
|
198
|
-
vBusy = true; vSay('mut', 'working out what would be sent …');
|
|
199
|
-
const out = await post('/api/validate/plan', { ws });
|
|
200
|
-
vBusy = false;
|
|
201
|
-
if (!out || out.ok === false) { vPlan = null; return vSay('bad', (out && out.error) || 'no plan'); }
|
|
202
|
-
vPlan = { ws, plan: out.plan }; vSay('mut', 'review the plan, then confirm to send');
|
|
203
|
-
}
|
|
204
|
-
async function vRun() {
|
|
205
|
-
if (!vPlan) return;
|
|
206
|
-
vBusy = true; vSay('mut', 'validating … this sends text to ' + vPlan.plan.host);
|
|
207
|
-
const out = await post('/api/validate/run', { ws: vPlan.ws, expect_requests: vPlan.plan.requests });
|
|
208
|
-
vBusy = false; vPlan = null; reload('vfind');
|
|
209
|
-
if (!out || out.ok === false) return vSay('bad', (out && out.error) || 'the run failed');
|
|
210
|
-
vSay(out.aborted ? 'bad' : 'ok', 'asked ' + out.asked + ' of ' + out.requests + ' · ' + out.raised + ' raised · ' + out.local_findings + ' local · ' + out.withheld + ' withheld · ' + out.failed + ' failed' + (out.aborted ? ' — ' + out.aborted : ''));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/* ── claims-ledger — is this repository consistent? Local checks first; nothing here sends anything ───────────────
|
|
215
|
-
* The verdict says what was checked and against what, in plain words. A finding names the documents and puts the
|
|
216
|
-
* truth value beside the claim. "Consistent" means no recorded statement contradicts its source: prose is not read,
|
|
217
|
-
* and the page says so every time. */
|
|
218
|
-
let cOpen = new Set(); // 'undecided' | 'fine' | 'unclassified' — which collapsed groups are open
|
|
219
|
-
let cNote = null;
|
|
220
|
-
const cSay = (text) => { cNote = text; setState({}); };
|
|
221
|
-
async function cCheck() {
|
|
222
|
-
const ws = vWs(); if (!ws) return cSay('select a repository first');
|
|
223
|
-
cSay('checking …');
|
|
224
|
-
const out = await post('/api/claims/check', { ws });
|
|
225
|
-
reload('claims');
|
|
226
|
-
cSay(out && out.ok ? 'checked just now — ' + out.run.reads + ' file(s) read, ' + out.run.affected + ' re-verified, ' + out.run.appended + ' recorded' : ((out && out.error) || 'the check failed'));
|
|
227
|
-
}
|
|
228
|
-
async function cWatch(on) {
|
|
229
|
-
const ws = vWs(); if (!ws) return;
|
|
230
|
-
const out = await post('/api/claims/watch', { ws, watch: on });
|
|
231
|
-
reload('claims');
|
|
232
|
-
cSay(out && out.ok ? (on ? 'now checked automatically whenever its files change' : 'automatic checking is off') : ((out && out.error) || 'not saved'));
|
|
233
|
-
}
|
|
234
|
-
const cToggle = (k) => { if (cOpen.has(k)) cOpen.delete(k); else cOpen.add(k); setState({}); };
|
|
235
|
-
const TYPE_CHIP = 'font-family:var(--mono);font-size:9.5px;padding:1px 6px;border:1px solid var(--border);color:var(--muted-foreground)';
|
|
236
|
-
|
|
237
|
-
let jPlan = null; // the backlog plan the PM is looking at: { ws, plan }
|
|
238
|
-
let jNote = null;
|
|
239
|
-
const jSay = (text) => { jNote = text; setState({}); };
|
|
240
|
-
async function jSwitch(on) {
|
|
241
|
-
const ws = vWs(); if (!ws) return;
|
|
242
|
-
const out = await post('/api/claims/jev', { ws, jev: on });
|
|
243
|
-
reload('claims'); jPlan = null;
|
|
244
|
-
jSay(out && out.ok ? (on ? 'checking with Jev automatically is on — the first check records what exists and sends nothing; after that only changed pairs are sent' : 'checking with Jev automatically is off') : ((out && out.error) || 'not saved'));
|
|
245
|
-
}
|
|
246
|
-
async function jStatus(on) {
|
|
247
|
-
const ws = vWs(); if (!ws) return;
|
|
248
|
-
const out = await post('/api/claims/jev/status', { ws, status_read: on });
|
|
249
|
-
reload('claims'); jPlan = null;
|
|
250
|
-
jSay(out && out.ok ? (on ? 'reading documents for status is on — the next check records the documents that exist and sends nothing for them; after that only changed documents are sent' : 'reading documents for status is off') : ((out && out.error) || 'not saved'));
|
|
251
|
-
}
|
|
252
|
-
async function jResume() {
|
|
253
|
-
const ws = vWs(); if (!ws) return;
|
|
254
|
-
const out = await post('/api/claims/jev/resume', { ws });
|
|
255
|
-
reload('claims');
|
|
256
|
-
jSay(out && out.ok ? 'automatic checking with Jev resumed' : ((out && out.error) || 'not resumed'));
|
|
257
|
-
}
|
|
258
|
-
async function jBacklogPlan() {
|
|
259
|
-
const ws = vWs(); if (!ws) return;
|
|
260
|
-
const out = await post('/api/claims/jev/backlog', { ws });
|
|
261
|
-
if (!out || out.ok === false) { jPlan = null; return jSay((out && out.error) || 'no plan'); }
|
|
262
|
-
jPlan = { ws, plan: out.plan }; jSay('review the count, then confirm to send');
|
|
263
|
-
}
|
|
264
|
-
async function jBacklogRun() {
|
|
265
|
-
if (!jPlan) return;
|
|
266
|
-
const { ws, plan } = jPlan;
|
|
267
|
-
jSay('sending ' + plan.requests + ' request(s) to ' + plan.host + ' …');
|
|
268
|
-
const out = await post('/api/claims/jev/backlog', { ws, confirm: true, expect_requests: plan.requests });
|
|
269
|
-
jPlan = null; reload('claims');
|
|
270
|
-
jSay(!out || out.ok === false ? ((out && out.error) || 'the backlog run failed') : 'asked ' + out.sent + ' · ' + out.suspected + ' suspected · ' + out.cached + ' answered from the cache · ' + out.failed + ' failed');
|
|
271
|
-
}
|
|
272
|
-
const lastJevLine = (j) => {
|
|
273
|
-
const l = j && j.last; if (!l) return null;
|
|
274
|
-
const when = String(l.at).replace('T', ' ').slice(0, 16);
|
|
275
|
-
if (l.baseline) return 'Last Jev pass ' + when + ': recorded ' + l.baseline + ' existing pair(s) as the starting point and sent nothing.';
|
|
276
|
-
const w = l.withheld_count != null ? l.withheld_count : (l.withheld || []).length;
|
|
277
|
-
return 'Last Jev pass ' + when + (l.backlog ? ' (backlog)' : '') + ': sent ' + l.sent + ' · answered from the cache ' + l.cached + ' · withheld ' + w + ' · excluded ' + l.excluded + ' · failed ' + l.failed + ' · suspected ' + l.suspected + '.';
|
|
278
|
-
};
|
|
279
|
-
function jevBlock(ws, d) {
|
|
280
|
-
const j = d.jev; if (!j) return [];
|
|
281
|
-
const kids = [];
|
|
282
|
-
kids.push(el('div', { style: LABEL }, iv('jev checks on changed claim pairs')));
|
|
283
|
-
kids.push(el('div', { 'data-r24': 'explain', style: NOTE }, iv('Where the local checks cannot decide, a pair of short texts (a requirement and the rubric’s dimensions, a story section and the requirement it cites, a sentence and the decision it cites, two sections of one PRD) can be put to Jev. Only pairs that changed are sent. Jev’s answers are suspicions: advisory, shown in words, and never counted as problems.')));
|
|
284
|
-
kids.push(el('div', { style: 'display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:2px 14px 6px' },
|
|
285
|
-
el('button', { style: BTN + (j.switch ? ';color:var(--foreground);border-color:var(--foreground)' : ''), hover: 'color:var(--foreground)', 'data-r24': 'switch', onClick: () => jSwitch(!j.switch) },
|
|
286
|
-
iv(j.switch ? 'check with Jev automatically: ON — turn off' : 'check with Jev automatically: OFF — turn on')),
|
|
287
|
-
el('button', { style: BTN + (j.status_read ? ';color:var(--foreground);border-color:var(--foreground)' : ''), hover: 'color:var(--foreground)', 'data-r24': 'status-switch',
|
|
288
|
-
title: 'Also send the documents tied to each initiative (its PRD, rubric and brief, and notes that name it), to ask whether a document is a stub and whether a note contradicts a requirement. The answers are suggestions in the initiative detail. Needs the switch on the left.',
|
|
289
|
-
onClick: () => jStatus(!j.status_read) },
|
|
290
|
-
iv(j.status_read ? 'read documents for status: ON — turn off' : 'read documents for status: OFF — turn on'))));
|
|
291
|
-
kids.push(el('div', { 'data-r24': 'gate', 'data-open': j.open ? 'yes' : 'no', style: NOTE + (j.open ? '' : ';color:var(--foreground)') },
|
|
292
|
-
iv(j.open ? 'Active: a key is saved, validation is on for this repository, automatic checking is on and this switch is on.' : 'Not active: ' + j.sentence + ' All four must hold before anything is sent.')));
|
|
293
|
-
if (j.paused) kids.push(el('div', { 'data-r24': 'paused', style: 'display:flex;gap:8px;align-items:center;padding:2px 14px 6px;font-size:11.5px;color:var(--destructive)' },
|
|
294
|
-
el('span', null, iv(j.paused.reason)),
|
|
295
|
-
el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r24': 'resume', onClick: jResume }, 'resume')));
|
|
296
|
-
const line = lastJevLine(j);
|
|
297
|
-
if (line) kids.push(el('div', { 'data-r24': 'last', style: NOTE }, iv(line)));
|
|
298
|
-
kids.push(el('div', { style: 'display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:2px 14px 6px' },
|
|
299
|
-
el('button', { style: BTN, hover: 'color:var(--foreground)', disabled: j.switch && j.missing.every((m) => m === 'watch') ? null : 'true', 'data-r24': 'backlog',
|
|
300
|
-
title: 'Shows how many requests the existing pairs would take, and sends only after you confirm that number.', onClick: jBacklogPlan }, 'check the backlog with Jev'),
|
|
301
|
-
jPlan && jPlan.ws === ws ? el('button', { style: BTN + ';color:var(--foreground);border-color:var(--foreground)', hover: 'background:var(--accent)', 'data-r24': 'backlog-run', onClick: jBacklogRun }, 'confirm and send ' + jPlan.plan.requests + ' request(s)') : null));
|
|
302
|
-
if (jPlan && jPlan.ws === ws) {
|
|
303
|
-
const p = jPlan.plan;
|
|
304
|
-
kids.push(el('div', { 'data-r24': 'backlog-plan', style: NOTE }, iv(p.requests + ' request(s), about ' + p.characters.toLocaleString() + ' characters, to ' + p.host + ' · ' + p.pairs + ' pairs in all · ' + p.cached + ' already answered · ' + p.excluded + ' excluded · ' + p.withheld_count + ' withheld by the credential scan.')));
|
|
305
|
-
}
|
|
306
|
-
if (jNote) kids.push(el('div', { 'data-r24': 'note', style: NOTE }, iv(jNote)));
|
|
307
|
-
return kids;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
function claimsBlock(ws) {
|
|
311
|
-
const kids = [];
|
|
312
|
-
kids.push(el('div', { style: LABEL }, iv('consistency of this repository')));
|
|
313
|
-
if (!ws) return [...kids, el('div', { style: NOTE }, iv('Select a repository first.'))];
|
|
314
|
-
const r = read('claims', '/api/claims?ws=' + encodeURIComponent(ws));
|
|
315
|
-
const st = status(r, 'the consistency checks');
|
|
316
|
-
if (st) return [...kids, st];
|
|
317
|
-
const d = r.data; const c = d.counts;
|
|
318
|
-
const word = d.checking ? 'Checking…' : d.verdict === 'not-checked' ? 'Not checked yet' : d.verdict === 'consistent' ? 'Consistent' : c.problems + (c.problems === 1 ? ' problem' : ' problems');
|
|
319
|
-
const tone = d.verdict === 'problems' ? 'var(--destructive)' : 'var(--foreground)';
|
|
320
|
-
const why = d.verdict === 'not-checked'
|
|
321
|
-
? 'Press “check now” to read this repository’s documents and config files and compare each with what it must agree with.'
|
|
322
|
-
: 'Checked ' + c.documents + ' documents and config files · ' + c.verified + ' statements verified · ' + c.stale + ' stale · ' + c.undecided + ' worth a look. '
|
|
323
|
-
+ c.internal_only + ' are checked by their own structure only; ' + c.unclassified + ' are not classified and are never compared with other files.';
|
|
324
|
-
kids.push(el('div', { 'data-r22': 'verdict', 'data-verdict': d.checking ? 'checking' : d.verdict, style: 'padding:6px 14px;border-left:2px solid ' + tone + ';margin:2px 14px 6px' },
|
|
325
|
-
el('span', { 'data-r22': 'verdict-word', style: 'font-size:15px;font-weight:600;color:' + tone }, iv(word)),
|
|
326
|
-
c.suspected > 0 ? el('span', { 'data-r24': 'suspects', style: 'font-size:13px;color:var(--muted-foreground)' }, iv(' · Jev suspects ' + c.suspected + ' more')) : null,
|
|
327
|
-
el('span', { 'data-r22': 'verdict-why', style: 'display:block;font-size:11.5px;color:var(--muted-foreground);line-height:1.5;margin-top:2px' }, iv(why))));
|
|
328
|
-
const sends = !!(d.jev && d.jev.open);
|
|
329
|
-
kids.push(el('div', { 'data-r22': 'limits', style: NOTE }, iv('Checked by structure and the claims record. Prose is not read, so “Consistent” means no recorded statement contradicts its source — not that every sentence was checked. '
|
|
330
|
-
+ (sends ? 'Changed claim pairs are sent to TypeSafe (Jev); everything else stays on this computer.' : 'Nothing here is sent anywhere.'))));
|
|
331
|
-
kids.push(el('div', { style: 'display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:2px 14px 6px' },
|
|
332
|
-
el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r22': 'check', disabled: d.checking ? 'true' : null, onClick: cCheck }, 'check now'),
|
|
333
|
-
el('button', { style: BTN + (d.watching ? ';color:var(--foreground);border-color:var(--foreground)' : ''), hover: 'color:var(--foreground)', 'data-r22': 'watch', onClick: () => cWatch(!d.watching),
|
|
334
|
-
title: 'When on, the workspace notices changes to files in this repository and re-checks the documents they affect. It records problems in the repository\'s claims.jsonl.' },
|
|
335
|
-
iv(d.watching ? 'automatic checking: ON — turn off' : 'automatic checking: OFF — turn on'))));
|
|
336
|
-
if (d.watching && d.last_run) kids.push(el('div', { 'data-r22': 'last', style: NOTE }, iv('Last automatic check ' + String(d.last_run.at).replace('T', ' ').slice(0, 16) + (d.last_run.ok === false ? ' — failed: ' + (d.last_run.error || 'error') : d.last_run.run ? ' — ' + d.last_run.run.affected + ' document(s) re-verified' : ''))));
|
|
337
|
-
if (cNote) kids.push(el('div', { 'data-r22': 'note', style: NOTE }, iv(cNote)));
|
|
338
|
-
if (d.ledger && d.verdict !== 'not-checked') kids.push(el('div', { style: NOTE }, iv('Record of problems: '), el('button', { style: 'text-decoration:underline;color:var(--foreground)', 'data-r22': 'ledger', onClick: () => openDocIn(ws, d.ledger, state.product) }, iv(d.ledger))));
|
|
339
|
-
|
|
340
|
-
kids.push(...jevBlock(ws, d));
|
|
341
|
-
const docs = d.docs || [];
|
|
342
|
-
const finding = (f, rel) => el('div', { 'data-r22': 'finding', 'data-status': f.status, style: 'padding:2px 14px 2px 26px;font-size:11.5px;line-height:1.5;color:' + (f.status === 'contradicted' ? 'var(--foreground)' : 'var(--muted-foreground)') }, iv(f.sentence));
|
|
343
|
-
const docRow = (x, showFindings) => el('div', { 'data-r22': 'doc', 'data-rel': x.rel, style: 'padding:4px 0;border-bottom:1px solid oklch(1 0 0 / 5%)' },
|
|
344
|
-
el('button', { style: 'display:flex;gap:8px;align-items:baseline;width:100%;padding:2px 14px;text-align:left', hover: 'background:var(--accent)', onClick: () => openDocIn(ws, x.rel, state.product) },
|
|
345
|
-
el('span', { style: 'font-family:var(--mono);font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0' }, iv(x.rel)),
|
|
346
|
-
el('span', { style: TYPE_CHIP + ';margin-left:auto;flex:none' }, iv(x.classified ? x.type : 'not classified'))),
|
|
347
|
-
x.compared_with.length ? el('div', { 'data-r22': 'compared', style: 'padding:0 14px 0 26px;font-size:10.5px;color:var(--muted-foreground)' }, iv('compared with: ' + x.compared_with.join(', '))) : (x.classified ? el('div', { style: 'padding:0 14px 0 26px;font-size:10.5px;color:var(--muted-foreground)' }, iv(x.references.length ? 'no counterpart found to compare with' : 'checked on its own structure only')) : el('div', { style: 'padding:0 14px 0 26px;font-size:10.5px;color:var(--muted-foreground)' }, iv('nothing declares what this is, so it is checked on its own links and dates only'))),
|
|
348
|
-
showFindings ? x.findings.map((f) => finding(f, x.rel)) : null);
|
|
349
|
-
const group = (key, title, list, open, showFindings) => {
|
|
350
|
-
if (!list.length) return null;
|
|
351
|
-
return el('div', { 'data-r22': 'group', 'data-group': key },
|
|
352
|
-
el('button', { style: LABEL + ';display:block;width:100%;text-align:left', 'data-r22': 'group-toggle', onClick: open === 'always' ? null : () => cToggle(key) }, iv((open === 'always' || cOpen.has(key) ? '▾ ' : '▸ ') + title + ' · ' + list.length)),
|
|
353
|
-
open === 'always' || cOpen.has(key) ? list.slice(0, 150).map((x) => docRow(x, showFindings)) : null,
|
|
354
|
-
list.length > 150 && (open === 'always' || cOpen.has(key)) ? el('div', { style: NOTE }, iv('… and ' + (list.length - 150) + ' more')) : null);
|
|
355
|
-
};
|
|
356
|
-
const withStatus = (st) => docs.filter((x) => x.findings.some((f) => f.status === st));
|
|
357
|
-
const only = (st) => (x) => ({ ...x, findings: x.findings.filter((f) => f.status === st) });
|
|
358
|
-
kids.push(group('problems', 'problems — a statement is contradicted by its source', withStatus('contradicted').map(only('contradicted')), 'always', true));
|
|
359
|
-
kids.push(group('stale', 'stale — a source changed after the document did, or its date passed', withStatus('stale').map(only('stale')), 'always', true));
|
|
360
|
-
kids.push(group('suspected', 'suspected by Jev — advisory, not counted as problems', withStatus('suspected').map(only('suspected')), 'always', true));
|
|
361
|
-
kids.push(group('undecided', 'worth a look — structure cannot decide', withStatus('undecided').map(only('undecided')), 'toggle', true));
|
|
362
|
-
kids.push(group('fine', 'checked and fine', docs.filter((x) => x.classified && !x.findings.length), 'toggle', false));
|
|
363
|
-
kids.push(group('unclassified', 'not classified — nothing declares what these are', docs.filter((x) => !x.classified), 'toggle', true));
|
|
364
|
-
return kids.filter(Boolean);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
export function validateList() {
|
|
368
|
-
const kids = [];
|
|
369
|
-
const k = read('typesafe', '/api/typesafe');
|
|
370
|
-
const ws = vWs();
|
|
371
|
-
const rp = ws ? read('vrepo', '/api/validate/repo?ws=' + encodeURIComponent(ws)) : null;
|
|
372
|
-
const fd = ws ? read('vfind', '/api/validate/findings?ws=' + encodeURIComponent(ws)) : null;
|
|
373
|
-
kids.push(...claimsBlock(ws));
|
|
374
|
-
kids.push(el('div', { style: LABEL + ';margin-top:10px' }, iv('typesafe (jev) — optional, sends text only after you turn it on')));
|
|
375
|
-
kids.push(el('div', { style: NOTE, 'data-r19': 'intro' }, iv('Checks this repository\'s documents for reliability, coherence and freshness. Local checks run first and send nothing. Text that needs judgement goes to TypeSafe (Jev), only after you switch it on for this repository and confirm what will be sent. Findings are advice; nothing is edited.')));
|
|
376
|
-
|
|
377
|
-
// 1 · the key
|
|
378
|
-
kids.push(el('div', { style: LABEL }, iv('1 · TypeSafe key')));
|
|
379
|
-
const st = status(k, 'the key status');
|
|
380
|
-
if (st) kids.push(st);
|
|
381
|
-
else {
|
|
382
|
-
const present = k.data && k.data.key && k.data.key.present;
|
|
383
|
-
const src = k.data && k.data.key && k.data.key.source;
|
|
384
|
-
kids.push(el('div', { style: NOTE, 'data-r19': 'key-status' }, iv(present
|
|
385
|
-
? 'A key is set (' + (src === 'environment' ? 'from the environment' : 'saved on this machine') + '). It is never shown again and is never given to a terminal.'
|
|
386
|
-
: 'No key is set. Without a key nothing is sent.')));
|
|
387
|
-
const input = el('input', { type: 'password', autocomplete: 'off', spellcheck: 'false', placeholder: present ? 'replace the key' : 'paste your TypeSafe key', 'data-r19': 'key-input',
|
|
388
|
-
style: 'flex:1;min-width:0;font-family:var(--mono);font-size:11px;padding:4px 8px;border:1px solid var(--border);background:var(--background);color:var(--foreground);min-height:28px' });
|
|
389
|
-
kids.push(el('div', { style: 'display:flex;gap:4px;padding:0 14px 6px' }, input,
|
|
390
|
-
el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r19': 'key-save', onClick: () => vSaveKey(input) }, 'save'),
|
|
391
|
-
present && src === 'settings' ? el('button', { style: BTN, hover: 'color:var(--destructive)', 'data-r19': 'key-remove', onClick: vClearKey }, 'remove') : null));
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
// 2 · this repository
|
|
395
|
-
kids.push(el('div', { style: LABEL }, iv('2 · this repository' + (state.product ? ' · ' + state.product : ''))));
|
|
396
|
-
if (!ws) kids.push(el('div', { style: NOTE }, iv('Select a repository first.')));
|
|
397
|
-
else {
|
|
398
|
-
const rs = status(rp, 'this repository\'s validation setting');
|
|
399
|
-
if (rs) kids.push(rs);
|
|
400
|
-
else {
|
|
401
|
-
const on = !!(rp.data && rp.data.consent);
|
|
402
|
-
kids.push(el('div', { style: 'display:flex;gap:8px;align-items:center;padding:4px 14px' },
|
|
403
|
-
el('span', { style: 'font-size:12px', 'data-r19': 'consent-state' }, iv(on ? 'validation is ON for this repository' : 'validation is OFF — nothing from this repository is sent')),
|
|
404
|
-
el('button', { style: BTN + ';margin-left:auto', hover: 'color:var(--foreground)', 'data-r19': 'consent-toggle', onClick: () => vConsent(!on) }, on ? 'turn off' : 'turn on')));
|
|
405
|
-
const ro = !!(rp.data && rp.data.route);
|
|
406
|
-
kids.push(el('div', { style: 'display:flex;gap:8px;align-items:center;padding:4px 14px' },
|
|
407
|
-
el('span', { style: 'font-size:12px', 'data-route': 'state' }, iv(ro ? 'route prompts with Jev: ON — each prompt typed in a workspace terminal is checked, and the model switches when Jev decides' : 'route prompts with Jev: OFF — no prompt is sent')),
|
|
408
|
-
el('button', { style: BTN + ';margin-left:auto', hover: 'color:var(--foreground)', 'data-route': 'toggle', onClick: () => vRoute(!ro) }, ro ? 'turn off' : 'turn on')));
|
|
409
|
-
const ta = el('textarea', { rows: 2, placeholder: 'paths never sent, one per line (e.g. private/ or notes/*.md)', 'data-r19': 'exclude-input',
|
|
410
|
-
style: 'width:calc(100% - 28px);margin:4px 14px 0;font-family:var(--mono);font-size:10.5px;padding:4px 8px;border:1px solid var(--border);background:var(--background);color:var(--foreground)' }, (rp.data.exclude || []).join('\n'));
|
|
411
|
-
kids.push(ta, el('div', { style: 'padding:4px 14px 6px' }, el('button', { style: BTN, hover: 'color:var(--foreground)', 'data-r19': 'exclude-save', onClick: () => vExclude(ta.value) }, 'save excluded paths')));
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// 3 · plan and run
|
|
416
|
-
kids.push(el('div', { style: LABEL }, iv('3 · validate')));
|
|
417
|
-
kids.push(el('div', { style: 'padding:4px 14px 6px;display:flex;gap:6px;align-items:center;flex-wrap:wrap' },
|
|
418
|
-
el('button', { style: BTN, hover: 'color:var(--foreground)', disabled: vBusy ? 'true' : null, 'data-r19': 'plan', onClick: vMakePlan }, 'show what would be sent'),
|
|
419
|
-
vPlan && vPlan.ws === ws ? el('button', { style: BTN + ';color:var(--foreground);border-color:var(--foreground)', hover: 'background:var(--accent)', disabled: vBusy ? 'true' : null, 'data-r19': 'run', onClick: vRun }, 'confirm and send ' + vPlan.plan.requests + ' request(s)') : null));
|
|
420
|
-
if (vPlan && vPlan.ws === ws) {
|
|
421
|
-
const p = vPlan.plan;
|
|
422
|
-
kids.push(el('div', { style: NOTE, 'data-r19': 'plan-text' },
|
|
423
|
-
iv(p.requests + ' request(s), about ' + p.characters.toLocaleString() + ' characters, to ' + p.host + '. ' + p.eligible + ' of ' + p.documents + ' documents eligible · ' + p.excluded + ' excluded · ' + p.local_findings + ' local finding(s) that send nothing.')));
|
|
424
|
-
if (p.withheld.length) kids.push(el('div', { style: NOTE + ';color:var(--destructive)', 'data-r19': 'withheld' }, iv('Withheld, matched a credential pattern, will NOT be sent: ' + p.withheld.map((w) => w.file + ' (' + w.rules.join(', ') + ')').join('; '))));
|
|
425
|
-
if (p.too_large.length) kids.push(el('div', { style: NOTE }, iv('Too large to send: ' + p.too_large.join(', '))));
|
|
426
|
-
}
|
|
427
|
-
if (vNote) kids.push(el('div', { 'data-r19': 'note', style: NOTE + ';color:' + (TONE[vNote.tone] || TONE.mut) }, iv(vNote.text)));
|
|
428
|
-
|
|
429
|
-
// 4 · findings
|
|
430
|
-
const fs0 = fd ? status(fd, 'the findings') : null;
|
|
431
|
-
const run = fd && fd.data ? fd.data.run : null;
|
|
432
|
-
kids.push(el('div', { style: LABEL }, iv('4 · findings' + (run ? ' · last run ' + String(run.at).replace('T', ' ').slice(0, 16) + ' · model ' + (run.model || 'none') : ''))));
|
|
433
|
-
if (fs0) kids.push(fs0);
|
|
434
|
-
else if (!run) kids.push(el('div', { style: NOTE, 'data-r19': 'no-run' }, iv('No validation has run for this repository.')));
|
|
435
|
-
else {
|
|
436
|
-
kids.push(el('div', { style: NOTE, 'data-r19': 'coverage' }, iv('Coverage: ' + run.asked + ' of ' + run.requests + ' request(s) answered · ' + run.withheld + ' withheld · ' + run.too_large + ' too large · ' + run.excluded + ' excluded · ' + run.failed + ' failed. A short list is not a clean bill: read this line first.')));
|
|
437
|
-
const list = fd.data.findings || [];
|
|
438
|
-
if (!list.length) kids.push(el('div', { style: NOTE }, iv('The run raised nothing.')));
|
|
439
|
-
for (const f of list) {
|
|
440
|
-
const unsure = f.label === 'for-your-judgement';
|
|
441
|
-
kids.push(el('button', { style: ROW, hover: 'background:var(--accent)', 'data-r19': 'finding', 'data-rule': f.rule, title: f.question || f.detail || '',
|
|
442
|
-
onClick: () => openDocIn(ws, f.file, state.product) },
|
|
443
|
-
el('span', { style: 'display:flex;gap:8px;align-items:baseline' },
|
|
444
|
-
el('span', { style: 'font-family:var(--mono);font-size:10px;color:' + (f.severity === 'high' ? 'var(--destructive)' : 'var(--muted-foreground)') }, iv(f.severity)),
|
|
445
|
-
el('span', { style: 'font-size:12px' }, iv(f.rule.replace(/-/g, ' '))),
|
|
446
|
-
el('span', { style: 'margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--muted-foreground)' }, iv(f.kind === 'judged' ? (unsure ? 'for your judgement · ' : '') + 'confidence ' + (f.confidence == null ? '—' : f.confidence.toFixed(2)) : f.sent ? 'sent' : 'local'))),
|
|
447
|
-
el('span', { style: 'display:block;font-size:11px;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap' }, iv(f.files.join(' ↔ ') + (f.detail ? ' — ' + f.detail : '')))));
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
return [el('div', { style: 'padding:2px 0 8px', 'data-r19': 'validate' }, kids)];
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// { cid, state: 'loading'|'ok'|'error', data, error }
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/* pm/modes.js — what is left of the secondary modes after the R29 cuts (pm-os-absorb Run 3, slice 3D).
|
|
2
|
-
*
|
|
3
|
-
* The settings drawer and its modes are gone: Focus, Portfolio, Memory, Knowledge, the Guide, Skills, Scheduled, Agents,
|
|
4
|
-
* Connect and the morning brief. Memory, Knowledge and the Guide are ⌘K search scopes (palette.js); Skills start from the
|
|
5
|
-
* dock's + Session menu; the schedules live in Reports; "All repositories" is a choice in Repository ▾. This file keeps
|
|
6
|
-
* the two things that stay:
|
|
7
|
-
*
|
|
8
|
-
* validate the Validate page's list (modes-live.js validateList), reached from Settings
|
|
9
|
-
* prof the Claude profiles in the detail column, reached from Settings
|
|
10
|
-
*
|
|
11
|
-
* ── The entry points ─────────────────────────────────────────────────────────────────────────
|
|
12
|
-
* renderMode(hostList, hostDetail, mode) — the body for `mode`, APPENDED to `hostList`.
|
|
13
|
-
* detailBody(kind, detail) — the nodes the detail column puts BELOW its header for a secondary
|
|
14
|
-
* detail kind (`prof`).
|
|
15
|
-
*
|
|
16
|
-
* No network, no derived state cached (D33): every list, count and colour below is computed at read time, on every render.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { el, setChildren } from './dom.js';
|
|
20
|
-
import { state, FIXTURE } from './state.js';
|
|
21
|
-
import * as FX from './fixture.js';
|
|
22
|
-
import * as LIVE from './modes-live.js'; // overhaul-r4: server-backed renderers, live mode only
|
|
23
|
-
|
|
24
|
-
/** `{{ expr }}` — an interpolated value, wrapped the way the prototype's runtime wraps it. */
|
|
25
|
-
const iv = (v) => el('span', null, v === null || v === undefined ? '' : String(v));
|
|
26
|
-
|
|
27
|
-
/** The detail descriptor, never undefined. */
|
|
28
|
-
const detOf = () => state.detail || { kind: 'init' };
|
|
29
|
-
|
|
30
|
-
/* ── style constants ─────────────────────────────────────────────────────────────────────── */
|
|
31
|
-
|
|
32
|
-
// The two-column field grid every secondary detail uses; `pt` is the label's top padding.
|
|
33
|
-
const FIELD_ROW = 'display:grid;grid-template-columns:76px 1fr;gap:10px;padding:8px 14px;border-bottom:1px solid var(--border)';
|
|
34
|
-
const fieldLabel = (pt) => 'font-family:var(--mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted-foreground);padding-top:' + pt + 'px';
|
|
35
|
-
const FOOTER = 'margin-top:auto;padding:8px 14px;border-top:1px solid var(--border);font-family:var(--mono);font-size:10px;color:var(--muted-foreground)';
|
|
36
|
-
const HEAD_BLOCK = 'padding:13px 14px 11px;border-bottom:1px solid var(--border)';
|
|
37
|
-
const HEAD_NAME = 'font-family:var(--mono);font-size:15px;font-weight:600';
|
|
38
|
-
const HEAD_SUB = 'font-size:12px;color:var(--muted-foreground);margin-top:2px';
|
|
39
|
-
const ITALIC_EMPTY = 'font-size:11.5px;color:var(--muted-foreground);font-style:italic';
|
|
40
|
-
const PILL = 'font-family:var(--mono);font-size:10px;padding:2px 6px;background:var(--secondary);border:1px solid var(--border)';
|
|
41
|
-
|
|
42
|
-
/* ── the Claude profiles (the detail Settings opens) ─────────────────────────────────────────── */
|
|
43
|
-
|
|
44
|
-
/** The registered profiles: the live data layer's, else (fixture mode only) the seed's. */
|
|
45
|
-
const profileList = () => {
|
|
46
|
-
const p = state.profiles; // the /api/profiles answer ({ profiles: [...] }), or a bare list
|
|
47
|
-
return Array.isArray(p) ? p : p && Array.isArray(p.profiles) ? p.profiles : (FIXTURE ? FX.PROFILES : []);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
function profBody(det) {
|
|
51
|
-
let pf = { id: '', account: '', mcp: [], noMcp: false, note: '', detected: null };
|
|
52
|
-
const x = profileList().find((z) => z.id === det.id);
|
|
53
|
-
if (x) pf = { ...pf, ...x, account: x.account || '', mcp: x.mcp || [], note: x.note || (x.detected ? 'Found on this machine, not written by PMOS. A session started under it sets only CLAUDE_CONFIG_DIR.' : ''), noMcp: !(x.mcp && x.mcp.length) };
|
|
54
|
-
|
|
55
|
-
// a profile PMOS found rather than wrote has no descriptor file: say how it was found, in tokens-and-classes only
|
|
56
|
-
if (pf.detected) {
|
|
57
|
-
const how = { shell: 'a shell command', launcher: 'a launcher script', 'config-dir': 'a config folder' }[pf.detected.source] || 'this machine';
|
|
58
|
-
return [el('div', { class: 'fr-fp-stack', 'data-fr': 'profile-detected' },
|
|
59
|
-
el('span', { class: 'fr-fp-label' }, iv(pf.id)),
|
|
60
|
-
el('p', { class: 'fr-fp-sub' }, 'Detected from ' + how + '. ' + pf.note),
|
|
61
|
-
el('p', { class: 'fr-fp-sub' }, iv(pf.detected.from)))];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const out = [];
|
|
65
|
-
out.push(el('div', { style: HEAD_BLOCK },
|
|
66
|
-
el('div', { style: HEAD_NAME }, iv(pf.id)),
|
|
67
|
-
el('div', { style: HEAD_SUB }, 'claude profile · ', iv(pf.account))));
|
|
68
|
-
out.push(el('div', { style: FIELD_ROW },
|
|
69
|
-
el('span', { style: fieldLabel(2) }, 'mcp'),
|
|
70
|
-
el('div', { style: 'display:flex;gap:4px;flex-wrap:wrap;min-width:0' },
|
|
71
|
-
pf.mcp.map((mc) => el('span', { style: PILL + ';color:var(--info)' }, iv(mc))),
|
|
72
|
-
pf.noMcp && el('span', { style: ITALIC_EMPTY }, 'none — workspace MCP unavailable on this profile'))));
|
|
73
|
-
out.push(el('div', { style: 'padding:10px 14px;font-size:11.5px;line-height:1.55;color:var(--muted-foreground)' }, iv(pf.note)));
|
|
74
|
-
out.push(el('div', { style: FOOTER }, '~/.claude/profiles/', iv(pf.id), '.json'));
|
|
75
|
-
return out;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/* ═════════════════════════════════════════════════════════════════════════════════════════════
|
|
79
|
-
* the entry points
|
|
80
|
-
* ═════════════════════════════════════════════════════════════════════════════════════════════ */
|
|
81
|
-
|
|
82
|
-
const LISTS = {
|
|
83
|
-
// live mode only: the Validate page's list. The fixture has none.
|
|
84
|
-
validate: () => (FIXTURE ? [] : LIVE.validateList()),
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const BODIES = {
|
|
88
|
-
prof: profBody,
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/* WHERE EACH THING OPENS. A list (the initiatives, the Validate page) is drawn in the navigation column; a detail (an
|
|
92
|
-
* initiative, a profile) is drawn in the detail column. This table is the rule; a mode or a detail kind that is not in
|
|
93
|
-
* it is a failing test, so a new one has to say which column it opens in. */
|
|
94
|
-
export const MODE_PLACE = {
|
|
95
|
-
lists: { product: 'navigation', validate: 'navigation' },
|
|
96
|
-
details: { init: 'detail', prof: 'detail', addprod: 'detail', bind: 'detail', new: 'detail', none: 'detail' },
|
|
97
|
-
};
|
|
98
|
-
/* WHAT A ROW IN EACH LIST OPENS. An initiative opens in the detail column; the Validate page opens in a tab, like any other
|
|
99
|
-
* document, so it can sit beside a terminal. */
|
|
100
|
-
export const ROW_OPENS = {
|
|
101
|
-
product: 'detail',
|
|
102
|
-
validate: 'tab',
|
|
103
|
-
};
|
|
104
|
-
/** The column a list mode opens in: always `navigation`. `null` for a mode this table does not know. */
|
|
105
|
-
export const placeOfMode = (mode) => MODE_PLACE.lists[mode] || null;
|
|
106
|
-
/** The column a detail kind opens in: always `detail`. `null` for a kind this table does not know. */
|
|
107
|
-
export const placeOfDetail = (kind) => MODE_PLACE.details[kind] || null;
|
|
108
|
-
|
|
109
|
-
/** Is `mode` one this module renders? `product` belongs to panel-initiatives.js. */
|
|
110
|
-
export function hasMode(mode) {
|
|
111
|
-
return Object.prototype.hasOwnProperty.call(LISTS, mode);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/** Is `kind` a detail body this module owns? */
|
|
115
|
-
export function hasDetail(kind) {
|
|
116
|
-
return Object.prototype.hasOwnProperty.call(BODIES, kind);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Panel 3's body for a secondary detail kind — the nodes that go BELOW panel-detail.js's sticky
|
|
121
|
-
* header. An unknown kind returns null so the caller can fall back to its own empty copy.
|
|
122
|
-
*/
|
|
123
|
-
export function detailBody(kind, detail) {
|
|
124
|
-
const fn = BODIES[kind];
|
|
125
|
-
if (!fn) return null;
|
|
126
|
-
return fn(detail || detOf());
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Panel 2's body for `mode`, appended to `hostList` below the header and the search box that
|
|
131
|
-
* panel-initiatives.js has already put there. `hostDetail`, when given, is filled with the
|
|
132
|
-
* matching detail body; it is normally null because panel 3 paints itself.
|
|
133
|
-
*/
|
|
134
|
-
export function renderMode(hostList, hostDetail, mode) {
|
|
135
|
-
const m = mode || state.mode || 'product';
|
|
136
|
-
const fn = LISTS[m];
|
|
137
|
-
if (hostList && fn) for (const node of fn()) if (node) hostList.appendChild(node);
|
|
138
|
-
|
|
139
|
-
if (hostDetail) {
|
|
140
|
-
const kind = (state.detail && state.detail.kind) || 'init';
|
|
141
|
-
const body = detailBody(kind, state.detail);
|
|
142
|
-
setChildren(hostDetail, body || []);
|
|
143
|
-
}
|
|
144
|
-
return hostList;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export default renderMode;
|