@skillcdn/console 0.5.0 → 0.5.2
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/README.md +87 -12
- package/SKILLCDN.md +3 -3
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +7 -6
- package/dist/agent-page.js.map +1 -1
- package/dist/api.d.ts +9 -7
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +8 -6
- package/dist/api.js.map +1 -1
- package/dist/charts.d.ts +103 -0
- package/dist/charts.d.ts.map +1 -0
- package/dist/charts.js +182 -0
- package/dist/charts.js.map +1 -0
- package/dist/cli/cli.d.ts +58 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +1742 -472
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/command-words.d.ts +20 -0
- package/dist/cli/command-words.d.ts.map +1 -0
- package/dist/cli/command-words.js +51 -0
- package/dist/cli/command-words.js.map +1 -0
- package/dist/cli/credentials.d.ts +54 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +126 -20
- package/dist/cli/credentials.js.map +1 -1
- package/dist/cli/directory.d.ts +19 -4
- package/dist/cli/directory.d.ts.map +1 -1
- package/dist/cli/directory.js +16 -8
- package/dist/cli/directory.js.map +1 -1
- package/dist/cli/format.d.ts +70 -9
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +267 -40
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +13 -4
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +101 -58
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/machine-check.d.ts +36 -0
- package/dist/cli/machine-check.d.ts.map +1 -0
- package/dist/cli/machine-check.js +151 -0
- package/dist/cli/machine-check.js.map +1 -0
- package/dist/cli/main.js +76 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -60
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -270
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/plugin-check.d.ts +42 -0
- package/dist/cli/plugin-check.d.ts.map +1 -1
- package/dist/cli/plugin-check.js +221 -36
- package/dist/cli/plugin-check.js.map +1 -1
- package/dist/cli/plugin-cli.d.ts +6 -1
- package/dist/cli/plugin-cli.d.ts.map +1 -1
- package/dist/cli/plugin-cli.js +21 -4
- package/dist/cli/plugin-cli.js.map +1 -1
- package/dist/cli/plugin-main.js +1 -0
- package/dist/cli/plugin-main.js.map +1 -1
- package/dist/cli/runner-host.d.ts +7 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +2 -0
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/cli/secret-notes.d.ts +8 -0
- package/dist/cli/secret-notes.d.ts.map +1 -0
- package/dist/cli/secret-notes.js +48 -0
- package/dist/cli/secret-notes.js.map +1 -0
- package/dist/cli/serve.d.ts +33 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +252 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/client.d.ts +54 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +77 -80
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +164 -8
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +588 -151
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +1 -1
- package/dist/components/agents.js.map +1 -1
- package/dist/components/board.d.ts.map +1 -1
- package/dist/components/board.js +3 -2
- package/dist/components/board.js.map +1 -1
- package/dist/components/categories.js +1 -1
- package/dist/components/categories.js.map +1 -1
- package/dist/components/charts.d.ts +157 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/charts.js +182 -0
- package/dist/components/charts.js.map +1 -0
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +1 -1
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/desk-records.d.ts +102 -0
- package/dist/components/desk-records.d.ts.map +1 -0
- package/dist/components/desk-records.js +221 -0
- package/dist/components/desk-records.js.map +1 -0
- package/dist/components/desk.d.ts +85 -0
- package/dist/components/desk.d.ts.map +1 -0
- package/dist/components/desk.js +135 -0
- package/dist/components/desk.js.map +1 -0
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +7 -3
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts +2 -0
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +1 -1
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +14 -6
- package/dist/components/home.js.map +1 -1
- package/dist/components/icon.d.ts +31 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +169 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/markdown.d.ts +6 -0
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +10 -2
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/people.js.map +1 -1
- package/dist/components/plugin-frame.d.ts.map +1 -1
- package/dist/components/plugin-frame.js +7 -0
- package/dist/components/plugin-frame.js.map +1 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +54 -3
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts +17 -4
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +51 -12
- package/dist/components/projects.js.map +1 -1
- package/dist/components/rules.d.ts +8 -10
- package/dist/components/rules.d.ts.map +1 -1
- package/dist/components/rules.js +35 -13
- package/dist/components/rules.js.map +1 -1
- package/dist/components/sessions.d.ts.map +1 -1
- package/dist/components/sessions.js +3 -2
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/setup.d.ts +9 -3
- package/dist/components/setup.d.ts.map +1 -1
- package/dist/components/setup.js +12 -6
- package/dist/components/setup.js.map +1 -1
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +3 -2
- package/dist/components/shell.js.map +1 -1
- package/dist/components/tokens.js +1 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/ui.d.ts +5 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +10 -7
- package/dist/components/ui.js.map +1 -1
- package/dist/connect-page.js +1 -1
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +1172 -106
- package/dist/console.d.ts +5 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +52 -39
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +32 -33
- package/dist/data.js.map +1 -1
- package/dist/desk-page.d.ts +38 -0
- package/dist/desk-page.d.ts.map +1 -0
- package/dist/desk-page.js +184 -0
- package/dist/desk-page.js.map +1 -0
- package/dist/desk-records-page.d.ts +18 -0
- package/dist/desk-records-page.d.ts.map +1 -0
- package/dist/desk-records-page.js +130 -0
- package/dist/desk-records-page.js.map +1 -0
- package/dist/desk-records.d.ts +247 -0
- package/dist/desk-records.d.ts.map +1 -0
- package/dist/desk-records.js +543 -0
- package/dist/desk-records.js.map +1 -0
- package/dist/desk.d.ts +122 -0
- package/dist/desk.d.ts.map +1 -0
- package/dist/desk.js +211 -0
- package/dist/desk.js.map +1 -0
- package/dist/feed-stream.d.ts +39 -0
- package/dist/feed-stream.d.ts.map +1 -0
- package/dist/feed-stream.js +117 -0
- package/dist/feed-stream.js.map +1 -0
- package/dist/home-tiles.d.ts +19 -3
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +147 -42
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +228 -6
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +309 -9
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +366 -85
- package/dist/i18n/ko.js.map +1 -1
- package/dist/i18n/particles.d.ts +7 -0
- package/dist/i18n/particles.d.ts.map +1 -0
- package/dist/i18n/particles.js +72 -0
- package/dist/i18n/particles.js.map +1 -0
- package/dist/icons/glyphs.d.ts +605 -0
- package/dist/icons/glyphs.d.ts.map +1 -0
- package/dist/icons/glyphs.js +104 -0
- package/dist/icons/glyphs.js.map +1 -0
- package/dist/icons/index.d.ts +59 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +157 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +20 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +20 -0
- package/dist/limits.js.map +1 -1
- package/dist/marks.d.ts +9 -0
- package/dist/marks.d.ts.map +1 -1
- package/dist/marks.js +9 -0
- package/dist/marks.js.map +1 -1
- package/dist/onboarding.d.ts +6 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +5 -5
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/context.d.ts +42 -11
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +2 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +2 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +13 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +30 -3
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +55 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +37 -0
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/sandbox.d.ts.map +1 -1
- package/dist/plugin/sandbox.js +4 -1
- package/dist/plugin/sandbox.js.map +1 -1
- package/dist/plugin/testing.d.ts +6 -2
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +52 -10
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin/web.d.ts +3 -0
- package/dist/plugin/web.d.ts.map +1 -1
- package/dist/plugin/web.js +5 -1
- package/dist/plugin/web.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/records.d.ts +283 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +543 -0
- package/dist/records.js.map +1 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +3 -1
- package/dist/routes.js.map +1 -1
- package/dist/rules.d.ts +30 -11
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +98 -45
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +32 -21
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/awake.d.ts +35 -0
- package/dist/runner/awake.d.ts.map +1 -0
- package/dist/runner/awake.js +95 -0
- package/dist/runner/awake.js.map +1 -0
- package/dist/runner/claude.d.ts +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +100 -18
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +20 -17
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +5 -0
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +9 -0
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +43 -2
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +168 -13
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/process.d.ts.map +1 -1
- package/dist/runner/process.js +11 -4
- package/dist/runner/process.js.map +1 -1
- package/dist/runner/redact.d.ts +39 -4
- package/dist/runner/redact.d.ts.map +1 -1
- package/dist/runner/redact.js +81 -5
- package/dist/runner/redact.js.map +1 -1
- package/dist/runner/runner.d.ts +28 -3
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +371 -54
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +10 -4
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/task-scheduler.d.ts +20 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -1
- package/dist/runner/task-scheduler.js +34 -4
- package/dist/runner/task-scheduler.js.map +1 -1
- package/dist/runner/types.d.ts +51 -1
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js +26 -0
- package/dist/runner/types.js.map +1 -1
- package/dist/runner.d.ts +6 -6
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +5 -5
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +603 -6
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +156 -20
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +22 -5
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +41 -17
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +17 -4
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +48 -41
- package/dist/setup-guide.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +5 -1
- package/dist/tokens.js.map +1 -1
- package/dist/vocabulary.d.ts +21 -3
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +19 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +73 -44
- package/docs/specs/plugins.md +40 -22
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +30 -21
- package/docs/specs/runner.md +46 -22
- package/package.json +11 -2
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-plugin/SKILL.md +6 -6
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +41 -4
- package/skills/deploying-a-console/references/running-it-again.md +3 -2
- package/skills/keeping-a-desk/SKILL.md +133 -0
- package/skills/keeping-a-desk/collections.md +96 -0
- package/skills/planning-the-board/SKILL.md +14 -18
- package/skills/planning-the-board/references/a-task.md +2 -2
- package/skills/planning-the-board/references/project-rules.md +13 -14
- package/skills/planning-the-board/references/setting-up.md +15 -13
- package/skills/running-an-agent/SKILL.md +47 -56
- package/skills/working-the-board/SKILL.md +63 -44
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +12 -10
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +16 -2
- package/src/api.ts +109 -3
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +2226 -580
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +181 -20
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +332 -49
- package/src/cli/help.ts +113 -57
- package/src/cli/machine-check.ts +223 -0
- package/src/cli/main.ts +72 -2
- package/src/cli/pack.ts +333 -372
- package/src/cli/plugin-check.ts +275 -34
- package/src/cli/plugin-cli.ts +28 -4
- package/src/cli/plugin-main.ts +1 -0
- package/src/cli/runner-host.ts +8 -0
- package/src/cli/secret-notes.ts +63 -0
- package/src/cli/serve.ts +295 -2
- package/src/client.ts +215 -177
- package/src/components/agent-page.tsx +1044 -281
- package/src/components/agents.tsx +9 -5
- package/src/components/board.tsx +3 -15
- package/src/components/categories.tsx +2 -2
- package/src/components/charts.tsx +680 -0
- package/src/components/decision-list.tsx +11 -7
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +12 -3
- package/src/components/goals.tsx +33 -25
- package/src/components/home.tsx +42 -6
- package/src/components/icon.tsx +337 -0
- package/src/components/markdown.tsx +22 -2
- package/src/components/people.tsx +1 -1
- package/src/components/plugin-frame.tsx +7 -0
- package/src/components/plugin-settings.tsx +171 -12
- package/src/components/projects.tsx +68 -17
- package/src/components/rules.tsx +94 -34
- package/src/components/sessions.tsx +2 -13
- package/src/components/setup.tsx +20 -5
- package/src/components/shell.tsx +3 -20
- package/src/components/tokens.tsx +1 -1
- package/src/components/ui.tsx +16 -8
- package/src/connect-page.tsx +1 -1
- package/src/console.tsx +104 -62
- package/src/data.ts +37 -34
- package/src/desk-page.tsx +332 -0
- package/src/desk-records-page.tsx +256 -0
- package/src/desk-records.ts +808 -0
- package/src/desk.ts +329 -0
- package/src/feed-stream.ts +144 -0
- package/src/home-tiles.ts +170 -46
- package/src/i18n/en.ts +323 -11
- package/src/i18n/ko.ts +378 -87
- package/src/i18n/particles.ts +79 -0
- package/src/icons/glyphs.ts +112 -0
- package/src/icons/index.ts +195 -0
- package/src/index.ts +125 -0
- package/src/limits.ts +20 -0
- package/src/marks.ts +12 -0
- package/src/onboarding.ts +14 -6
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +38 -2
- package/src/plugin/rest-schemas.ts +41 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin/web.ts +9 -2
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/routes.ts +3 -1
- package/src/rules.ts +108 -47
- package/src/runner/acp.ts +49 -30
- package/src/runner/awake.ts +135 -0
- package/src/runner/claude.ts +131 -26
- package/src/runner/codex.ts +37 -26
- package/src/runner/config.ts +9 -0
- package/src/runner/desk.ts +200 -15
- package/src/runner/process.ts +11 -4
- package/src/runner/redact.ts +92 -6
- package/src/runner/runner.ts +457 -56
- package/src/runner/slack.ts +10 -4
- package/src/runner/task-scheduler.ts +36 -4
- package/src/runner/types.ts +67 -1
- package/src/runner.ts +27 -2
- package/src/schemas.ts +177 -18
- package/src/services.ts +55 -16
- package/src/setup-guide.ts +49 -40
- package/src/styles/README.md +16 -5
- package/src/styles/base.css +17 -0
- package/src/styles/console.css +10 -0
- package/src/styles/drawn-by-pages.json +1 -1
- package/src/styles/pages/agents.css +103 -1
- package/src/styles/pages/board.css +0 -10
- package/src/styles/pages/calendar.css +1 -1
- package/src/styles/pages/connect.css +0 -10
- package/src/styles/pages/decisions.css +3 -1
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +5 -0
- package/src/styles/pages/feed.css +5 -2
- package/src/styles/pages/home.css +5 -0
- package/src/styles/pages/roadmap.css +2 -2
- package/src/styles/pages/settings.css +11 -0
- package/src/styles/pages/task.css +0 -20
- package/src/styles/pages/thread.css +1 -1
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/calendar.css +1 -1
- package/src/styles/parts/callout.css +1 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/detail.css +22 -0
- package/src/styles/parts/empty.css +2 -0
- package/src/styles/parts/eyebrow.css +1 -1
- package/src/styles/parts/facts.css +1 -1
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/form.css +2 -1
- package/src/styles/parts/icon.css +191 -0
- package/src/styles/parts/input.css +14 -4
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/mark.css +36 -0
- package/src/styles/parts/menu.css +1 -7
- package/src/styles/parts/page.css +1 -1
- package/src/styles/parts/panel.css +10 -0
- package/src/styles/parts/person.css +5 -2
- package/src/styles/parts/progress.css +5 -2
- package/src/styles/parts/rows.css +1 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/settings.css +5 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/tokens.css +31 -10
- package/src/tokens.ts +5 -1
- package/src/vocabulary.ts +25 -3
- package/template/desk-web/README.md +8 -0
- package/template/desk-web/index.html +13 -0
- package/template/desk-web/package.json +25 -0
- package/template/desk-web/src/main.tsx +24 -0
- package/template/desk-web/src/page.tsx +51 -0
- package/template/desk-web/tsconfig.json +16 -0
- package/template/desk-web/vite.config.ts +15 -0
package/src/components/setup.tsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import {
|
|
3
|
+
type FirstSignIn,
|
|
3
4
|
hostOfLogin,
|
|
4
5
|
type RestAgentInvitation,
|
|
5
6
|
type RestAgentInvitationMade,
|
|
6
7
|
type RestAgentSetup,
|
|
7
8
|
} from "../api.js";
|
|
8
9
|
import { useWords } from "../i18n/index.js";
|
|
9
|
-
import { type SetupGuide
|
|
10
|
+
import { SETUP_INSTALL, type SetupGuide } from "../setup-guide.js";
|
|
10
11
|
import { AvatarPicture, Badge, Button, Callout, CopyButton, cx, personName, Time } from "./ui.js";
|
|
11
12
|
|
|
12
13
|
// The way a machine is led to an agent account (ADR-0088): the invitation as a supervisor sees
|
|
@@ -106,7 +107,7 @@ export function AgentInvitationPanel(props: AgentInvitationPanelProps) {
|
|
|
106
107
|
{made !== undefined ? (
|
|
107
108
|
<Callout tone="warning" title={words.made.title}>
|
|
108
109
|
<p>{words.made.say}</p>
|
|
109
|
-
<Line text={
|
|
110
|
+
<Line text={words.made.line(made.command, SETUP_INSTALL)} />
|
|
110
111
|
<p>{words.made.orRun}</p>
|
|
111
112
|
<Line text={made.command} />
|
|
112
113
|
<p>
|
|
@@ -146,6 +147,11 @@ export interface AgentStartStepsProps {
|
|
|
146
147
|
readonly provider: string;
|
|
147
148
|
/** Whether anyone has signed in with the account. */
|
|
148
149
|
readonly signedIn: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* What its first sign-in is held to at a git host (ADR-0126), as the console answers it of
|
|
152
|
+
* the account: left out, as a console older than the answer leaves it, the login alone.
|
|
153
|
+
*/
|
|
154
|
+
readonly firstSignIn?: FirstSignIn | undefined;
|
|
149
155
|
/** Whether an invitation stands. */
|
|
150
156
|
readonly invited: boolean;
|
|
151
157
|
/** Whether the account's command is signed in on a machine. */
|
|
@@ -161,8 +167,9 @@ export interface AgentStartStepsProps {
|
|
|
161
167
|
* done: the account it signs in with, an invitation, the one line on its machine, its runner.
|
|
162
168
|
* Each is said done as the console sees it, so that whoever looks reads what is next. Who makes
|
|
163
169
|
* the account at the provider is not said: the account is named, and when it has to be there
|
|
164
|
-
* (ADR-0094), which at a git host is already, since
|
|
165
|
-
*
|
|
170
|
+
* (ADR-0094), which at a git host is already, since a login there is whoever's registers it:
|
|
171
|
+
* the step says whether the host said which account the login is, and marks the account not
|
|
172
|
+
* confirmed where it did not (ADR-0126).
|
|
166
173
|
*/
|
|
167
174
|
export function AgentStartSteps(props: AgentStartStepsProps) {
|
|
168
175
|
const words = useWords().agents.page.start;
|
|
@@ -170,11 +177,15 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
|
|
|
170
177
|
const heard = props.heard;
|
|
171
178
|
const onMachine = props.onMachine || heard;
|
|
172
179
|
const signedIn = props.signedIn || onMachine;
|
|
180
|
+
const atGitHost = hostOfLogin(props.login) === "gh";
|
|
181
|
+
const heldTo = props.firstSignIn ?? "login";
|
|
173
182
|
const steps: readonly {
|
|
174
183
|
readonly key: string;
|
|
175
184
|
readonly title: string;
|
|
176
185
|
readonly body: string;
|
|
177
186
|
readonly done: boolean;
|
|
187
|
+
/** What is to be seen of a step that is not done, beside its title. */
|
|
188
|
+
readonly mark?: string | undefined;
|
|
178
189
|
readonly more?: ReactNode;
|
|
179
190
|
}[] = [
|
|
180
191
|
{
|
|
@@ -182,8 +193,11 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
|
|
|
182
193
|
title: words.account.title,
|
|
183
194
|
body: signedIn
|
|
184
195
|
? words.account.done(props.login)
|
|
185
|
-
:
|
|
196
|
+
: atGitHost
|
|
197
|
+
? words.account.at.gh[heldTo](props.login, props.provider)
|
|
198
|
+
: words.account.at.google(props.login, props.provider),
|
|
186
199
|
done: signedIn,
|
|
200
|
+
mark: !signedIn && atGitHost && heldTo !== "account" ? words.account.notConfirmed : undefined,
|
|
187
201
|
},
|
|
188
202
|
{
|
|
189
203
|
key: "invitation",
|
|
@@ -226,6 +240,7 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
|
|
|
226
240
|
<span className="sc-step-title">
|
|
227
241
|
{step.title}
|
|
228
242
|
{step.done && <Badge tone="success">{words.done}</Badge>}
|
|
243
|
+
{!step.done && step.mark !== undefined && <Badge tone="warning">{step.mark}</Badge>}
|
|
229
244
|
</span>
|
|
230
245
|
<p className="sc-step-body">{step.body}</p>
|
|
231
246
|
{step.more}
|
package/src/components/shell.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, type ReactNode, useEffect, useId, useRef, useState } from "react";
|
|
2
2
|
import type { RestPerson } from "../api.js";
|
|
3
3
|
import { useWords } from "../i18n/index.js";
|
|
4
|
+
import { Icon } from "./icon.js";
|
|
4
5
|
import { Avatar, cx, personName } from "./ui.js";
|
|
5
6
|
|
|
6
7
|
// The frame every page sits in (ADR-0010): a header that names the workspace and the project the
|
|
@@ -299,16 +300,7 @@ function TabGroup(props: { readonly item: NavItem; readonly onNavigate: (href: s
|
|
|
299
300
|
}}
|
|
300
301
|
>
|
|
301
302
|
<span className="sc-tab-label">{item.label}</span>
|
|
302
|
-
<
|
|
303
|
-
<path
|
|
304
|
-
d="M4 6l4 4 4-4"
|
|
305
|
-
fill="none"
|
|
306
|
-
stroke="currentColor"
|
|
307
|
-
strokeWidth="1.5"
|
|
308
|
-
strokeLinecap="round"
|
|
309
|
-
strokeLinejoin="round"
|
|
310
|
-
/>
|
|
311
|
-
</svg>
|
|
303
|
+
<Icon name="chevron-down" size="xs" className="sc-menu-caret" />
|
|
312
304
|
</button>
|
|
313
305
|
<div
|
|
314
306
|
id={id}
|
|
@@ -392,16 +384,7 @@ function PersonMenu(props: {
|
|
|
392
384
|
<summary className="sc-menu-summary" aria-label={words.shell.menu(personName(person))}>
|
|
393
385
|
<Avatar person={person} size="sm" />
|
|
394
386
|
<span className="sc-person-login">{personName(person)}</span>
|
|
395
|
-
<
|
|
396
|
-
<path
|
|
397
|
-
d="M4 6l4 4 4-4"
|
|
398
|
-
fill="none"
|
|
399
|
-
stroke="currentColor"
|
|
400
|
-
strokeWidth="1.5"
|
|
401
|
-
strokeLinecap="round"
|
|
402
|
-
strokeLinejoin="round"
|
|
403
|
-
/>
|
|
404
|
-
</svg>
|
|
387
|
+
<Icon name="chevron-down" size="xs" className="sc-menu-caret" />
|
|
405
388
|
</summary>
|
|
406
389
|
<div className="sc-menu-panel">
|
|
407
390
|
<p className="sc-menu-who">
|
package/src/components/ui.tsx
CHANGED
|
@@ -510,8 +510,13 @@ export function ProgressBar(props: {
|
|
|
510
510
|
return (
|
|
511
511
|
<div className="sc-progress">
|
|
512
512
|
<div className="sc-progress-bar" {...said}>
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
{/* A part of nothing is not drawn: it would leave its gap at the bar's edge. */}
|
|
514
|
+
{counts.done > 0 && (
|
|
515
|
+
<span className="sc-progress-done" style={{ width: `${share(counts.done)}%` }} />
|
|
516
|
+
)}
|
|
517
|
+
{working > 0 && (
|
|
518
|
+
<span className="sc-progress-working" style={{ width: `${share(working)}%` }} />
|
|
519
|
+
)}
|
|
515
520
|
</div>
|
|
516
521
|
{props.words !== false && (
|
|
517
522
|
<span className="sc-progress-words">
|
|
@@ -557,17 +562,20 @@ export function EmptyState(props: {
|
|
|
557
562
|
);
|
|
558
563
|
}
|
|
559
564
|
|
|
560
|
-
/**
|
|
561
|
-
|
|
565
|
+
/**
|
|
566
|
+
* An instant as people read one in a language: the day and the time of day, with the year
|
|
567
|
+
* where it is another than this one's, as a day alone is written (formatDay).
|
|
568
|
+
*/
|
|
569
|
+
export function formatInstant(iso: string, language?: string, now: Date = new Date()): string {
|
|
562
570
|
const date = new Date(iso);
|
|
563
571
|
if (Number.isNaN(date.getTime())) {
|
|
564
572
|
return iso;
|
|
565
573
|
}
|
|
566
574
|
return date.toLocaleString(language, {
|
|
567
|
-
year: "numeric",
|
|
575
|
+
...(date.getFullYear() === now.getFullYear() ? {} : { year: "numeric" }),
|
|
568
576
|
month: "short",
|
|
569
577
|
day: "numeric",
|
|
570
|
-
hour: "
|
|
578
|
+
hour: "numeric",
|
|
571
579
|
minute: "2-digit",
|
|
572
580
|
});
|
|
573
581
|
}
|
|
@@ -606,8 +614,8 @@ export function Time(props: {
|
|
|
606
614
|
const shown = date.toLocaleString(
|
|
607
615
|
tag,
|
|
608
616
|
dayOf(date) === dayOf(props.against === undefined ? new Date() : new Date(props.against))
|
|
609
|
-
? { hour: "
|
|
610
|
-
: { month: "short", day: "numeric", hour: "
|
|
617
|
+
? { hour: "numeric", minute: "2-digit" }
|
|
618
|
+
: { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" },
|
|
611
619
|
);
|
|
612
620
|
return (
|
|
613
621
|
<time className="sc-time" dateTime={props.iso} title={full}>
|
package/src/connect-page.tsx
CHANGED
|
@@ -69,7 +69,7 @@ export function ConnectPage(props: ConnectPageProps) {
|
|
|
69
69
|
);
|
|
70
70
|
const ask = (
|
|
71
71
|
<>
|
|
72
|
-
<section className="sc-panel" aria-label={words.aria}>
|
|
72
|
+
<section className="sc-panel sc-panel-form" aria-label={words.aria}>
|
|
73
73
|
<ConnectCodeForm busy={busy} onSubmit={(typed) => navigation.go(connectHref(typed))} />
|
|
74
74
|
</section>
|
|
75
75
|
</>
|
package/src/console.tsx
CHANGED
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
type FileUpload,
|
|
18
18
|
OPEN_TASK_STATES,
|
|
19
19
|
PROJECT_RULES_TEMPLATE,
|
|
20
|
-
REFERENCE_RULES,
|
|
21
20
|
type RestAgent,
|
|
22
21
|
type RestAgentProposal,
|
|
23
22
|
type RestAnswerInput,
|
|
@@ -65,6 +64,7 @@ import {
|
|
|
65
64
|
DecisionList,
|
|
66
65
|
type DecisionListProps,
|
|
67
66
|
} from "./components/decision-list.js";
|
|
67
|
+
import { DeskWords } from "./components/desk.js";
|
|
68
68
|
import { EventFeed, type EventFeedProps } from "./components/event-feed.js";
|
|
69
69
|
import { GoalForm, GoalList, type GoalListProps, GoalView, goalMonth } from "./components/goals.js";
|
|
70
70
|
import { HomeGrid, type HomeGridProps, type ProjectGlance } from "./components/home.js";
|
|
@@ -260,6 +260,11 @@ export interface CustomPageContext {
|
|
|
260
260
|
/** The client, for what the data does not carry. */
|
|
261
261
|
readonly client: ConsoleClient;
|
|
262
262
|
readonly navigation: Navigation;
|
|
263
|
+
/**
|
|
264
|
+
* The query of the address the page is at, as the browser has it (`?view=figures`), or `""`:
|
|
265
|
+
* how a page of one's own is shown is said by its address, as every page's is (ADR-0010).
|
|
266
|
+
*/
|
|
267
|
+
readonly search: string;
|
|
263
268
|
/** The words of the language the pages speak, and its tag. */
|
|
264
269
|
readonly words: Messages;
|
|
265
270
|
readonly language: string;
|
|
@@ -586,7 +591,7 @@ function ProjectsPage(props: {
|
|
|
586
591
|
</div>
|
|
587
592
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
588
593
|
{making && (
|
|
589
|
-
<section className="sc-panel sc-panel-form" aria-label={words.form.aria}>
|
|
594
|
+
<section className="sc-panel sc-panel-form sc-panel-form-lead" aria-label={words.form.aria}>
|
|
590
595
|
<ProjectForm
|
|
591
596
|
busy={busy}
|
|
592
597
|
skillsSource={data.me?.workspace.skills.source}
|
|
@@ -1401,13 +1406,10 @@ function ProjectPage(props: {
|
|
|
1401
1406
|
const viewHref = (view: GoalTaskView) => goalHref(key, goal.id, { view });
|
|
1402
1407
|
return (
|
|
1403
1408
|
<>
|
|
1404
|
-
<div className="sc-page-head">
|
|
1405
|
-
<h1 className="sc-page-title">{roadmap.one}</h1>
|
|
1406
|
-
<LinkButton href={projectHref(key, "roadmap")}>{roadmap.all}</LinkButton>
|
|
1407
|
-
</div>
|
|
1408
1409
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
1409
1410
|
<GoalView
|
|
1410
1411
|
goal={goal}
|
|
1412
|
+
allHref={projectHref(key, "roadmap")}
|
|
1411
1413
|
tasks={data.tasks}
|
|
1412
1414
|
taskHref={href}
|
|
1413
1415
|
docHref={toDoc}
|
|
@@ -1574,27 +1576,30 @@ function ProjectPage(props: {
|
|
|
1574
1576
|
<div className="sc-page-head">
|
|
1575
1577
|
<h1 className="sc-page-title">{words.feed.title}</h1>
|
|
1576
1578
|
</div>
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1579
|
+
{/* The feed names its own region; the pane it stands on is no second one of that name. */}
|
|
1580
|
+
<div className="sc-panel">
|
|
1581
|
+
<components.EventFeed
|
|
1582
|
+
events={data.events}
|
|
1583
|
+
href={(event) => {
|
|
1584
|
+
const task = event.taskId === null ? undefined : tasksById.get(event.taskId);
|
|
1585
|
+
if (task !== undefined) {
|
|
1586
|
+
return href(task);
|
|
1587
|
+
}
|
|
1588
|
+
if (event.decisionId !== null) {
|
|
1589
|
+
return decisionHref(key, event.decisionId);
|
|
1590
|
+
}
|
|
1591
|
+
if (event.goalId !== null) {
|
|
1592
|
+
return goalHref(key, event.goalId);
|
|
1593
|
+
}
|
|
1594
|
+
// The rules are a page shown on the settings, not among the documents (ADR-0023).
|
|
1595
|
+
if (event.data.path === RULES_PATH) {
|
|
1596
|
+
return projectSettingsHref(key);
|
|
1597
|
+
}
|
|
1598
|
+
return event.data.path === undefined ? undefined : toDoc(event.data.path);
|
|
1599
|
+
}}
|
|
1600
|
+
empty={<EmptyState title={words.feed.empty} />}
|
|
1601
|
+
/>
|
|
1602
|
+
</div>
|
|
1598
1603
|
</>
|
|
1599
1604
|
);
|
|
1600
1605
|
}
|
|
@@ -1723,9 +1728,6 @@ function ProjectSettingsPage(props: {
|
|
|
1723
1728
|
const head = (
|
|
1724
1729
|
<div className="sc-page-head">
|
|
1725
1730
|
<h1 className="sc-page-title">{settings.title}</h1>
|
|
1726
|
-
{owner && route.form === undefined && (
|
|
1727
|
-
<LinkButton href={projectSettingsHref(key, "edit")}>{words.common.edit}</LinkButton>
|
|
1728
|
-
)}
|
|
1729
1731
|
</div>
|
|
1730
1732
|
);
|
|
1731
1733
|
if (route.form === "edit") {
|
|
@@ -1837,6 +1839,17 @@ function ProjectSettingsPage(props: {
|
|
|
1837
1839
|
{head}
|
|
1838
1840
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
1839
1841
|
<section className="sc-panel" aria-label={settings.aria}>
|
|
1842
|
+
<div className="sc-section-head">
|
|
1843
|
+
<h2 className="sc-section-title">{words.nav.projects}</h2>
|
|
1844
|
+
{owner && (
|
|
1845
|
+
<a
|
|
1846
|
+
className="sc-button sc-button-secondary sc-button-sm"
|
|
1847
|
+
href={projectSettingsHref(key, "edit")}
|
|
1848
|
+
>
|
|
1849
|
+
{words.common.edit}
|
|
1850
|
+
</a>
|
|
1851
|
+
)}
|
|
1852
|
+
</div>
|
|
1840
1853
|
<dl className="sc-facts sc-facts-plain">
|
|
1841
1854
|
<div>
|
|
1842
1855
|
<dt>{form.name}</dt>
|
|
@@ -1942,8 +1955,9 @@ function ProjectSettingsPage(props: {
|
|
|
1942
1955
|
* signed in on (board #309), which a console that holds a token does not offer, and so does not
|
|
1943
1956
|
* name.
|
|
1944
1957
|
*/
|
|
1945
|
-
function SettingsViews(props: { readonly on: "workspace" | "sessions" }) {
|
|
1946
|
-
const
|
|
1958
|
+
function SettingsViews(props: { readonly on: "workspace" | "sessions" | "categories" }) {
|
|
1959
|
+
const settings = useWords().settings;
|
|
1960
|
+
const views = settings.views;
|
|
1947
1961
|
return (
|
|
1948
1962
|
<nav className="sc-subtabs sc-settings-views" aria-label={views.aria}>
|
|
1949
1963
|
<a
|
|
@@ -1960,6 +1974,13 @@ function SettingsViews(props: { readonly on: "workspace" | "sessions" }) {
|
|
|
1960
1974
|
>
|
|
1961
1975
|
{views.sessions}
|
|
1962
1976
|
</a>
|
|
1977
|
+
<a
|
|
1978
|
+
className={cx("sc-tab", props.on === "categories" && "sc-tab-current")}
|
|
1979
|
+
href={PATHS.categories}
|
|
1980
|
+
aria-current={props.on === "categories" ? "page" : undefined}
|
|
1981
|
+
>
|
|
1982
|
+
{settings.categories}
|
|
1983
|
+
</a>
|
|
1963
1984
|
</nav>
|
|
1964
1985
|
);
|
|
1965
1986
|
}
|
|
@@ -2088,7 +2109,7 @@ function WorkspaceSettingsPage(props: {
|
|
|
2088
2109
|
<RulesForm
|
|
2089
2110
|
rules={rules}
|
|
2090
2111
|
scope="workspace"
|
|
2091
|
-
template=
|
|
2112
|
+
template=""
|
|
2092
2113
|
busy={busy}
|
|
2093
2114
|
onSubmit={(input) =>
|
|
2094
2115
|
void act(async () => {
|
|
@@ -2104,12 +2125,6 @@ function WorkspaceSettingsPage(props: {
|
|
|
2104
2125
|
})
|
|
2105
2126
|
}
|
|
2106
2127
|
onCancel={() => navigation.back(PATHS.settings)}
|
|
2107
|
-
onReset={() =>
|
|
2108
|
-
void act(async () => {
|
|
2109
|
-
setRules(await data.actions.archiveRules());
|
|
2110
|
-
navigation.replace(PATHS.settings);
|
|
2111
|
-
})
|
|
2112
|
-
}
|
|
2113
2128
|
/>
|
|
2114
2129
|
)}
|
|
2115
2130
|
</section>
|
|
@@ -2503,6 +2518,8 @@ function PlatePage(props: {
|
|
|
2503
2518
|
readonly lead?: string | undefined;
|
|
2504
2519
|
/** What stands beside the title: the way back, on another person's plate. */
|
|
2505
2520
|
readonly aside?: ReactNode;
|
|
2521
|
+
/** What stands under the head and over the plate: the agents that need the person, on their own. */
|
|
2522
|
+
readonly under?: ReactNode;
|
|
2506
2523
|
/** A day of the week shown at the top, from the address; today's week when it names none. */
|
|
2507
2524
|
readonly week: string | undefined;
|
|
2508
2525
|
readonly weekHref: (day: string) => string;
|
|
@@ -2558,6 +2575,7 @@ function PlatePage(props: {
|
|
|
2558
2575
|
{props.aside}
|
|
2559
2576
|
</div>
|
|
2560
2577
|
)}
|
|
2578
|
+
{props.under}
|
|
2561
2579
|
{problem !== undefined && <Callout tone="danger">{problem}</Callout>}
|
|
2562
2580
|
{forbidden && refused !== undefined ? (
|
|
2563
2581
|
<EmptyState
|
|
@@ -2834,22 +2852,20 @@ function WorkPage(props: {
|
|
|
2834
2852
|
const words = useWords();
|
|
2835
2853
|
const { plate } = props.data.actions;
|
|
2836
2854
|
return (
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
<
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
/>
|
|
2852
|
-
</>
|
|
2855
|
+
<PlatePage
|
|
2856
|
+
components={props.components}
|
|
2857
|
+
under={<AgentsNeedingYou agents={props.data.agents} me={props.data.me?.person?.id} />}
|
|
2858
|
+
load={plate}
|
|
2859
|
+
remember={`work:${props.data.me?.person?.id ?? ""}`}
|
|
2860
|
+
early="work"
|
|
2861
|
+
title={words.work.title}
|
|
2862
|
+
week={props.week}
|
|
2863
|
+
weekStart={weekStartOf(props.data.me?.workspace)}
|
|
2864
|
+
weekHref={workHref}
|
|
2865
|
+
loading={words.work.loading}
|
|
2866
|
+
couldNotLoad={words.work.couldNotLoad}
|
|
2867
|
+
empty={words.work.empty}
|
|
2868
|
+
/>
|
|
2853
2869
|
);
|
|
2854
2870
|
}
|
|
2855
2871
|
|
|
@@ -3095,8 +3111,9 @@ function WorkspacePage(props: {
|
|
|
3095
3111
|
return (
|
|
3096
3112
|
<>
|
|
3097
3113
|
<div className="sc-page-head">
|
|
3098
|
-
<h1 className="sc-page-title">{
|
|
3114
|
+
<h1 className="sc-page-title">{words.settings.title}</h1>
|
|
3099
3115
|
</div>
|
|
3116
|
+
{!holdsToken(data) && <SettingsViews on="categories" />}
|
|
3100
3117
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
3101
3118
|
<components.CategoryList
|
|
3102
3119
|
categories={data.categories}
|
|
@@ -3177,7 +3194,10 @@ function WorkspacePage(props: {
|
|
|
3177
3194
|
{narrowed && <p className="sc-lead">{words.people.narrowed}</p>}
|
|
3178
3195
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
3179
3196
|
{makingTeam && (
|
|
3180
|
-
<section
|
|
3197
|
+
<section
|
|
3198
|
+
className="sc-panel sc-panel-form sc-panel-form-lead"
|
|
3199
|
+
aria-label={words.teams.newAria}
|
|
3200
|
+
>
|
|
3181
3201
|
<TeamForm
|
|
3182
3202
|
busy={busy}
|
|
3183
3203
|
onSubmit={(input) =>
|
|
@@ -3224,7 +3244,10 @@ function WorkspacePage(props: {
|
|
|
3224
3244
|
/>
|
|
3225
3245
|
)}
|
|
3226
3246
|
{making && (
|
|
3227
|
-
<section
|
|
3247
|
+
<section
|
|
3248
|
+
className="sc-panel sc-panel-form sc-panel-form-lead"
|
|
3249
|
+
aria-label={words.people.letInAria}
|
|
3250
|
+
>
|
|
3228
3251
|
<ListingForm
|
|
3229
3252
|
providers={data.me?.signIn ?? []}
|
|
3230
3253
|
busy={busy}
|
|
@@ -3446,7 +3469,10 @@ function WorkspacePage(props: {
|
|
|
3446
3469
|
/>
|
|
3447
3470
|
)}
|
|
3448
3471
|
{making && (
|
|
3449
|
-
<section
|
|
3472
|
+
<section
|
|
3473
|
+
className="sc-panel sc-panel-form sc-panel-form-lead"
|
|
3474
|
+
aria-label={agents.makeAria}
|
|
3475
|
+
>
|
|
3450
3476
|
<TokenForm
|
|
3451
3477
|
daysAtMost={data.me?.workspace.tokenDaysAtMost}
|
|
3452
3478
|
busy={busy}
|
|
@@ -3468,6 +3494,7 @@ function WorkspacePage(props: {
|
|
|
3468
3494
|
empty={<EmptyState title={agents.empty.title} body={agents.empty.body} />}
|
|
3469
3495
|
/>
|
|
3470
3496
|
<ConnectWords origin={origin} />
|
|
3497
|
+
<DeskWords origin={origin} />
|
|
3471
3498
|
</section>
|
|
3472
3499
|
)}
|
|
3473
3500
|
</>
|
|
@@ -3559,7 +3586,11 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
|
|
|
3559
3586
|
/** The tab the page shown is under, once the tabs are known. */
|
|
3560
3587
|
let here: string | undefined;
|
|
3561
3588
|
let content: React.ReactNode;
|
|
3562
|
-
|
|
3589
|
+
// The shell waits for the workspace's lists as it waits for who is asking: its tabs name the
|
|
3590
|
+
// plugins, and tabs drawn before those are known move under the pointer when they arrive.
|
|
3591
|
+
const listsToCome =
|
|
3592
|
+
data.me !== undefined && data.me.person !== null && !data.loaded && data.error === undefined;
|
|
3593
|
+
if (data.me === undefined || listsToCome) {
|
|
3563
3594
|
content = (
|
|
3564
3595
|
<Ground>
|
|
3565
3596
|
<div className="sc-loading">
|
|
@@ -3674,7 +3705,10 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
|
|
|
3674
3705
|
href: projectHref(projectKey),
|
|
3675
3706
|
label: words.nav.board,
|
|
3676
3707
|
current:
|
|
3677
|
-
route.name === "board" ||
|
|
3708
|
+
route.name === "board" ||
|
|
3709
|
+
route.name === "task" ||
|
|
3710
|
+
route.name === "new-task" ||
|
|
3711
|
+
route.name === "archive",
|
|
3678
3712
|
},
|
|
3679
3713
|
{
|
|
3680
3714
|
href: projectHref(projectKey, "roadmap"),
|
|
@@ -3752,7 +3786,15 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
|
|
|
3752
3786
|
return found === undefined ? (
|
|
3753
3787
|
<NothingHere />
|
|
3754
3788
|
) : (
|
|
3755
|
-
found.render({
|
|
3789
|
+
found.render({
|
|
3790
|
+
data,
|
|
3791
|
+
project,
|
|
3792
|
+
client,
|
|
3793
|
+
navigation,
|
|
3794
|
+
search: location.search,
|
|
3795
|
+
words,
|
|
3796
|
+
language: pack.tag,
|
|
3797
|
+
})
|
|
3756
3798
|
);
|
|
3757
3799
|
};
|
|
3758
3800
|
let page: ReactNode;
|
package/src/data.ts
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type CommentInput,
|
|
5
5
|
type ConsoleClient,
|
|
6
6
|
type DocumentFilter,
|
|
7
|
-
EVENT_KINDS,
|
|
8
7
|
type FileUpload,
|
|
9
8
|
LIST_LIMIT,
|
|
10
9
|
type ProjectClient,
|
|
@@ -73,8 +72,8 @@ import {
|
|
|
73
72
|
type RestWorkspace,
|
|
74
73
|
type RestWorkspacePackConnect,
|
|
75
74
|
type RestWorkspacePatch,
|
|
76
|
-
restEventSchema,
|
|
77
75
|
} from "./api.js";
|
|
76
|
+
import { followFeed, whileFeedSettles } from "./feed-stream.js";
|
|
78
77
|
|
|
79
78
|
// What the console shows, and how it stays current: the workspace (who is signed in, the
|
|
80
79
|
// projects, the people, the tokens) is loaded once; the project the page is on is loaded whole,
|
|
@@ -325,7 +324,11 @@ async function readFeed(
|
|
|
325
324
|
key: string,
|
|
326
325
|
signal: AbortSignal,
|
|
327
326
|
): Promise<RestEvent[]> {
|
|
328
|
-
|
|
327
|
+
// Asked again where the console cannot say yet where the feed stands: never begun from nothing.
|
|
328
|
+
const result = await whileFeedSettles(
|
|
329
|
+
() => client.project(key).events(0, { latest: true }, signal),
|
|
330
|
+
{ signal },
|
|
331
|
+
);
|
|
329
332
|
return result.items.slice(-FEED_KEEP);
|
|
330
333
|
}
|
|
331
334
|
|
|
@@ -608,7 +611,7 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
|
|
|
608
611
|
}
|
|
609
612
|
const controller = new AbortController();
|
|
610
613
|
const { signal } = controller;
|
|
611
|
-
let
|
|
614
|
+
let unfollow: (() => void) | undefined;
|
|
612
615
|
let reloadTimer: ReturnType<typeof setTimeout> | undefined;
|
|
613
616
|
const scope = client.project(projectKey);
|
|
614
617
|
const run = async () => {
|
|
@@ -653,42 +656,38 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
|
|
|
653
656
|
});
|
|
654
657
|
}
|
|
655
658
|
});
|
|
656
|
-
|
|
659
|
+
// The stream begins after the feed read, and is opened again from the last event that
|
|
660
|
+
// arrived when the browser gives it up, while the console restarts say (`feed-stream.ts`).
|
|
661
|
+
if (signal.aborted) {
|
|
657
662
|
return;
|
|
658
663
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
}, RELOAD_DELAY_MS);
|
|
682
|
-
};
|
|
683
|
-
for (const kind of EVENT_KINDS) {
|
|
684
|
-
source.addEventListener(kind, arrived);
|
|
685
|
-
}
|
|
664
|
+
unfollow = followFeed({
|
|
665
|
+
url: (after) => scope.eventStreamUrl(after),
|
|
666
|
+
after: lastEvent.current,
|
|
667
|
+
onLive: setLive,
|
|
668
|
+
onEvent: (event) => {
|
|
669
|
+
lastEvent.current = event.id;
|
|
670
|
+
setEvents((current) => [...current, event].slice(-FEED_KEEP));
|
|
671
|
+
clearTimeout(reloadTimer);
|
|
672
|
+
reloadTimer = setTimeout(() => {
|
|
673
|
+
refreshProject(signal).catch(() => undefined);
|
|
674
|
+
if (event.kind.startsWith("project.")) {
|
|
675
|
+
refreshWorkspace(signal).catch(() => undefined);
|
|
676
|
+
}
|
|
677
|
+
// A decision raised or answered here may be one of the person's own: the count
|
|
678
|
+
// beside My decisions follows it.
|
|
679
|
+
if (event.kind.startsWith("decision.")) {
|
|
680
|
+
refreshMe(signal).catch(() => undefined);
|
|
681
|
+
}
|
|
682
|
+
}, RELOAD_DELAY_MS);
|
|
683
|
+
},
|
|
684
|
+
});
|
|
686
685
|
};
|
|
687
686
|
void run();
|
|
688
687
|
return () => {
|
|
689
688
|
controller.abort();
|
|
690
689
|
clearTimeout(reloadTimer);
|
|
691
|
-
|
|
690
|
+
unfollow?.();
|
|
692
691
|
setLive(false);
|
|
693
692
|
};
|
|
694
693
|
}, [client, projectKey, signedIn, generation, refreshProject, refreshWorkspace, refreshMe]);
|
|
@@ -964,7 +963,11 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
|
|
|
964
963
|
const history: RestEvent[] = [];
|
|
965
964
|
let after = 0;
|
|
966
965
|
for (let page = 0; page < FEED_MAX_PAGES; page += 1) {
|
|
967
|
-
const
|
|
966
|
+
const from = after;
|
|
967
|
+
const result = await whileFeedSettles(
|
|
968
|
+
() => scope().events(from, { task: taskId }, signal),
|
|
969
|
+
{ signal },
|
|
970
|
+
);
|
|
968
971
|
history.push(...result.items);
|
|
969
972
|
after = result.items.at(-1)?.id ?? after;
|
|
970
973
|
if (!result.more) {
|