create-pmos 0.399.0 → 0.400.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +18 -13
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +2 -2
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-test.js +3 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +17 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +20 -2
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/phone-companion.md +1 -1
- package/workspace/lib/route-modules.js +1 -9
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +2 -2
- package/workspace/premium-vw-doc-test.js +1 -8
- package/workspace/premium-work-depth-test.js +2 -3
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/c3-base.js +47 -0
- package/workspace/public/pm/c3-capture.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/c3-sheet.js +1 -1
- package/workspace/public/pm/c3-toast.js +1 -1
- package/workspace/public/pm/console3.css +3 -0
- package/workspace/public/pm/cozy-home.css +20 -5
- package/workspace/public/pm/cozy-today.css +5 -2
- package/workspace/public/pm/cozy-viewer.js +4 -2
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-app.js +47 -26
- package/workspace/public/pm/home-chat.js +10 -4
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +12 -2
- package/workspace/public/pm/home-list.js +20 -7
- package/workspace/public/pm/home-more.js +2 -2
- package/workspace/public/pm/home-phone-card.js +9 -4
- package/workspace/public/pm/home-review.js +2 -3
- package/workspace/public/pm/home-today.js +10 -6
- package/workspace/public/pm/home-work.js +15 -8
- package/workspace/public/pm/note-dock.js +1 -2
- package/workspace/public/pm/notes-links.js +1 -2
- package/workspace/public/pm/notes-task.js +3 -4
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/replaced-tests.json +435 -0
- package/workspace/run-tests.js +323 -28
- package/workspace/server.js +15 -10
- package/workspace/test-files.json +3 -140
- package/workspace/test-lists/base.json +1 -2
- package/workspace/test-lists/c3-desktop-light-load.json +1 -2
- package/workspace/test-lists/c3-initiative-boards.json +1 -2
- package/workspace/test-lists/c3-meeting-focus.json +2 -12
- package/workspace/test-lists/c3-work-agent.json +1 -2
- package/workspace/test-lists/calendar-tidy-up.json +1 -2
- package/workspace/test-lists/console3-reports.json +1 -2
- package/workspace/test-lists/docs-three-way-sync.json +1 -2
- package/workspace/test-lists/extension-capture.json +5 -0
- package/workspace/test-lists/jira-wbs.json +1 -2
- package/workspace/test-lists/legacy-cleanup-a.json +9 -0
- package/workspace/test-lists/meeting-material.json +1 -2
- package/workspace/test-lists/meeting-notes.json +2 -36
- package/workspace/test-lists/meeting-replay.json +1 -2
- package/workspace/test-lists/mm-capture.json +2 -12
- package/workspace/test-lists/my-work.json +2 -10
- package/workspace/test-lists/onboarding-firstrun.json +2 -12
- package/workspace/test-lists/people-directory.json +1 -2
- package/workspace/test-lists/run2-a.json +1 -2
- package/workspace/test-lists/run2-d.json +2 -19
- package/workspace/test-lists/run3-b.json +1 -2
- package/workspace/test-lists/run3-c.json +2 -12
- package/workspace/test-lists/run4-b.json +1 -2
- package/workspace/test-lists/run4-d.json +1 -5
- package/workspace/test-lists/run5-c.json +1 -11
- package/workspace/test-lists/run6.json +1 -5
- package/workspace/test-lists/workspace-launch-flags.json +2 -12
- package/workspace/test-lists/workspace-profile-detection.json +2 -10
- package/workspace/test-timings.json +242 -123
- package/workspace/c3-briefing-test.js +0 -136
- package/workspace/c3-core-docs-test.js +0 -170
- package/workspace/c3-driver-fixture.js +0 -64
- package/workspace/c3-driver-test.js +0 -169
- package/workspace/c3-foundation-test.js +0 -163
- package/workspace/c3-ib-items-test.js +0 -114
- package/workspace/c3-ib-more-test.js +0 -146
- package/workspace/c3-ib-triage-backlog-test.js +0 -128
- package/workspace/c3-ini-harness.js +0 -66
- package/workspace/c3-ini-life-test.js +0 -167
- package/workspace/c3-initiatives-test.js +0 -186
- package/workspace/c3-light-load-test.js +0 -112
- package/workspace/c3-one-home-test.js +0 -149
- package/workspace/c3-phone-test.js +0 -289
- package/workspace/c3-quiet-test.js +0 -157
- package/workspace/c3-report-design-real-test.js +0 -264
- package/workspace/c3-report-design-test.js +0 -442
- package/workspace/c3-report-setup-test.js +0 -192
- package/workspace/c3-report-structure-real-test.js +0 -248
- package/workspace/c3-report-structure-test.js +0 -397
- package/workspace/c3-reports-test.js +0 -288
- package/workspace/c3-scan-test.js +0 -517
- package/workspace/c3-sessions-panel-test.js +0 -365
- package/workspace/c3-settings-test.js +0 -204
- package/workspace/c3-updates-test.js +0 -131
- package/workspace/c3-work-test.js +0 -260
- package/workspace/cut-stub.js +0 -40
- package/workspace/first-paint-audit.js +0 -160
- package/workspace/lib/c3-full-console.js +0 -15
- package/workspace/lib/engine/derived/trust.js +0 -3
- package/workspace/lib/engine/plan-forecast.js +0 -342
- package/workspace/lib/engine/report-families.js +0 -175
- package/workspace/lib/engine/truth-table.js +0 -57
- package/workspace/lib/routes-c3-init.js +0 -54
- package/workspace/lib/routes-c3-life.js +0 -120
- package/workspace/lib/routes-c3-timeline.js +0 -192
- package/workspace/lib/routes-forecast.js +0 -86
- package/workspace/lib/routes-releases.js +0 -130
- package/workspace/lib/routes-report-facts.js +0 -85
- package/workspace/lib/routes-report-families.js +0 -33
- package/workspace/lib/routes-signals.js +0 -51
- package/workspace/lib/routes-timeline.js +0 -197
- package/workspace/public/c3.html +0 -35
- package/workspace/public/index.html +0 -156
- package/workspace/public/pm/app.js +0 -831
- package/workspace/public/pm/bd-board.js +0 -159
- package/workspace/public/pm/bd-drag.js +0 -59
- package/workspace/public/pm/bd-model.js +0 -152
- package/workspace/public/pm/bd-timeline.js +0 -233
- package/workspace/public/pm/bd-tree.js +0 -244
- package/workspace/public/pm/board-copy.js +0 -59
- package/workspace/public/pm/board-read.js +0 -38
- package/workspace/public/pm/branches-sheet.js +0 -56
- package/workspace/public/pm/breakdown-api.js +0 -58
- package/workspace/public/pm/breakdown-copy.js +0 -138
- package/workspace/public/pm/briefing-deck.js +0 -441
- package/workspace/public/pm/briefing-model.js +0 -251
- package/workspace/public/pm/c3-ambient.js +0 -100
- package/workspace/public/pm/c3-audience-link.js +0 -21
- package/workspace/public/pm/c3-audience.js +0 -46
- package/workspace/public/pm/c3-boot.js +0 -13
- package/workspace/public/pm/c3-breakdown.js +0 -240
- package/workspace/public/pm/c3-brief-data.js +0 -11
- package/workspace/public/pm/c3-brief-mentions.js +0 -137
- package/workspace/public/pm/c3-brief-needs.js +0 -288
- package/workspace/public/pm/c3-brief-pulse.js +0 -112
- package/workspace/public/pm/c3-brief-summary.js +0 -139
- package/workspace/public/pm/c3-brief-today.js +0 -79
- package/workspace/public/pm/c3-brief.js +0 -279
- package/workspace/public/pm/c3-cal-strategy.js +0 -529
- package/workspace/public/pm/c3-calendar.js +0 -965
- package/workspace/public/pm/c3-calpop.js +0 -111
- package/workspace/public/pm/c3-case.js +0 -196
- package/workspace/public/pm/c3-core-docs.css +0 -18
- package/workspace/public/pm/c3-core-docs.js +0 -236
- package/workspace/public/pm/c3-daypart.js +0 -176
- package/workspace/public/pm/c3-demo-boards.js +0 -764
- package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
- package/workspace/public/pm/c3-demo-brief-page.js +0 -70
- package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
- package/workspace/public/pm/c3-demo-cal2.js +0 -66
- package/workspace/public/pm/c3-demo-cal3.js +0 -173
- package/workspace/public/pm/c3-demo-cal4.js +0 -169
- package/workspace/public/pm/c3-demo-cal5.js +0 -52
- package/workspace/public/pm/c3-demo-coredocs.js +0 -221
- package/workspace/public/pm/c3-demo-data.js +0 -552
- package/workspace/public/pm/c3-demo-focus.js +0 -181
- package/workspace/public/pm/c3-demo-init.js +0 -430
- package/workspace/public/pm/c3-demo-life.js +0 -77
- package/workspace/public/pm/c3-demo-material.js +0 -58
- package/workspace/public/pm/c3-demo-misc2.js +0 -34
- package/workspace/public/pm/c3-demo-phone.js +0 -48
- package/workspace/public/pm/c3-demo-plan2.js +0 -30
- package/workspace/public/pm/c3-demo-rd.js +0 -432
- package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
- package/workspace/public/pm/c3-demo-rep2.js +0 -130
- package/workspace/public/pm/c3-demo-rep3.js +0 -138
- package/workspace/public/pm/c3-demo-rs.js +0 -287
- package/workspace/public/pm/c3-demo-term.js +0 -153
- package/workspace/public/pm/c3-demo-time.js +0 -49
- package/workspace/public/pm/c3-demo-work-ix.js +0 -32
- package/workspace/public/pm/c3-demo.js +0 -131
- package/workspace/public/pm/c3-design-studio.js +0 -369
- package/workspace/public/pm/c3-doc-formats.js +0 -153
- package/workspace/public/pm/c3-doc-sheet.js +0 -1230
- package/workspace/public/pm/c3-dock.js +0 -206
- package/workspace/public/pm/c3-docs.js +0 -291
- package/workspace/public/pm/c3-driver-work.js +0 -110
- package/workspace/public/pm/c3-driver.css +0 -18
- package/workspace/public/pm/c3-driver.js +0 -298
- package/workspace/public/pm/c3-focus.css +0 -304
- package/workspace/public/pm/c3-focus.js +0 -983
- package/workspace/public/pm/c3-ib-docs.js +0 -92
- package/workspace/public/pm/c3-ib-initiatives.js +0 -201
- package/workspace/public/pm/c3-ib-items.js +0 -210
- package/workspace/public/pm/c3-ib-releases.js +0 -48
- package/workspace/public/pm/c3-ib-sprints.js +0 -201
- package/workspace/public/pm/c3-ib-triage.js +0 -177
- package/workspace/public/pm/c3-ii-tabs.js +0 -252
- package/workspace/public/pm/c3-ini-life.css +0 -34
- package/workspace/public/pm/c3-ini-life.js +0 -379
- package/workspace/public/pm/c3-ini-records.js +0 -197
- package/workspace/public/pm/c3-ini-timeline.js +0 -278
- package/workspace/public/pm/c3-ini-work.js +0 -139
- package/workspace/public/pm/c3-init-extras.js +0 -170
- package/workspace/public/pm/c3-initiatives.js +0 -852
- package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
- package/workspace/public/pm/c3-look.js +0 -27
- package/workspace/public/pm/c3-material.css +0 -22
- package/workspace/public/pm/c3-material.js +0 -321
- package/workspace/public/pm/c3-md.js +0 -3
- package/workspace/public/pm/c3-misc-panels.js +0 -89
- package/workspace/public/pm/c3-new-session.js +0 -110
- package/workspace/public/pm/c3-notes.js +0 -751
- package/workspace/public/pm/c3-phone-boot.js +0 -47
- package/workspace/public/pm/c3-phone-detail.js +0 -97
- package/workspace/public/pm/c3-phone-model.js +0 -3
- package/workspace/public/pm/c3-phone.css +0 -66
- package/workspace/public/pm/c3-phone.js +0 -444
- package/workspace/public/pm/c3-plan-panels.js +0 -163
- package/workspace/public/pm/c3-plan.js +0 -193
- package/workspace/public/pm/c3-quiet.css +0 -113
- package/workspace/public/pm/c3-quiet.js +0 -177
- package/workspace/public/pm/c3-replay.css +0 -133
- package/workspace/public/pm/c3-replay.js +0 -429
- package/workspace/public/pm/c3-report-deck.css +0 -163
- package/workspace/public/pm/c3-report-deck.js +0 -598
- package/workspace/public/pm/c3-report-frame.css +0 -20
- package/workspace/public/pm/c3-report-print.css +0 -20
- package/workspace/public/pm/c3-report-setup.css +0 -67
- package/workspace/public/pm/c3-report-setup.js +0 -298
- package/workspace/public/pm/c3-report-store.js +0 -244
- package/workspace/public/pm/c3-report-structure.css +0 -44
- package/workspace/public/pm/c3-report-structure.js +0 -473
- package/workspace/public/pm/c3-reports.css +0 -68
- package/workspace/public/pm/c3-reports.js +0 -377
- package/workspace/public/pm/c3-roadmap.js +0 -249
- package/workspace/public/pm/c3-scan-api.js +0 -167
- package/workspace/public/pm/c3-scan-next.js +0 -248
- package/workspace/public/pm/c3-scan-setup.js +0 -313
- package/workspace/public/pm/c3-scan-words.js +0 -41
- package/workspace/public/pm/c3-scan.css +0 -74
- package/workspace/public/pm/c3-scan.js +0 -93
- package/workspace/public/pm/c3-session-chat.js +0 -103
- package/workspace/public/pm/c3-session-conv.js +0 -165
- package/workspace/public/pm/c3-session-term.js +0 -216
- package/workspace/public/pm/c3-settings.css +0 -85
- package/workspace/public/pm/c3-settings.js +0 -1045
- package/workspace/public/pm/c3-shell.js +0 -628
- package/workspace/public/pm/c3-signals.js +0 -196
- package/workspace/public/pm/c3-strategy-panels.js +0 -45
- package/workspace/public/pm/c3-swipe.js +0 -230
- package/workspace/public/pm/c3-terminal-data.js +0 -48
- package/workspace/public/pm/c3-terminal-edge.js +0 -91
- package/workspace/public/pm/c3-terminal-icons.js +0 -40
- package/workspace/public/pm/c3-terminal-results.js +0 -141
- package/workspace/public/pm/c3-terminal.js +0 -52
- package/workspace/public/pm/c3-tickets.js +0 -163
- package/workspace/public/pm/c3-timeline.js +0 -201
- package/workspace/public/pm/calendar-views.js +0 -1049
- package/workspace/public/pm/console3-lift.md +0 -220
- package/workspace/public/pm/cozy-home.js +0 -172
- package/workspace/public/pm/cozy-initiative.css +0 -138
- package/workspace/public/pm/cycle-review.js +0 -125
- package/workspace/public/pm/data.js +0 -1577
- package/workspace/public/pm/dest-board.js +0 -444
- package/workspace/public/pm/dest-docs.js +0 -530
- package/workspace/public/pm/dest-initiatives.js +0 -162
- package/workspace/public/pm/dest-mywork.js +0 -307
- package/workspace/public/pm/dest-notes.js +0 -537
- package/workspace/public/pm/dest-people.js +0 -449
- package/workspace/public/pm/dest-reports.js +0 -383
- package/workspace/public/pm/dest-settings.js +0 -601
- package/workspace/public/pm/dest-today.js +0 -267
- package/workspace/public/pm/display-word.js +0 -56
- package/workspace/public/pm/doc-editor.js +0 -473
- package/workspace/public/pm/doc-graph.js +0 -272
- package/workspace/public/pm/doc-health-panel.js +0 -110
- package/workspace/public/pm/doc-rail.js +0 -167
- package/workspace/public/pm/doc-remote.js +0 -180
- package/workspace/public/pm/dock-sessions.js +0 -472
- package/workspace/public/pm/dock.js +0 -216
- package/workspace/public/pm/fixture.js +0 -821
- package/workspace/public/pm/flag-picker.js +0 -104
- package/workspace/public/pm/frame-copy.js +0 -278
- package/workspace/public/pm/freshness-line.js +0 -149
- package/workspace/public/pm/handoff-box.js +0 -82
- package/workspace/public/pm/initiative-list.js +0 -235
- package/workspace/public/pm/initiative-sheet.js +0 -331
- package/workspace/public/pm/initiatives-api.js +0 -95
- package/workspace/public/pm/initiatives-copy.js +0 -287
- package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
- package/workspace/public/pm/initiatives-timeline.js +0 -410
- package/workspace/public/pm/initiatives-ui.js +0 -291
- package/workspace/public/pm/item-sheet.js +0 -268
- package/workspace/public/pm/keep-card.js +0 -204
- package/workspace/public/pm/lifecycle-lens-model.js +0 -246
- package/workspace/public/pm/lifecycle-lens.js +0 -276
- package/workspace/public/pm/lifecycle.js +0 -111
- package/workspace/public/pm/mobile.css +0 -366
- package/workspace/public/pm/mobile.js +0 -581
- package/workspace/public/pm/modes-live.js +0 -453
- package/workspace/public/pm/modes.js +0 -147
- package/workspace/public/pm/my-work-card.js +0 -51
- package/workspace/public/pm/my-work-data.js +0 -36
- package/workspace/public/pm/new-initiative-sheet.js +0 -169
- package/workspace/public/pm/next-step-ui.js +0 -190
- package/workspace/public/pm/outbox-panel.js +0 -125
- package/workspace/public/pm/palette-copy.js +0 -55
- package/workspace/public/pm/palette.js +0 -343
- package/workspace/public/pm/panel-breakdown.js +0 -702
- package/workspace/public/pm/panel-cockpit.js +0 -425
- package/workspace/public/pm/panel-detail.js +0 -1513
- package/workspace/public/pm/panel-initiatives.js +0 -929
- package/workspace/public/pm/panel-newsess.js +0 -709
- package/workspace/public/pm/panel-repos.js +0 -741
- package/workspace/public/pm/panel-tabs.js +0 -1506
- package/workspace/public/pm/panel-trees.js +0 -204
- package/workspace/public/pm/people-link.js +0 -106
- package/workspace/public/pm/phone-deck.js +0 -167
- package/workspace/public/pm/pm-work-view.js +0 -1533
- package/workspace/public/pm/portfolio-report.js +0 -61
- package/workspace/public/pm/premium-acts.js +0 -280
- package/workspace/public/pm/premium-brief.js +0 -111
- package/workspace/public/pm/premium-chat.js +0 -22
- package/workspace/public/pm/premium-doc-sheet.js +0 -312
- package/workspace/public/pm/premium-initiative.js +0 -324
- package/workspace/public/pm/premium-insights.css +0 -228
- package/workspace/public/pm/premium-metric-tiles.js +0 -68
- package/workspace/public/pm/premium-report-brief.js +0 -132
- package/workspace/public/pm/premium-vw-rec.js +0 -67
- package/workspace/public/pm/premium-wide.css +0 -30
- package/workspace/public/pm/print.css +0 -44
- package/workspace/public/pm/provider-cards.js +0 -136
- package/workspace/public/pm/registry.js +0 -203
- package/workspace/public/pm/release-card.js +0 -110
- package/workspace/public/pm/releases-view.js +0 -248
- package/workspace/public/pm/report-families-view.js +0 -505
- package/workspace/public/pm/report-slides.js +0 -438
- package/workspace/public/pm/report-tab.js +0 -33
- package/workspace/public/pm/report-view.js +0 -337
- package/workspace/public/pm/reports-copy.js +0 -134
- package/workspace/public/pm/roadmap.js +0 -294
- package/workspace/public/pm/run-card.js +0 -260
- package/workspace/public/pm/sessions-panel.js +0 -219
- package/workspace/public/pm/sheet-jira.js +0 -353
- package/workspace/public/pm/shell-bell.js +0 -163
- package/workspace/public/pm/shell-model.js +0 -83
- package/workspace/public/pm/shell-phone.js +0 -124
- package/workspace/public/pm/shell-readaloud.js +0 -53
- package/workspace/public/pm/shell-recording.js +0 -274
- package/workspace/public/pm/shell-ticker.js +0 -90
- package/workspace/public/pm/sig-watch.js +0 -41
- package/workspace/public/pm/slide-confirm.js +0 -163
- package/workspace/public/pm/slides-copy.js +0 -52
- package/workspace/public/pm/status-banner.js +0 -95
- package/workspace/public/pm/tab-doc.js +0 -859
- package/workspace/public/pm/tab-gone.js +0 -21
- package/workspace/public/pm/tab-term.js +0 -1210
- package/workspace/public/pm/tab-web.js +0 -90
- package/workspace/public/pm/timeline-copy.js +0 -48
- package/workspace/public/pm/timeline-forecast-view.js +0 -164
- package/workspace/public/pm/today-agenda.js +0 -331
- package/workspace/public/pm/today-cards.js +0 -244
- package/workspace/public/pm/today-copy.js +0 -506
- package/workspace/public/pm/today-day.js +0 -1371
- package/workspace/public/pm/today-goals.js +0 -297
- package/workspace/public/pm/today-jobs.js +0 -84
- package/workspace/public/pm/today-mentions.js +0 -50
- package/workspace/public/pm/topbar.js +0 -202
- package/workspace/public/pm/triage-card.js +0 -60
- package/workspace/public/pm/undo-hold.js +0 -103
- package/workspace/public/pm/view-addrepo.js +0 -208
- package/workspace/public/pm/view-files.js +0 -197
- package/workspace/public/pm/view-livenotes.js +0 -399
- package/workspace/public/pm/view-today.js +0 -13
- package/workspace/public/pm/view-validate.js +0 -171
- package/workspace/public/pm/welcome.js +0 -391
- package/workspace/public/pm/work-place.js +0 -68
- package/workspace/public/pm/xlsx-read.js +0 -117
- package/workspace/public/welcome.html +0 -22
- package/workspace/test-lists/browser-suites-green.json +0 -5
- package/workspace/test-lists/c3-core-docs.json +0 -9
- package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
- package/workspace/test-lists/c3-ib-items.json +0 -9
- package/workspace/test-lists/c3-ib-more.json +0 -9
- package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
- package/workspace/test-lists/c3-ini-life.json +0 -9
- package/workspace/test-lists/c3-meeting-board.json +0 -5
- package/workspace/test-lists/c3-meeting-card.json +0 -5
- package/workspace/test-lists/c3-notes-place.json +0 -5
- package/workspace/test-lists/c3-notes-series.json +0 -5
- package/workspace/test-lists/calendar-time-page.json +0 -5
- package/workspace/test-lists/calpop.json +0 -4
- package/workspace/test-lists/console3-briefing.json +0 -9
- package/workspace/test-lists/console3-foundation.json +0 -9
- package/workspace/test-lists/console3-work-page.json +0 -9
- package/workspace/test-lists/premium-brief-parity.json +0 -9
- package/workspace/test-lists/report-design-studio-ui.json +0 -5
- package/workspace/test-lists/report-structure-ui.json +0 -11
- package/workspace/test-lists/report-workspace-ui.json +0 -5
- package/workspace/test-lists/run3-a.json +0 -5
- package/workspace/test-lists/run3-d.json +0 -6
- package/workspace/test-lists/run4-c.json +0 -13
- package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
- package/workspace/test-lists/today-mentions-cards.json +0 -5
- package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
/* pm/dest-settings.js — the Settings destination, the frame's ⚙ (pm-os-absorb Run 3, slice 3A; PRD R9).
|
|
2
|
-
*
|
|
3
|
-
* Settings holds settings only, in eight sections and in this order:
|
|
4
|
-
* Repositories every registered repository as a row (open it to make it current; ⋯ for more), and Add repository,
|
|
5
|
-
* which draws the existing add-repository flow (view-addrepo.js) in place
|
|
6
|
-
* Profiles one row that opens the Claude profiles in the detail
|
|
7
|
-
* New sessions the default CLI and the default model the dock's + Session applies (dock.js)
|
|
8
|
-
* Validate consent the current repository's consent switch (GET and POST /api/validate/repo)
|
|
9
|
-
* People the current repository's switch for calendar attendee names (GET /api/people, POST /api/people/decide;
|
|
10
|
-
* people-directory, D90)
|
|
11
|
-
* Online the Online switch and its five settings (GET and POST /api/online; workspace-online-mode, D89)
|
|
12
|
-
* Theme Dark or Light
|
|
13
|
-
* Updates the workspace app's version and the current repository's kit version; Check for updates asks the
|
|
14
|
-
* npm registry for the latest create-pmos (POST /api/kit/check, the PM's press only). One Update
|
|
15
|
-
* button runs what `npx create-pmos@latest --update` runs when the kit is behind, then what
|
|
16
|
-
* `pmos upgrade` runs when the app is behind (workspace-kit-update). The app update restarts the
|
|
17
|
-
* server, so the page waits and reloads on the new version.
|
|
18
|
-
* The work itself (what needs you, initiatives, items, reports) is never here.
|
|
19
|
-
*
|
|
20
|
-
* The mount contract (registry.js): mountDestination(host, ctx) is called on every render with the same host. The page
|
|
21
|
-
* keeps one root per host and rebuilds it only when what it shows changed, and never while the PM types in it, so a
|
|
22
|
-
* focused control keeps its focus across the workspace's polls.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
import { el, setChildren } from './dom.js';
|
|
26
|
-
import { state, setState, FIXTURE } from './state.js';
|
|
27
|
-
import { pmGet, pmPost } from './http.js';
|
|
28
|
-
import { button, iconButton, field, badge, row, tabs, menu, empty } from './primitives.js';
|
|
29
|
-
import { repoTuples, activeProduct, renameRepo, removeRepo } from './panel-repos.js';
|
|
30
|
-
import { repoRow } from './fixture.js';
|
|
31
|
-
import { sessionDefaults, setSessionDefaults, adoptProfileDefault } from './dock.js';
|
|
32
|
-
import { COPY } from './frame-copy.js';
|
|
33
|
-
import { askConfirm } from './dialogs.js';
|
|
34
|
-
import { icon } from './icons.js';
|
|
35
|
-
import { flagPicker, flagsLine, flagsMissingValue } from './flag-picker.js';
|
|
36
|
-
import { freshnessTable } from './freshness-line.js';
|
|
37
|
-
|
|
38
|
-
const P = COPY.page;
|
|
39
|
-
const roots = new WeakMap(); // host -> { root, sig }
|
|
40
|
-
const consentByWs = new Map(); // ws -> { on: boolean | null, error, at, pending }
|
|
41
|
-
const kitByWs = new Map(); // ws -> { st: GET /api/kit/status body | null, at, pending }
|
|
42
|
-
const upd = { phase: null, latest: null, compare: null, message: '', error: '', output: '' }; // the Updates section
|
|
43
|
-
const peopleByWs = new Map(); // ws -> { on: boolean | null, error, at, pending }
|
|
44
|
-
const online = { data: null, error: null, note: null, at: 0, pending: false }; // GET /api/online, and the last refusal
|
|
45
|
-
let addOpen = false;
|
|
46
|
-
let addMod = null;
|
|
47
|
-
|
|
48
|
-
const frame = () => (window.pmApp && window.pmApp.frame) || null;
|
|
49
|
-
const dataMod = () => (window.pmApp && window.pmApp.mods && window.pmApp.mods.data) || null;
|
|
50
|
-
const wsOfRepo = (name) => { const d = dataMod(); return name && d && typeof d.wsOf === 'function' ? d.wsOf(name) : null; };
|
|
51
|
-
|
|
52
|
-
function readConsent(ws) {
|
|
53
|
-
if (!ws || FIXTURE) return;
|
|
54
|
-
const have = consentByWs.get(ws);
|
|
55
|
-
if (have && (have.pending || Date.now() - have.at < 30000)) return;
|
|
56
|
-
const entry = { on: have ? have.on : null, error: null, at: Date.now(), pending: true };
|
|
57
|
-
consentByWs.set(ws, entry);
|
|
58
|
-
pmGet('/api/validate/repo?ws=' + encodeURIComponent(ws)).then((j) => {
|
|
59
|
-
entry.pending = false; entry.at = Date.now();
|
|
60
|
-
if (j && j.ok !== false) { entry.on = !!j.consent; entry.error = null; } else entry.error = (j && j.error) || P.validateUnread;
|
|
61
|
-
setState({});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async function setConsent(ws, on) {
|
|
66
|
-
const j = await pmPost('/api/validate/repo', { ws, consent: on });
|
|
67
|
-
consentByWs.set(ws, { on: j && j.ok !== false ? !!j.consent : null, error: j && j.ok !== false ? null : ((j && j.error) || P.validateUnread), at: Date.now() });
|
|
68
|
-
setState({});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function readPeople(ws) {
|
|
72
|
-
if (!ws || FIXTURE) return;
|
|
73
|
-
const have = peopleByWs.get(ws);
|
|
74
|
-
if (have && (have.pending || Date.now() - have.at < 30000)) return;
|
|
75
|
-
const entry = { on: have ? have.on : null, error: null, at: Date.now(), pending: true };
|
|
76
|
-
peopleByWs.set(ws, entry);
|
|
77
|
-
pmGet('/api/people?ws=' + encodeURIComponent(ws)).then((j) => {
|
|
78
|
-
entry.pending = false; entry.at = Date.now();
|
|
79
|
-
if (j && j.ok !== false && j.settings) { entry.on = !!j.settings.calendar_names; entry.error = null; } else entry.error = (j && j.error) || P.peopleUnread;
|
|
80
|
-
setState({});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
async function setPeopleCalendar(ws, on) {
|
|
85
|
-
const j = await pmPost('/api/people/decide', { ws, act: 'setting', calendar_names: on });
|
|
86
|
-
peopleByWs.delete(ws);
|
|
87
|
-
if (!j || j.ok === false) peopleByWs.set(ws, { on: null, error: (j && j.error) || P.peopleUnread, at: Date.now() });
|
|
88
|
-
else readPeople(ws);
|
|
89
|
-
setState({});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function readOnline(force) {
|
|
93
|
-
if (FIXTURE || online.pending) return;
|
|
94
|
-
if (!force && Date.now() - online.at < 10000) return;
|
|
95
|
-
online.pending = true;
|
|
96
|
-
pmGet('/api/online').then((j) => {
|
|
97
|
-
online.pending = false; online.at = Date.now();
|
|
98
|
-
if (j && j.ok !== false) { online.data = j; online.error = null; } else online.error = P.onlineUnread;
|
|
99
|
-
setState({});
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function setOnline(patch) {
|
|
104
|
-
const j = await pmPost('/api/online', patch);
|
|
105
|
-
if (j && j.ok !== false) { online.data = j; online.note = null; } else online.note = (j && j.error) || P.onlineUnread;
|
|
106
|
-
online.at = Date.now();
|
|
107
|
-
setState({});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/* A card: a small uppercase eyebrow (icon + title) over the section's rows. The section ids and data-fr hooks are the contract. */
|
|
111
|
-
const section = (id, title, kids, action, iconName) => el('section', { class: 'fr-set__section', 'data-fr-section': id },
|
|
112
|
-
el('div', { class: 'fr-set__head' }, el('h2', { class: 'fr-set__title' }, iconName ? icon(iconName) : null, title), action || null),
|
|
113
|
-
kids);
|
|
114
|
-
|
|
115
|
-
/** A toggle row: the state text beside a Turn on / Turn off button (the same button as before the redesign). */
|
|
116
|
-
function switchRow({ textEl, on, disabled, attrs, onClick }) {
|
|
117
|
-
const toggle = button({ label: on ? P.turnOff : P.turnOn, variant: 'outline', size: 'sm', disabled: !!disabled, attrs, onClick });
|
|
118
|
-
return el('div', { class: 'fr-set__sw' }, el('div', { class: 'fr-set__sw-text' }, textEl), toggle);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* ── the eight sections ────────────────────────────────────────────────────────────────────────────────────────── */
|
|
122
|
-
|
|
123
|
-
function reposSection(scope) {
|
|
124
|
-
const tuples = repoTuples();
|
|
125
|
-
const current = scope === 'all' ? null : activeProduct(tuples);
|
|
126
|
-
const rows = tuples.map((t) => {
|
|
127
|
-
const rp = repoRow(t);
|
|
128
|
-
const on = rp.name === current;
|
|
129
|
-
const use = () => { const f = frame(); if (f) f.chooseRepo(rp.name); };
|
|
130
|
-
const more = iconButton({
|
|
131
|
-
icon: 'ellipsis', ariaLabel: P.more(rp.name), attrs: { 'data-fr': 'repo-more' },
|
|
132
|
-
onClick: () => menu({
|
|
133
|
-
anchor: more, ariaLabel: P.more(rp.name),
|
|
134
|
-
items: [
|
|
135
|
-
{ label: P.use, onSelect: use },
|
|
136
|
-
{ label: P.show, onSelect: () => { use(); const f = frame(); if (f) f.go('initiatives'); } },
|
|
137
|
-
{ label: P.rename, onSelect: () => renameRepo(rp.name) },
|
|
138
|
-
{ label: P.remove, onSelect: () => removeRepo(rp.name) },
|
|
139
|
-
],
|
|
140
|
-
}),
|
|
141
|
-
});
|
|
142
|
-
return row({
|
|
143
|
-
title: rp.name, meta: [rp.kindLabel], signals: on ? [badge({ text: P.current, tone: 'outline' })] : [],
|
|
144
|
-
onOpen: use, openLabel: P.use + ': ' + rp.name, trail: [more],
|
|
145
|
-
attrs: { 'data-fr-row': 'repo', 'data-repo': rp.name, 'data-current': on ? 'true' : 'false' },
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
const add = button({
|
|
149
|
-
label: addOpen ? P.addClose : P.add, variant: 'outline', size: 'sm', icon: addOpen ? 'x' : 'plus',
|
|
150
|
-
attrs: { 'data-fr': 'add-repo', 'aria-expanded': addOpen ? 'true' : 'false' },
|
|
151
|
-
onClick: () => { addOpen = !addOpen; if (addOpen && !addMod) loadAdd(); setState({}); },
|
|
152
|
-
});
|
|
153
|
-
const kids = rows.length ? rows : [empty({ text: P.reposEmpty })];
|
|
154
|
-
if (addOpen) kids.push(addBoard());
|
|
155
|
-
return section('repositories', P.repos, kids, add, 'git-branch');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function loadAdd() {
|
|
159
|
-
import('./view-addrepo.js').then((m) => { addMod = m; setState({}); }).catch(() => { addMod = false; setState({}); });
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** The existing add-repository board, drawn in place: the same form, scan review and confirm as the old tab. */
|
|
163
|
-
function addBoard() {
|
|
164
|
-
const host = el('div', { class: 'fr-set__add', 'data-fr': 'add-board' });
|
|
165
|
-
if (!addMod || typeof addMod.renderBoard !== 'function') return host;
|
|
166
|
-
const cockpit = window.pmApp && window.pmApp.mods ? window.pmApp.mods.cockpit : null;
|
|
167
|
-
try {
|
|
168
|
-
addMod.renderBoard(host, {
|
|
169
|
-
tab: { id: 'settings:addrepo', kind: 'view', view: 'addrepo' }, view: 'addrepo', renderMode: () => {}, ready: true,
|
|
170
|
-
el, setChildren, state, setState, FIXTURE, openView: cockpit ? cockpit.openView : () => {}, repo: state.product || null,
|
|
171
|
-
});
|
|
172
|
-
} catch (e) { console.error('[pm] Add repository failed:', e); }
|
|
173
|
-
return host;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function profilesSection() {
|
|
177
|
-
const open = (id) => setState({ detail: { kind: 'prof', id: id || null }, col2: true });
|
|
178
|
-
loadSessionReads();
|
|
179
|
-
const found = sess.profiles && Array.isArray(sess.profiles.profiles) ? sess.profiles.profiles : [];
|
|
180
|
-
const def = sessionDefaults().profile;
|
|
181
|
-
// every row has its ⋯, here as on the repositories: on a phone it is the one control a row is known by
|
|
182
|
-
const more = iconButton({
|
|
183
|
-
icon: 'ellipsis', ariaLabel: P.more(P.profilesRow), attrs: { 'data-fr': 'profiles-more' },
|
|
184
|
-
onClick: () => menu({ anchor: more, ariaLabel: P.more(P.profilesRow), items: [
|
|
185
|
-
{ label: P.profilesOpen, onSelect: () => open(found[0] && found[0].id) },
|
|
186
|
-
{ label: P.profilesLookAgain, onSelect: () => readProfilesAgain() },
|
|
187
|
-
] }),
|
|
188
|
-
});
|
|
189
|
-
const kids = [row({
|
|
190
|
-
title: P.profilesRow, meta: [P.profilesMeta], onOpen: () => open(found[0] && found[0].id), openLabel: P.profilesOpen, trail: [more],
|
|
191
|
-
attrs: { 'data-fr-row': 'profiles' },
|
|
192
|
-
})];
|
|
193
|
-
// one row per profile the reader returned, descriptors and detected alike: the list the default select and the New session form offer
|
|
194
|
-
for (const x of found) {
|
|
195
|
-
const isDef = def === x.id;
|
|
196
|
-
const rm = iconButton({
|
|
197
|
-
icon: 'ellipsis', ariaLabel: P.more(x.id), attrs: { 'data-fr': 'profile-more' },
|
|
198
|
-
onClick: () => menu({ anchor: rm, ariaLabel: P.more(x.id), items: [
|
|
199
|
-
{ label: isDef ? P.profileNoDefault : P.profileUseDefault, onSelect: () => chooseDefaultProfile(isDef ? null : x.id) },
|
|
200
|
-
{ label: P.profilesOpen, onSelect: () => open(x.id) },
|
|
201
|
-
] }),
|
|
202
|
-
});
|
|
203
|
-
kids.push(row({
|
|
204
|
-
title: x.id, meta: [P.profileMeta(x)],
|
|
205
|
-
signals: [isDef ? badge({ text: P.profileDefaultBadge, tone: 'outline' }) : null, x.detected ? badge({ text: P.profileDetectedBadge, tone: 'outline' }) : null].filter(Boolean),
|
|
206
|
-
onOpen: () => open(x.id), openLabel: P.profilesOpen + ': ' + x.id, trail: [rm],
|
|
207
|
-
attrs: { 'data-fr-row': 'profile', 'data-profile': x.id, 'data-default': isDef ? 'true' : 'false', 'data-detected': x.detected ? 'true' : 'false' },
|
|
208
|
-
}));
|
|
209
|
-
}
|
|
210
|
-
if (sess.formOpen) kids.push(profileForm());
|
|
211
|
-
if (sess.msg) kids.push(el('p', { class: 'fr-set__note', role: 'status', 'data-fr': 'profiles-msg' }, sess.msg));
|
|
212
|
-
kids.push(el('p', { class: 'fr-set__note', 'data-fr': 'profiles-found' }, !sess.profiles ? P.profilesReading
|
|
213
|
-
: sess.profiles.ok === false ? P.profilesUnread(sess.profiles.error)
|
|
214
|
-
: found.length ? P.profilesFound(found.map((x) => x.id), found.filter((x) => x.detected).map((x) => x.id)) : P.profilesNone(sess.profiles.dir, sess.profiles.searched)));
|
|
215
|
-
const add = button({ label: P.profileNew, variant: 'outline', size: 'sm', icon: 'plus', attrs: { 'data-fr': 'profile-new', 'aria-expanded': sess.formOpen ? 'true' : 'false' },
|
|
216
|
-
onClick: () => { sess.formOpen = !sess.formOpen; sess.msg = ''; setState({}); } });
|
|
217
|
-
return section('profiles', P.profiles, kids, add, 'bot');
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/** The default Claude profile, from a row or the select: kept for the dock, and remembered by the server for the New session form. */
|
|
221
|
-
function chooseDefaultProfile(id) {
|
|
222
|
-
setSessionDefaults({ profile: id || null });
|
|
223
|
-
setState({});
|
|
224
|
-
// the server's answer is the default: a refusal reads the profiles again, so the select goes back to what is stored
|
|
225
|
-
pmPost('/api/profiles/prefer', { agent: 'claude', profile: id || null }).then((j) => {
|
|
226
|
-
if (j && j.ok && j.prefs) { adoptProfileDefault({ prefs: j.prefs }); if (sess.profiles) sess.profiles = { ...sess.profiles, prefs: j.prefs }; }
|
|
227
|
-
else { sess.msg = (j && j.error) || P.profileDefaultFailed; readProfilesAgain(); }
|
|
228
|
-
setState({});
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* ── the Claude profile and launch flags a new session starts with (workspace-launch-flags) ───────────────────────── */
|
|
233
|
-
const sess = { readAt: 0, profiles: null, flags: null, asked: false, flagsOpen: false, filter: '', formOpen: false, msg: '' };
|
|
234
|
-
|
|
235
|
-
/** Both reads once per page load; a created profile asks for the profile read again. */
|
|
236
|
-
function loadSessionReads() {
|
|
237
|
-
if (FIXTURE) return;
|
|
238
|
-
if (!sess.asked) {
|
|
239
|
-
sess.asked = true;
|
|
240
|
-
pmGet('/api/claude-flags').then((j) => { sess.flags = j || { ok: false, error: 'no answer', flags: [] }; setState({}); });
|
|
241
|
-
}
|
|
242
|
-
// read again when it is a while old, so a profile added since (a folder, an alias) shows without a reload
|
|
243
|
-
if (!sess.reading && (!sess.profiles || Date.now() - sess.readAt > 15000)) readProfilesAgain();
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/** Ask for the profiles again. The list on screen stays until the answer comes. */
|
|
247
|
-
function readProfilesAgain() {
|
|
248
|
-
if (FIXTURE || sess.reading) return;
|
|
249
|
-
sess.reading = true;
|
|
250
|
-
pmGet('/api/profiles').then((j) => {
|
|
251
|
-
sess.reading = false; sess.readAt = Date.now();
|
|
252
|
-
sess.profiles = j || { ok: false, error: 'no answer', profiles: [] };
|
|
253
|
-
// the server's default wins over this browser's copy, so every browser and port shows and starts with the same one
|
|
254
|
-
adoptProfileDefault(sess.profiles);
|
|
255
|
-
// the detail column and the New session form read the same answer
|
|
256
|
-
state.profiles = sess.profiles;
|
|
257
|
-
setState({});
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
let profFormNode = null;
|
|
262
|
-
/** Built once per opening and handed back on every render, so typing is never lost to a rebuild. */
|
|
263
|
-
function profileForm() {
|
|
264
|
-
if (profFormNode) return profFormNode;
|
|
265
|
-
const idF = field({ label: P.pfId, placeholder: 'client-acme', attrs: { 'data-fr': 'pf-id' } });
|
|
266
|
-
const labelF = field({ label: P.pfLabel, placeholder: 'Client Acme', attrs: { 'data-fr': 'pf-label' } });
|
|
267
|
-
const acctF = field({ label: P.pfAccount, placeholder: 'you@company.com', attrs: { 'data-fr': 'pf-account' } });
|
|
268
|
-
const mcpF = field({ label: P.pfMcp, placeholder: 'jira confluence slack', attrs: { 'data-fr': 'pf-mcp' } });
|
|
269
|
-
const envHost = el('div', { class: 'fr-set__envrows', 'data-fr': 'pf-env' });
|
|
270
|
-
const rows = [];
|
|
271
|
-
const addEnv = (name) => {
|
|
272
|
-
const n = field({ label: P.pfEnvName, hideLabel: true, placeholder: 'NAME', value: name || '', attrs: { 'data-fr': 'pf-env-name' } });
|
|
273
|
-
const v = field({ label: P.pfEnvValue, hideLabel: true, placeholder: P.pfEnvValuePh, attrs: { 'data-fr': 'pf-env-value', type: 'password', autocomplete: 'new-password' } });
|
|
274
|
-
rows.push({ n, v });
|
|
275
|
-
envHost.append(el('div', { class: 'fr-set__fields fr-set__fields--grid' }, n, v));
|
|
276
|
-
return v;
|
|
277
|
-
};
|
|
278
|
-
addEnv('CLAUDE_CONFIG_DIR');
|
|
279
|
-
const err = el('p', { class: 'fr-set__note fr-set__error', role: 'alert', 'data-fr': 'pf-error' });
|
|
280
|
-
const reset = () => { profFormNode = null; sess.formOpen = false; };
|
|
281
|
-
const submit = async () => {
|
|
282
|
-
err.textContent = '';
|
|
283
|
-
const env = {};
|
|
284
|
-
for (const r of rows) { const k = r.n.control.value.trim(); if (k) env[k] = r.v.control.value; }
|
|
285
|
-
const body = { id: idF.control.value.trim(), label: labelF.control.value.trim(), account: acctF.control.value.trim(),
|
|
286
|
-
mcp: mcpF.control.value.split(/[\s,]+/).filter(Boolean), env };
|
|
287
|
-
const j = await pmPost('/api/profiles/create', body);
|
|
288
|
-
if (!j || j.ok === false) { err.textContent = (j && j.error) || P.pfFailed; return; }
|
|
289
|
-
reset(); sess.profiles = null; sess.readAt = 0; sess.msg = P.pfCreated(j.profile.id, j.profile.env_count);
|
|
290
|
-
setState({});
|
|
291
|
-
};
|
|
292
|
-
profFormNode = el('form', { class: 'fr-set__form', 'data-fr': 'profile-form', onSubmit: (e) => { e.preventDefault(); submit(); } },
|
|
293
|
-
el('div', { class: 'fr-set__fields fr-set__fields--grid' }, idF, labelF, acctF, mcpF),
|
|
294
|
-
el('p', { class: 'fr-set__note' }, P.pfEnvHead), envHost,
|
|
295
|
-
el('div', { class: 'fr-set__fields' },
|
|
296
|
-
button({ label: P.pfAddVar, variant: 'ghost', size: 'sm', icon: 'plus', attrs: { type: 'button', 'data-fr': 'pf-add-var' }, onClick: () => { addEnv('').control.focus(); } }),
|
|
297
|
-
...['CLAUDE_CONFIG_DIR', 'ANTHROPIC_API_KEY', 'ANTHROPIC_BASE_URL'].map((nm) => button({ label: nm, variant: 'ghost', size: 'sm', attrs: { type: 'button' }, onClick: () => { addEnv(nm).control.focus(); } }))),
|
|
298
|
-
el('p', { class: 'fr-set__note' }, P.pfNote), err,
|
|
299
|
-
el('div', { class: 'fr-set__fields' },
|
|
300
|
-
button({ label: P.cancel, variant: 'outline', attrs: { type: 'button' }, onClick: () => { reset(); setState({}); } }),
|
|
301
|
-
button({ label: P.pfCreate, variant: 'primary', attrs: { type: 'submit', 'data-fr': 'pf-create' } })));
|
|
302
|
-
return profFormNode;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
function sessionsSection() {
|
|
306
|
-
loadSessionReads();
|
|
307
|
-
const d = sessionDefaults();
|
|
308
|
-
const cli = field({
|
|
309
|
-
label: P.cli, kind: 'select', value: d.cli,
|
|
310
|
-
options: [{ value: 'shell', label: P.cliShell }, { value: 'claude', label: P.cliClaude }],
|
|
311
|
-
onCommit: (v) => { setSessionDefaults({ cli: v }); setState({}); },
|
|
312
|
-
attrs: { 'data-fr': 'default-cli' },
|
|
313
|
-
});
|
|
314
|
-
const model = field({
|
|
315
|
-
label: P.model, kind: 'select', value: d.tier,
|
|
316
|
-
options: [['auto', P.modelAuto], ['fast', P.modelFast], ['balanced', P.modelBalanced], ['deep', P.modelDeep]].map(([value, label]) => ({ value, label })),
|
|
317
|
-
onCommit: (v) => { setSessionDefaults({ tier: v }); setState({}); },
|
|
318
|
-
attrs: { 'data-fr': 'default-model' },
|
|
319
|
-
});
|
|
320
|
-
// Only descriptors the reader accepted are offered; a saved default that no longer reads stays shown, marked, so it is not silently swapped
|
|
321
|
-
const live = sess.profiles && Array.isArray(sess.profiles.profiles) ? sess.profiles.profiles : [];
|
|
322
|
-
const stale = d.profile && !live.some((x) => x.id === d.profile);
|
|
323
|
-
const profile = field({
|
|
324
|
-
label: P.profileDefault, kind: 'select', value: d.profile || '',
|
|
325
|
-
options: [{ value: '', label: P.noProfile }, ...(stale ? [{ value: d.profile, label: P.profileMissing(d.profile) }] : []),
|
|
326
|
-
...live.map((x) => ({ value: x.id, label: (x.label && x.label !== x.id ? x.label + ' (' + x.id + ')' : x.id) }))],
|
|
327
|
-
// the form's own per-agent memory follows, so both starts agree; a refusal is shown by the form itself
|
|
328
|
-
onCommit: (v) => chooseDefaultProfile(v),
|
|
329
|
-
attrs: { 'data-fr': 'default-profile' },
|
|
330
|
-
});
|
|
331
|
-
const flags = d.flags;
|
|
332
|
-
const flagsBox = el('div', { class: 'fr-set__flags', 'data-fr': 'default-flags' },
|
|
333
|
-
el('span', { class: 'fr-fp-label' }, P.flagsDefault),
|
|
334
|
-
el('p', { class: 'fr-set__note', 'data-fr': 'flags-summary' }, flags.length ? 'claude ' + flagsLine(flags) : P.flagsNone),
|
|
335
|
-
sess.flags && flagsMissingValue(sess.flags, flags).length ? el('p', { class: 'fr-set__note fr-set__error', role: 'alert', 'data-fr': 'flags-missing' }, P.flagsMissing(flagsMissingValue(sess.flags, flags)[0])) : null,
|
|
336
|
-
flagPicker({ list: sess.flags, chosen: flags, filter: sess.filter, compact: !sess.flagsOpen,
|
|
337
|
-
onChange: (next) => { setSessionDefaults({ flags: next }); setState({}); },
|
|
338
|
-
onFilter: (q) => { sess.filter = q; setState({}); } }),
|
|
339
|
-
button({ label: sess.flagsOpen ? P.flagsHide : P.flagsAll, variant: 'outline', size: 'sm', attrs: { 'data-fr': 'flags-all', 'aria-expanded': sess.flagsOpen ? 'true' : 'false' },
|
|
340
|
-
onClick: () => { sess.flagsOpen = !sess.flagsOpen; setState({}); } }));
|
|
341
|
-
return section('sessions', P.sessions, [el('div', { class: 'fr-set__fields fr-set__fields--grid' }, cli, model, profile), flagsBox, el('p', { class: 'fr-set__note' }, P.sessionsNote)], null, 'square-terminal');
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function validateSection(scope) {
|
|
345
|
-
const repo = scope === 'all' ? null : activeProduct();
|
|
346
|
-
const ws = wsOfRepo(repo);
|
|
347
|
-
if (!ws) return section('validate', P.validate, [empty({ text: P.validateNoRepo })], null, 'check');
|
|
348
|
-
readConsent(ws);
|
|
349
|
-
const c = consentByWs.get(ws) || {};
|
|
350
|
-
const known = c.on === true || c.on === false;
|
|
351
|
-
const line = c.error ? P.validateUnread : !known ? '' : c.on ? P.validateOn : P.validateOff;
|
|
352
|
-
const stateEl = el('span', { 'data-fr': 'consent-state', 'data-on': known ? String(c.on) : 'unread' }, line);
|
|
353
|
-
const toggleRow = known ? switchRow({
|
|
354
|
-
textEl: stateEl, label: line, on: c.on, attrs: { 'data-fr': 'consent-toggle' }, onClick: () => setConsent(ws, !c.on),
|
|
355
|
-
}) : el('div', { class: 'fr-set__sw' }, el('div', { class: 'fr-set__sw-text' }, stateEl));
|
|
356
|
-
// Validate itself is a tool, not a place: it opens as a tab in the dock, from here only
|
|
357
|
-
const open = button({
|
|
358
|
-
label: P.validateOpen, variant: 'outline', size: 'sm', attrs: { 'data-fr': 'open-validate' },
|
|
359
|
-
onClick: () => {
|
|
360
|
-
const cockpit = window.pmApp && window.pmApp.mods ? window.pmApp.mods.cockpit : null;
|
|
361
|
-
if (cockpit && typeof cockpit.openView === 'function') cockpit.openView('validate');
|
|
362
|
-
const f = frame(); if (f) f.openDock();
|
|
363
|
-
},
|
|
364
|
-
});
|
|
365
|
-
return section('validate', P.validate, [toggleRow], open, 'check');
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
function peopleSection(scope) {
|
|
369
|
-
const repo = scope === 'all' ? null : activeProduct();
|
|
370
|
-
const ws = wsOfRepo(repo);
|
|
371
|
-
if (!ws) return section('people', P.people, [empty({ text: P.peopleNoRepo })], null, 'share-2');
|
|
372
|
-
readPeople(ws);
|
|
373
|
-
const c = peopleByWs.get(ws) || {};
|
|
374
|
-
const known = c.on === true || c.on === false;
|
|
375
|
-
const line = c.error ? c.error : !known ? '' : c.on ? P.peopleOn : P.peopleOff;
|
|
376
|
-
const stateEl = el('span', { 'data-fr': 'people-state', 'data-on': known ? String(c.on) : 'unread' }, line);
|
|
377
|
-
const toggleRow = known ? switchRow({
|
|
378
|
-
textEl: stateEl, label: line, on: c.on, attrs: { 'data-fr': 'people-calendar' }, onClick: () => setPeopleCalendar(ws, !c.on),
|
|
379
|
-
}) : el('div', { class: 'fr-set__sw' }, el('div', { class: 'fr-set__sw-text' }, stateEl));
|
|
380
|
-
return section('people', P.people, [toggleRow, el('p', { class: 'fr-set__note' }, P.peopleNote)], null, 'share-2');
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
function onlineSection() {
|
|
384
|
-
readOnline(false);
|
|
385
|
-
const d = online.data;
|
|
386
|
-
if (!d) return section('online', P.online, [el('p', { class: 'fr-set__note' }, online.error || '')], null, 'globe');
|
|
387
|
-
if (d.envHost) return section('online', P.online, [el('p', { class: 'fr-set__note', 'data-fr': 'online-state', 'data-on': 'env' }, P.onlineEnv(d.envHost))], null, 'globe');
|
|
388
|
-
const stateP = el('p', { class: 'fr-set__note', 'data-fr': 'online-state', 'data-on': String(!!d.on) }, d.on ? P.onlineOn(d.host) : P.onlineOff);
|
|
389
|
-
const lines = [];
|
|
390
|
-
if (d.on) {
|
|
391
|
-
const r = d.running || {};
|
|
392
|
-
lines.push(el('p', { class: 'fr-set__note', 'data-fr': 'online-tunnel' },
|
|
393
|
-
r.running ? P.onlineRunning : r.lastExit ? P.onlineExited(r.lastExit.code) : P.onlineStarting));
|
|
394
|
-
if (d.keys && !d.keys.keys) lines.push(el('p', { class: 'fr-set__note', 'data-fr': 'online-keys' }, d.keys.lastError ? P.onlineKeysError(d.keys.lastError) : P.onlineKeysWait));
|
|
395
|
-
if (d.lastRefusal) lines.push(el('p', { class: 'fr-set__note', 'data-fr': 'online-refused', role: 'status' }, P.onlineRefused(d.lastRefusal.reason, d.lastRefusal.at)));
|
|
396
|
-
}
|
|
397
|
-
if (!d.canChange) return section('online', P.online, [stateP, ...lines, el('p', { class: 'fr-set__note' }, P.onlineRemote)], null, 'globe');
|
|
398
|
-
const f = (key, label, placeholder) => field({
|
|
399
|
-
label, value: d[key] || '', placeholder,
|
|
400
|
-
onCommit: (v) => setOnline({ [key]: v }),
|
|
401
|
-
attrs: { 'data-fr': 'online-' + key, disabled: d.on ? true : undefined },
|
|
402
|
-
});
|
|
403
|
-
const fields = el('div', { class: 'fr-set__fields fr-set__fields--grid' },
|
|
404
|
-
f('host', P.onlineHost, 'pmos.example.com'), f('tunnel', P.onlineTunnel, 'pmos'), f('team', P.onlineTeam, 'myteam.cloudflareaccess.com'),
|
|
405
|
-
f('audience', P.onlineAudience, ''), f('email', P.onlineEmail, 'you@example.com'));
|
|
406
|
-
const blocked = !d.on && (!d.complete ? P.onlineNeedFields : !d.cloudflared ? P.onlineNoCloudflared : null);
|
|
407
|
-
const toggleRow = switchRow({
|
|
408
|
-
textEl: stateP, label: d.on ? P.onlineOn(d.host) : P.onlineOff, on: !!d.on, disabled: !!blocked,
|
|
409
|
-
attrs: { 'data-fr': 'online-toggle' }, onClick: () => setOnline({ on: !d.on }),
|
|
410
|
-
});
|
|
411
|
-
const kids = [toggleRow, ...lines, el('p', { class: 'fr-set__note' }, P.onlineIntro), fields];
|
|
412
|
-
if (blocked) kids.push(el('p', { class: 'fr-set__note', 'data-fr': 'online-blocked' }, blocked));
|
|
413
|
-
if (online.note) kids.push(el('p', { class: 'fr-set__note', 'data-fr': 'online-error', role: 'alert' }, online.note));
|
|
414
|
-
return section('online', P.online, kids, null, 'globe');
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
function themeSection() {
|
|
418
|
-
return section('theme', P.theme, [tabs({
|
|
419
|
-
variant: 'segmented', role: 'radiogroup', ariaLabel: P.theme, value: state.theme,
|
|
420
|
-
items: [{ id: 'dark', label: P.dark }, { id: 'light', label: P.light }],
|
|
421
|
-
onChange: (id) => setState({ theme: id }),
|
|
422
|
-
attrs: { 'data-fr': 'theme' },
|
|
423
|
-
})], null, 'sun');
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
function readKitStatus(ws, force) {
|
|
427
|
-
if (!ws || FIXTURE) return;
|
|
428
|
-
const have = kitByWs.get(ws);
|
|
429
|
-
if (!force && have && (have.pending || Date.now() - have.at < 30000)) return;
|
|
430
|
-
const entry = { st: have ? have.st : null, at: Date.now(), pending: true };
|
|
431
|
-
kitByWs.set(ws, entry);
|
|
432
|
-
pmGet('/api/kit/status?ws=' + encodeURIComponent(ws)).then((j) => {
|
|
433
|
-
entry.pending = false; entry.at = Date.now();
|
|
434
|
-
if (j && j.ok !== false) entry.st = j;
|
|
435
|
-
setState({});
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
const say = (fields) => { Object.assign(upd, fields); setState({}); };
|
|
440
|
-
|
|
441
|
-
async function checkUpdates(ws) {
|
|
442
|
-
say({ phase: 'check', message: '', error: '', output: '' });
|
|
443
|
-
const j = await pmPost('/api/kit/check', { ws });
|
|
444
|
-
if (j && j.ok !== false) {
|
|
445
|
-
kitByWs.set(ws, { st: j, at: Date.now() });
|
|
446
|
-
say({ phase: null, latest: j.latest, compare: { appBehind: !!j.appBehind, kitBehind: !!j.kitBehind }, source: j.source });
|
|
447
|
-
} else say({ phase: null, error: (j && j.error) || P.updateFailed });
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/** Update the kit in this repository. Returns true when it finished. */
|
|
451
|
-
async function updateKit(ws) {
|
|
452
|
-
say({ phase: 'kit', message: '', error: '', output: '' });
|
|
453
|
-
const j = await pmPost('/api/kit/update', { ws, version: upd.latest });
|
|
454
|
-
if (j && j.ok !== false) {
|
|
455
|
-
kitByWs.set(ws, { st: j, at: Date.now() });
|
|
456
|
-
say({ phase: null, compare: { ...(upd.compare || {}), kitBehind: false }, message: P.updateKitDone((j.kit && j.kit.version) || upd.latest), output: j.output || '' });
|
|
457
|
-
return true;
|
|
458
|
-
}
|
|
459
|
-
say({ phase: null, error: (j && j.error) || P.updateFailed, output: (j && j.output) || '' });
|
|
460
|
-
return false;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
const pause = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
464
|
-
|
|
465
|
-
/** Wait for the server to come back after the app update: reload on a new version, or say what happened. */
|
|
466
|
-
async function waitForRestart(from, log) {
|
|
467
|
-
let sawDown = false;
|
|
468
|
-
const until = Date.now() + 5 * 60000;
|
|
469
|
-
while (Date.now() < until) {
|
|
470
|
-
await pause(2000);
|
|
471
|
-
const j = await pmGet('/api/sessions');
|
|
472
|
-
if (!j || j.ok === false || !j.version) { sawDown = true; continue; }
|
|
473
|
-
if (j.version !== from) { location.reload(); return; }
|
|
474
|
-
if (sawDown) { say({ phase: null, error: P.updateAppSame(j.version, log) }); return; }
|
|
475
|
-
}
|
|
476
|
-
say({ phase: null, error: P.updateAppLost(log) });
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* The one Update button: the kit first when it is behind, then the app when it is behind. The app update stops this
|
|
481
|
-
* server, installs the new version, starts it again, and this page reloads on it. A kit update alone changes no page.
|
|
482
|
-
*/
|
|
483
|
-
async function updateAll(ws, app, cmp) {
|
|
484
|
-
const cur = kitByWs.get(ws);
|
|
485
|
-
const local = !!(cur && cur.st && cur.st.source && cur.st.source.kind === 'local');
|
|
486
|
-
const appToo = !!cmp.appBehind && (!app.fromCheckout || local);
|
|
487
|
-
if (appToo) {
|
|
488
|
-
const yes = await askConfirm({ title: P.updateAppTitle, body: P.updateAppBody(app.version || '?', upd.latest), confirmLabel: P.updateAll });
|
|
489
|
-
if (!yes) return;
|
|
490
|
-
}
|
|
491
|
-
if (cmp.kitBehind && !(await updateKit(ws))) return;
|
|
492
|
-
if (appToo) await updateApp(ws, app.version);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
async function updateApp(ws, from) {
|
|
496
|
-
say({ phase: 'app', message: P.updateAppBusy, error: '', output: '' });
|
|
497
|
-
const j = await pmPost('/api/kit/upgrade-app', { ws, version: upd.latest });
|
|
498
|
-
if (!j || j.ok === false) { say({ phase: null, message: '', error: (j && j.error) || P.updateFailed }); return; }
|
|
499
|
-
waitForRestart(j.from || from, j.log || '');
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
function updatesSection(scope) {
|
|
503
|
-
const repo = scope === 'all' ? null : activeProduct();
|
|
504
|
-
const ws = wsOfRepo(repo) || wsOfRepo(activeProduct());
|
|
505
|
-
readKitStatus(ws);
|
|
506
|
-
const st = (ws && kitByWs.get(ws) && kitByWs.get(ws).st) || null;
|
|
507
|
-
const app = st && st.app ? st.app : {};
|
|
508
|
-
const kit = st && st.kit ? st.kit : null;
|
|
509
|
-
const busy = !!upd.phase;
|
|
510
|
-
const cmp = upd.compare || {};
|
|
511
|
-
const kids = [];
|
|
512
|
-
const kitPresent = !!(kit && kit.present);
|
|
513
|
-
const canUpdate = (cmp.appBehind && (!app.fromCheckout || (st && st.source && st.source.kind === 'local'))) || (cmp.kitBehind && kitPresent);
|
|
514
|
-
kids.push(el('div', { class: 'fr-set__line fr-set__line--box' }, icon('panel-top'), el('span', { 'data-fr': 'app-version' }, P.updatesApp(app.version))));
|
|
515
|
-
const src = st && st.source;
|
|
516
|
-
if (src && src.kind === 'local') kids.push(el('p', { class: 'fr-set__note' + (src.error ? ' fr-set__error' : ''), 'data-fr': 'update-source' }, src.error ? P.updatesLocalBad(src.error) : P.updatesLocal(src.path)));
|
|
517
|
-
if (cmp.appBehind && app.fromCheckout && !(src && src.kind === 'local')) kids.push(el('p', { class: 'fr-set__note', 'data-fr': 'app-checkout' }, P.updatesCheckout));
|
|
518
|
-
const kitText = scope === 'all' || !ws ? P.updatesNoRepo : !kit ? '' : kit.present ? P.updatesKit(kit.version) : P.updatesNoKit;
|
|
519
|
-
kids.push(el('div', { class: 'fr-set__line fr-set__line--box' }, icon('cloud'), el('span', { 'data-fr': 'kit-version' }, kitText)));
|
|
520
|
-
if (canUpdate) {
|
|
521
|
-
kids.push(el('div', { class: 'fr-set__line' }, button({
|
|
522
|
-
label: P.updateAllTo(upd.latest), variant: 'primary', size: 'sm', disabled: busy, attrs: { 'data-fr': 'update-all' },
|
|
523
|
-
onClick: () => updateAll(ws, app, { appBehind: !!cmp.appBehind, kitBehind: !!cmp.kitBehind && kitPresent }),
|
|
524
|
-
})));
|
|
525
|
-
}
|
|
526
|
-
const line = upd.phase === 'check' ? P.updatesChecking : upd.phase === 'kit' ? P.updateKitBusy
|
|
527
|
-
: upd.message ? upd.message : upd.latest ? (cmp.appBehind || cmp.kitBehind ? P.updatesLatest(upd.latest) : P.updatesCurrent(upd.latest)) : P.updatesNever;
|
|
528
|
-
const sourceNote = upd.source === 'local' ? ' (from the local package)' : '';
|
|
529
|
-
kids.push(el('p', { class: 'fr-set__note', role: 'status', 'aria-live': 'polite', 'data-fr': 'update-state' }, line + sourceNote));
|
|
530
|
-
if (upd.error) kids.push(el('p', { class: 'fr-set__note fr-set__error', role: 'alert', 'data-fr': 'update-error' }, upd.error));
|
|
531
|
-
if (upd.output) kids.push(el('pre', { class: 'fr-set__output', 'data-fr': 'update-output' }, upd.output));
|
|
532
|
-
kids.push(el('p', { class: 'fr-set__note' }, P.updatesNote));
|
|
533
|
-
return section('updates', P.updates, kids, null, 'arrow-down');
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
/** Check for updates sits in the page header; it asks about the current repository's kit. */
|
|
537
|
-
function checkButton(scope) {
|
|
538
|
-
const repo = scope === 'all' ? null : activeProduct();
|
|
539
|
-
const ws = wsOfRepo(repo) || wsOfRepo(activeProduct());
|
|
540
|
-
return button({
|
|
541
|
-
label: P.updatesCheck, variant: 'outline', size: 'sm', icon: 'refresh-cw', disabled: !!upd.phase || !ws,
|
|
542
|
-
attrs: { 'data-fr': 'check-updates' }, onClick: () => checkUpdates(ws),
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
/* ── Data freshness (workspace-data-freshness R9): how old each source is, Refresh, and the change detector switch ── */
|
|
547
|
-
function freshnessSection(scope) {
|
|
548
|
-
const ws = wsOfRepo(scope === 'all' ? null : activeProduct());
|
|
549
|
-
if (!ws) return section('freshness', 'Data freshness', [empty({ text: 'Open a repository to see how old its data is.' })], null, 'refresh-cw');
|
|
550
|
-
return section('freshness', 'Data freshness', [freshnessTable(ws)], null, 'refresh-cw');
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
/* ── mount ────────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
554
|
-
|
|
555
|
-
function signature(scope) {
|
|
556
|
-
const ws = wsOfRepo(scope === 'all' ? null : activeProduct());
|
|
557
|
-
const addKeys = addOpen ? Object.keys(state).filter((k) => /^add[A-Z]/.test(k)).sort().map((k) => [k, state[k]]) : null;
|
|
558
|
-
let add = '';
|
|
559
|
-
try { add = JSON.stringify(addKeys); } catch { add = String(Date.now()); }
|
|
560
|
-
const kit = ws ? kitByWs.get(ws) : null;
|
|
561
|
-
return JSON.stringify([repoTuples(), activeProduct(), scope, state.theme, sessionDefaults(), sess.profiles, sess.flags, sess.flagsOpen, sess.filter, sess.formOpen, sess.msg, ws, consentByWs.get(ws) || null, peopleByWs.get(ws) || null, addOpen, !!addMod, online.data, online.error, online.note,
|
|
562
|
-
kit ? kit.st : null, upd]) + add;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
/** True while the PM is typing in the page or a menu of it is open: a rebuild then would take the focus away. */
|
|
566
|
-
function busy(root) {
|
|
567
|
-
const a = document.activeElement;
|
|
568
|
-
return !!a && root.contains(a) && /^(INPUT|TEXTAREA|SELECT)$/.test(a.tagName);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
export function mountDestination(host, ctx) {
|
|
572
|
-
const scope = ctx && ctx.tab && ctx.tab.scope === 'all' ? 'all' : 'repo';
|
|
573
|
-
let r = roots.get(host);
|
|
574
|
-
if (!r) {
|
|
575
|
-
r = { root: el('div', { class: 'fr-set', 'data-fr': 'settings' }), sig: null };
|
|
576
|
-
roots.set(host, r);
|
|
577
|
-
}
|
|
578
|
-
if (r.root.parentNode !== host) setChildren(host, [r.root]);
|
|
579
|
-
const sig = signature(scope);
|
|
580
|
-
if (sig === r.sig || busy(r.root)) return;
|
|
581
|
-
r.sig = sig;
|
|
582
|
-
setChildren(r.root, [
|
|
583
|
-
el('header', { class: 'fr-set__intro' }, el('h1', { class: 'fr-set__h1' }, P.title), checkButton(scope)),
|
|
584
|
-
/* The DOM keeps the section order (the tests and the keyboard order read it); the grid in components.css places the
|
|
585
|
-
* left column (repositories, new sessions, profiles, theme) and the right (Validate, People, Online, updates). */
|
|
586
|
-
el('div', { class: 'fr-set__grid' },
|
|
587
|
-
reposSection(scope),
|
|
588
|
-
profilesSection(),
|
|
589
|
-
sessionsSection(),
|
|
590
|
-
validateSection(scope),
|
|
591
|
-
peopleSection(scope),
|
|
592
|
-
onlineSection(),
|
|
593
|
-
themeSection(),
|
|
594
|
-
updatesSection(scope),
|
|
595
|
-
freshnessSection(scope)),
|
|
596
|
-
]);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
export function disposeDestination(host) {
|
|
600
|
-
roots.delete(host);
|
|
601
|
-
}
|