@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
package/dist/console.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,aAAa,EAalB,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,aAAa,EAalB,KAAK,MAAM,EAMX,KAAK,WAAW,EAkBjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;A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/dist/console.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { StrictMode, useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { AgentPage, AgentsNeedingYou } from "./agent-page.js";
|
|
5
|
-
import { ApiError, createClient, OPEN_TASK_STATES, PROJECT_RULES_TEMPLATE, RULES_PATH, RULES_TITLE, } from "./api.js";
|
|
5
|
+
import { ApiError, createClient, OPEN_TASK_STATES, PROJECT_RULES_TEMPLATE, RULES_PATH, RULES_TITLE, unseenSince, } from "./api.js";
|
|
6
6
|
import { AVATAR_SETS } from "./avatar.js";
|
|
7
7
|
import { AgentAccountForm, AgentAccountList, agentAccountGroups, } from "./components/agents.js";
|
|
8
8
|
import { Board, BoardFilters, byDue, filterTasks } from "./components/board.js";
|
|
@@ -16,6 +16,7 @@ import { EventFeed } from "./components/event-feed.js";
|
|
|
16
16
|
import { GoalForm, GoalList, GoalView, goalMonth } from "./components/goals.js";
|
|
17
17
|
import { HomeGrid } from "./components/home.js";
|
|
18
18
|
import { MyDecisions, ReachedDecision } from "./components/my-decisions.js";
|
|
19
|
+
import { NotificationSettings, NotificationsMenu } from "./components/notifications.js";
|
|
19
20
|
import { PackTokenWays } from "./components/pack-token.js";
|
|
20
21
|
import { PAGE_SIZE } from "./components/paged.js";
|
|
21
22
|
import { ListingForm, PeopleList, supervisedBy, TeamForm, TeamList, } from "./components/people.js";
|
|
@@ -443,6 +444,26 @@ function TaskPage(props) {
|
|
|
443
444
|
(fetched !== undefined && (fetched.id === route.id || fetched.number === route.number)
|
|
444
445
|
? fetched
|
|
445
446
|
: undefined);
|
|
447
|
+
// What the reader is told of this task (ADR-0157): read with it, and not offered where the
|
|
448
|
+
// console keeps none, an older one.
|
|
449
|
+
const { taskFollow, followTask } = data.actions;
|
|
450
|
+
const [follow, setFollow] = useState(undefined);
|
|
451
|
+
const followed = task?.id;
|
|
452
|
+
useEffect(() => {
|
|
453
|
+
setFollow(undefined);
|
|
454
|
+
if (followed === undefined) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
const controller = new AbortController();
|
|
458
|
+
taskFollow(followed, controller.signal)
|
|
459
|
+
.then((found) => {
|
|
460
|
+
if (!controller.signal.aborted) {
|
|
461
|
+
setFollow(found);
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
.catch(() => undefined);
|
|
465
|
+
return () => controller.abort();
|
|
466
|
+
}, [followed, taskFollow]);
|
|
446
467
|
// The task this one is part of: among the board's, or asked for by itself when it was put away.
|
|
447
468
|
const parentId = task?.parentId ?? null;
|
|
448
469
|
const parentOnBoard = parentId === null ? undefined : data.tasks.find((candidate) => candidate.id === parentId);
|
|
@@ -515,7 +536,15 @@ function TaskPage(props) {
|
|
|
515
536
|
people: data.members.map((member) => member.person),
|
|
516
537
|
me: data.me?.person ?? undefined,
|
|
517
538
|
onAddress: (decision, deciders) => void act(() => data.actions.addressDecision(decision.id, deciders.map((person) => person.id))),
|
|
518
|
-
}, onAbandonRun: (run) => void act(() => data.actions.abandonRun(run.id)),
|
|
539
|
+
}, onAbandonRun: (run) => void act(() => data.actions.abandonRun(run.id)), follow: follow === undefined
|
|
540
|
+
? undefined
|
|
541
|
+
: {
|
|
542
|
+
on: follow.on,
|
|
543
|
+
busy,
|
|
544
|
+
onChange: (on) => void act(async () => {
|
|
545
|
+
setFollow(await followTask(task.id, on));
|
|
546
|
+
}),
|
|
547
|
+
}, onArchive: (target) => void act(async () => {
|
|
519
548
|
await data.actions.archiveTask(target.id);
|
|
520
549
|
navigation.go(projectHref(key, "archive"));
|
|
521
550
|
}), onRestore: (target) => void act(async () => {
|
|
@@ -763,14 +792,14 @@ function ProjectSettingsPage(props) {
|
|
|
763
792
|
: undefined, busy: busy }))] }), _jsxs("section", { className: "sc-panel", "aria-label": words.rules.workspaceRules, children: [_jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: words.rules.workspaceRules }), _jsx("a", { className: "sc-muted", href: settingsHref(), children: words.rules.onWorkspaceSettings })] }), rules !== undefined && _jsx(RulesView, { rules: rules.workspace, scope: "workspace", folded: true })] })] }));
|
|
764
793
|
}
|
|
765
794
|
/**
|
|
766
|
-
* The views of the settings: the workspace's, read by everyone
|
|
767
|
-
*
|
|
768
|
-
* name.
|
|
795
|
+
* The views of the settings: the workspace's, read by everyone; what the person chose to be
|
|
796
|
+
* told of (ADR-0157), their own; and the browsers the person is signed in on (board #309),
|
|
797
|
+
* which a console that holds a token does not offer, and so does not name.
|
|
769
798
|
*/
|
|
770
799
|
function SettingsViews(props) {
|
|
771
800
|
const settings = useWords().settings;
|
|
772
801
|
const views = settings.views;
|
|
773
|
-
return (_jsxs("nav", { className: "sc-subtabs sc-settings-views", "aria-label": views.aria, children: [_jsx("a", { className: cx("sc-tab", props.on === "workspace" && "sc-tab-current"), href: PATHS.settings, "aria-current": props.on === "workspace" ? "page" : undefined, children: views.workspace }), _jsx("a", { className: cx("sc-tab", props.on === "sessions" && "sc-tab-current"), href: PATHS.sessions, "aria-current": props.on === "sessions" ? "page" : undefined, children: views.sessions }), _jsx("a", { className: cx("sc-tab", props.on === "categories" && "sc-tab-current"), href: PATHS.categories, "aria-current": props.on === "categories" ? "page" : undefined, children: settings.categories })] }));
|
|
802
|
+
return (_jsxs("nav", { className: "sc-subtabs sc-settings-views", "aria-label": views.aria, children: [_jsx("a", { className: cx("sc-tab", props.on === "workspace" && "sc-tab-current"), href: PATHS.settings, "aria-current": props.on === "workspace" ? "page" : undefined, children: views.workspace }), props.told && (_jsx("a", { className: cx("sc-tab", props.on === "notifications" && "sc-tab-current"), href: PATHS.notificationSettings, "aria-current": props.on === "notifications" ? "page" : undefined, children: views.notifications })), _jsx("a", { className: cx("sc-tab", props.on === "sessions" && "sc-tab-current"), href: PATHS.sessions, "aria-current": props.on === "sessions" ? "page" : undefined, children: views.sessions }), _jsx("a", { className: cx("sc-tab", props.on === "categories" && "sc-tab-current"), href: PATHS.categories, "aria-current": props.on === "categories" ? "page" : undefined, children: settings.categories })] }));
|
|
774
803
|
}
|
|
775
804
|
/**
|
|
776
805
|
* The browsers whoever is signed in is signed in on (board #309): read when the page opens, and
|
|
@@ -798,7 +827,7 @@ function SessionsPage(props) {
|
|
|
798
827
|
});
|
|
799
828
|
return () => controller.abort();
|
|
800
829
|
}, [read, words]);
|
|
801
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.settings.title }) }), _jsx(SettingsViews, { on: "sessions" }), (error ?? failure) !== undefined && _jsx(Callout, { tone: "danger", children: error ?? failure }), sessions === undefined ? (failure === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: words.sessions.loading }) }))) : (_jsx(components.SessionList, { sessions: sessions.items, idleDays: sessions.idleDays, busy: busy, onEnd: (session) => void act(async () => {
|
|
830
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.settings.title }) }), _jsx(SettingsViews, { on: "sessions", told: keepsNotifications(data) }), (error ?? failure) !== undefined && _jsx(Callout, { tone: "danger", children: error ?? failure }), sessions === undefined ? (failure === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: words.sessions.loading }) }))) : (_jsx(components.SessionList, { sessions: sessions.items, idleDays: sessions.idleDays, busy: busy, onEnd: (session) => void act(async () => {
|
|
802
831
|
// Read again whether it went or not: one ended from elsewhere, or whose time
|
|
803
832
|
// ended, is not found, and its row goes all the same.
|
|
804
833
|
try {
|
|
@@ -889,7 +918,7 @@ function WorkspaceSettingsPage(props) {
|
|
|
889
918
|
navigation.replace(PATHS.settings);
|
|
890
919
|
}), onCancel: () => navigation.back(PATHS.settings) })] })] }));
|
|
891
920
|
}
|
|
892
|
-
return (_jsxs(_Fragment, { children: [head, !holdsToken(data) && _jsx(SettingsViews, { on: "workspace" }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), workspace !== undefined && (_jsxs("section", { className: "sc-panel", "aria-label": words.settings.workspace.aria, children: [_jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: words.settings.workspace.title }), administrator && (_jsx("a", { className: "sc-button sc-button-secondary sc-button-sm", href: settingsHref("workspace"), children: words.common.edit }))] }), _jsx(WorkspaceSettingsView, { workspace: workspace, console: data.me?.console })] })), workspace !== undefined && (_jsxs("section", { className: "sc-panel", "aria-label": words.settings.services.aria, children: [_jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: words.settings.services.title }), administrator && (_jsx("a", { className: "sc-button sc-button-secondary sc-button-sm", href: settingsHref("services"), children: words.common.edit }))] }), _jsx("p", { className: "sc-settings-hint", children: words.settings.services.intro }), _jsx(WorkspaceServicesView, { workspace: workspace })] })), _jsxs("section", { className: "sc-panel", "aria-label": words.rules.title, children: [_jsx("h2", { className: "sc-section-title", children: words.rules.title }), rules === undefined ? (_jsx(Spinner, { label: words.rules.loading })) : (_jsx(RulesView, { rules: rules, scope: "workspace", editHref: administrator ? settingsHref("rules") : undefined, onArchive: administrator
|
|
921
|
+
return (_jsxs(_Fragment, { children: [head, !holdsToken(data) && _jsx(SettingsViews, { on: "workspace", told: keepsNotifications(data) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), workspace !== undefined && (_jsxs("section", { className: "sc-panel", "aria-label": words.settings.workspace.aria, children: [_jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: words.settings.workspace.title }), administrator && (_jsx("a", { className: "sc-button sc-button-secondary sc-button-sm", href: settingsHref("workspace"), children: words.common.edit }))] }), _jsx(WorkspaceSettingsView, { workspace: workspace, console: data.me?.console })] })), workspace !== undefined && (_jsxs("section", { className: "sc-panel", "aria-label": words.settings.services.aria, children: [_jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: words.settings.services.title }), administrator && (_jsx("a", { className: "sc-button sc-button-secondary sc-button-sm", href: settingsHref("services"), children: words.common.edit }))] }), _jsx("p", { className: "sc-settings-hint", children: words.settings.services.intro }), _jsx(WorkspaceServicesView, { workspace: workspace })] })), _jsxs("section", { className: "sc-panel", "aria-label": words.rules.title, children: [_jsx("h2", { className: "sc-section-title", children: words.rules.title }), rules === undefined ? (_jsx(Spinner, { label: words.rules.loading })) : (_jsx(RulesView, { rules: rules, scope: "workspace", editHref: administrator ? settingsHref("rules") : undefined, onArchive: administrator
|
|
893
922
|
? () => void act(async () => {
|
|
894
923
|
setRules(await data.actions.archiveRules());
|
|
895
924
|
})
|
|
@@ -1009,11 +1038,11 @@ function PlatePage(props) {
|
|
|
1009
1038
|
setForbidden(true);
|
|
1010
1039
|
}
|
|
1011
1040
|
else {
|
|
1012
|
-
setProblem(errorWords(failure, couldNotLoad));
|
|
1041
|
+
setProblem(errorWords(failure, couldNotLoad, words));
|
|
1013
1042
|
}
|
|
1014
1043
|
});
|
|
1015
1044
|
return () => controller.abort();
|
|
1016
|
-
}, [load, couldNotLoad, refused, remember, early]);
|
|
1045
|
+
}, [load, couldNotLoad, refused, remember, early, words]);
|
|
1017
1046
|
return (_jsxs(_Fragment, { children: [props.headless !== true && (_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: props.title }), props.lead !== undefined && _jsx("p", { className: "sc-page-lead", children: props.lead }), props.aside] })), props.under, problem !== undefined && _jsx(Callout, { tone: "danger", children: problem }), forbidden && refused !== undefined ? (_jsx(EmptyState, { title: refused.title, body: refused.body, action: _jsx(LinkButton, { href: PATHS.work, children: words.nav.work }) })) : plate === undefined ? (problem === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: props.loading }) }))) : plate.tasks.length === 0 &&
|
|
1018
1047
|
(plate.closed?.length ?? 0) === 0 &&
|
|
1019
1048
|
(plate.decisions?.length ?? 0) === 0 ? (_jsx(EmptyState, { title: props.empty.title, body: props.empty.body })) : (_jsx(components.WorkList, { work: plate, week: props.week, weekStart: props.weekStart, taskHref: (projectKey, task) => taskHref(projectKey, task.number), decisionHref: (projectKey, decisionId) => decisionHref(projectKey, decisionId), weekHref: props.weekHref }))] }));
|
|
@@ -1066,6 +1095,7 @@ const MY_DECISIONS_PAGE = 50;
|
|
|
1066
1095
|
function useMyDecisions(myDecisions, raised, couldNotLoad,
|
|
1067
1096
|
/** What the first page is remembered by, with whose it is. */
|
|
1068
1097
|
remember) {
|
|
1098
|
+
const words = useWords();
|
|
1069
1099
|
const [items, setItems] = useState(() => rememberedAs(remember)?.items);
|
|
1070
1100
|
const [more, setMore] = useState(() => rememberedAs(remember)?.more ?? false);
|
|
1071
1101
|
const [busy, setBusy] = useState(false);
|
|
@@ -1090,7 +1120,7 @@ remember) {
|
|
|
1090
1120
|
}
|
|
1091
1121
|
catch (failure) {
|
|
1092
1122
|
if (signal?.aborted !== true) {
|
|
1093
|
-
setProblem(errorWords(failure, couldNotLoad));
|
|
1123
|
+
setProblem(errorWords(failure, couldNotLoad, words));
|
|
1094
1124
|
}
|
|
1095
1125
|
}
|
|
1096
1126
|
finally {
|
|
@@ -1098,7 +1128,7 @@ remember) {
|
|
|
1098
1128
|
setBusy(false);
|
|
1099
1129
|
}
|
|
1100
1130
|
}
|
|
1101
|
-
}, [myDecisions, raised, couldNotLoad, remember]);
|
|
1131
|
+
}, [myDecisions, raised, couldNotLoad, remember, words]);
|
|
1102
1132
|
useEffect(() => {
|
|
1103
1133
|
const controller = new AbortController();
|
|
1104
1134
|
const kept = rememberedAs(remember);
|
|
@@ -1112,6 +1142,121 @@ remember) {
|
|
|
1112
1142
|
const reload = useCallback(() => void read(0), [read]);
|
|
1113
1143
|
return { items, more, busy, problem, readMore, reload };
|
|
1114
1144
|
}
|
|
1145
|
+
/** How many notifications the list under the bell reads at a time. */
|
|
1146
|
+
const NOTIFICATIONS_READ = 20;
|
|
1147
|
+
/** Whether the console keeps what a member is told of (ADR-0157): an older one answers none of it. */
|
|
1148
|
+
const keepsNotifications = (data) => data.me?.notifications !== undefined && data.me.notifications !== null;
|
|
1149
|
+
/**
|
|
1150
|
+
* The bell in the page's head (ADR-0157): the person's notifications open under it, the
|
|
1151
|
+
* newest first. Opening the list reads all of it at one moment, so that the mark on the bell
|
|
1152
|
+
* goes; what was read at that moment is shown as new this once, and as seen from the next
|
|
1153
|
+
* opening on.
|
|
1154
|
+
*/
|
|
1155
|
+
function NotificationsBell(props) {
|
|
1156
|
+
const words = useWords();
|
|
1157
|
+
const said = words.notifications;
|
|
1158
|
+
const { data } = props;
|
|
1159
|
+
const { notifications, readNotifications } = data.actions;
|
|
1160
|
+
const [items, setItems] = useState(undefined);
|
|
1161
|
+
const [more, setMore] = useState(false);
|
|
1162
|
+
const [since, setSince] = useState(undefined);
|
|
1163
|
+
const [problem, setProblem] = useState(undefined);
|
|
1164
|
+
// The opening whose answer is shown: one that answers after a later one began is let go.
|
|
1165
|
+
const turn = useRef(0);
|
|
1166
|
+
// The moment an opening read something at whose rows were never shown (`unseenSince`).
|
|
1167
|
+
const unseen = useRef(undefined);
|
|
1168
|
+
const open = useCallback(async () => {
|
|
1169
|
+
turn.current += 1;
|
|
1170
|
+
const mine = turn.current;
|
|
1171
|
+
setProblem(undefined);
|
|
1172
|
+
try {
|
|
1173
|
+
// Read first, then listed: what the list answers as read at that moment is what was
|
|
1174
|
+
// new, and one that arrives between the two is not read yet, and new all the same.
|
|
1175
|
+
const read = await readNotifications({ all: true });
|
|
1176
|
+
unseen.current = unseenSince(unseen.current, read);
|
|
1177
|
+
const page = await notifications({ limit: NOTIFICATIONS_READ, offset: 0 });
|
|
1178
|
+
if (mine !== turn.current) {
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
setSince(unseen.current ?? read.at);
|
|
1182
|
+
unseen.current = undefined;
|
|
1183
|
+
setItems(page.items);
|
|
1184
|
+
setMore(page.more);
|
|
1185
|
+
}
|
|
1186
|
+
catch (failure) {
|
|
1187
|
+
if (mine === turn.current) {
|
|
1188
|
+
setProblem(errorWords(failure, said.couldNotLoad, words));
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}, [notifications, readNotifications, said.couldNotLoad, words]);
|
|
1192
|
+
const readMore = useCallback(async () => {
|
|
1193
|
+
const mine = turn.current;
|
|
1194
|
+
try {
|
|
1195
|
+
const page = await notifications({ limit: NOTIFICATIONS_READ, offset: items?.length ?? 0 });
|
|
1196
|
+
if (mine !== turn.current) {
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
// A list that moved between two reads, by what arrived meanwhile, answers a row a second
|
|
1200
|
+
// time: each is shown once.
|
|
1201
|
+
setItems((before) => {
|
|
1202
|
+
const shown = new Set((before ?? []).map((one) => one.id));
|
|
1203
|
+
return [...(before ?? []), ...page.items.filter((one) => !shown.has(one.id))];
|
|
1204
|
+
});
|
|
1205
|
+
setMore(page.more);
|
|
1206
|
+
}
|
|
1207
|
+
catch {
|
|
1208
|
+
// The rows that are shown stay: more is still offered, and asked for again by a press.
|
|
1209
|
+
}
|
|
1210
|
+
}, [notifications, items]);
|
|
1211
|
+
const visible = (key) => data.projects.some((project) => project.key === key);
|
|
1212
|
+
/** Where what a notification is of is read: the task, the decision, the agent account. */
|
|
1213
|
+
const hrefOf = (notification) => {
|
|
1214
|
+
const { event, project } = notification;
|
|
1215
|
+
if (event.decisionId !== null) {
|
|
1216
|
+
return project !== null && visible(project.key)
|
|
1217
|
+
? decisionHref(project.key, event.decisionId)
|
|
1218
|
+
: myDecisionHref(event.decisionId);
|
|
1219
|
+
}
|
|
1220
|
+
if (project !== null && event.data.number !== undefined) {
|
|
1221
|
+
return visible(project.key) ? taskHref(project.key, event.data.number) : undefined;
|
|
1222
|
+
}
|
|
1223
|
+
return event.data.handle === undefined ? undefined : agentHref(event.data.handle);
|
|
1224
|
+
};
|
|
1225
|
+
return (_jsx(NotificationsMenu, { unread: data.me?.notifications?.unread ?? 0, notifications: items, since: since, problem: problem, href: hrefOf, settingsHref: PATHS.notificationSettings, more: more, onMore: () => void readMore(), onOpen: () => void open(), onNavigate: props.onNavigate }));
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* What the person chose to be told of (ADR-0157): a view of the settings, their own. Each
|
|
1229
|
+
* choice is kept as it is made.
|
|
1230
|
+
*/
|
|
1231
|
+
function NotificationSettingsPage(props) {
|
|
1232
|
+
const words = useWords();
|
|
1233
|
+
const said = words.notifications;
|
|
1234
|
+
const { data } = props;
|
|
1235
|
+
const { notificationSettings, updateNotificationSettings } = data.actions;
|
|
1236
|
+
const [settings, setSettings] = useState(undefined);
|
|
1237
|
+
const [problem, setProblem] = useState(undefined);
|
|
1238
|
+
const { busy, error, act } = useAction();
|
|
1239
|
+
useEffect(() => {
|
|
1240
|
+
const controller = new AbortController();
|
|
1241
|
+
setProblem(undefined);
|
|
1242
|
+
notificationSettings(controller.signal)
|
|
1243
|
+
.then((found) => {
|
|
1244
|
+
if (!controller.signal.aborted) {
|
|
1245
|
+
setSettings(found);
|
|
1246
|
+
}
|
|
1247
|
+
})
|
|
1248
|
+
.catch((failure) => {
|
|
1249
|
+
if (!controller.signal.aborted) {
|
|
1250
|
+
setProblem(errorWords(failure, said.couldNotLoad, words));
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
return () => controller.abort();
|
|
1254
|
+
}, [notificationSettings, said.couldNotLoad, words]);
|
|
1255
|
+
const shownProblem = problem ?? error;
|
|
1256
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.settings.title }) }), !holdsToken(data) && _jsx(SettingsViews, { on: "notifications", told: true }), shownProblem !== undefined && _jsx(Callout, { tone: "danger", children: shownProblem }), settings === undefined ? (shownProblem === undefined && (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: said.loading }) }))) : (_jsx("section", { className: "sc-panel", "aria-label": said.settings.title, children: _jsx(NotificationSettings, { settings: settings, projects: data.projects.map((project) => ({ key: project.key, name: project.name })), agent: data.me?.person?.kind === "agent", busy: busy, onChange: (input) => void act(async () => {
|
|
1257
|
+
setSettings(await updateNotificationSettings(input));
|
|
1258
|
+
}) }) }))] }));
|
|
1259
|
+
}
|
|
1115
1260
|
/**
|
|
1116
1261
|
* A person's decisions (ADR-0042), laid out as a project's decisions page is: those waiting for
|
|
1117
1262
|
* their answer, answered here, those they asked of others, and the record of both.
|
|
@@ -1144,10 +1289,36 @@ function MyDecisionsPage(props) {
|
|
|
1144
1289
|
}),
|
|
1145
1290
|
}), busy: busy || addressed.busy || raised.busy }))] }));
|
|
1146
1291
|
}
|
|
1292
|
+
/** How often the agents are read again while a page that says how they stand is in view. */
|
|
1293
|
+
const AGENTS_AGAIN_MS = 30_000;
|
|
1294
|
+
/**
|
|
1295
|
+
* Keeps the agent accounts as they stand while a page shows them, how each stands and what its
|
|
1296
|
+
* allowance has used (ADR-0156): read again as the page is opened, every half a minute while its
|
|
1297
|
+
* window is in view, as often as a runner says how it stands, and when the person comes back to
|
|
1298
|
+
* it. A window nobody looks at asks nothing.
|
|
1299
|
+
*/
|
|
1300
|
+
function AgentsKept(props) {
|
|
1301
|
+
const { refreshAgents } = props.data.actions;
|
|
1302
|
+
useEffect(() => {
|
|
1303
|
+
const again = () => {
|
|
1304
|
+
if (document.visibilityState === "visible") {
|
|
1305
|
+
refreshAgents().catch(() => undefined);
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
again();
|
|
1309
|
+
const timer = setInterval(again, AGENTS_AGAIN_MS);
|
|
1310
|
+
document.addEventListener("visibilitychange", again);
|
|
1311
|
+
return () => {
|
|
1312
|
+
clearInterval(timer);
|
|
1313
|
+
document.removeEventListener("visibilitychange", again);
|
|
1314
|
+
};
|
|
1315
|
+
}, [refreshAgents]);
|
|
1316
|
+
return null;
|
|
1317
|
+
}
|
|
1147
1318
|
function WorkPage(props) {
|
|
1148
1319
|
const words = useWords();
|
|
1149
1320
|
const { plate } = props.data.actions;
|
|
1150
|
-
return (_jsx(PlatePage, { components: props.components, under: _jsx(AgentsNeedingYou, { agents: props.data.agents, me: props.data.me?.person?.id }), load: plate, remember: `work:${props.data.me?.person?.id ?? ""}`, early: "work", title: words.work.title, week: props.week, weekStart: weekStartOf(props.data.me?.workspace), weekHref: workHref, loading: words.work.loading, couldNotLoad: words.work.couldNotLoad, empty: words.work.empty }));
|
|
1321
|
+
return (_jsx(PlatePage, { components: props.components, under: _jsxs(_Fragment, { children: [_jsx(AgentsKept, { data: props.data }), _jsx(AgentsNeedingYou, { agents: props.data.agents, me: props.data.me?.person?.id })] }), load: plate, remember: `work:${props.data.me?.person?.id ?? ""}`, early: "work", title: words.work.title, week: props.week, weekStart: weekStartOf(props.data.me?.workspace), weekHref: workHref, loading: words.work.loading, couldNotLoad: words.work.couldNotLoad, empty: words.work.empty }));
|
|
1151
1322
|
}
|
|
1152
1323
|
/** Another person's plate, for whoever oversees them: an administrator, or an owner of a project they are in. */
|
|
1153
1324
|
function PersonWorkPage(props) {
|
|
@@ -1253,6 +1424,9 @@ function WorkspacePage(props) {
|
|
|
1253
1424
|
if (route.name === "my-decision") {
|
|
1254
1425
|
return _jsx(MyDecisionPage, { id: route.id, data: data });
|
|
1255
1426
|
}
|
|
1427
|
+
if (route.name === "notification-settings") {
|
|
1428
|
+
return _jsx(NotificationSettingsPage, { data: data });
|
|
1429
|
+
}
|
|
1256
1430
|
if (route.name === "person-work") {
|
|
1257
1431
|
return _jsx(PersonWorkPage, { id: route.id, data: data, components: components, week: route.week });
|
|
1258
1432
|
}
|
|
@@ -1266,7 +1440,7 @@ function WorkspacePage(props) {
|
|
|
1266
1440
|
const me = data.me?.person ?? undefined;
|
|
1267
1441
|
const administrator = me?.role === "admin";
|
|
1268
1442
|
const categories = words.categories;
|
|
1269
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.settings.title }) }), !holdsToken(data) && _jsx(SettingsViews, { on: "categories" }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx(components.CategoryList, { categories: data.categories, busy: busy, onAdd: administrator
|
|
1443
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sc-page-head", children: _jsx("h1", { className: "sc-page-title", children: words.settings.title }) }), !holdsToken(data) && _jsx(SettingsViews, { on: "categories", told: keepsNotifications(data) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), _jsx(components.CategoryList, { categories: data.categories, busy: busy, onAdd: administrator
|
|
1270
1444
|
? (input) => void act(() => data.actions.createCategory(input))
|
|
1271
1445
|
: undefined, onChange: administrator
|
|
1272
1446
|
? (category, patch) => void act(() => data.actions.updateCategory(category.key, patch))
|
|
@@ -1369,7 +1543,7 @@ function WorkspacePage(props) {
|
|
|
1369
1543
|
if (view === "connected" && viaToken) {
|
|
1370
1544
|
return _jsx(NothingHere, {});
|
|
1371
1545
|
}
|
|
1372
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: agents.title }), view !== "connected" && administrator && (_jsx(LinkButton, { href: PATHS.newAgent, variant: "primary", children: accounts.add })), view === "connected" && !making && (_jsx(LinkButton, { href: PATHS.newToken, variant: "primary", children: agents.makeByHand }))] }), _jsx("nav", { className: "sc-subtabs sc-agents-views", "aria-label": agents.views.aria, children: views.map((one) => (_jsxs("a", { className: cx("sc-tab", one.view === view && "sc-tab-current"), href: agentsHref(one.view), "aria-current": one.view === view ? "page" : undefined, children: [one.label, _jsx("span", { className: "sc-tab-count", children: one.count })] }, one.view))) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), view !== "connected" ? (_jsxs(_Fragment, { children: [_jsxs("section", { className: "sc-people-group", "aria-label": agents.views.mine, children: [_jsx("p", { className: "sc-lead", children: accounts.intro }), _jsx(components.AgentAccountList, { agents: mine, me: me, busy: busy, href: (agent) => agentHref(agent.person.handle ?? ""), empty: others.length > 0 ? (_jsx("p", { className: "sc-field-hint", children: accounts.mineEmpty.title })) : administrator ? (_jsx(EmptyState, { title: accounts.empty.title, body: accounts.empty.body })) : (_jsx(EmptyState, { title: accounts.mineEmpty.title, body: accounts.mineEmpty.body, action: _jsx(LinkButton, { href: PATHS.people, children: words.nav.people }) })) })] }), others.length > 0 && (_jsxs("section", { className: "sc-people-group", "aria-label": accounts.others, children: [_jsxs("h2", { className: "sc-section-title", children: [accounts.others, _jsx(Badge, { kind: "count", children: others.length })] }), _jsx("p", { className: "sc-lead", children: accounts.othersIntro }), _jsx(components.AgentAccountList, { agents: others, me: me, busy: busy, href: (agent) => agentHref(agent.person.handle ?? "") })] }))] })) : (_jsxs("section", { "aria-label": agents.views.connected, children: [_jsx("p", { className: "sc-lead", children: accounts.yoursIntro }), fresh !== undefined && (_jsx(NewToken, { token: fresh.token, secret: fresh.secret, onDone: () => setFresh(undefined) })), making && (_jsx("section", { className: "sc-panel sc-panel-form sc-panel-form-lead", "aria-label": agents.makeAria, children: _jsx(TokenForm, { daysAtMost: data.me?.workspace.tokenDaysAtMost, busy: busy, onSubmit: (input) => void act(async () => {
|
|
1546
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "sc-page-head", children: [_jsx("h1", { className: "sc-page-title", children: agents.title }), view !== "connected" && administrator && (_jsx(LinkButton, { href: PATHS.newAgent, variant: "primary", children: accounts.add })), view === "connected" && !making && (_jsx(LinkButton, { href: PATHS.newToken, variant: "primary", children: agents.makeByHand }))] }), _jsx("nav", { className: "sc-subtabs sc-agents-views", "aria-label": agents.views.aria, children: views.map((one) => (_jsxs("a", { className: cx("sc-tab", one.view === view && "sc-tab-current"), href: agentsHref(one.view), "aria-current": one.view === view ? "page" : undefined, children: [one.label, _jsx("span", { className: "sc-tab-count", children: one.count })] }, one.view))) }), error !== undefined && _jsx(Callout, { tone: "danger", children: error }), view !== "connected" ? (_jsxs(_Fragment, { children: [_jsx(AgentsKept, { data: data }), _jsxs("section", { className: "sc-people-group", "aria-label": agents.views.mine, children: [_jsx("p", { className: "sc-lead", children: accounts.intro }), _jsx(components.AgentAccountList, { agents: mine, me: me, busy: busy, href: (agent) => agentHref(agent.person.handle ?? ""), empty: others.length > 0 ? (_jsx("p", { className: "sc-field-hint", children: accounts.mineEmpty.title })) : administrator ? (_jsx(EmptyState, { title: accounts.empty.title, body: accounts.empty.body })) : (_jsx(EmptyState, { title: accounts.mineEmpty.title, body: accounts.mineEmpty.body, action: _jsx(LinkButton, { href: PATHS.people, children: words.nav.people }) })) })] }), others.length > 0 && (_jsxs("section", { className: "sc-people-group", "aria-label": accounts.others, children: [_jsxs("h2", { className: "sc-section-title", children: [accounts.others, _jsx(Badge, { kind: "count", children: others.length })] }), _jsx("p", { className: "sc-lead", children: accounts.othersIntro }), _jsx(components.AgentAccountList, { agents: others, me: me, busy: busy, href: (agent) => agentHref(agent.person.handle ?? "") })] }))] })) : (_jsxs("section", { "aria-label": agents.views.connected, children: [_jsx("p", { className: "sc-lead", children: accounts.yoursIntro }), fresh !== undefined && (_jsx(NewToken, { token: fresh.token, secret: fresh.secret, onDone: () => setFresh(undefined) })), making && (_jsx("section", { className: "sc-panel sc-panel-form sc-panel-form-lead", "aria-label": agents.makeAria, children: _jsx(TokenForm, { daysAtMost: data.me?.workspace.tokenDaysAtMost, busy: busy, onSubmit: (input) => void act(async () => {
|
|
1373
1547
|
setFresh(await data.actions.createToken(input));
|
|
1374
1548
|
navigation.replace(agentsHref("connected"));
|
|
1375
1549
|
}), onCancel: () => navigation.back(agentsHref("connected")) }) })), _jsx(components.TokenList, { tokens: data.tokens, busy: busy, consoleVersion: data.me?.console?.version, onRevoke: (token) => void act(() => data.actions.revokeToken(token.id)), empty: _jsx(EmptyState, { title: agents.empty.title, body: agents.empty.body }) }), _jsx(ConnectWords, { origin: origin }), _jsx(DeskWords, { origin: origin })] }))] }));
|
|
@@ -1508,6 +1682,7 @@ export function createConsole(config = {}) {
|
|
|
1508
1682
|
href: PATHS.settings,
|
|
1509
1683
|
label: words.nav.settings,
|
|
1510
1684
|
current: route.name === "workspace-settings" ||
|
|
1685
|
+
route.name === "notification-settings" ||
|
|
1511
1686
|
route.name === "sessions" ||
|
|
1512
1687
|
route.name === "categories" ||
|
|
1513
1688
|
route.name === "plugins-settings",
|
|
@@ -1641,7 +1816,9 @@ export function createConsole(config = {}) {
|
|
|
1641
1816
|
tag: candidate.tag,
|
|
1642
1817
|
label: candidate.label,
|
|
1643
1818
|
current: candidate.tag === pack.tag,
|
|
1644
|
-
})), onLanguage: (tag) => void data.actions.updateMe({ language: tag }).catch(() => undefined), person: data.me.person, live: projectKey === undefined ? undefined : data.live,
|
|
1819
|
+
})), onLanguage: (tag) => void data.actions.updateMe({ language: tag }).catch(() => undefined), person: data.me.person, live: projectKey === undefined ? undefined : data.live, notifications:
|
|
1820
|
+
// Where the console keeps what a member is told of (ADR-0157): an older one answers none.
|
|
1821
|
+
keepsNotifications(data) ? (_jsx(NotificationsBell, { data: data, onNavigate: (href) => navigation.go(href) })) : undefined, wide: route.name === "board" ||
|
|
1645
1822
|
route.name === "calendar" ||
|
|
1646
1823
|
(route.name === "goal" && route.form === undefined) ||
|
|
1647
1824
|
(route.name === "custom" &&
|