@skillcdn/console 0.4.7 → 0.5.1
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 +74 -14
- package/SKILLCDN.md +5 -3
- package/dist/agent-page.d.ts +44 -0
- package/dist/agent-page.d.ts.map +1 -0
- package/dist/agent-page.js +415 -0
- package/dist/agent-page.js.map +1 -0
- package/dist/agent-stream.d.ts +52 -0
- package/dist/agent-stream.d.ts.map +1 -0
- package/dist/agent-stream.js +155 -0
- package/dist/agent-stream.js.map +1 -0
- package/dist/api.d.ts +12 -6
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +11 -5
- package/dist/api.js.map +1 -1
- package/dist/avatar.d.ts +137 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +1216 -0
- package/dist/avatar.js.map +1 -0
- 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 +39 -1
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +2424 -296
- 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 +59 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +128 -16
- 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 +91 -8
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +386 -57
- 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 +202 -62
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +94 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -36
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -188
- 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 +36 -0
- package/dist/cli/runner-host.d.ts.map +1 -0
- package/dist/cli/runner-host.js +154 -0
- package/dist/cli/runner-host.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 +275 -6
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/setup-machine.d.ts +36 -0
- package/dist/cli/setup-machine.d.ts.map +1 -0
- package/dist/cli/setup-machine.js +109 -0
- package/dist/cli/setup-machine.js.map +1 -0
- package/dist/client.d.ts +189 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +192 -57
- package/dist/client.js.map +1 -1
- package/dist/compat.d.ts +1 -1
- package/dist/compat.js +2 -2
- package/dist/components/agent-page.d.ts +384 -0
- package/dist/components/agent-page.d.ts.map +1 -0
- package/dist/components/agent-page.js +985 -0
- package/dist/components/agent-page.js.map +1 -0
- package/dist/components/agents.d.ts +102 -0
- package/dist/components/agents.d.ts.map +1 -0
- package/dist/components/agents.js +246 -0
- package/dist/components/agents.js.map +1 -0
- package/dist/components/calendar.d.ts +17 -17
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +7 -2
- package/dist/components/calendar.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/comments.d.ts +2 -0
- package/dist/components/comments.d.ts.map +1 -1
- package/dist/components/comments.js +1 -1
- package/dist/components/comments.js.map +1 -1
- package/dist/components/connect.d.ts.map +1 -1
- package/dist/components/connect.js +7 -2
- package/dist/components/connect.js.map +1 -1
- package/dist/components/decision-form.d.ts +21 -0
- package/dist/components/decision-form.d.ts.map +1 -1
- package/dist/components/decision-form.js +20 -6
- package/dist/components/decision-form.js.map +1 -1
- package/dist/components/decision-list.d.ts +24 -0
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +54 -5
- 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 +26 -1
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/home.d.ts +12 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +175 -16
- package/dist/components/home.js.map +1 -1
- package/dist/components/my-decisions.d.ts +5 -0
- package/dist/components/my-decisions.d.ts.map +1 -1
- package/dist/components/my-decisions.js +3 -3
- package/dist/components/my-decisions.js.map +1 -1
- package/dist/components/people.d.ts +17 -0
- package/dist/components/people.d.ts.map +1 -1
- package/dist/components/people.js +55 -19
- package/dist/components/people.js.map +1 -1
- package/dist/components/picker.d.ts +2 -0
- package/dist/components/picker.d.ts.map +1 -1
- package/dist/components/picker.js +1 -1
- package/dist/components/picker.js.map +1 -1
- package/dist/components/pictures.d.ts +38 -10
- package/dist/components/pictures.d.ts.map +1 -1
- package/dist/components/pictures.js +195 -40
- package/dist/components/pictures.js.map +1 -1
- package/dist/components/plugin-events.d.ts +29 -0
- package/dist/components/plugin-events.d.ts.map +1 -0
- package/dist/components/plugin-events.js +139 -0
- package/dist/components/plugin-events.js.map +1 -0
- package/dist/components/plugin-frame.d.ts.map +1 -1
- package/dist/components/plugin-frame.js +14 -37
- 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 +58 -7
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +30 -10
- 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 +36 -14
- package/dist/components/rules.js.map +1 -1
- package/dist/components/sessions.d.ts.map +1 -1
- package/dist/components/sessions.js +8 -4
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/setup.d.ts +59 -0
- package/dist/components/setup.d.ts.map +1 -0
- package/dist/components/setup.js +93 -0
- package/dist/components/setup.js.map +1 -0
- package/dist/components/sign-in.js +1 -1
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/task-form.d.ts.map +1 -1
- package/dist/components/task-form.js +2 -2
- package/dist/components/task-form.js.map +1 -1
- package/dist/components/task-list.d.ts +7 -6
- package/dist/components/task-list.d.ts.map +1 -1
- package/dist/components/task-list.js.map +1 -1
- package/dist/components/task-view.d.ts +3 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +1 -1
- package/dist/components/task-view.js.map +1 -1
- package/dist/components/ui.d.ts +78 -8
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +88 -9
- package/dist/components/ui.js.map +1 -1
- package/dist/components/work.d.ts +5 -5
- package/dist/components/work.d.ts.map +1 -1
- package/dist/components/work.js.map +1 -1
- package/dist/components/workspace.d.ts +17 -0
- package/dist/components/workspace.d.ts.map +1 -1
- package/dist/components/workspace.js +129 -2
- package/dist/components/workspace.js.map +1 -1
- package/dist/connect-page.d.ts.map +1 -1
- package/dist/connect-page.js +5 -2
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +7551 -4580
- package/dist/console.d.ts +20 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +331 -57
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +22 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +62 -34
- 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/glances.d.ts +39 -0
- package/dist/glances.d.ts.map +1 -0
- package/dist/glances.js +94 -0
- package/dist/glances.js.map +1 -0
- package/dist/home-tiles.d.ts +69 -5
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +347 -9
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +773 -3
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +770 -9
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +736 -9
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +19 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +67 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +67 -0
- package/dist/limits.js.map +1 -1
- package/dist/onboarding.d.ts +21 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +43 -0
- package/dist/onboarding.js.map +1 -0
- package/dist/persona.d.ts +34 -0
- package/dist/persona.d.ts.map +1 -0
- package/dist/persona.js +71 -0
- package/dist/persona.js.map +1 -0
- 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 +34 -4
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +56 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +42 -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.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/router.d.ts +50 -3
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +78 -7
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +12 -2
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +14 -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 +99 -42
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +20 -0
- package/dist/runner/acp.d.ts.map +1 -0
- package/dist/runner/acp.js +1132 -0
- package/dist/runner/acp.js.map +1 -0
- package/dist/runner/claude.d.ts +13 -0
- package/dist/runner/claude.d.ts.map +1 -0
- package/dist/runner/claude.js +615 -0
- package/dist/runner/claude.js.map +1 -0
- package/dist/runner/codex.d.ts +19 -0
- package/dist/runner/codex.d.ts.map +1 -0
- package/dist/runner/codex.js +597 -0
- package/dist/runner/codex.js.map +1 -0
- package/dist/runner/config.d.ts +35 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +74 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/desk.d.ts +81 -0
- package/dist/runner/desk.d.ts.map +1 -0
- package/dist/runner/desk.js +303 -0
- package/dist/runner/desk.js.map +1 -0
- package/dist/runner/launchd.d.ts +7 -0
- package/dist/runner/launchd.d.ts.map +1 -0
- package/dist/runner/launchd.js +78 -0
- package/dist/runner/launchd.js.map +1 -0
- package/dist/runner/message.d.ts +66 -0
- package/dist/runner/message.d.ts.map +1 -0
- package/dist/runner/message.js +181 -0
- package/dist/runner/message.js.map +1 -0
- package/dist/runner/modules.d.ts +13 -0
- package/dist/runner/modules.d.ts.map +1 -0
- package/dist/runner/modules.js +30 -0
- package/dist/runner/modules.js.map +1 -0
- package/dist/runner/process.d.ts +7 -0
- package/dist/runner/process.d.ts.map +1 -0
- package/dist/runner/process.js +65 -0
- package/dist/runner/process.js.map +1 -0
- package/dist/runner/redact.d.ts +48 -0
- package/dist/runner/redact.d.ts.map +1 -0
- package/dist/runner/redact.js +214 -0
- package/dist/runner/redact.js.map +1 -0
- package/dist/runner/registry.d.ts +37 -0
- package/dist/runner/registry.d.ts.map +1 -0
- package/dist/runner/registry.js +26 -0
- package/dist/runner/registry.js.map +1 -0
- package/dist/runner/runner.d.ts +130 -0
- package/dist/runner/runner.d.ts.map +1 -0
- package/dist/runner/runner.js +1551 -0
- package/dist/runner/runner.js.map +1 -0
- package/dist/runner/slack.d.ts +16 -0
- package/dist/runner/slack.d.ts.map +1 -0
- package/dist/runner/slack.js +157 -0
- package/dist/runner/slack.js.map +1 -0
- package/dist/runner/systemd-user.d.ts +7 -0
- package/dist/runner/systemd-user.d.ts.map +1 -0
- package/dist/runner/systemd-user.js +93 -0
- package/dist/runner/systemd-user.js.map +1 -0
- package/dist/runner/task-scheduler.d.ts +38 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -0
- package/dist/runner/task-scheduler.js +216 -0
- package/dist/runner/task-scheduler.js.map +1 -0
- package/dist/runner/types.d.ts +315 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +24 -0
- package/dist/runner/types.js.map +1 -0
- package/dist/runner.d.ts +18 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +20 -0
- package/dist/runner.js.map +1 -0
- package/dist/schemas.d.ts +6082 -1295
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +930 -31
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +110 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +305 -0
- package/dist/services.js.map +1 -0
- package/dist/setup-guide.d.ts +64 -0
- package/dist/setup-guide.d.ts.map +1 -0
- package/dist/setup-guide.js +256 -0
- package/dist/setup-guide.js.map +1 -0
- package/dist/setup-page.d.ts +6 -0
- package/dist/setup-page.d.ts.map +1 -0
- package/dist/setup-page.js +29 -0
- package/dist/setup-page.js.map +1 -0
- package/dist/sse.d.ts +15 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +73 -0
- package/dist/sse.js.map +1 -0
- package/dist/tab-title.d.ts +6 -0
- package/dist/tab-title.d.ts.map +1 -0
- package/dist/tab-title.js +22 -0
- package/dist/tab-title.js.map +1 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +3 -0
- package/dist/tokens.js.map +1 -1
- package/dist/use-action.d.ts +5 -2
- package/dist/use-action.d.ts.map +1 -1
- package/dist/use-action.js +6 -1
- package/dist/use-action.js.map +1 -1
- package/dist/vocabulary.d.ts +84 -4
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +115 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +147 -41
- package/docs/specs/plugins.md +37 -27
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +155 -20
- package/docs/specs/runner.md +347 -0
- package/package.json +12 -3
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-console/references/configuring.md +1 -0
- package/skills/building-a-plugin/SKILL.md +7 -7
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +48 -8
- 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 +22 -9
- package/skills/running-an-agent/SKILL.md +107 -0
- package/skills/running-an-agent/references/slack-app.md +61 -0
- package/skills/working-the-board/SKILL.md +66 -39
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +14 -9
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +1039 -0
- package/src/agent-stream.ts +199 -0
- package/src/api.ts +317 -2
- package/src/avatar.ts +1506 -0
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +3210 -503
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +188 -16
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +470 -67
- package/src/cli/help.ts +233 -61
- package/src/cli/main.ts +89 -0
- package/src/cli/pack.ts +332 -263
- 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 +188 -0
- package/src/cli/serve.ts +320 -5
- package/src/cli/setup-machine.ts +153 -0
- package/src/client.ts +711 -126
- package/src/compat.ts +2 -2
- package/src/components/agent-page.tsx +1946 -0
- package/src/components/agents.tsx +638 -0
- package/src/components/calendar.tsx +74 -53
- package/src/components/charts.tsx +680 -0
- package/src/components/comments.tsx +3 -0
- package/src/components/connect.tsx +37 -2
- package/src/components/decision-form.tsx +89 -51
- package/src/components/decision-list.tsx +140 -4
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +30 -1
- package/src/components/home.tsx +353 -12
- package/src/components/my-decisions.tsx +8 -2
- package/src/components/people.tsx +300 -203
- package/src/components/picker.tsx +3 -1
- package/src/components/pictures.tsx +256 -44
- package/src/components/plugin-events.ts +159 -0
- package/src/components/plugin-frame.tsx +14 -38
- package/src/components/plugin-settings.tsx +178 -22
- package/src/components/projects.tsx +33 -15
- package/src/components/rules.tsx +96 -36
- package/src/components/sessions.tsx +7 -4
- package/src/components/setup.tsx +252 -0
- package/src/components/sign-in.tsx +1 -1
- package/src/components/task-form.tsx +11 -2
- package/src/components/task-list.tsx +7 -6
- package/src/components/task-view.tsx +4 -0
- package/src/components/ui.tsx +169 -25
- package/src/components/work.tsx +9 -9
- package/src/components/workspace.tsx +345 -4
- package/src/connect-page.tsx +15 -2
- package/src/console.tsx +657 -83
- package/src/data.ts +109 -43
- 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/glances.ts +132 -0
- package/src/home-tiles.ts +411 -9
- package/src/i18n/en.ts +828 -10
- package/src/i18n/ko.ts +792 -10
- package/src/index.ts +172 -3
- package/src/limits.ts +67 -0
- package/src/onboarding.ts +84 -0
- package/src/persona.ts +100 -0
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +42 -3
- package/src/plugin/rest-schemas.ts +46 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/router.ts +120 -10
- package/src/routes.ts +17 -1
- package/src/rules.ts +109 -44
- package/src/runner/acp.ts +1267 -0
- package/src/runner/claude.ts +695 -0
- package/src/runner/codex.ts +691 -0
- package/src/runner/config.ts +97 -0
- package/src/runner/desk.ts +377 -0
- package/src/runner/launchd.ts +86 -0
- package/src/runner/message.ts +232 -0
- package/src/runner/modules.ts +30 -0
- package/src/runner/process.ts +72 -0
- package/src/runner/redact.ts +242 -0
- package/src/runner/registry.ts +67 -0
- package/src/runner/runner.ts +1879 -0
- package/src/runner/slack.ts +180 -0
- package/src/runner/systemd-user.ts +103 -0
- package/src/runner/task-scheduler.ts +236 -0
- package/src/runner/types.ts +334 -0
- package/src/runner.ts +110 -0
- package/src/schemas.ts +1183 -30
- package/src/services.ts +424 -0
- package/src/setup-guide.ts +336 -0
- package/src/setup-page.tsx +46 -0
- package/src/sse.ts +84 -0
- package/src/styles/README.md +111 -0
- package/src/styles/base.css +130 -0
- package/src/styles/console.css +85 -7095
- package/src/styles/drawn-by-pages.json +256 -0
- package/src/styles/pages/agents.css +1195 -0
- package/src/styles/pages/board.css +380 -0
- package/src/styles/pages/calendar.css +214 -0
- package/src/styles/pages/connect.css +182 -0
- package/src/styles/pages/decisions.css +370 -0
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +273 -0
- package/src/styles/pages/feed.css +118 -0
- package/src/styles/pages/home.css +718 -0
- package/src/styles/pages/people.css +90 -0
- package/src/styles/pages/plugins.css +212 -0
- package/src/styles/pages/roadmap.css +377 -0
- package/src/styles/pages/settings.css +171 -0
- package/src/styles/pages/shell.css +208 -0
- package/src/styles/pages/sign-in.css +178 -0
- package/src/styles/pages/task.css +108 -0
- package/src/styles/pages/thread.css +331 -0
- package/src/styles/pages/work.css +68 -0
- package/src/styles/parts/avatar.css +82 -0
- package/src/styles/parts/badge.css +227 -0
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/button.css +99 -0
- package/src/styles/parts/calendar.css +547 -0
- package/src/styles/parts/callout.css +41 -0
- package/src/styles/parts/category.css +8 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/chip.css +90 -0
- package/src/styles/parts/code.css +48 -0
- package/src/styles/parts/count.css +27 -0
- package/src/styles/parts/crumbs.css +61 -0
- package/src/styles/parts/detail.css +110 -0
- package/src/styles/parts/empty.css +21 -0
- package/src/styles/parts/eyebrow.css +9 -0
- package/src/styles/parts/facts.css +147 -0
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/files.css +38 -0
- package/src/styles/parts/filters.css +42 -0
- package/src/styles/parts/form.css +109 -0
- package/src/styles/parts/frame.css +45 -0
- package/src/styles/parts/input.css +243 -0
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/links.css +37 -0
- package/src/styles/parts/mark.css +79 -0
- package/src/styles/parts/menu.css +147 -0
- package/src/styles/parts/page.css +174 -0
- package/src/styles/parts/pager.css +19 -0
- package/src/styles/parts/panel.css +33 -0
- package/src/styles/parts/person.css +257 -0
- package/src/styles/parts/picker.css +185 -0
- package/src/styles/parts/progress.css +25 -0
- package/src/styles/parts/prose.css +128 -0
- package/src/styles/parts/rows.css +63 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/settings.css +101 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/spinner.css +29 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/parts/steps.css +68 -0
- package/src/styles/parts/tabs.css +175 -0
- package/src/styles/parts/text.css +61 -0
- package/src/styles/parts/toggle.css +71 -0
- package/src/styles/parts/workers.css +37 -0
- package/src/styles/tokens.css +295 -0
- package/src/tab-title.ts +25 -0
- package/src/tokens.ts +3 -0
- package/src/use-action.ts +7 -2
- package/src/vocabulary.ts +151 -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/home.tsx
CHANGED
|
@@ -6,14 +6,24 @@ import {
|
|
|
6
6
|
type RefObject,
|
|
7
7
|
useEffect,
|
|
8
8
|
useLayoutEffect,
|
|
9
|
+
useMemo,
|
|
9
10
|
useRef,
|
|
10
11
|
useState,
|
|
11
12
|
} from "react";
|
|
13
|
+
import { daysBetween, today } from "../dates.js";
|
|
12
14
|
import {
|
|
13
15
|
added,
|
|
14
16
|
arranged,
|
|
17
|
+
COMPOSED_HOME,
|
|
18
|
+
type ComposedTile,
|
|
15
19
|
columnsFor,
|
|
20
|
+
composed,
|
|
21
|
+
composedRows,
|
|
16
22
|
footprintOf,
|
|
23
|
+
GLANCE_REM,
|
|
24
|
+
GLANCE_ROOM_GUESS,
|
|
25
|
+
glanceFit,
|
|
26
|
+
glanceProjects,
|
|
17
27
|
HOME_TILE_CELLS,
|
|
18
28
|
type HomeColumns,
|
|
19
29
|
type HomeTile,
|
|
@@ -21,20 +31,29 @@ import {
|
|
|
21
31
|
type HomeWidgetTile,
|
|
22
32
|
homeTiles,
|
|
23
33
|
homeWith,
|
|
34
|
+
isGlanceSize,
|
|
24
35
|
moved,
|
|
36
|
+
nobodyArranged,
|
|
25
37
|
type PlacedTile,
|
|
26
38
|
resized,
|
|
27
39
|
rowsOf,
|
|
28
40
|
sizesAt,
|
|
41
|
+
standsComposed,
|
|
29
42
|
waitToGiveWay,
|
|
30
43
|
} from "../home-tiles.js";
|
|
31
44
|
import { useWords } from "../i18n/index.js";
|
|
32
45
|
import type { PluginWidgetSizeName } from "../plugin/bridge.js";
|
|
33
|
-
import type {
|
|
46
|
+
import type {
|
|
47
|
+
RestGlanceTask,
|
|
48
|
+
RestHome,
|
|
49
|
+
RestPlugin,
|
|
50
|
+
RestProject,
|
|
51
|
+
RestProjectGlance,
|
|
52
|
+
} from "../schemas.js";
|
|
34
53
|
import { useAction } from "../use-action.js";
|
|
35
54
|
import { DRAG_SLACK, edgeScrollOf, HOLD_MS, HOLD_SLACK } from "./board.js";
|
|
36
55
|
import { ProjectMark, ProjectRoleBadge } from "./projects.js";
|
|
37
|
-
import { Badge, Button, Callout, cx } from "./ui.js";
|
|
56
|
+
import { Badge, Button, Callout, cx, Day, DueBadge, ProgressBar, Workers } from "./ui.js";
|
|
38
57
|
|
|
39
58
|
// The front page (ADR-0061): one grid of tiles, the projects and the plugins' widgets alike. While
|
|
40
59
|
// the person arranges it nothing on it opens: a tile is taken in hand and put down anywhere, as a
|
|
@@ -47,20 +66,283 @@ const SPARE_ROWS = 2;
|
|
|
47
66
|
|
|
48
67
|
const NONE: readonly string[] = [];
|
|
49
68
|
|
|
69
|
+
/**
|
|
70
|
+
* What a project's tile at a glance reads of its board (ADR-0105): the one answer of
|
|
71
|
+
* `client.project(key).glance()`, its figures and its rows of one moment (ADR-0107).
|
|
72
|
+
*/
|
|
73
|
+
export type ProjectGlance = RestProjectGlance;
|
|
74
|
+
|
|
75
|
+
/** What stands for a figure that is not read yet. */
|
|
76
|
+
const UNREAD = "\u2013";
|
|
77
|
+
|
|
50
78
|
export interface ProjectTileProps {
|
|
51
79
|
readonly project: RestProject;
|
|
52
80
|
readonly size: HomeTileSize;
|
|
53
81
|
/** The way into the project; left out while the page is arranged, when a tile opens nothing. */
|
|
54
82
|
readonly href?: string | undefined;
|
|
55
83
|
readonly onOpen?: ((project: RestProject) => void) | undefined;
|
|
84
|
+
/** What its board holds, at a size that shows it; nothing while it is read. */
|
|
85
|
+
readonly glance?: ProjectGlance | undefined;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** How many days a task is due within for its day to be shown on a glance: a week, as the board's badge counts it. */
|
|
89
|
+
const GLANCE_DUE_DAYS = 7;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The height of the room a glance's lists have, in rem, followed as the tile changes; nothing
|
|
93
|
+
* before the element is laid out. Taken through a callback ref, since the element changes with
|
|
94
|
+
* the tile's shape: a column beside the head on a wide tile, the body under it otherwise.
|
|
95
|
+
*/
|
|
96
|
+
function useRoom(): readonly [(node: HTMLDivElement | null) => void, number | undefined] {
|
|
97
|
+
const [node, setNode] = useState<HTMLDivElement | null>(null);
|
|
98
|
+
const [room, setRoom] = useState<number | undefined>(undefined);
|
|
99
|
+
useLayoutEffect(() => {
|
|
100
|
+
if (node === null) {
|
|
101
|
+
setRoom(undefined);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const measure = () => {
|
|
105
|
+
if (node.getClientRects().length === 0) {
|
|
106
|
+
setRoom(undefined);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// The room inside its padding, which is what the lists have.
|
|
110
|
+
const style = window.getComputedStyle(node);
|
|
111
|
+
const height =
|
|
112
|
+
node.clientHeight -
|
|
113
|
+
(Number.parseFloat(style.paddingTop) || 0) -
|
|
114
|
+
(Number.parseFloat(style.paddingBottom) || 0);
|
|
115
|
+
const rem =
|
|
116
|
+
Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;
|
|
117
|
+
setRoom(Math.max(0, height) / rem);
|
|
118
|
+
};
|
|
119
|
+
measure();
|
|
120
|
+
if (typeof ResizeObserver === "undefined") {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const observer = new ResizeObserver(measure);
|
|
124
|
+
observer.observe(node);
|
|
125
|
+
return () => observer.disconnect();
|
|
126
|
+
}, [node]);
|
|
127
|
+
return [setNode, room];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The order a glance's lists are given rows in, one under the other (ADR-0105): two tasks in
|
|
132
|
+
* progress, a goal, the rest of the tasks, the rest of the goals, then what waits for review.
|
|
133
|
+
* Beside the head, on a wide tile, the tasks and what waits for review share a column and the
|
|
134
|
+
* goals have one of their own.
|
|
135
|
+
*/
|
|
136
|
+
const STACKED: readonly (readonly [number, number])[] = [
|
|
137
|
+
[0, 2],
|
|
138
|
+
[1, 1],
|
|
139
|
+
[0, Number.POSITIVE_INFINITY],
|
|
140
|
+
[1, Number.POSITIVE_INFINITY],
|
|
141
|
+
[2, Number.POSITIVE_INFINITY],
|
|
142
|
+
];
|
|
143
|
+
const SHARING: readonly (readonly [number, number])[] = [
|
|
144
|
+
[0, Number.POSITIVE_INFINITY],
|
|
145
|
+
[1, Number.POSITIVE_INFINITY],
|
|
146
|
+
];
|
|
147
|
+
const ALONE: readonly (readonly [number, number])[] = [[0, Number.POSITIVE_INFINITY]];
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* A project at a glance (ADR-0105): its name and three figures, what is in progress, in review
|
|
151
|
+
* and waiting for a decision; under them, or beside them on a wide tile, its tasks in progress, its
|
|
152
|
+
* goals ahead and its tasks waiting for review, as many rows as the room holds, each whole, and
|
|
153
|
+
* how many more there are.
|
|
154
|
+
*/
|
|
155
|
+
function ProjectGlanceTile(props: {
|
|
156
|
+
readonly project: RestProject;
|
|
157
|
+
readonly size: HomeTileSize;
|
|
158
|
+
readonly glance: ProjectGlance | undefined;
|
|
159
|
+
}) {
|
|
160
|
+
const glanceWords = useWords().home.glance;
|
|
161
|
+
const { project, glance } = props;
|
|
162
|
+
const columns = props.size === "wide";
|
|
163
|
+
const [body, measured] = useRoom();
|
|
164
|
+
const room = measured ?? GLANCE_ROOM_GUESS[props.size] ?? 0;
|
|
165
|
+
// The rows come ordered and cut by the console, each list with how many it has in all, and
|
|
166
|
+
// the figures with them, of the same moment (ADR-0107).
|
|
167
|
+
const tasks = glance?.inProgress.items ?? [];
|
|
168
|
+
const goals = glance?.goals.items ?? [];
|
|
169
|
+
const review = glance?.inReview.items ?? [];
|
|
170
|
+
// The tasks and the goals say so in a row of their own when there are none; what waits for
|
|
171
|
+
// review is shown only when something does.
|
|
172
|
+
const taskList = {
|
|
173
|
+
rows: Math.max(tasks.length, 1),
|
|
174
|
+
total: Math.max(glance?.inProgress.total ?? 0, tasks.length, 1),
|
|
175
|
+
row: GLANCE_REM.task,
|
|
176
|
+
};
|
|
177
|
+
const goalList = {
|
|
178
|
+
rows: Math.max(goals.length, 1),
|
|
179
|
+
total: Math.max(glance?.goals.total ?? 0, goals.length, 1),
|
|
180
|
+
row: GLANCE_REM.goal,
|
|
181
|
+
};
|
|
182
|
+
const reviewList = {
|
|
183
|
+
rows: review.length,
|
|
184
|
+
total: Math.max(glance?.inReview.total ?? 0, review.length),
|
|
185
|
+
row: GLANCE_REM.task,
|
|
186
|
+
};
|
|
187
|
+
const beside = glanceFit(room, [taskList, reviewList], SHARING);
|
|
188
|
+
const [taskRows = 0, goalRows = 0, reviewRows = 0] = columns
|
|
189
|
+
? [beside[0], glanceFit(room, [goalList], ALONE)[0], beside[1]]
|
|
190
|
+
: glanceFit(room, [taskList, goalList, reviewList], STACKED);
|
|
191
|
+
const now = today();
|
|
192
|
+
// A figure that is not read yet is a dash in its place, so that nothing moves when it comes.
|
|
193
|
+
const figure = (label: string, value: number | undefined, waiting = false) => (
|
|
194
|
+
<div
|
|
195
|
+
className={cx(
|
|
196
|
+
"sc-glance-fact",
|
|
197
|
+
waiting && value !== undefined && value > 0 && "sc-glance-fact-waiting",
|
|
198
|
+
)}
|
|
199
|
+
>
|
|
200
|
+
<dt>{label}</dt>
|
|
201
|
+
<dd>{value ?? UNREAD}</dd>
|
|
202
|
+
</div>
|
|
203
|
+
);
|
|
204
|
+
const more = (shown: number, total: number) =>
|
|
205
|
+
shown > 0 && shown < total ? (
|
|
206
|
+
<p className="sc-glance-more">{glanceWords.more(total - shown)}</p>
|
|
207
|
+
) : null;
|
|
208
|
+
const taskRow = (task: RestGlanceTask) => {
|
|
209
|
+
const soon = task.dueOn !== null && daysBetween(now, task.dueOn) <= GLANCE_DUE_DAYS;
|
|
210
|
+
return (
|
|
211
|
+
<li key={task.id} className="sc-glance-row">
|
|
212
|
+
<span className="sc-glance-row-main">{task.title}</span>
|
|
213
|
+
{soon && task.dueOn !== null && (
|
|
214
|
+
<DueBadge dueOn={task.dueOn} state={task.state} today={now} />
|
|
215
|
+
)}
|
|
216
|
+
<Workers workers={task.workers} size="xs" shown={2} />
|
|
217
|
+
</li>
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
const taskSection =
|
|
221
|
+
glance === undefined || taskRows === 0 ? null : (
|
|
222
|
+
<section className="sc-glance-section">
|
|
223
|
+
<p className="sc-eyebrow sc-glance-heading">{glanceWords.tasks}</p>
|
|
224
|
+
<ul className="sc-glance-rows">
|
|
225
|
+
{tasks.length === 0 ? (
|
|
226
|
+
<li className="sc-glance-row sc-glance-none">{glanceWords.noTasks}</li>
|
|
227
|
+
) : (
|
|
228
|
+
tasks.slice(0, taskRows).map(taskRow)
|
|
229
|
+
)}
|
|
230
|
+
</ul>
|
|
231
|
+
{tasks.length > 0 && more(taskRows, taskList.total)}
|
|
232
|
+
</section>
|
|
233
|
+
);
|
|
234
|
+
const reviewSection =
|
|
235
|
+
glance === undefined || reviewRows === 0 ? null : (
|
|
236
|
+
<section className="sc-glance-section">
|
|
237
|
+
<p className="sc-eyebrow sc-glance-heading">{glanceWords.reviewTasks}</p>
|
|
238
|
+
<ul className="sc-glance-rows">{review.slice(0, reviewRows).map(taskRow)}</ul>
|
|
239
|
+
{more(reviewRows, reviewList.total)}
|
|
240
|
+
</section>
|
|
241
|
+
);
|
|
242
|
+
const goalSection =
|
|
243
|
+
glance === undefined || goalRows === 0 ? null : (
|
|
244
|
+
<section className="sc-glance-section">
|
|
245
|
+
<p className="sc-eyebrow sc-glance-heading">{glanceWords.roadmap}</p>
|
|
246
|
+
<ul className="sc-glance-rows">
|
|
247
|
+
{goals.length === 0 ? (
|
|
248
|
+
<li className="sc-glance-row sc-glance-none">{glanceWords.noGoals}</li>
|
|
249
|
+
) : (
|
|
250
|
+
goals.slice(0, goalRows).map((goal) => {
|
|
251
|
+
const { taskCounts: of } = goal;
|
|
252
|
+
const total = of.idea + of.ready + of.in_progress + of.in_review + of.done;
|
|
253
|
+
return (
|
|
254
|
+
<li key={goal.id} className="sc-glance-row sc-glance-goal">
|
|
255
|
+
<span className="sc-glance-goal-line">
|
|
256
|
+
<span className="sc-glance-row-main">{goal.title}</span>
|
|
257
|
+
{goal.dueOn !== null && (
|
|
258
|
+
<span className="sc-glance-day">
|
|
259
|
+
<Day day={goal.dueOn} />
|
|
260
|
+
</span>
|
|
261
|
+
)}
|
|
262
|
+
{total > 0 && (
|
|
263
|
+
<span className="sc-glance-figure" title={glanceWords.done(of.done, total)}>
|
|
264
|
+
{of.done}/{total}
|
|
265
|
+
</span>
|
|
266
|
+
)}
|
|
267
|
+
</span>
|
|
268
|
+
<ProgressBar counts={of} words={false} />
|
|
269
|
+
</li>
|
|
270
|
+
);
|
|
271
|
+
})
|
|
272
|
+
)}
|
|
273
|
+
</ul>
|
|
274
|
+
{goals.length > 0 && more(goalRows, goalList.total)}
|
|
275
|
+
</section>
|
|
276
|
+
);
|
|
277
|
+
return (
|
|
278
|
+
<>
|
|
279
|
+
<div className="sc-glance-lead">
|
|
280
|
+
<span className="sc-glance-who">
|
|
281
|
+
<ProjectMark project={project} size="lg" />
|
|
282
|
+
<span className="sc-glance-name">
|
|
283
|
+
<span className="sc-tile-name">{project.name}</span>
|
|
284
|
+
<code className="sc-project-key sc-glance-key">{project.key}</code>
|
|
285
|
+
</span>
|
|
286
|
+
</span>
|
|
287
|
+
{columns && project.description.length > 0 && (
|
|
288
|
+
<span className="sc-tile-about sc-glance-about">{project.description}</span>
|
|
289
|
+
)}
|
|
290
|
+
<dl className="sc-glance-facts">
|
|
291
|
+
{figure(glanceWords.working, glance?.taskCounts.in_progress)}
|
|
292
|
+
{figure(glanceWords.review, glance?.taskCounts.in_review)}
|
|
293
|
+
{figure(glanceWords.decisions, glance?.openDecisions ?? project.openDecisions, true)}
|
|
294
|
+
</dl>
|
|
295
|
+
</div>
|
|
296
|
+
{columns ? (
|
|
297
|
+
<>
|
|
298
|
+
<div ref={body} className="sc-glance-column">
|
|
299
|
+
{taskSection}
|
|
300
|
+
{reviewSection}
|
|
301
|
+
</div>
|
|
302
|
+
<div className="sc-glance-column">{goalSection}</div>
|
|
303
|
+
</>
|
|
304
|
+
) : (
|
|
305
|
+
<div ref={body} className="sc-glance-body">
|
|
306
|
+
{taskSection}
|
|
307
|
+
{goalSection}
|
|
308
|
+
{reviewSection}
|
|
309
|
+
</div>
|
|
310
|
+
)}
|
|
311
|
+
</>
|
|
312
|
+
);
|
|
56
313
|
}
|
|
57
314
|
|
|
315
|
+
const GLANCE_STYLE = {
|
|
316
|
+
"--sc-glance-heading": `${GLANCE_REM.heading}rem`,
|
|
317
|
+
"--sc-glance-task": `${GLANCE_REM.task}rem`,
|
|
318
|
+
"--sc-glance-goal": `${GLANCE_REM.goal}rem`,
|
|
319
|
+
"--sc-glance-more": `${GLANCE_REM.more}rem`,
|
|
320
|
+
"--sc-glance-between": `${GLANCE_REM.between}rem`,
|
|
321
|
+
} as CSSProperties;
|
|
322
|
+
|
|
58
323
|
/** A project on the front page: its mark and its name as an icon; at a larger size, what it is too. */
|
|
59
324
|
export function ProjectTile(props: ProjectTileProps) {
|
|
60
325
|
const words = useWords().projects;
|
|
326
|
+
const glanceWords = useWords().home.glance;
|
|
61
327
|
const { project, onOpen } = props;
|
|
62
328
|
const card = props.size !== "icon";
|
|
63
|
-
const
|
|
329
|
+
const glancing = isGlanceSize(props.size);
|
|
330
|
+
// A glance is one link with lists in it: said whole it would be every row, so it is given a
|
|
331
|
+
// name of its own, the project and its figures.
|
|
332
|
+
const name = !glancing
|
|
333
|
+
? undefined
|
|
334
|
+
: props.glance === undefined
|
|
335
|
+
? glanceWords.namedAlone(project.name, project.key, project.openDecisions)
|
|
336
|
+
: glanceWords.named(
|
|
337
|
+
project.name,
|
|
338
|
+
project.key,
|
|
339
|
+
props.glance.taskCounts.in_progress,
|
|
340
|
+
props.glance.taskCounts.in_review,
|
|
341
|
+
props.glance.openDecisions,
|
|
342
|
+
);
|
|
343
|
+
const inside = glancing ? (
|
|
344
|
+
<ProjectGlanceTile project={project} size={props.size} glance={props.glance} />
|
|
345
|
+
) : (
|
|
64
346
|
<>
|
|
65
347
|
<span className="sc-tile-mark">
|
|
66
348
|
<ProjectMark project={project} size="lg" />
|
|
@@ -94,14 +376,24 @@ export function ProjectTile(props: ProjectTileProps) {
|
|
|
94
376
|
)}
|
|
95
377
|
</>
|
|
96
378
|
);
|
|
97
|
-
const className =
|
|
379
|
+
const className = glancing
|
|
380
|
+
? cx("sc-tile-pane", "sc-tile-glance", props.size === "wide" && "sc-tile-glance-wide")
|
|
381
|
+
: cx("sc-tile-pane", "sc-tile-project", card && "sc-tile-project-card");
|
|
382
|
+
// The heights the rows are laid out with are the ones the glance fits them by.
|
|
383
|
+
const style = glancing ? GLANCE_STYLE : undefined;
|
|
98
384
|
if (props.href === undefined) {
|
|
99
|
-
return
|
|
385
|
+
return (
|
|
386
|
+
<div className={className} style={style}>
|
|
387
|
+
{inside}
|
|
388
|
+
</div>
|
|
389
|
+
);
|
|
100
390
|
}
|
|
101
391
|
return (
|
|
102
392
|
<a
|
|
103
393
|
className={className}
|
|
394
|
+
style={style}
|
|
104
395
|
href={props.href}
|
|
396
|
+
aria-label={name}
|
|
105
397
|
onClick={(event) => {
|
|
106
398
|
if (
|
|
107
399
|
onOpen !== undefined &&
|
|
@@ -218,20 +510,29 @@ export interface HomeGridProps {
|
|
|
218
510
|
readonly renderWidget: (tile: HomeWidgetTile, size: PluginWidgetSizeName) => ReactNode;
|
|
219
511
|
/** What stands on the page while it holds nothing. */
|
|
220
512
|
readonly empty?: ReactNode;
|
|
513
|
+
/** What the boards of the projects shown at a glance hold, by the project's id (ADR-0105). */
|
|
514
|
+
readonly glances?: Readonly<Record<string, ProjectGlance>> | undefined;
|
|
515
|
+
/** Asked for the projects the page shows at a glance, each time those change: their boards are to be read. */
|
|
516
|
+
readonly onGlance?: ((projects: readonly RestProject[]) => void) | undefined;
|
|
221
517
|
}
|
|
222
518
|
|
|
223
519
|
export function HomeGrid(props: HomeGridProps) {
|
|
224
520
|
const allWords = useWords();
|
|
225
521
|
const words = allWords.home;
|
|
226
522
|
const { editing, home, nameOf } = props;
|
|
227
|
-
const tiles =
|
|
523
|
+
const tiles = useMemo(
|
|
524
|
+
() => homeTiles(props.plugins, props.projects),
|
|
525
|
+
[props.plugins, props.projects],
|
|
526
|
+
);
|
|
228
527
|
const [page, columns] = useHomeColumns();
|
|
229
528
|
const grid = useRef<HTMLUListElement>(null);
|
|
230
529
|
/** What the person has changed since they began: kept when they are done, let go if they cancel. */
|
|
231
530
|
const [draft, setDraft] = useState<RestHome | null>(null);
|
|
232
531
|
const working = draft ?? home;
|
|
233
532
|
const hidden = working?.hidden ?? NONE;
|
|
234
|
-
|
|
533
|
+
// A width nobody arranged is closed up by trying the sizes the tiles come in: once a render, not
|
|
534
|
+
// once a pointer's move.
|
|
535
|
+
const placed = useMemo(() => arranged(tiles, working, columns), [tiles, working, columns]);
|
|
235
536
|
const [drag, setDrag] = useState<Drag | null>(null);
|
|
236
537
|
const { busy, error, act } = useAction();
|
|
237
538
|
/** The tile in hand, once it has come loose; nothing while one is merely pressed. */
|
|
@@ -448,25 +749,52 @@ export function HomeGrid(props: HomeGridProps) {
|
|
|
448
749
|
setDraft(null);
|
|
449
750
|
props.onDone();
|
|
450
751
|
};
|
|
752
|
+
/** The page as composed again, every tile back on it: kept by Done like any change, let go by Cancel. */
|
|
753
|
+
const reset = () => setDraft(COMPOSED_HOME);
|
|
451
754
|
|
|
452
755
|
const nameOfTile = (tile: HomeTile): string =>
|
|
453
756
|
tile.kind === "project" ? tile.project.name : nameOf(tile.widget.name);
|
|
454
757
|
// Moved in the page, a frame would load again: the tiles keep the order they came in for as
|
|
455
758
|
// long as the page is open, and each stands where its style says.
|
|
759
|
+
// Someone who has arranged nothing sees the page composed, edge to edge; arranging it puts the
|
|
760
|
+
// same tiles on the grid's cells, where they move from (ADR-0082).
|
|
761
|
+
const composing = !editing && nobodyArranged(working);
|
|
762
|
+
const boxes: readonly ComposedTile[] = useMemo(
|
|
763
|
+
() =>
|
|
764
|
+
composing
|
|
765
|
+
? composed(tiles, working, columns)
|
|
766
|
+
: shown.map((tile) => ({ ...tile, ...footprintOf(tile.size, columns) })),
|
|
767
|
+
[composing, tiles, working, columns, shown],
|
|
768
|
+
);
|
|
456
769
|
const order = useRef<readonly string[]>(NONE);
|
|
457
|
-
const inOrder = [...
|
|
770
|
+
const inOrder = [...boxes].sort((a, b) => a.y - b.y || a.x - b.x).map((tile) => tile.tile.id);
|
|
458
771
|
order.current = [
|
|
459
772
|
...order.current.filter((id) => inOrder.includes(id)),
|
|
460
773
|
...inOrder.filter((id) => !order.current.includes(id)),
|
|
461
774
|
];
|
|
462
|
-
const standing = [...
|
|
775
|
+
const standing = [...boxes].sort(
|
|
463
776
|
(a, b) => order.current.indexOf(a.tile.id) - order.current.indexOf(b.tile.id),
|
|
464
777
|
);
|
|
465
778
|
const out = editing
|
|
466
779
|
? tiles.filter((tile) => !shown.some((candidate) => candidate.tile.id === tile.id))
|
|
467
780
|
: [];
|
|
468
781
|
const slot = dragging === null ? undefined : shown.find((tile) => tile.tile.id === dragging.id);
|
|
469
|
-
const rows =
|
|
782
|
+
const rows = composing
|
|
783
|
+
? composedRows(boxes)
|
|
784
|
+
: rowsOf(shown, columns) + (editing ? SPARE_ROWS : 0);
|
|
785
|
+
// The boards of the projects at a glance are read by whoever composes the page, once for each
|
|
786
|
+
// set of them: the ids in order say when it changed.
|
|
787
|
+
const glancing = glanceProjects(boxes);
|
|
788
|
+
const glancingIds = glancing.map((project) => project.id).join(" ");
|
|
789
|
+
// Told when the set changes, to none too, so that what is no longer shown is no longer read;
|
|
790
|
+
// and never because the function it is told through is another one, which a console that
|
|
791
|
+
// passes one written in place would make at every render.
|
|
792
|
+
const told = useRef({ onGlance: props.onGlance, glancing });
|
|
793
|
+
told.current = { onGlance: props.onGlance, glancing };
|
|
794
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: the ids in order are the set
|
|
795
|
+
useEffect(() => {
|
|
796
|
+
told.current.onGlance?.(told.current.glancing);
|
|
797
|
+
}, [glancingIds]);
|
|
470
798
|
return (
|
|
471
799
|
<div
|
|
472
800
|
ref={page}
|
|
@@ -476,6 +804,14 @@ export function HomeGrid(props: HomeGridProps) {
|
|
|
476
804
|
<div className="sc-home-bar">
|
|
477
805
|
<p className="sc-home-hint">{words.hint}</p>
|
|
478
806
|
<div className="sc-home-bar-actions">
|
|
807
|
+
<Button
|
|
808
|
+
size="sm"
|
|
809
|
+
variant="ghost"
|
|
810
|
+
disabled={busy || standsComposed(working)}
|
|
811
|
+
onClick={reset}
|
|
812
|
+
>
|
|
813
|
+
{words.reset}
|
|
814
|
+
</Button>
|
|
479
815
|
<Button size="sm" variant="ghost" disabled={busy} onClick={cancel}>
|
|
480
816
|
{allWords.common.cancel}
|
|
481
817
|
</Button>
|
|
@@ -521,7 +857,7 @@ export function HomeGrid(props: HomeGridProps) {
|
|
|
521
857
|
}
|
|
522
858
|
>
|
|
523
859
|
{standing.map((tile) => {
|
|
524
|
-
const { w, h } =
|
|
860
|
+
const { w, h } = tile;
|
|
525
861
|
const inHand = dragging?.id === tile.tile.id ? dragging : undefined;
|
|
526
862
|
const name = nameOfTile(tile.tile);
|
|
527
863
|
return (
|
|
@@ -557,6 +893,7 @@ export function HomeGrid(props: HomeGridProps) {
|
|
|
557
893
|
size={tile.size}
|
|
558
894
|
href={editing ? undefined : props.projectHref(tile.tile.project)}
|
|
559
895
|
onOpen={props.onOpen}
|
|
896
|
+
glance={props.glances?.[tile.tile.project.id]}
|
|
560
897
|
/>
|
|
561
898
|
) : (
|
|
562
899
|
<article className="sc-tile-pane sc-tile-widget">
|
|
@@ -601,7 +938,11 @@ export function HomeGrid(props: HomeGridProps) {
|
|
|
601
938
|
}
|
|
602
939
|
>
|
|
603
940
|
{slot.tile.kind === "project" ? (
|
|
604
|
-
<ProjectTile
|
|
941
|
+
<ProjectTile
|
|
942
|
+
project={slot.tile.project}
|
|
943
|
+
size={slot.size}
|
|
944
|
+
glance={props.glances?.[slot.tile.project.id]}
|
|
945
|
+
/>
|
|
605
946
|
) : (
|
|
606
947
|
<div className="sc-tile-pane sc-tile-widget">
|
|
607
948
|
<p className="sc-tile-title">{nameOfTile(slot.tile)}</p>
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type RestReachedDecision,
|
|
8
8
|
} from "../api.js";
|
|
9
9
|
import { useWords } from "../i18n/index.js";
|
|
10
|
-
import { DecisionCard, DecisionLog } from "./decision-list.js";
|
|
10
|
+
import { type DecisionAddressing, DecisionCard, DecisionLog } from "./decision-list.js";
|
|
11
11
|
import { ProjectMark } from "./projects.js";
|
|
12
12
|
import { Button } from "./ui.js";
|
|
13
13
|
|
|
@@ -47,6 +47,8 @@ export interface MyDecisionsProps {
|
|
|
47
47
|
readonly onAnswer?:
|
|
48
48
|
| ((projectKey: string, decision: RestDecision, input: RestAnswerInput) => void)
|
|
49
49
|
| undefined;
|
|
50
|
+
/** How a waiting decision is addressed anew (ADR-0096), by its project's key. Left out, whom one is for is changed on its project's pages. */
|
|
51
|
+
readonly addressing?: ((projectKey: string) => DecisionAddressing) | undefined;
|
|
50
52
|
readonly busy?: boolean | undefined;
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -72,7 +74,7 @@ function More(props: {
|
|
|
72
74
|
return null;
|
|
73
75
|
}
|
|
74
76
|
return (
|
|
75
|
-
<div
|
|
77
|
+
<div>
|
|
76
78
|
<Button variant="secondary" size="sm" disabled={props.busy} onClick={page.onMore}>
|
|
77
79
|
{props.label}
|
|
78
80
|
</Button>
|
|
@@ -106,6 +108,7 @@ export function MyDecisions(props: MyDecisionsProps) {
|
|
|
106
108
|
? (decision, input) => onAnswer(item.project.key, decision, input)
|
|
107
109
|
: undefined
|
|
108
110
|
}
|
|
111
|
+
addressing={props.addressing?.(item.project.key)}
|
|
109
112
|
busy={props.busy}
|
|
110
113
|
/>
|
|
111
114
|
);
|
|
@@ -163,6 +166,8 @@ export interface ReachedDecisionProps {
|
|
|
163
166
|
readonly reached: RestReachedDecision;
|
|
164
167
|
/** Called with the person's answer; the decision is answered here only where `mayAnswer` says they may. */
|
|
165
168
|
readonly onAnswer?: ((decision: RestDecision, input: RestAnswerInput) => void) | undefined;
|
|
169
|
+
/** How the decision is addressed anew while it waits (ADR-0096); offered only where `mayAnswer` says the person may answer it. */
|
|
170
|
+
readonly addressing?: DecisionAddressing | undefined;
|
|
166
171
|
readonly busy?: boolean | undefined;
|
|
167
172
|
}
|
|
168
173
|
|
|
@@ -180,6 +185,7 @@ export function ReachedDecision(props: ReachedDecisionProps) {
|
|
|
180
185
|
project={<InProject project={reached.project} />}
|
|
181
186
|
fileHref={(fileId) => decisionFilePath(decision.id, fileId)}
|
|
182
187
|
onAnswer={reached.mayAnswer === true ? props.onAnswer : undefined}
|
|
188
|
+
addressing={reached.mayAnswer === true ? props.addressing : undefined}
|
|
183
189
|
busy={props.busy}
|
|
184
190
|
/>
|
|
185
191
|
);
|