@skillcdn/console 0.6.0 → 0.6.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 +7 -7
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +58 -35
- package/dist/agent-page.js.map +1 -1
- package/dist/agent-usage.d.ts +51 -0
- package/dist/agent-usage.d.ts.map +1 -0
- package/dist/agent-usage.js +77 -0
- package/dist/agent-usage.js.map +1 -0
- package/dist/api.d.ts +4 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -2
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +491 -125
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +46 -4
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +163 -45
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +62 -13
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/machine-check.d.ts +24 -5
- package/dist/cli/machine-check.d.ts.map +1 -1
- package/dist/cli/machine-check.js +128 -16
- package/dist/cli/machine-check.js.map +1 -1
- package/dist/cli/pack.d.ts +11 -8
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +63 -28
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/runner-host.d.ts +2 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +1 -0
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/cli/secret-notes.d.ts.map +1 -1
- package/dist/cli/secret-notes.js +9 -1
- package/dist/cli/secret-notes.js.map +1 -1
- package/dist/cli/terminal.d.ts +10 -2
- package/dist/cli/terminal.d.ts.map +1 -1
- package/dist/cli/terminal.js +16 -4
- package/dist/cli/terminal.js.map +1 -1
- package/dist/client.d.ts +30 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +76 -18
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +183 -53
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts +2 -0
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +6 -5
- package/dist/components/agents.js.map +1 -1
- package/dist/components/calendar.d.ts +24 -4
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +79 -36
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/categories.js +2 -2
- package/dist/components/categories.js.map +1 -1
- package/dist/components/comments.js +2 -2
- package/dist/components/comments.js.map +1 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +5 -5
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/documents.d.ts.map +1 -1
- package/dist/components/documents.js +4 -4
- package/dist/components/documents.js.map +1 -1
- package/dist/components/event-feed.d.ts +2 -3
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -184
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +3 -3
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.js +9 -9
- package/dist/components/home.js.map +1 -1
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +11 -2
- package/dist/components/icon.js.map +1 -1
- package/dist/components/notifications.d.ts +65 -0
- package/dist/components/notifications.d.ts.map +1 -0
- package/dist/components/notifications.js +162 -0
- package/dist/components/notifications.js.map +1 -0
- package/dist/components/pack-connect.js +1 -1
- package/dist/components/pack-connect.js.map +1 -1
- package/dist/components/pack-token.js +1 -1
- package/dist/components/pack-token.js.map +1 -1
- package/dist/components/people.js +2 -2
- package/dist/components/people.js.map +1 -1
- package/dist/components/pictures.js +1 -1
- package/dist/components/pictures.js.map +1 -1
- package/dist/components/plugin-settings.d.ts +22 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +63 -11
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.js +1 -1
- package/dist/components/projects.js.map +1 -1
- package/dist/components/roadmap.js +2 -2
- package/dist/components/roadmap.js.map +1 -1
- package/dist/components/rules.js +2 -2
- package/dist/components/rules.js.map +1 -1
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +1 -1
- package/dist/components/runs.js.map +1 -1
- package/dist/components/sessions.js +1 -1
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/shell.d.ts +2 -0
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/shell.js.map +1 -1
- package/dist/components/sign-in.js +2 -2
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/skills.d.ts.map +1 -1
- package/dist/components/skills.js +1 -1
- package/dist/components/skills.js.map +1 -1
- package/dist/components/task-view.d.ts +6 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +3 -2
- package/dist/components/task-view.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 +21 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +24 -3
- package/dist/components/ui.js.map +1 -1
- package/dist/components/work.js +1 -1
- package/dist/components/work.js.map +1 -1
- package/dist/console.css +506 -289
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +193 -16
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +17 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +31 -0
- package/dist/data.js.map +1 -1
- package/dist/desk-page.js +5 -5
- package/dist/desk-page.js.map +1 -1
- package/dist/feed-words.d.ts +5 -0
- package/dist/feed-words.d.ts.map +1 -0
- package/dist/feed-words.js +193 -0
- package/dist/feed-words.js.map +1 -0
- package/dist/i18n/en.d.ts +93 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +103 -15
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +105 -22
- package/dist/i18n/ko.js.map +1 -1
- package/dist/icons/glyphs.d.ts +370 -104
- package/dist/icons/glyphs.d.ts.map +1 -1
- package/dist/icons/glyphs.js +72 -66
- package/dist/icons/glyphs.js.map +1 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +9 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +7 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +7 -0
- package/dist/limits.js.map +1 -1
- package/dist/notifications.d.ts +124 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +147 -0
- package/dist/notifications.js.map +1 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +7 -12
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/capabilities.d.ts +1 -1
- package/dist/plugin/capabilities.d.ts.map +1 -1
- package/dist/plugin/capabilities.js +10 -0
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +85 -1
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +7 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +7 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +8 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +13 -0
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +22 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +19 -3
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/testing.d.ts +2 -0
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +2 -0
- 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/router.d.ts +6 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +5 -0
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +2 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -0
- package/dist/routes.js.map +1 -1
- package/dist/rules.js +1 -1
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +12 -97
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/browser.d.ts +50 -0
- package/dist/runner/browser.d.ts.map +1 -0
- package/dist/runner/browser.js +104 -0
- package/dist/runner/browser.js.map +1 -0
- package/dist/runner/claude.d.ts +1 -2
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +352 -13
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +9 -10
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +809 -346
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +14 -3
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +27 -7
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +3 -1
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +17 -5
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +53 -3
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +201 -20
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/registry.d.ts +6 -0
- package/dist/runner/registry.d.ts.map +1 -1
- package/dist/runner/registry.js.map +1 -1
- package/dist/runner/rpc.d.ts +31 -0
- package/dist/runner/rpc.d.ts.map +1 -0
- package/dist/runner/rpc.js +102 -0
- package/dist/runner/rpc.js.map +1 -0
- package/dist/runner/runner.d.ts +41 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +695 -52
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack.d.ts +17 -8
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +1250 -78
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +160 -8
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js.map +1 -1
- package/dist/runner/usage.d.ts +105 -0
- package/dist/runner/usage.d.ts.map +1 -0
- package/dist/runner/usage.js +218 -0
- package/dist/runner/usage.js.map +1 -0
- package/dist/runner.d.ts +4 -4
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +3 -3
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +673 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +205 -1
- package/dist/schemas.js.map +1 -1
- package/dist/services.js +3 -3
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +4 -3
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +11 -13
- package/dist/setup-guide.js.map +1 -1
- package/dist/text.d.ts +7 -0
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +18 -0
- package/dist/text.js.map +1 -1
- package/dist/vocabulary.d.ts +4 -2
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +4 -1
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +26 -19
- package/docs/specs/plugins.md +16 -10
- package/docs/specs/rest.md +28 -10
- package/docs/specs/runner.md +132 -44
- package/package.json +4 -4
- package/skills/building-a-console/SKILL.md +2 -2
- package/skills/building-a-console/references/configuring.md +1 -1
- package/skills/building-a-plugin/SKILL.md +4 -4
- package/skills/planning-the-board/SKILL.md +1 -1
- package/skills/planning-the-board/references/setting-up.md +2 -2
- package/skills/running-an-agent/SKILL.md +15 -64
- package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
- package/skills/running-an-agent/references/several-tasks.md +37 -0
- package/skills/running-an-agent/references/slack-app.md +70 -13
- package/skills/running-an-agent/references/the-account-and-the-invitation.md +5 -0
- package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -0
- package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +16 -0
- package/skills/running-an-agent/references/your-first-task.md +14 -0
- package/skills/working-the-board/SKILL.md +9 -12
- package/skills/working-the-board/references/a-pack-skills-questions.md +3 -0
- package/skills/working-the-board/references/a-plugins-commands.md +3 -0
- package/skills/working-the-board/references/a-review.md +3 -0
- package/skills/working-the-board/references/an-open-run.md +3 -0
- package/skills/working-the-board/references/requirements.md +7 -0
- package/skills/working-the-board/references/the-pack.md +2 -2
- package/skills/working-the-board/references/what-they-were-told.md +3 -0
- package/skills/working-the-board/references/work-given-in-chat.md +5 -0
- package/src/agent-page.tsx +76 -47
- package/src/agent-usage.ts +113 -0
- package/src/api.ts +62 -0
- package/src/cli/cli.ts +634 -162
- package/src/cli/format.ts +190 -47
- package/src/cli/help.ts +77 -12
- package/src/cli/machine-check.ts +182 -29
- package/src/cli/pack.ts +81 -40
- package/src/cli/runner-host.ts +3 -0
- package/src/cli/secret-notes.ts +9 -1
- package/src/cli/terminal.ts +20 -4
- package/src/client.ts +94 -6
- package/src/components/agent-page.tsx +280 -63
- package/src/components/agents.tsx +23 -3
- package/src/components/calendar.tsx +93 -37
- package/src/components/categories.tsx +2 -2
- package/src/components/comments.tsx +5 -5
- package/src/components/decision-list.tsx +13 -10
- package/src/components/documents.tsx +13 -8
- package/src/components/event-feed.tsx +4 -203
- package/src/components/goals.tsx +6 -4
- package/src/components/home.tsx +12 -12
- package/src/components/icon.tsx +16 -3
- package/src/components/notifications.tsx +419 -0
- package/src/components/pack-connect.tsx +1 -1
- package/src/components/pack-token.tsx +5 -5
- package/src/components/people.tsx +3 -3
- package/src/components/pictures.tsx +1 -1
- package/src/components/plugin-settings.tsx +128 -23
- package/src/components/projects.tsx +1 -1
- package/src/components/roadmap.tsx +2 -2
- package/src/components/rules.tsx +2 -2
- package/src/components/runs.tsx +6 -3
- package/src/components/sessions.tsx +2 -2
- package/src/components/shell.tsx +3 -0
- package/src/components/sign-in.tsx +3 -3
- package/src/components/skills.tsx +5 -3
- package/src/components/task-view.tsx +18 -7
- package/src/components/tokens.tsx +2 -2
- package/src/components/ui.tsx +70 -5
- package/src/components/work.tsx +2 -2
- package/src/console.tsx +269 -12
- package/src/data.ts +54 -0
- package/src/desk-page.tsx +5 -5
- package/src/feed-words.ts +214 -0
- package/src/i18n/en.ts +114 -15
- package/src/i18n/ko.ts +115 -22
- package/src/icons/glyphs.ts +74 -68
- package/src/icons/index.ts +9 -1
- package/src/index.ts +11 -0
- package/src/limits.ts +7 -0
- package/src/notifications.ts +205 -0
- package/src/onboarding.ts +10 -14
- package/src/plugin/capabilities.ts +13 -0
- package/src/plugin/context.ts +87 -0
- package/src/plugin/limits.ts +7 -0
- package/src/plugin/manifest.ts +14 -0
- package/src/plugin/rest-schemas.ts +27 -3
- package/src/plugin/testing.ts +4 -0
- package/src/plugin.ts +2 -0
- package/src/router.ts +7 -0
- package/src/routes.ts +2 -0
- package/src/rules.ts +1 -1
- package/src/runner/acp.ts +12 -118
- package/src/runner/browser.ts +128 -0
- package/src/runner/claude.ts +399 -12
- package/src/runner/codex.ts +904 -400
- package/src/runner/config.ts +30 -7
- package/src/runner/desk.ts +22 -6
- package/src/runner/message.ts +251 -21
- package/src/runner/registry.ts +6 -0
- package/src/runner/rpc.ts +140 -0
- package/src/runner/runner.ts +863 -53
- package/src/runner/slack.ts +1535 -85
- package/src/runner/types.ts +150 -5
- package/src/runner/usage.ts +299 -0
- package/src/runner.ts +16 -1
- package/src/schemas.ts +249 -0
- package/src/services.ts +3 -3
- package/src/setup-guide.ts +12 -14
- package/src/styles/README.md +11 -7
- package/src/styles/console.css +2 -0
- package/src/styles/drawn-by-pages.json +7 -82
- package/src/styles/pages/agents.css +46 -35
- package/src/styles/pages/calendar.css +0 -1
- package/src/styles/pages/connect.css +0 -14
- package/src/styles/pages/decisions.css +2 -43
- package/src/styles/pages/documents.css +0 -29
- package/src/styles/pages/home.css +4 -16
- package/src/styles/pages/people.css +2 -17
- package/src/styles/pages/plugins.css +9 -12
- package/src/styles/pages/roadmap.css +0 -16
- package/src/styles/pages/settings.css +0 -28
- package/src/styles/pages/sign-in.css +2 -17
- package/src/styles/pages/thread.css +4 -50
- package/src/styles/pages/work.css +0 -5
- package/src/styles/parts/button.css +31 -0
- package/src/styles/parts/count.css +10 -0
- package/src/styles/parts/divider.css +17 -0
- package/src/styles/parts/frame.css +12 -0
- package/src/styles/parts/icon.css +39 -0
- package/src/styles/parts/menu.css +184 -0
- package/src/styles/parts/panel.css +7 -0
- package/src/styles/parts/progress.css +63 -0
- package/src/styles/parts/settings.css +2 -0
- package/src/styles/parts/sheet.css +28 -0
- package/src/styles/parts/text.css +34 -0
- package/src/text.ts +19 -0
- package/src/vocabulary.ts +4 -1
- package/template/plugin/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { type FormEvent, type ReactNode, useEffect, useId, useMemo, useState } f
|
|
|
2
2
|
import type { ConsoleClient } from "../client.js";
|
|
3
3
|
import type { Messages } from "../i18n/en.js";
|
|
4
4
|
import { useWords } from "../i18n/index.js";
|
|
5
|
+
import { type IconName, isIconName } from "../icons/index.js";
|
|
5
6
|
import { PLUGIN_CAPABILITIES, type PluginCapability } from "../plugin/capabilities.js";
|
|
6
7
|
import { settingsHref } from "../router.js";
|
|
7
8
|
import type {
|
|
@@ -18,8 +19,11 @@ import type {
|
|
|
18
19
|
RestTeam,
|
|
19
20
|
} from "../schemas.js";
|
|
20
21
|
import { useAction } from "../use-action.js";
|
|
22
|
+
import { COLOR_NAMES, type ColorName } from "../vocabulary.js";
|
|
21
23
|
import { EventFeed } from "./event-feed.js";
|
|
24
|
+
import { IconPicker } from "./icon.js";
|
|
22
25
|
import { Picker } from "./picker.js";
|
|
26
|
+
import { ProjectMark } from "./projects.js";
|
|
23
27
|
import { listSearch, peopleSearch, projectsSearch } from "./searches.js";
|
|
24
28
|
import {
|
|
25
29
|
Badge,
|
|
@@ -66,6 +70,36 @@ export interface CapabilityText {
|
|
|
66
70
|
readonly opens: string;
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
/**
|
|
74
|
+
* The mark a plugin names for the project made for it (ADR-0155), as the form begins with it: an
|
|
75
|
+
* icon this console's pack has, none where it has no such icon, and the colour, `""` for the
|
|
76
|
+
* one chosen from the key.
|
|
77
|
+
*/
|
|
78
|
+
export function boardMarkOf(defaults: RestPluginDetail["boardDefaults"]): {
|
|
79
|
+
readonly glyph: IconName | null;
|
|
80
|
+
readonly color: ColorName | "";
|
|
81
|
+
} {
|
|
82
|
+
const glyph = defaults?.glyph;
|
|
83
|
+
return { glyph: isIconName(glyph) ? glyph : null, color: defaults?.color ?? "" };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** The project to make for a plugin, as it is sent: its mark named only where one was chosen. */
|
|
87
|
+
export function boardToMake(fields: {
|
|
88
|
+
readonly key: string;
|
|
89
|
+
readonly name: string;
|
|
90
|
+
readonly description: string;
|
|
91
|
+
readonly glyph: IconName | null;
|
|
92
|
+
readonly color: ColorName | "";
|
|
93
|
+
}): Extract<NonNullable<RestPluginEnableInput["board"]>, { create: unknown }>["create"] {
|
|
94
|
+
return {
|
|
95
|
+
key: fields.key,
|
|
96
|
+
name: fields.name,
|
|
97
|
+
description: fields.description,
|
|
98
|
+
...(fields.glyph === null ? {} : { glyph: fields.glyph }),
|
|
99
|
+
...(fields.color === "" ? {} : { color: fields.color }),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
69
103
|
/**
|
|
70
104
|
* A capability by the name the pages give it and the sentence of what it opens, in the person's
|
|
71
105
|
* language; one the packs do not know, by its key alone.
|
|
@@ -178,7 +212,13 @@ function TickRow(props: {
|
|
|
178
212
|
}) {
|
|
179
213
|
return (
|
|
180
214
|
<li>
|
|
181
|
-
<label
|
|
215
|
+
<label
|
|
216
|
+
className={cx(
|
|
217
|
+
"sc-sheet",
|
|
218
|
+
"sc-plugin-tick",
|
|
219
|
+
props.locked === true && "sc-plugin-tick-locked",
|
|
220
|
+
)}
|
|
221
|
+
>
|
|
182
222
|
<input
|
|
183
223
|
type="checkbox"
|
|
184
224
|
checked={props.checked}
|
|
@@ -186,12 +226,12 @@ function TickRow(props: {
|
|
|
186
226
|
onChange={(event) => props.onChange?.(event.target.checked)}
|
|
187
227
|
/>
|
|
188
228
|
<span className="sc-plugin-tick-words">
|
|
189
|
-
<span className="sc-plugin-tick-name">
|
|
229
|
+
<span className="sc-plugin-tick-name sc-name">
|
|
190
230
|
{props.name}
|
|
191
231
|
{props.tag !== undefined && <Badge tone="warning">{props.tag}</Badge>}
|
|
192
232
|
</span>
|
|
193
233
|
{props.under !== undefined && props.under !== "" && (
|
|
194
|
-
<span className="sc-
|
|
234
|
+
<span className="sc-note">{props.under}</span>
|
|
195
235
|
)}
|
|
196
236
|
</span>
|
|
197
237
|
</label>
|
|
@@ -295,10 +335,8 @@ function Overview(props: {
|
|
|
295
335
|
const text = capabilityText(words, capability);
|
|
296
336
|
return (
|
|
297
337
|
<li key={capability}>
|
|
298
|
-
<span className="sc-plugin-tick-name">{text.name}</span>
|
|
299
|
-
{text.opens !== "" &&
|
|
300
|
-
<span className="sc-plugin-tick-under"> {text.opens}</span>
|
|
301
|
-
)}
|
|
338
|
+
<span className="sc-plugin-tick-name sc-name">{text.name}</span>
|
|
339
|
+
{text.opens !== "" && <span className="sc-note"> {text.opens}</span>}
|
|
302
340
|
</li>
|
|
303
341
|
);
|
|
304
342
|
})}
|
|
@@ -326,10 +364,8 @@ function Overview(props: {
|
|
|
326
364
|
}
|
|
327
365
|
/>
|
|
328
366
|
<span>
|
|
329
|
-
<span className="sc-plugin-tick-name">{text.name}</span>
|
|
330
|
-
{text.opens !== "" &&
|
|
331
|
-
<span className="sc-plugin-tick-under"> {text.opens}</span>
|
|
332
|
-
)}
|
|
367
|
+
<span className="sc-plugin-tick-name sc-name">{text.name}</span>
|
|
368
|
+
{text.opens !== "" && <span className="sc-note"> {text.opens}</span>}
|
|
333
369
|
</span>
|
|
334
370
|
</label>
|
|
335
371
|
</li>
|
|
@@ -351,11 +387,11 @@ function Overview(props: {
|
|
|
351
387
|
<ul className="sc-plugin-held">
|
|
352
388
|
{detail.jobs.map((job) => (
|
|
353
389
|
<li key={job.name}>
|
|
354
|
-
<span className="sc-plugin-tick-name">
|
|
390
|
+
<span className="sc-plugin-tick-name sc-name">
|
|
355
391
|
<code>{job.name}</code>
|
|
356
392
|
{job.lastOutcome === "failed" && <Badge tone="danger">{settings.jobFailing}</Badge>}
|
|
357
393
|
</span>
|
|
358
|
-
<span className="sc-
|
|
394
|
+
<span className="sc-note"> {jobStanding(settings, job, language)}</span>
|
|
359
395
|
</li>
|
|
360
396
|
))}
|
|
361
397
|
</ul>
|
|
@@ -820,7 +856,9 @@ function SettingsForm(props: {
|
|
|
820
856
|
className="sc-settings-group"
|
|
821
857
|
aria-label={pluginWord(group.name, props.language)}
|
|
822
858
|
>
|
|
823
|
-
<h3 className="sc-settings-group-title">
|
|
859
|
+
<h3 className="sc-settings-group-title sc-subtitle">
|
|
860
|
+
{pluginWord(group.name, props.language)}
|
|
861
|
+
</h3>
|
|
824
862
|
{description !== "" && <p className="sc-settings-hint">{description}</p>}
|
|
825
863
|
{rows(grouped)}
|
|
826
864
|
</section>
|
|
@@ -1067,13 +1105,29 @@ function EnableForm(props: {
|
|
|
1067
1105
|
const [boardDescription, setBoardDescription] = useState(
|
|
1068
1106
|
pluginWord(detail.boardDefaults?.description, language),
|
|
1069
1107
|
);
|
|
1108
|
+
// The mark the plugin names for its project (ADR-0155), to keep or to change before it is made.
|
|
1109
|
+
const named = boardMarkOf(detail.boardDefaults);
|
|
1110
|
+
// A console of before answers nothing of a mark, and would make the project without the one
|
|
1111
|
+
// shown: the mark is offered where the console says it, `null` for none.
|
|
1112
|
+
const marked =
|
|
1113
|
+
detail.boardDefaults !== null &&
|
|
1114
|
+
(detail.boardDefaults.glyph !== undefined || detail.boardDefaults.color !== undefined);
|
|
1115
|
+
const [boardGlyph, setBoardGlyph] = useState<IconName | null>(named.glyph);
|
|
1116
|
+
const [boardColor, setBoardColor] = useState<ColorName | "">(named.color);
|
|
1070
1117
|
const [chosen, setChosen] = useState(detail.board?.key ?? props.projects[0]?.key ?? "");
|
|
1071
1118
|
const before = detail.projects;
|
|
1072
1119
|
const [allProjects, setAllProjects] = useState(!Array.isArray(before) || before.length === 0);
|
|
1073
1120
|
const [onProjects, setOnProjects] = useState<ReadonlySet<string>>(
|
|
1074
1121
|
() => new Set(Array.isArray(before) ? before : []),
|
|
1075
1122
|
);
|
|
1076
|
-
const ids = {
|
|
1123
|
+
const ids = {
|
|
1124
|
+
key: useId(),
|
|
1125
|
+
name: useId(),
|
|
1126
|
+
description: useId(),
|
|
1127
|
+
icon: useId(),
|
|
1128
|
+
color: useId(),
|
|
1129
|
+
choose: useId(),
|
|
1130
|
+
};
|
|
1077
1131
|
const boardReady =
|
|
1078
1132
|
boardMode === "none"
|
|
1079
1133
|
? detail.boardNeeds !== "required"
|
|
@@ -1089,7 +1143,15 @@ function EnableForm(props: {
|
|
|
1089
1143
|
boardMode === "none"
|
|
1090
1144
|
? null
|
|
1091
1145
|
: boardMode === "create"
|
|
1092
|
-
? {
|
|
1146
|
+
? {
|
|
1147
|
+
create: boardToMake({
|
|
1148
|
+
key: boardKey,
|
|
1149
|
+
name: boardName,
|
|
1150
|
+
description: boardDescription,
|
|
1151
|
+
glyph: marked ? boardGlyph : null,
|
|
1152
|
+
color: marked ? boardColor : "",
|
|
1153
|
+
}),
|
|
1154
|
+
}
|
|
1093
1155
|
: { project: chosen },
|
|
1094
1156
|
projects: allProjects ? "all" : [...onProjects],
|
|
1095
1157
|
},
|
|
@@ -1102,7 +1164,7 @@ function EnableForm(props: {
|
|
|
1102
1164
|
<form className="sc-form sc-plugin-enable" onSubmit={submit} aria-label={settings.enable}>
|
|
1103
1165
|
{detail.capabilities.length + optional.length > 0 && (
|
|
1104
1166
|
<div className="sc-plugin-group">
|
|
1105
|
-
<h3 className="sc-plugin-group-title">{settings.capabilities}</h3>
|
|
1167
|
+
<h3 className="sc-plugin-group-title sc-subtitle">{settings.capabilities}</h3>
|
|
1106
1168
|
{detail.capabilities.length > 0 && (
|
|
1107
1169
|
<div className="sc-plugin-capabilities">
|
|
1108
1170
|
<p className="sc-plugin-capabilities-head">
|
|
@@ -1152,7 +1214,7 @@ function EnableForm(props: {
|
|
|
1152
1214
|
)}
|
|
1153
1215
|
{needsBoard && (
|
|
1154
1216
|
<div className="sc-plugin-group">
|
|
1155
|
-
<h3 className="sc-plugin-group-title">{settings.board}</h3>
|
|
1217
|
+
<h3 className="sc-plugin-group-title sc-subtitle">{settings.board}</h3>
|
|
1156
1218
|
<p className="sc-settings-hint">{settings.boardHint}</p>
|
|
1157
1219
|
<div className="sc-radio-row">
|
|
1158
1220
|
{detail.boardNeeds === "optional" && (
|
|
@@ -1220,6 +1282,49 @@ function EnableForm(props: {
|
|
|
1220
1282
|
onChange={(event) => setBoardDescription(event.target.value)}
|
|
1221
1283
|
/>
|
|
1222
1284
|
</div>
|
|
1285
|
+
{marked && (
|
|
1286
|
+
<div className="sc-field-row sc-mark-row">
|
|
1287
|
+
<ProjectMark
|
|
1288
|
+
project={{
|
|
1289
|
+
key: boardKey,
|
|
1290
|
+
name: boardName,
|
|
1291
|
+
color: boardColor === "" ? null : boardColor,
|
|
1292
|
+
symbol: null,
|
|
1293
|
+
glyph: boardGlyph,
|
|
1294
|
+
}}
|
|
1295
|
+
size="lg"
|
|
1296
|
+
/>
|
|
1297
|
+
<div className="sc-field">
|
|
1298
|
+
<label className="sc-field-label" htmlFor={ids.icon}>
|
|
1299
|
+
{words.projects.form.icon}
|
|
1300
|
+
</label>
|
|
1301
|
+
<IconPicker
|
|
1302
|
+
id={ids.icon}
|
|
1303
|
+
value={boardGlyph}
|
|
1304
|
+
label={words.projects.form.icon}
|
|
1305
|
+
onChange={setBoardGlyph}
|
|
1306
|
+
/>
|
|
1307
|
+
</div>
|
|
1308
|
+
<div className="sc-field">
|
|
1309
|
+
<label className="sc-field-label" htmlFor={ids.color}>
|
|
1310
|
+
{words.projects.form.color}
|
|
1311
|
+
</label>
|
|
1312
|
+
<select
|
|
1313
|
+
id={ids.color}
|
|
1314
|
+
className="sc-input"
|
|
1315
|
+
value={boardColor}
|
|
1316
|
+
onChange={(event) => setBoardColor(event.target.value as ColorName | "")}
|
|
1317
|
+
>
|
|
1318
|
+
<option value="">{words.projects.form.colorAuto}</option>
|
|
1319
|
+
{COLOR_NAMES.map((candidate) => (
|
|
1320
|
+
<option key={candidate} value={candidate}>
|
|
1321
|
+
{words.vocabulary.categoryColor[candidate]}
|
|
1322
|
+
</option>
|
|
1323
|
+
))}
|
|
1324
|
+
</select>
|
|
1325
|
+
</div>
|
|
1326
|
+
</div>
|
|
1327
|
+
)}
|
|
1223
1328
|
</div>
|
|
1224
1329
|
)}
|
|
1225
1330
|
{boardMode === "choose" && (
|
|
@@ -1244,7 +1349,7 @@ function EnableForm(props: {
|
|
|
1244
1349
|
</div>
|
|
1245
1350
|
)}
|
|
1246
1351
|
<div className="sc-plugin-group">
|
|
1247
|
-
<h3 className="sc-plugin-group-title">{settings.projects}</h3>
|
|
1352
|
+
<h3 className="sc-plugin-group-title sc-subtitle">{settings.projects}</h3>
|
|
1248
1353
|
<div className="sc-radio-row">
|
|
1249
1354
|
<label className="sc-check">
|
|
1250
1355
|
<input
|
|
@@ -1282,7 +1387,7 @@ function EnableForm(props: {
|
|
|
1282
1387
|
<div className="sc-plugin-group">
|
|
1283
1388
|
{asks.length > 0 && (
|
|
1284
1389
|
<div className="sc-plugin-group">
|
|
1285
|
-
<h3 className="sc-plugin-group-title">{settings.asks}</h3>
|
|
1390
|
+
<h3 className="sc-plugin-group-title sc-subtitle">{settings.asks}</h3>
|
|
1286
1391
|
<p className="sc-settings-hint">{settings.asksHint}</p>
|
|
1287
1392
|
<ul className="sc-plugin-ticks">
|
|
1288
1393
|
{asks.map((ask) => {
|
|
@@ -1459,7 +1564,7 @@ function RoleRow(props: {
|
|
|
1459
1564
|
return (
|
|
1460
1565
|
<li className="sc-plugin-role">
|
|
1461
1566
|
<div>
|
|
1462
|
-
<p className="sc-plugin-role-name">
|
|
1567
|
+
<p className="sc-plugin-role-name sc-name">
|
|
1463
1568
|
{pluginWord(role.name, props.language)}
|
|
1464
1569
|
<code className="sc-plugin-role-key">{role.key}</code>
|
|
1465
1570
|
{props.isDefault && <Badge tone="accent">{settings.roleDefault}</Badge>}
|
|
@@ -1563,13 +1668,13 @@ function RolesSection(props: {
|
|
|
1563
1668
|
)}
|
|
1564
1669
|
{asks.length > 0 && (
|
|
1565
1670
|
<div className="sc-plugin-group">
|
|
1566
|
-
<h3 className="sc-plugin-group-title">{settings.asks}</h3>
|
|
1671
|
+
<h3 className="sc-plugin-group-title sc-subtitle">{settings.asks}</h3>
|
|
1567
1672
|
<p className="sc-settings-hint">{settings.asksHint}</p>
|
|
1568
1673
|
<ul className="sc-plugin-roles">
|
|
1569
1674
|
{asks.map((ask) => (
|
|
1570
1675
|
<li key={`${ask.plugin}:${ask.role}`} className="sc-plugin-role">
|
|
1571
1676
|
<div>
|
|
1572
|
-
<p className="sc-plugin-role-name">
|
|
1677
|
+
<p className="sc-plugin-role-name sc-name">
|
|
1573
1678
|
{pluginNameOf(props.plugins, ask.plugin, props.language)}
|
|
1574
1679
|
<code className="sc-plugin-role-key">{ask.role}</code>
|
|
1575
1680
|
{ask.state === "granted" && <Badge tone="accent">{settings.askGranted}</Badge>}
|
|
@@ -456,7 +456,7 @@ export function MemberList(props: MemberListProps) {
|
|
|
456
456
|
</span>
|
|
457
457
|
{props.onChangeRole === undefined || member.person.role === "admin" ? (
|
|
458
458
|
// An administrator owns every project by office: nothing here changes that.
|
|
459
|
-
<span className="sc-member-role">
|
|
459
|
+
<span className="sc-small sc-member-role">
|
|
460
460
|
<ProjectRoleBadge role={member.role} />
|
|
461
461
|
{member.person.role === "admin" && (
|
|
462
462
|
<span className="sc-muted"> {words.vocabulary.role.admin}</span>
|
|
@@ -107,7 +107,7 @@ export function GoalTimeline(props: GoalTimelineProps) {
|
|
|
107
107
|
return (
|
|
108
108
|
<div className="sc-timeline">
|
|
109
109
|
<div className="sc-timeline-head">
|
|
110
|
-
<h2 className="sc-timeline-title">{words.timeline.title}</h2>
|
|
110
|
+
<h2 className="sc-timeline-title sc-subtitle">{words.timeline.title}</h2>
|
|
111
111
|
<nav className="sc-calendar-nav" aria-label={words.timeline.title}>
|
|
112
112
|
<a
|
|
113
113
|
className="sc-button sc-button-ghost sc-button-sm"
|
|
@@ -225,7 +225,7 @@ export function GoalTimeline(props: GoalTimelineProps) {
|
|
|
225
225
|
</dl>
|
|
226
226
|
)}
|
|
227
227
|
{undated.length > 0 && (
|
|
228
|
-
<p className="sc-timeline-undated">
|
|
228
|
+
<p className="sc-small sc-timeline-undated">
|
|
229
229
|
<span className="sc-muted">{words.timeline.noDays}: </span>
|
|
230
230
|
{undated.map((goal, index) => (
|
|
231
231
|
<span key={goal.id}>
|
package/src/components/rules.tsx
CHANGED
|
@@ -59,7 +59,7 @@ export function RulesView(props: RulesViewProps) {
|
|
|
59
59
|
<Callout tone="info">{words.rules.console}</Callout>
|
|
60
60
|
) : (
|
|
61
61
|
page !== null && (
|
|
62
|
-
<p className="sc-rules-facts">
|
|
62
|
+
<p className="sc-rules-facts sc-note">
|
|
63
63
|
{words.docs.version(page.version)} · {words.docs.writtenBy}{" "}
|
|
64
64
|
<Writer by={page.updatedBy} agent={page.agent} /> <Time iso={page.updatedAt} />
|
|
65
65
|
</p>
|
|
@@ -106,7 +106,7 @@ function WorkspaceRules(props: RulesViewProps & { readonly own: string }) {
|
|
|
106
106
|
<p className="sc-muted">{words.rules.nothingAdded}</p>
|
|
107
107
|
) : (
|
|
108
108
|
<>
|
|
109
|
-
<p className="sc-rules-facts">
|
|
109
|
+
<p className="sc-rules-facts sc-note">
|
|
110
110
|
{words.docs.version(added.page.version)} · {words.docs.writtenBy}{" "}
|
|
111
111
|
<Writer by={added.page.updatedBy} agent={added.page.agent} />{" "}
|
|
112
112
|
<Time iso={added.page.updatedAt} />
|
package/src/components/runs.tsx
CHANGED
|
@@ -70,13 +70,16 @@ export function RunCard(props: RunCardProps) {
|
|
|
70
70
|
return artifact === undefined ? undefined : hrefOf(artifact);
|
|
71
71
|
};
|
|
72
72
|
return (
|
|
73
|
-
<article
|
|
74
|
-
|
|
73
|
+
<article
|
|
74
|
+
className="sc-panel sc-panel-small sc-run"
|
|
75
|
+
aria-label={words.label(run.agent, personName(run.person))}
|
|
76
|
+
>
|
|
77
|
+
<header className="sc-divider-below sc-run-header">
|
|
75
78
|
<span className="sc-run-agent" title={run.agent}>
|
|
76
79
|
{agentLabel(run.agent)}
|
|
77
80
|
</span>
|
|
78
81
|
<RunStatusBadge status={run.status} />
|
|
79
|
-
<span className="sc-run-meta">
|
|
82
|
+
<span className="sc-run-meta sc-note">
|
|
80
83
|
{words.for} <PersonChip person={run.person} /> {words.since} <Time iso={run.startedAt} />
|
|
81
84
|
{run.endedAt !== null && (
|
|
82
85
|
<>
|
|
@@ -62,11 +62,11 @@ export function SessionList(props: SessionListProps) {
|
|
|
62
62
|
{props.sessions.map((session) => (
|
|
63
63
|
<li
|
|
64
64
|
key={session.id}
|
|
65
|
-
className={cx("sc-session", session.current && "sc-session-current")}
|
|
65
|
+
className={cx("sc-divider", "sc-session", session.current && "sc-session-current")}
|
|
66
66
|
>
|
|
67
67
|
<DeviceIcon handheld={session.platform !== null && HANDHELD.has(session.platform)} />
|
|
68
68
|
<div className="sc-session-body">
|
|
69
|
-
<p className="sc-session-name">
|
|
69
|
+
<p className="sc-session-name sc-name">
|
|
70
70
|
<span>{deviceOf(session)}</span>
|
|
71
71
|
{session.current && <Badge tone="accent">{words.current}</Badge>}
|
|
72
72
|
</p>
|
package/src/components/shell.tsx
CHANGED
|
@@ -55,6 +55,8 @@ export interface ShellProps {
|
|
|
55
55
|
readonly onSignOut?: (() => void) | undefined;
|
|
56
56
|
/** Whether the feed is connected: a dot in the header says so. */
|
|
57
57
|
readonly live?: boolean | undefined;
|
|
58
|
+
/** What stands in the head before the person's menu: the bell their notifications open under. */
|
|
59
|
+
readonly notifications?: ReactNode;
|
|
58
60
|
/** Whether the page takes the whole width of the window, as the board does, rather than the column the rest read in. */
|
|
59
61
|
readonly wide?: boolean | undefined;
|
|
60
62
|
readonly children: ReactNode;
|
|
@@ -433,6 +435,7 @@ export function Shell(props: ShellProps) {
|
|
|
433
435
|
</span>
|
|
434
436
|
</span>
|
|
435
437
|
)}
|
|
438
|
+
{props.person !== undefined && props.notifications}
|
|
436
439
|
{props.person !== undefined && (
|
|
437
440
|
<PersonMenu
|
|
438
441
|
person={props.person}
|
|
@@ -50,7 +50,7 @@ export function SignIn(props: SignInProps) {
|
|
|
50
50
|
return words.admits.listed;
|
|
51
51
|
};
|
|
52
52
|
return (
|
|
53
|
-
<div className="sc-sign-in">
|
|
53
|
+
<div className="sc-panel sc-sign-in">
|
|
54
54
|
{props.brand?.symbol !== undefined && (
|
|
55
55
|
<div className="sc-sign-in-stage" aria-hidden="true">
|
|
56
56
|
<span className="sc-sign-in-badge">
|
|
@@ -62,7 +62,7 @@ export function SignIn(props: SignInProps) {
|
|
|
62
62
|
<img className="sc-sign-in-wordmark" src={props.brand.wordmark} alt="" />
|
|
63
63
|
)}
|
|
64
64
|
<h1 className="sc-sign-in-title">{props.title}</h1>
|
|
65
|
-
<p className="sc-
|
|
65
|
+
<p className="sc-muted">{words.lead}</p>
|
|
66
66
|
{props.failure !== undefined && (
|
|
67
67
|
<Callout tone={props.failure === "refused" ? "warning" : "info"}>
|
|
68
68
|
{words.failure[props.failure]}
|
|
@@ -100,7 +100,7 @@ export function SignIn(props: SignInProps) {
|
|
|
100
100
|
)}
|
|
101
101
|
</a>
|
|
102
102
|
{provider.admits !== undefined && (
|
|
103
|
-
<p className="sc-sign-in-admits">{admitsOf(provider.admits)}</p>
|
|
103
|
+
<p className="sc-sign-in-admits sc-fine">{admitsOf(provider.admits)}</p>
|
|
104
104
|
)}
|
|
105
105
|
</div>
|
|
106
106
|
);
|
|
@@ -81,7 +81,7 @@ export function SkillList(props: SkillListProps) {
|
|
|
81
81
|
{where}
|
|
82
82
|
<ul className="sc-skills" aria-label={words.list}>
|
|
83
83
|
{skills.items.map((skill) => (
|
|
84
|
-
<li key={skill.path} className="sc-skill">
|
|
84
|
+
<li key={skill.path} className="sc-sheet sc-sheet-large sc-sheet-raised sc-skill">
|
|
85
85
|
<p className="sc-skill-head">
|
|
86
86
|
{skill.page === null ? (
|
|
87
87
|
<span className="sc-skill-name">{skill.name}</span>
|
|
@@ -97,8 +97,10 @@ export function SkillList(props: SkillListProps) {
|
|
|
97
97
|
)}
|
|
98
98
|
<span className="sc-muted">{skill.directory === "" ? "/" : skill.directory}</span>
|
|
99
99
|
</p>
|
|
100
|
-
<p className="sc-skill-description">{skill.description}</p>
|
|
101
|
-
{skill.uri !== null &&
|
|
100
|
+
<p className="sc-skill-description sc-note">{skill.description}</p>
|
|
101
|
+
{skill.uri !== null && (
|
|
102
|
+
<code className="sc-divider sc-fine-faint sc-skill-uri">{skill.uri}</code>
|
|
103
|
+
)}
|
|
102
104
|
</li>
|
|
103
105
|
))}
|
|
104
106
|
</ul>
|
|
@@ -23,6 +23,7 @@ import { DecisionForm } from "./decision-form.js";
|
|
|
23
23
|
import type { DecisionAddressing } from "./decision-list.js";
|
|
24
24
|
import { EventFeed } from "./event-feed.js";
|
|
25
25
|
import { Markdown } from "./markdown.js";
|
|
26
|
+
import { TaskBell, type TaskBellProps } from "./notifications.js";
|
|
26
27
|
import { type GoalSearch, TaskForm, type TaskSearch } from "./task-form.js";
|
|
27
28
|
import {
|
|
28
29
|
Badge,
|
|
@@ -100,6 +101,11 @@ export interface TaskViewProps {
|
|
|
100
101
|
readonly onRestore?: ((task: RestTask) => void) | undefined;
|
|
101
102
|
/** Called with a word for the discussion, and the files put in it. Left out, nothing can be said here. */
|
|
102
103
|
readonly onComment?: ((draft: CommentDraft) => void) | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* What the reader is told of this task (ADR-0157), and the way to change it: everything, as
|
|
106
|
+
* their settings say, or nothing. Left out, it is not offered: a console that keeps none.
|
|
107
|
+
*/
|
|
108
|
+
readonly follow?: TaskBellProps | undefined;
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
export function TaskView(props: TaskViewProps) {
|
|
@@ -169,14 +175,19 @@ export function TaskView(props: TaskViewProps) {
|
|
|
169
175
|
)}
|
|
170
176
|
</div>
|
|
171
177
|
</div>
|
|
172
|
-
{props.formHref !== undefined && (
|
|
178
|
+
{(props.formHref !== undefined || props.follow !== undefined) && (
|
|
173
179
|
<div className="sc-task-actions">
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
{props.follow !== undefined && <TaskBell {...props.follow} />}
|
|
181
|
+
{props.formHref !== undefined && (
|
|
182
|
+
<>
|
|
183
|
+
<a className="sc-button sc-button-secondary" href={props.formHref("edit")}>
|
|
184
|
+
{words.common.edit}
|
|
185
|
+
</a>
|
|
186
|
+
<a className="sc-button sc-button-secondary" href={props.formHref("ask")}>
|
|
187
|
+
{words.task.raiseDecision}
|
|
188
|
+
</a>
|
|
189
|
+
</>
|
|
190
|
+
)}
|
|
180
191
|
{props.onArchive !== undefined && task.archivedAt === null && (
|
|
181
192
|
<Button
|
|
182
193
|
variant="secondary"
|
|
@@ -65,9 +65,9 @@ export function TokenList(props: TokenListProps) {
|
|
|
65
65
|
return (
|
|
66
66
|
<ul className="sc-token-list" aria-label={words.list}>
|
|
67
67
|
{props.tokens.map((token) => (
|
|
68
|
-
<li key={token.id} className="sc-token">
|
|
68
|
+
<li key={token.id} className="sc-sheet sc-sheet-large sc-sheet-raised sc-token">
|
|
69
69
|
<div>
|
|
70
|
-
<p className="sc-
|
|
70
|
+
<p className="sc-name">{token.name}</p>
|
|
71
71
|
<p className="sc-token-meta">
|
|
72
72
|
<span>
|
|
73
73
|
{words.connected} <Time iso={token.createdAt} />
|
package/src/components/ui.tsx
CHANGED
|
@@ -528,6 +528,62 @@ export function ProgressBar(props: {
|
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
+
/** The least share a meter draws, in hundredths of its track: about the bar's own height in a card. */
|
|
532
|
+
const METER_LEAST = 3;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* How much is used of something that runs out: its name, a quiet note after it, the share as a
|
|
536
|
+
* figure, and a round bar of that share on its track. The tone is what the share means: none
|
|
537
|
+
* while there is room, `warning` near the end, `danger` at it. A share nobody said is the row
|
|
538
|
+
* without its bar. The bar is a picture of what the row says in words, the name and the figure,
|
|
539
|
+
* and is told to nobody a second time.
|
|
540
|
+
*/
|
|
541
|
+
export function Meter(props: {
|
|
542
|
+
readonly label: ReactNode;
|
|
543
|
+
/** The share used, from 0 to 1; left out where it is not known. */
|
|
544
|
+
readonly share?: number | undefined;
|
|
545
|
+
/** What stands at the row's end: the share as people read it, or a word in its place. */
|
|
546
|
+
readonly figure?: ReactNode;
|
|
547
|
+
/** What stands after the name, quiet: when it resets, say. */
|
|
548
|
+
readonly note?: ReactNode;
|
|
549
|
+
readonly tone?: "warning" | "danger" | undefined;
|
|
550
|
+
}) {
|
|
551
|
+
const share =
|
|
552
|
+
props.share === undefined || Number.isNaN(props.share)
|
|
553
|
+
? undefined
|
|
554
|
+
: Math.min(1, Math.max(0, props.share));
|
|
555
|
+
return (
|
|
556
|
+
<div
|
|
557
|
+
className={cx(
|
|
558
|
+
"sc-progress",
|
|
559
|
+
props.tone === "warning" && "sc-progress-near",
|
|
560
|
+
props.tone === "danger" && "sc-progress-full",
|
|
561
|
+
)}
|
|
562
|
+
>
|
|
563
|
+
<div className="sc-progress-head">
|
|
564
|
+
<span className="sc-progress-label">{props.label}</span>
|
|
565
|
+
{props.note !== undefined && <span className="sc-progress-note">{props.note}</span>}
|
|
566
|
+
{props.figure !== undefined && <span className="sc-progress-figure">{props.figure}</span>}
|
|
567
|
+
</div>
|
|
568
|
+
{share !== undefined && (
|
|
569
|
+
// Drawn as the bars of a chart are: a shape as long as the share, which takes its
|
|
570
|
+
// length as its own and needs no style set on it.
|
|
571
|
+
<svg className="sc-progress-track" aria-hidden="true" focusable="false">
|
|
572
|
+
{/* A share of nothing is not drawn: the track alone says it. A sliver is drawn as
|
|
573
|
+
long as the bar is high, so that it is round and seen. */}
|
|
574
|
+
{share > 0 && (
|
|
575
|
+
<rect
|
|
576
|
+
className="sc-progress-used"
|
|
577
|
+
width={`${Math.max(share * 100, METER_LEAST)}%`}
|
|
578
|
+
height="100%"
|
|
579
|
+
/>
|
|
580
|
+
)}
|
|
581
|
+
</svg>
|
|
582
|
+
)}
|
|
583
|
+
</div>
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
|
|
531
587
|
/** A day as people read one, in the language of the page. */
|
|
532
588
|
export function Day(props: { readonly day: string }) {
|
|
533
589
|
const { tag } = useLanguage();
|
|
@@ -593,29 +649,38 @@ export function formatBytes(size: number): string {
|
|
|
593
649
|
return `${mb < 10 ? mb.toFixed(1) : Math.round(mb)} MB`;
|
|
594
650
|
}
|
|
595
651
|
|
|
652
|
+
/** For how long a day of the week names one day: six days, so that today's is never another week's. */
|
|
653
|
+
const WEEKDAY_READS_FOR_MS = 6 * 24 * 60 * 60 * 1000;
|
|
654
|
+
|
|
596
655
|
export function Time(props: {
|
|
597
656
|
readonly iso: string;
|
|
598
657
|
/**
|
|
599
658
|
* `day` shows the day alone, with the moment as the title, where a row has no room for the hour;
|
|
600
659
|
* `clock` the hour alone for a moment of today and the day with the hour for another, with the
|
|
601
|
-
* whole moment as the title, where moments follow one another down a log
|
|
660
|
+
* whole moment as the title, where moments follow one another down a log; `week` as `clock`,
|
|
661
|
+
* but the day of the week with the hour for a moment within six days either way, where what
|
|
662
|
+
* is read is how soon.
|
|
602
663
|
*/
|
|
603
|
-
readonly precision?: "minute" | "day" | "clock";
|
|
664
|
+
readonly precision?: "minute" | "day" | "clock" | "week";
|
|
604
665
|
/** For `clock`: the moment whose day the hour alone is read against; now, where none is given. */
|
|
605
666
|
readonly against?: string | undefined;
|
|
606
667
|
}) {
|
|
607
668
|
const { tag } = useLanguage();
|
|
608
669
|
const full = formatInstant(props.iso, tag);
|
|
609
|
-
if (props.precision === "clock") {
|
|
670
|
+
if (props.precision === "clock" || props.precision === "week") {
|
|
610
671
|
const date = new Date(props.iso);
|
|
611
672
|
if (Number.isNaN(date.getTime())) {
|
|
612
673
|
return <time className="sc-time">{props.iso}</time>;
|
|
613
674
|
}
|
|
675
|
+
const against = props.against === undefined ? new Date() : new Date(props.against);
|
|
614
676
|
const shown = date.toLocaleString(
|
|
615
677
|
tag,
|
|
616
|
-
dayOf(date) === dayOf(
|
|
678
|
+
dayOf(date) === dayOf(against)
|
|
617
679
|
? { hour: "numeric", minute: "2-digit" }
|
|
618
|
-
:
|
|
680
|
+
: props.precision === "week" &&
|
|
681
|
+
Math.abs(date.getTime() - against.getTime()) < WEEKDAY_READS_FOR_MS
|
|
682
|
+
? { weekday: "short", hour: "numeric", minute: "2-digit" }
|
|
683
|
+
: { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" },
|
|
619
684
|
);
|
|
620
685
|
return (
|
|
621
686
|
<time className="sc-time" dateTime={props.iso} title={full}>
|
package/src/components/work.tsx
CHANGED
|
@@ -103,7 +103,7 @@ export function WorkList(props: WorkListProps) {
|
|
|
103
103
|
) : (
|
|
104
104
|
<ol className="sc-decision-log">
|
|
105
105
|
{decisions.map(({ project, decision }) => (
|
|
106
|
-
<li key={decision.id} className="sc-decision-row">
|
|
106
|
+
<li key={decision.id} className="sc-sheet sc-small sc-decision-row">
|
|
107
107
|
<a
|
|
108
108
|
className="sc-decision-row-question"
|
|
109
109
|
href={props.decisionHref(project.key, decision.id)}
|
|
@@ -113,7 +113,7 @@ export function WorkList(props: WorkListProps) {
|
|
|
113
113
|
<span className="sc-task-row-project">
|
|
114
114
|
<ProjectMark project={project} size="sm" /> {work.inProject(project.name)}
|
|
115
115
|
</span>
|
|
116
|
-
<span className="sc-decision-row-meta">
|
|
116
|
+
<span className="sc-decision-row-meta sc-muted">
|
|
117
117
|
<PersonChip person={decision.raisedBy} /> <Time iso={decision.createdAt} />
|
|
118
118
|
</span>
|
|
119
119
|
</li>
|