@songsid/agend 2.4.0-beta.18 → 2.4.0-beta.19
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/dist/agent-cli-instructions.md +13 -7
- package/dist/agent-cli.js +149 -49
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-export.d.ts +3 -1
- package/dist/agent-export.js +18 -1
- package/dist/agent-export.js.map +1 -1
- package/dist/agent-whats-new.js +9 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/apply-job.d.ts +2 -2
- package/dist/auth-api.js +1 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +0 -6
- package/dist/backend/claude-code.js +23 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-precaution.js +3 -2
- package/dist/backend/codex-precaution.js.map +1 -1
- package/dist/backend/codex.js +1 -1
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-server.js +8 -2
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.d.ts +27 -1
- package/dist/channel/mcp-tools.js +77 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/chat-task-refs.d.ts +61 -0
- package/dist/chat-task-refs.js +112 -0
- package/dist/chat-task-refs.js.map +1 -0
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +6 -2
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-launch.d.ts +6 -0
- package/dist/claude-credential-launch.js +16 -3
- package/dist/claude-credential-launch.js.map +1 -1
- package/dist/claude-credential-runner.js +3 -1
- package/dist/claude-credential-runner.js.map +1 -1
- package/dist/claude-setup-token-transport.js +25 -3
- package/dist/claude-setup-token-transport.js.map +1 -1
- package/dist/cli-audited.js +5 -5
- package/dist/cli-audited.js.map +1 -1
- package/dist/composite-tools.d.ts +11 -0
- package/dist/composite-tools.js +29 -0
- package/dist/composite-tools.js.map +1 -0
- package/dist/config-validator.js +22 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-policy.d.ts +1 -0
- package/dist/contact-auth-policy.js +2 -1
- package/dist/contact-auth-policy.js.map +1 -1
- package/dist/contact-auth-service.js +2 -0
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.js +21 -6
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +2 -0
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/daemon.js +4 -0
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.js +2 -1
- package/dist/darwin-memory.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +1 -8
- package/dist/dashboard-permissions.js +8 -9
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +0 -6
- package/dist/delivery-outbox.js +0 -25
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-outbox.test.js +132 -96
- package/dist/delivery-outbox.test.js.map +1 -1
- package/dist/fleet-manager.d.ts +45 -7
- package/dist/fleet-manager.js +309 -99
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +1 -1
- package/dist/fleet-windows-runtime.js +8 -1
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/fleet-yaml-stringify.d.ts +1 -1
- package/dist/fleet-yaml-stringify.js +64 -11
- package/dist/fleet-yaml-stringify.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +53 -4
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +4 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +21 -1
- package/dist/general-knowledge/skills/hub/SKILL.md +2 -0
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +5 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +3 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -0
- package/dist/general-knowledge/skills/task-board/SKILL.md +63 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +25 -2
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +38 -9
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +4 -0
- package/dist/general-knowledge/steering/core-rules.md +15 -78
- package/dist/general-role-block.d.ts +19 -0
- package/dist/general-role-block.js +56 -0
- package/dist/general-role-block.js.map +1 -0
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/host-memory.d.ts +3 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/host-monitoring/darwin/collector.d.ts +18 -0
- package/dist/host-monitoring/darwin/collector.js +65 -0
- package/dist/host-monitoring/darwin/collector.js.map +1 -0
- package/dist/host-monitoring/darwin/defaults.d.ts +2 -0
- package/dist/host-monitoring/darwin/defaults.js +9 -0
- package/dist/host-monitoring/darwin/defaults.js.map +1 -0
- package/dist/host-monitoring/darwin/interpretation.d.ts +20 -0
- package/dist/host-monitoring/darwin/interpretation.js +73 -0
- package/dist/host-monitoring/darwin/interpretation.js.map +1 -0
- package/dist/host-monitoring/linux/collector.d.ts +17 -0
- package/dist/host-monitoring/linux/collector.js +55 -0
- package/dist/host-monitoring/linux/collector.js.map +1 -0
- package/dist/host-monitoring/linux/defaults.d.ts +2 -0
- package/dist/host-monitoring/linux/defaults.js +9 -0
- package/dist/host-monitoring/linux/defaults.js.map +1 -0
- package/dist/host-monitoring/linux/interpretation.d.ts +22 -0
- package/dist/host-monitoring/linux/interpretation.js +76 -0
- package/dist/host-monitoring/linux/interpretation.js.map +1 -0
- package/dist/host-monitoring/transport.d.ts +42 -0
- package/dist/host-monitoring/transport.js +101 -0
- package/dist/host-monitoring/transport.js.map +1 -0
- package/dist/host-monitoring/wsl/collector.d.ts +19 -0
- package/dist/host-monitoring/wsl/collector.js +72 -0
- package/dist/host-monitoring/wsl/collector.js.map +1 -0
- package/dist/host-monitoring/wsl/defaults.d.ts +2 -0
- package/dist/host-monitoring/wsl/defaults.js +9 -0
- package/dist/host-monitoring/wsl/defaults.js.map +1 -0
- package/dist/host-monitoring/wsl/interpretation.d.ts +22 -0
- package/dist/host-monitoring/wsl/interpretation.js +77 -0
- package/dist/host-monitoring/wsl/interpretation.js.map +1 -0
- package/dist/host-monitoring-alert-policy.d.ts +2 -0
- package/dist/host-monitoring-alert-policy.js +4 -2
- package/dist/host-monitoring-alert-policy.js.map +1 -1
- package/dist/host-monitoring-alert-settings.d.ts +3 -1
- package/dist/host-monitoring-alert-settings.js +7 -2
- package/dist/host-monitoring-alert-settings.js.map +1 -1
- package/dist/host-monitoring-alerts.d.ts +3 -0
- package/dist/host-monitoring-alerts.js +18 -3
- package/dist/host-monitoring-alerts.js.map +1 -1
- package/dist/host-monitoring-defaults.d.ts +19 -0
- package/dist/host-monitoring-defaults.js +10 -0
- package/dist/host-monitoring-defaults.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +18 -70
- package/dist/host-monitoring-platform.js +14 -269
- package/dist/host-monitoring-platform.js.map +1 -1
- package/dist/host-monitoring.d.ts +13 -0
- package/dist/host-monitoring.js.map +1 -1
- package/dist/hub/agent-catalog-model.d.ts +21 -0
- package/dist/hub/agent-catalog-model.js +9 -1
- package/dist/hub/agent-catalog-model.js.map +1 -1
- package/dist/hub/agent-catalog.d.ts +4 -1
- package/dist/hub/agent-catalog.js +11 -0
- package/dist/hub/agent-catalog.js.map +1 -1
- package/dist/hub/catalog.js +12 -0
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +4 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +5 -0
- package/dist/hub/compose/member.js +25 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +2 -0
- package/dist/hub/compose/server.js +4 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/http/compose.d.ts +5 -0
- package/dist/hub/http/compose.js +25 -2
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/deps.d.ts +2 -0
- package/dist/hub/http/schema.js +4 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/lapse-carry.d.ts +45 -0
- package/dist/hub/lapse-carry.js +62 -0
- package/dist/hub/lapse-carry.js.map +1 -0
- package/dist/hub/member/agent-catalog.d.ts +4 -1
- package/dist/hub/member/agent-catalog.js +15 -4
- package/dist/hub/member/agent-catalog.js.map +1 -1
- package/dist/hub/member/agent-intro.d.ts +4 -3
- package/dist/hub/member/agent-intro.js +7 -0
- package/dist/hub/member/agent-intro.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +8 -1
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +34 -6
- package/dist/hub/member/room-post.js +30 -0
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/member/sharing.d.ts +2 -0
- package/dist/hub/member/sharing.js +9 -2
- package/dist/hub/member/sharing.js.map +1 -1
- package/dist/hub/protocol.d.ts +2 -0
- package/dist/hub/room-brief-model.js +2 -1
- package/dist/hub/room-brief-model.js.map +1 -1
- package/dist/hub/rooms/agents.d.ts +2 -0
- package/dist/hub/rooms/agents.js +16 -2
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/office.d.ts +82 -0
- package/dist/hub/rooms/office.js +46 -0
- package/dist/hub/rooms/office.js.map +1 -0
- package/dist/hub/rooms/service.d.ts +66 -1
- package/dist/hub/rooms/service.js +67 -11
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +4 -0
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/server.js +9 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sharing-requests.d.ts +5 -2
- package/dist/hub/sharing-requests.js +19 -4
- package/dist/hub/sharing-requests.js.map +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.js +6 -7
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instruction-file-sizes.d.ts +46 -0
- package/dist/instruction-file-sizes.js +115 -0
- package/dist/instruction-file-sizes.js.map +1 -0
- package/dist/instructions.d.ts +35 -1
- package/dist/instructions.js +59 -33
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +16 -4
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +5 -0
- package/dist/log-steps.js +6 -2
- package/dist/log-steps.js.map +1 -1
- package/dist/memory-guidance.d.ts +5 -0
- package/dist/memory-guidance.js +14 -0
- package/dist/memory-guidance.js.map +1 -0
- package/dist/model-defaults.d.ts +5 -0
- package/dist/model-defaults.js +6 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/native-mcp.d.ts +2 -0
- package/dist/native-mcp.js +16 -6
- package/dist/native-mcp.js.map +1 -1
- package/dist/needs-you-hub.d.ts +2 -0
- package/dist/needs-you-hub.js +6 -1
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +13 -1
- package/dist/needs-you.js +5 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +3 -3
- package/dist/outbound-schemas.d.ts +3 -0
- package/dist/outbound-schemas.js +27 -26
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/quickstart.d.ts +1 -1
- package/dist/quickstart.js +2 -3
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-prompt.d.ts +1 -0
- package/dist/remote-card-prompt.js +1 -1
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/runtime-build-info.js +1 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +5 -5
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-pane-mcp.js +7 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.js +2 -1
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/scheduler/db.js +2 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-mentions.d.ts +32 -0
- package/dist/scheduler/task-board-mentions.js +97 -0
- package/dist/scheduler/task-board-mentions.js.map +1 -0
- package/dist/scheduler/task-board-text.js +3 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +199 -3
- package/dist/scheduler/task-board.js +492 -7
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +3 -1
- package/dist/settings-api.js +23 -4
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +4 -2
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +1 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-instance-patch.js +3 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-host.d.ts +2 -3
- package/dist/setup-host.js +3 -5
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-wizard.js +0 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/shared-default-adoption.d.ts +24 -0
- package/dist/shared-default-adoption.js +73 -0
- package/dist/shared-default-adoption.js.map +1 -0
- package/dist/subagent-records.d.ts +2 -0
- package/dist/subagent-records.js +11 -1
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.d.ts +3 -0
- package/dist/subagent-service.js +24 -4
- package/dist/subagent-service.js.map +1 -1
- package/dist/task-board-tool.d.ts +31 -0
- package/dist/task-board-tool.js +31 -0
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +23 -30
- package/dist/task-board-waker.js +136 -97
- package/dist/task-board-waker.js.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/ui/agent-details-settings.js +2 -2
- package/dist/ui/agent-export-dialog.js +4 -3
- package/dist/ui/agent-export-strings.js +4 -4
- package/dist/ui/agent-page-strings.js +18 -0
- package/dist/ui/chat-activity-groups.js +1 -1
- package/dist/ui/chat-activity.js +17 -0
- package/dist/ui/chat-store.js +13 -4
- package/dist/ui/chat-task-ref-strings.js +24 -0
- package/dist/ui/chat-task-refs.js +129 -0
- package/dist/ui/claude-setup-token.js +3 -3
- package/dist/ui/contact-auth-strings.js +33 -3
- package/dist/ui/contact-authorizations.js +17 -24
- package/dist/ui/contact-grant-editor.js +50 -0
- package/dist/ui/contact-permissions.js +21 -8
- package/dist/ui/fleet-office-card.js +18 -14
- package/dist/ui/fleet-office.js +29 -17
- package/dist/ui/fleet-task-activity.js +362 -0
- package/dist/ui/fleet-task-card.js +317 -314
- package/dist/ui/fleet-task-common.js +99 -9
- package/dist/ui/fleet-task-create.js +67 -0
- package/dist/ui/fleet-task-edit.js +204 -0
- package/dist/ui/fleet-task-follow.js +123 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-owner.js +252 -0
- package/dist/ui/fleet-task-run.js +257 -0
- package/dist/ui/fleet-task-view.js +178 -39
- package/dist/ui/fleet-task-work.js +2 -2
- package/dist/ui/fleet-tasks.js +258 -130
- package/dist/ui/host-health.js +9 -6
- package/dist/ui/host-monitoring-darwin.js +6 -0
- package/dist/ui/host-monitoring-help.js +7 -0
- package/dist/ui/host-monitoring-linux.js +6 -0
- package/dist/ui/host-monitoring-wsl.js +6 -0
- package/dist/ui/hub-agent-copy.js +2 -0
- package/dist/ui/hub-client.js +4 -0
- package/dist/ui/hub-my-agents-strings.js +2 -0
- package/dist/ui/hub-my-agents.js +17 -1
- package/dist/ui/hub-room-composer.js +108 -5
- package/dist/ui/hub-room-members-strings.js +9 -2
- package/dist/ui/hub-room-members.js +72 -15
- package/dist/ui/hub-room-office.js +191 -0
- package/dist/ui/hub-room-purpose.js +18 -2
- package/dist/ui/hub-room-settings.js +8 -1
- package/dist/ui/hub-room-strings.js +15 -0
- package/dist/ui/hub-room-thread.js +51 -15
- package/dist/ui/hub-strings.js +1 -1
- package/dist/ui/log-row.js +7 -5
- package/dist/ui/native-instance-settings.js +4 -2
- package/dist/ui/panel-chat.js +96 -17
- package/dist/ui/panel-details.js +17 -0
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-hub.js +4 -1
- package/dist/ui/panel-needs.js +11 -2
- package/dist/ui/panel-settings.js +57 -13
- package/dist/ui/settings-apply.js +8 -3
- package/dist/ui/settings-default-model-scope.js +40 -0
- package/dist/ui/settings-default-model-strings.js +43 -0
- package/dist/ui/settings-dialogs.js +9 -5
- package/dist/ui/settings-host-alerts.js +4 -3
- package/dist/ui/settings-host-monitoring.js +2 -1
- package/dist/ui/settings-hub.js +1 -1
- package/dist/ui/settings-layout.js +7 -2
- package/dist/ui/settings-model.js +9 -5
- package/dist/ui/settings-quota-notice.js +3 -3
- package/dist/ui/settings-registry.js +3 -0
- package/dist/ui/settings-shared-strings.js +22 -0
- package/dist/ui/settings-shared.js +59 -12
- package/dist/ui/settings-strings.js +2 -4
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app.css +124 -46
- package/dist/ui/shared/chat-composer.js +7 -6
- package/dist/ui/shared/chat-render.js +39 -1
- package/dist/ui/shared/chat-thread.js +8 -3
- package/dist/ui/shared/composer-focus.js +21 -0
- package/dist/ui/shared/hub-chat.css +30 -2
- package/dist/ui/shared/hub-rooms-u2.css +17 -0
- package/dist/ui/shared/task-board.css +406 -8
- package/dist/ui/trigger-complete.js +71 -0
- package/dist/web-api.d.ts +9 -0
- package/dist/web-api.js +128 -13
- package/dist/web-api.js.map +1 -1
- package/dist/windows-native-mcp.js +5 -2
- package/dist/windows-native-mcp.js.map +1 -1
- package/dist/workflow-templates/default.md +4 -6
- package/package.json +1 -1
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
// Filters stack (each "is" or "is not" some values; a main task stays when it or one of its sub tasks matches them all)
|
|
6
6
|
// and ride in the address with the project (`?tp=`, `?tf=`), so a filtered board can be sent as a link; the last ones
|
|
7
7
|
// and the display choices are remembered on this device. No style attribute anywhere (the CSP).
|
|
8
|
-
import { html } from "/assets/app-html.js";
|
|
8
|
+
import { html, useState } from "/assets/app-html.js";
|
|
9
9
|
import { t, register, lang } from "/assets/app-i18n.js";
|
|
10
10
|
import { Icon } from "/assets/ui-icons.js";
|
|
11
11
|
import { Menu } from "/assets/ui-menu.js";
|
|
12
|
-
import {
|
|
12
|
+
import { RunMark, runOf } from "./fleet-task-run.js";
|
|
13
|
+
import { OwnerChip } from "./fleet-task-owner.js";
|
|
14
|
+
import { COLUMNS, ProgressBar, UNASSIGNED, Who, readStored, recentlyDone, relTime, reviewLabel, waitsForYou, waitsList, waitsOn, wrapUpText, writeStored } from "./fleet-task-common.js";
|
|
13
15
|
import { assetUrl } from "/assets/asset-url.js";
|
|
14
16
|
|
|
15
17
|
/** The task board's stylesheet, linked once (a tab opened before an upgrade has an app.css without these rules). */
|
|
@@ -43,6 +45,10 @@ register("taskview", {
|
|
|
43
45
|
fieldstatus: "Status", fieldassignee: "Assignee", fieldpriority: "Priority", fieldsize: "Size",
|
|
44
46
|
filters: "Filters", is: "is", isNot: "is not", opTip: "Switch between is and is not", values: "{0}: choose values",
|
|
45
47
|
nValues: "{0} values", remove: "Remove this filter", clear: "Clear filters", changed: "Changed {0}", inMain: "Sub task of {0} {1}",
|
|
48
|
+
fieldwaits: "Needs you", waitsYou: "Waiting for me", viewLabel: "Board or list", scrollColumns: "Scroll the columns", columnsLeft: "Columns to the left", columnsRight: "Columns to the right", search: "Search", searchLabel: "Search this project's cards (numbers, titles, fields, checklists)",
|
|
49
|
+
"order.assignee": "Assignee", "order.code": "Number", sortBy: "Sort by {0}", sortedBy: "{0}, sorted {1}", asc: "ascending", desc: "descending",
|
|
50
|
+
colId: "ID", colTitle: "Title", colPriority: "Priority", colAssignee: "Assignee", colUpdated: "Updated",
|
|
51
|
+
collapse: "Collapse {0}", expand: "Expand {0}", more: "Card actions", statusTabs: "Show one status", noMatch: "No cards match “{0}”", clearSearch: "Clear search",
|
|
46
52
|
},
|
|
47
53
|
"zh-TW": {
|
|
48
54
|
display: "顯示", displayTip: "看板或清單、分組、排序、已完成的卡", filter: "篩選", filterTip: "只看部分卡片",
|
|
@@ -53,6 +59,10 @@ register("taskview", {
|
|
|
53
59
|
fieldstatus: "狀態", fieldassignee: "負責人", fieldpriority: "優先度", fieldsize: "大小",
|
|
54
60
|
filters: "篩選條件", is: "是", isNot: "不是", opTip: "切換「是」與「不是」", values: "{0}:選擇項目",
|
|
55
61
|
nValues: "{0} 項", remove: "移除這個條件", clear: "清除篩選", changed: "{0}變動", inMain: "{0} {1} 的子任務",
|
|
62
|
+
fieldwaits: "等我處理", waitsYou: "等我確認", viewLabel: "看板或清單", scrollColumns: "捲動欄位", columnsLeft: "左邊的欄位", columnsRight: "右邊的欄位", search: "搜尋", searchLabel: "搜尋這個專案的卡片(卡號、標題、欄位、完成定義)",
|
|
63
|
+
"order.assignee": "負責人", "order.code": "卡號", sortBy: "依{0}排序", sortedBy: "{0},{1}排序", asc: "由小到大", desc: "由大到小",
|
|
64
|
+
colId: "卡號", colTitle: "標題", colPriority: "優先度", colAssignee: "負責人", colUpdated: "更新",
|
|
65
|
+
collapse: "收合 {0}", expand: "展開 {0}", more: "卡片動作", statusTabs: "一次看一個狀態", noMatch: "沒有符合「{0}」的卡片", clearSearch: "清除搜尋",
|
|
56
66
|
},
|
|
57
67
|
});
|
|
58
68
|
|
|
@@ -60,16 +70,17 @@ register("taskview", {
|
|
|
60
70
|
|
|
61
71
|
export const VIEWS = ["board", "list"];
|
|
62
72
|
export const GROUPS = ["status", "assignee", "priority", "none"];
|
|
63
|
-
export const ORDERS = ["manual", "priority", "updated", "created", "title"];
|
|
73
|
+
export const ORDERS = ["manual", "priority", "updated", "created", "title", "assignee", "code"];
|
|
74
|
+
export const DIRS = ["asc", "desc"];
|
|
64
75
|
export const DONE_SHOWN = ["recent", "all", "hide"];
|
|
65
|
-
export const DEFAULT_DISPLAY = Object.freeze({ view: "board", group: "status", order: "manual", done: "recent", subs: false });
|
|
76
|
+
export const DEFAULT_DISPLAY = Object.freeze({ view: "board", group: "status", order: "manual", dir: "asc", done: "recent", subs: false });
|
|
66
77
|
const DISPLAY_KEY = "agend_tasks_display";
|
|
67
78
|
|
|
68
79
|
/** Display choices from anything (a stored value, an older page's): each one known, else its default. */
|
|
69
80
|
export function cleanDisplay(raw) {
|
|
70
81
|
const d = raw && typeof raw === "object" ? raw : {};
|
|
71
82
|
const pick = (k, list) => (list.includes(d[k]) ? d[k] : DEFAULT_DISPLAY[k]);
|
|
72
|
-
return { view: pick("view", VIEWS), group: pick("group", GROUPS), order: pick("order", ORDERS), done: pick("done", DONE_SHOWN), subs: d.subs === true };
|
|
83
|
+
return { view: pick("view", VIEWS), group: pick("group", GROUPS), order: pick("order", ORDERS), dir: pick("dir", DIRS), done: pick("done", DONE_SHOWN), subs: d.subs === true };
|
|
73
84
|
}
|
|
74
85
|
export function readDisplay() {
|
|
75
86
|
try { return cleanDisplay(JSON.parse(readStored(DISPLAY_KEY, "{}"))); } catch { return { ...DEFAULT_DISPLAY }; }
|
|
@@ -82,11 +93,12 @@ export function doneShown(card, done, now = Date.now()) {
|
|
|
82
93
|
return done === "all" || (done === "recent" && recentlyDone(card, now));
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
export const FILTER_FIELDS = ["status", "assignee", "priority", "size"];
|
|
96
|
+
export const FILTER_FIELDS = ["status", "assignee", "priority", "size", "waits"];
|
|
86
97
|
/** A filter's value for "nobody" (assignee) and "not sized" (size). */
|
|
87
98
|
export const NONE = "~";
|
|
88
99
|
const PRIORITIES = ["urgent", "high", "normal", "low"];
|
|
89
|
-
|
|
100
|
+
/** "waits": whether the card waits for the person (Needs you's rule) — one value, "you". */
|
|
101
|
+
const KNOWN = { status: COLUMNS, priority: PRIORITIES, size: ["S", "M", "L", NONE], waits: ["you"] };
|
|
90
102
|
const FILTERS_KEY = "agend_tasks_filters";
|
|
91
103
|
const LEGACY_ASSIGNEE = "agend_tasks_assignee"; // the board's one assignee filter before these
|
|
92
104
|
|
|
@@ -94,14 +106,28 @@ const LEGACY_ASSIGNEE = "agend_tasks_assignee"; // the board's one assignee fi
|
|
|
94
106
|
export function valueOf(card, field) {
|
|
95
107
|
if (field === "assignee") return card.assignee || NONE;
|
|
96
108
|
if (field === "size") return card.size || NONE;
|
|
109
|
+
if (field === "waits") return waitsForYou(card) ? "you" : "other";
|
|
97
110
|
return card[field];
|
|
98
111
|
}
|
|
99
112
|
|
|
100
113
|
/** Whether a card matches every filter. */
|
|
101
114
|
export const cardMatches = (card, filters) => filters.every((f) => f.values.includes(valueOf(card, f.field)) !== f.not);
|
|
102
115
|
|
|
103
|
-
/**
|
|
104
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Whether a card has every word of a search (case does not matter): its number, title, goal, scope, context, state,
|
|
118
|
+
* result, blocked reason, assignee and checklist. No words: every card.
|
|
119
|
+
*/
|
|
120
|
+
export function searchMatches(card, query) {
|
|
121
|
+
const words = String(query || "").toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
122
|
+
if (!words.length) return true;
|
|
123
|
+
const text = [card.id, card.title, card.goal, card.scope, card.context, card.state, card.result, card.blockedReason, card.assignee, ...(card.acceptance || []).map((a) => a.text)]
|
|
124
|
+
.filter(Boolean).join("\n").toLocaleLowerCase();
|
|
125
|
+
return words.every((w) => text.includes(w));
|
|
126
|
+
}
|
|
127
|
+
const passes = (card, filters, query) => cardMatches(card, filters) && searchMatches(card, query);
|
|
128
|
+
|
|
129
|
+
/** A main task stays when it, or one of its sub tasks, matches every filter (and the search, when there is one). */
|
|
130
|
+
export const mainMatches = (main, subs, filters, query = "") => passes(main, filters, query) || (subs || []).some((s) => passes(s, filters, query));
|
|
105
131
|
|
|
106
132
|
// In the address: `field:a,b;field!:c` — "!" is "is not"; a value's own , ; : ! % ~ are %-escaped, so a bare ~ is NONE.
|
|
107
133
|
const esc = (v) => (v === NONE ? NONE : v.replace(/[%,;:!~]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`));
|
|
@@ -163,19 +189,25 @@ export function fieldValues(field, cards, filter = null) {
|
|
|
163
189
|
* The list's rows: the main tasks shown — or, with sub tasks as rows, each main task that matches the filters itself
|
|
164
190
|
* and its sub tasks that do (and are shown for their finish), each sub task right after its main task.
|
|
165
191
|
*/
|
|
166
|
-
export function listRows(mains, subsOf, display, filters, now = Date.now()) {
|
|
192
|
+
export function listRows(mains, subsOf, display, filters, now = Date.now(), query = "") {
|
|
167
193
|
if (!display.subs) return mains;
|
|
168
194
|
const out = [];
|
|
169
195
|
for (const m of mains) {
|
|
170
|
-
if (
|
|
171
|
-
for (const s of subsOf.get(m.id) || []) if (doneShown(s, display.done, now) &&
|
|
196
|
+
if (passes(m, filters, query)) out.push(m);
|
|
197
|
+
for (const s of subsOf.get(m.id) || []) if (doneShown(s, display.done, now) && passes(s, filters, query)) out.push(s);
|
|
172
198
|
}
|
|
173
199
|
return out;
|
|
174
200
|
}
|
|
175
201
|
|
|
176
202
|
const PRIORITY_RANK = { urgent: 0, high: 1, normal: 2, low: 3 };
|
|
177
|
-
/**
|
|
178
|
-
|
|
203
|
+
/** A card's number as a sortable pair: main tasks before sub tasks, then by the number itself. */
|
|
204
|
+
const codeKey = (c) => [c.kind === "sub" ? 1 : 0, Number(/\d+/.exec(c.id)?.[0] ?? 0)];
|
|
205
|
+
/**
|
|
206
|
+
* Rows in an order: the board's (a sub task right after its main task), by priority (urgent first), last change and
|
|
207
|
+
* newest (newest first), title, assignee or number. `dir` "desc" turns the order round — except that a card nobody has
|
|
208
|
+
* is last by assignee either way (it is not "the biggest name").
|
|
209
|
+
*/
|
|
210
|
+
export function orderRows(rows, order, byId = new Map(), dir = "asc") {
|
|
179
211
|
const place = (c) => {
|
|
180
212
|
const main = c.kind === "sub" ? byId.get(c.parentId) : null;
|
|
181
213
|
return main ? [main.sort, 1, c.sort] : [c.sort, 0, 0];
|
|
@@ -187,8 +219,12 @@ export function orderRows(rows, order, byId = new Map()) {
|
|
|
187
219
|
updated: (a, b) => String(b.updatedAt).localeCompare(String(a.updatedAt)) || manual(a, b),
|
|
188
220
|
created: (a, b) => String(b.createdAt).localeCompare(String(a.createdAt)) || manual(a, b),
|
|
189
221
|
title: (a, b) => a.title.localeCompare(b.title, lang()) || manual(a, b),
|
|
222
|
+
assignee: (a, b) => (a.assignee ? 0 : 1) - (b.assignee ? 0 : 1) || String(a.assignee || "").localeCompare(String(b.assignee || ""), lang()) || manual(a, b),
|
|
223
|
+
code: (a, b) => { const x = codeKey(a), y = codeKey(b); return x[0] - y[0] || x[1] - y[1]; },
|
|
190
224
|
}[order] || manual;
|
|
191
|
-
return [...rows].sort(by);
|
|
225
|
+
if (dir !== "desc") return [...rows].sort(by);
|
|
226
|
+
// Turned round; for assignee the nobody-last rule stays outside the turning.
|
|
227
|
+
return [...rows].sort(order === "assignee" ? (a, b) => (a.assignee ? 0 : 1) - (b.assignee ? 0 : 1) || by(b, a) : (a, b) => by(b, a));
|
|
192
228
|
}
|
|
193
229
|
|
|
194
230
|
/** Rows in groups, in a fixed order: statuses as the board's columns, priorities from urgent, assignees by name (nobody last). */
|
|
@@ -201,6 +237,7 @@ export function groupRows(rows, group) {
|
|
|
201
237
|
|
|
202
238
|
/** A filter value in words: a status, a priority, a size, an assignee (nobody: "Unassigned"; not sized: "Not sized"). */
|
|
203
239
|
export function valueWord(field, v) {
|
|
240
|
+
if (field === "waits") return t("taskview.waitsYou");
|
|
204
241
|
if (v === NONE) return field === "size" ? t("tasks.sizeNone") : t("tasks.nobody");
|
|
205
242
|
if (field === "status" || field === "priority") return t(`tasks.${v}`);
|
|
206
243
|
if (field === "size") return t(`tasks.size${v}`);
|
|
@@ -223,27 +260,78 @@ export function FilterMenu({ cards, filters, onChange }) {
|
|
|
223
260
|
return html`<${TextMenu} cls="tb-filter-menu" icon="filter" text=${t("taskview.filter")} tip=${t("taskview.filterTip")} active=${filters.length > 0} items=${items} />`;
|
|
224
261
|
}
|
|
225
262
|
|
|
226
|
-
/** Display:
|
|
263
|
+
/** Display: the list's grouping, order and sub-task rows; which finished cards show (the board / list switch is the toolbar's). */
|
|
227
264
|
export function DisplayMenu({ display, onChange }) {
|
|
228
265
|
const d = display;
|
|
229
266
|
const list = d.view === "list";
|
|
230
267
|
const radio = (k, v, label) => ({ key: `${k}-${v}`, label, checked: d[k] === v, onSelect: () => onChange({ ...d, [k]: v }) });
|
|
231
268
|
const items = [
|
|
232
|
-
{ key: "h-view", heading: true, label: t("taskview.view") },
|
|
233
|
-
radio("view", "board", t("taskview.board")), radio("view", "list", t("taskview.list")),
|
|
234
269
|
list && { key: "h-group", heading: true, label: t("taskview.groupBy") },
|
|
235
270
|
...(list ? GROUPS.map((g) => radio("group", g, t(`taskview.group.${g}`))) : []),
|
|
236
271
|
list && { key: "h-order", heading: true, label: t("taskview.orderBy") },
|
|
237
|
-
...(list ? ORDERS.map((o) =>
|
|
272
|
+
...(list ? ORDERS.map((o) => ({ key: `order-${o}`, label: t(`taskview.order.${o}`), checked: d.order === o, onSelect: () => onChange({ ...d, order: o, dir: "asc" }) })) : []),
|
|
238
273
|
list && { key: "subs", checkbox: true, checked: d.subs, label: t("taskview.subsRows"), onSelect: () => onChange({ ...d, subs: !d.subs }) },
|
|
239
274
|
{ key: "h-done", heading: true, label: t("taskview.finished") },
|
|
240
275
|
radio("done", "recent", t("tasks.recent")), radio("done", "all", t("tasks.all")), radio("done", "hide", t("taskview.doneHide")),
|
|
241
276
|
];
|
|
242
277
|
// Pressed while it shows something other than the defaults (beyond board or list, which is plain to see).
|
|
243
|
-
const changed = ["group", "order", "done", "subs"].some((k) => d[k] !== DEFAULT_DISPLAY[k]);
|
|
278
|
+
const changed = ["group", "order", "dir", "done", "subs"].some((k) => d[k] !== DEFAULT_DISPLAY[k]);
|
|
244
279
|
return html`<${TextMenu} cls="tb-view-menu" icon="sliders" text=${t("taskview.display")} tip=${t("taskview.displayTip")} active=${changed} items=${items} />`;
|
|
245
280
|
}
|
|
246
281
|
|
|
282
|
+
/** Board | List, one click: the choice is remembered on this device (the display's `view`). */
|
|
283
|
+
export function ViewToggle({ display, onChange }) {
|
|
284
|
+
return html`<div class="tb-seg tb-view-toggle" role="group" aria-label=${t("taskview.viewLabel")}>${VIEWS.map((v) =>
|
|
285
|
+
html`<button key=${v} type="button" aria-pressed=${display.view === v ? "true" : "false"} class=${`tb-seg-btn${display.view === v ? " active" : ""}`}
|
|
286
|
+
onClick=${() => display.view !== v && onChange({ ...display, view: v })}>${t(`taskview.${v}`)}</button>`)}</div>`;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* How far the board's columns reach past their box: `over` (they do not fit, so they scroll sideways), and whether there is more
|
|
291
|
+
* to the `left` and to the `right` of what shows. Pure on the box's measures (a platform may hide its scrollbar until it is used,
|
|
292
|
+
* so the toolbar says it in buttons).
|
|
293
|
+
*/
|
|
294
|
+
export function scrollReach({ scrollWidth, clientWidth, scrollLeft }) {
|
|
295
|
+
const over = scrollWidth - clientWidth > 1;
|
|
296
|
+
return { over, left: over && scrollLeft > 1, right: over && scrollLeft + clientWidth < scrollWidth - 1 };
|
|
297
|
+
}
|
|
298
|
+
export const NO_REACH = { over: false, left: false, right: false };
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* "‹ ›" at the toolbar's end while the board has columns out of sight: a click scrolls the columns by most of a screen. A button
|
|
302
|
+
* with nothing to reach is dimmed and says so (`aria-disabled`), and keeps the focus, so a key press can still land on it.
|
|
303
|
+
*/
|
|
304
|
+
export function ColumnScroll({ reach, onScroll }) {
|
|
305
|
+
const btn = (dir, icon, can, label) => html`<button type="button" class="tb-seg-btn tb-scroll-btn" aria-label=${label} title=${label}
|
|
306
|
+
aria-disabled=${can ? "false" : "true"} onClick=${() => { if (can) onScroll(dir); }}><${Icon} name=${icon} size=${16} /></button>`;
|
|
307
|
+
return html`<div class="tb-seg tb-scroll-nav" role="group" aria-label=${t("taskview.scrollColumns")}>
|
|
308
|
+
${btn(-1, "prev", reach.left, t("taskview.columnsLeft"))}${btn(1, "next", reach.right, t("taskview.columnsRight"))}</div>`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** The project's search: filters what the board and the list show as you type; Esc clears it. */
|
|
312
|
+
export function SearchField({ value, onChange }) {
|
|
313
|
+
return html`<div class="tb-search tb-find">
|
|
314
|
+
<${Icon} name="search" size=${16} cls="tb-search-icon" />
|
|
315
|
+
<input type="search" value=${value} placeholder=${t("taskview.search")} aria-label=${t("taskview.searchLabel")} title=${t("taskview.searchLabel")}
|
|
316
|
+
onInput=${(e) => onChange(e.target.value)} onKeyDown=${(e) => { if (e.key === "Escape" && value) { e.preventDefault(); e.stopPropagation(); onChange(""); } }} />
|
|
317
|
+
</div>`;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* One row of controls under a project's header: the board / list switch, the search, Filter and Display, the buttons that scroll
|
|
322
|
+
* the board's columns while some are out of sight (`scroller`: its `reach` and `by(direction)`), then the filters in force as chips. The filters, the view and the display are kept on this device.
|
|
323
|
+
*/
|
|
324
|
+
export function TaskToolbar({ cards, display, onDisplay, filters, onFilters, query, onQuery, scroller = null }) {
|
|
325
|
+
return html`<div class="tb-view-bar">
|
|
326
|
+
<${ViewToggle} display=${display} onChange=${onDisplay} />
|
|
327
|
+
<${SearchField} value=${query} onChange=${onQuery} />
|
|
328
|
+
<${FilterMenu} cards=${cards} filters=${filters} onChange=${onFilters} />
|
|
329
|
+
<${DisplayMenu} display=${display} onChange=${onDisplay} />
|
|
330
|
+
${scroller && scroller.reach.over ? html`<${ColumnScroll} reach=${scroller.reach} onScroll=${scroller.by} />` : null}
|
|
331
|
+
<${FilterBar} cards=${cards} filters=${filters} onChange=${onFilters} />
|
|
332
|
+
</div>`;
|
|
333
|
+
}
|
|
334
|
+
|
|
247
335
|
/** The filters in force, a chip each: its field, is / is not (a click switches), its values (a menu), and remove. */
|
|
248
336
|
export function FilterBar({ cards, filters, onChange }) {
|
|
249
337
|
if (!filters.length) return null;
|
|
@@ -285,42 +373,90 @@ function groupHead(group, key) {
|
|
|
285
373
|
const groupWord = (group, key) => (group === "assignee" ? (key === NONE ? t("tasks.nobody") : key) : t(`tasks.${key}`));
|
|
286
374
|
const longTime = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? d.toLocaleString(lang() === "zh-TW" ? "zh-TW" : "en") : ""; };
|
|
287
375
|
|
|
376
|
+
// The groups a person folded away, remembered on this device, per project (by what heads them: "1/status:done",
|
|
377
|
+
// "none/assignee:alpha" — the project's id, or "none" for No project).
|
|
378
|
+
const COLLAPSED_KEY = "agend_tasks_collapsed";
|
|
379
|
+
export const groupId = (group, key, scope = "") => (scope === "" ? `${group}:${key}` : `${scope}/${group}:${key}`);
|
|
380
|
+
export function readCollapsed() {
|
|
381
|
+
try { const a = JSON.parse(readStored(COLLAPSED_KEY, "[]")); return new Set(Array.isArray(a) ? a.filter((x) => typeof x === "string") : []); } catch { return new Set(); }
|
|
382
|
+
}
|
|
383
|
+
export const writeCollapsed = (set) => writeStored(COLLAPSED_KEY, JSON.stringify([...set]));
|
|
384
|
+
|
|
385
|
+
/** The columns the list's header sorts by, each the order it picks. */
|
|
386
|
+
export const SORT_COLUMNS = [["code", "colId", "tb-lh-code"], ["title", "colTitle", "tb-lh-title"], ["priority", "colPriority", "tb-lh-prio"], ["assignee", "colAssignee", "tb-lh-who"], ["updated", "colUpdated", "tb-lh-time"]];
|
|
387
|
+
|
|
388
|
+
/** A column's order after a click on its header: the same column again turns it round, another starts from its own end. */
|
|
389
|
+
export function sortedBy(display, order) {
|
|
390
|
+
return display.order === order ? { ...display, dir: display.dir === "asc" ? "desc" : "asc" } : { ...display, order, dir: "asc" };
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** The list's header: its sortable columns (ID, Title, Priority, Assignee, Updated), the current one marked with its direction. */
|
|
394
|
+
function ListHead({ display, onDisplay, who }) {
|
|
395
|
+
return html`<div class="tb-list-head" role="group" aria-label=${t("taskview.orderBy")}>
|
|
396
|
+
<span class="tb-lh-dot" aria-hidden="true"></span>
|
|
397
|
+
${SORT_COLUMNS.filter(([order]) => who || order !== "assignee").map(([order, word, cls]) => {
|
|
398
|
+
const on = display.order === order;
|
|
399
|
+
const label = t(`taskview.${word}`);
|
|
400
|
+
const dirWord = t(`taskview.${display.dir}`);
|
|
401
|
+
return html`<button key=${order} type="button" class=${`tb-lh ${cls}${on ? " active" : ""}`} aria-pressed=${on ? "true" : "false"}
|
|
402
|
+
title=${t("taskview.sortBy", label)} aria-label=${on ? t("taskview.sortedBy", label, dirWord) : t("taskview.sortBy", label)}
|
|
403
|
+
onClick=${() => onDisplay(sortedBy(display, order))}>${label}${on ? html`<${Icon} name=${display.dir === "asc" ? "up" : "down"} size=${12} />` : null}</button>`;
|
|
404
|
+
})}
|
|
405
|
+
<span class="tb-lh-more" aria-hidden="true"></span>
|
|
406
|
+
</div>`;
|
|
407
|
+
}
|
|
408
|
+
|
|
288
409
|
/**
|
|
289
|
-
* The list: a row per card in groups, each headed by its status, assignee or priority with its
|
|
290
|
-
*
|
|
410
|
+
* The list: a header to sort by, then a row per card in groups, each headed by its status, assignee or priority with its
|
|
411
|
+
* count (a click folds it away). A row shows its number, title, priority, assignee and last change; it opens its card; a
|
|
412
|
+
* main task's sub-task progress opens up its sub tasks under it (unless they are rows already); its ⋯ opens the card's menu.
|
|
291
413
|
*/
|
|
292
|
-
export function ListView({ rows, display, subsOf, byId, flashed, now, expanded, onToggleSubs, onOpen }) {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
414
|
+
export function ListView({ rows, display, subsOf, byId, flashed, now, runs, expanded, onToggleSubs, onOpen, onMore, onOwner, cards = [], lead = null, writable = false, onDisplay, scope = "" }) {
|
|
415
|
+
const [folded, setFolded] = useState(readCollapsed);
|
|
416
|
+
const toggle = (id) => setFolded((cur) => { const next = new Set(cur); if (next.has(id)) next.delete(id); else next.add(id); writeCollapsed(next); return next; });
|
|
417
|
+
const groups = groupRows(orderRows(rows, display.order, byId, display.dir), display.group);
|
|
418
|
+
const who = display.group !== "assignee";
|
|
419
|
+
return html`<div class="tb-list">
|
|
420
|
+
<${ListHead} display=${display} onDisplay=${onDisplay} who=${who} />
|
|
421
|
+
${groups.map((g) => {
|
|
422
|
+
const id = groupId(display.group, g.key, scope);
|
|
423
|
+
const shut = display.group !== "none" && folded.has(id);
|
|
424
|
+
return html`<section key=${g.key} class=${`tb-group${shut ? " shut" : ""}`} aria-label=${display.group === "none" ? null : groupWord(display.group, g.key)}>
|
|
425
|
+
${display.group === "none" ? null : html`<h3 class=${`tb-group-head g-${display.group}`}>
|
|
426
|
+
<button type="button" class="tb-group-toggle" aria-expanded=${shut ? "false" : "true"} title=${t(shut ? "taskview.expand" : "taskview.collapse", groupWord(display.group, g.key))}
|
|
427
|
+
onClick=${() => toggle(id)}><${Icon} name="chevron" size=${14} cls=${shut ? "tb-chev" : "tb-chev open"} />${groupHead(display.group, g.key)}<span class="tb-count">${g.rows.length}</span></button></h3>`}
|
|
428
|
+
${shut ? null : html`<ul class="tb-rows">${g.rows.map((c) => {
|
|
429
|
+
const subs = subsOf.get(c.id) || [];
|
|
430
|
+
const lit = Math.max(flashed.get(c.id) || 0, ...(display.subs ? [] : subs.map((s) => flashed.get(s.id) || 0)));
|
|
431
|
+
return html`<${Row} key=${c.id} card=${c} subs=${subs} main=${c.kind === "sub" ? byId.get(c.parentId) : null} flash=${now - lit < 4000} now=${now} runs=${runs}
|
|
432
|
+
subsAsRows=${display.subs} who=${who} expanded=${!!expanded[c.id]} onToggleSubs=${() => onToggleSubs(c.id)} onOpen=${onOpen} onMore=${onMore}
|
|
433
|
+
onOwner=${onOwner} cards=${cards} lead=${lead} writable=${writable} />`;
|
|
434
|
+
})}</ul>`}
|
|
435
|
+
</section>`;
|
|
436
|
+
})}</div>`;
|
|
303
437
|
}
|
|
304
438
|
|
|
305
439
|
/** One card's row; its assignee is left out under an assignee's own heading. */
|
|
306
|
-
function Row({ card, subs, main, flash, now, subsAsRows, who, expanded, onToggleSubs, onOpen }) {
|
|
440
|
+
function Row({ card, subs, main, flash, now, runs, subsAsRows, who, expanded, onToggleSubs, onOpen, onMore, onOwner, cards, lead, writable }) {
|
|
307
441
|
const progress = card.progress;
|
|
308
442
|
const hasSubs = card.kind === "main" && !!progress && progress.total > 0;
|
|
309
443
|
const accepted = card.acceptance.filter((a) => a.done).length;
|
|
310
444
|
const gap = card.status === "review" ? wrapUpText(card) : "";
|
|
311
445
|
const replied = card.lastComment && card.lastComment.authorKind !== "person";
|
|
446
|
+
// Its assignee (or, for a main task, a sub task's) is working on it now.
|
|
447
|
+
const run = runOf(card, runs, subs);
|
|
312
448
|
const bar = hasSubs ? html`<${ProgressBar} progress=${progress} /><span>${t("tasks.subProgress", progress.done, progress.total)}</span>` : null;
|
|
313
|
-
return html`<li class=${`tb-row st-${card.status}${card.kind === "sub" ? " is-sub" : ""}${flash ? " flash" : ""}`} data-row=${card.id} onClick=${() => onOpen(card.id)}>
|
|
449
|
+
return html`<li class=${`tb-row st-${card.status}${card.kind === "sub" ? " is-sub" : ""}${flash ? " flash" : ""}${run && run.state === "working" && !run.shared ? " running" : ""}`} data-row=${card.id} onClick=${(e) => { if (e.target && e.target.closest && e.target.closest(".tb-owner-pop")) return; onOpen(card.id); }}>
|
|
314
450
|
<div class="tb-row-line">
|
|
315
451
|
<span class=${`tb-dot st-${card.status}`} role="img" aria-label=${t(`tasks.${card.status}`)} title=${t(`tasks.${card.status}`)}></span>
|
|
316
|
-
<span class="tb-code">${card.id}</span>
|
|
452
|
+
<span class="tb-code tb-row-code">${card.id}</span>
|
|
317
453
|
${main ? html`<span class="tb-row-main" title=${t("taskview.inMain", main.id, main.title)}>${main.id} ›</span>` : null}
|
|
318
454
|
<span class="tb-row-text">
|
|
455
|
+
<${RunMark} run=${run} />
|
|
319
456
|
<button type="button" class="tb-row-title" onClick=${(e) => { e.stopPropagation(); onOpen(card.id); }}>${card.title}</button>
|
|
320
457
|
${card.status === "blocked" && card.blockedReason ? html`<span class="tb-row-note">${card.blockedReason}</span>` : null}
|
|
321
458
|
</span>
|
|
322
459
|
<span class="tb-row-tags">
|
|
323
|
-
${card.priority === "urgent" || card.priority === "high" ? html`<span class=${`tb-tag p-${card.priority}`}>${t(card.priority === "urgent" ? "tasks.urgentTag" : "tasks.highTag")}</span>` : null}
|
|
324
460
|
${card.status === "review" ? html`<span class=${`tb-tag st-review${waitsForYou(card) ? " you" : ""}`}>${reviewLabel(card)}</span>` : null}
|
|
325
461
|
${gap ? html`<span class="tb-tag wrapup" title=${t("tasks.wrapLine", gap)}>${t("tasks.wrapTag")}</span>` : null}
|
|
326
462
|
${card.size ? html`<span class="tb-size" title=${t("tasks.size")}>${t(`tasks.size${card.size}`)}</span>` : null}
|
|
@@ -330,11 +466,14 @@ function Row({ card, subs, main, flash, now, subsAsRows, who, expanded, onToggle
|
|
|
330
466
|
onClick=${(e) => { e.stopPropagation(); onToggleSubs(); }}>${bar}<${Icon} name="chevron" size=${14} cls=${expanded ? "tb-chev open" : "tb-chev"} /></button>`}
|
|
331
467
|
<span class="tb-tile-stats">
|
|
332
468
|
${card.acceptance.length ? html`<span class=${accepted === card.acceptance.length ? "all" : ""} title=${t(card.kind === "main" ? "tasks.definition" : "tasks.acceptance")}><${Icon} name="check" size=${13} />${accepted}/${card.acceptance.length}</span>` : null}
|
|
333
|
-
${card
|
|
469
|
+
${waitsOn(card) ? html`<span title=${t("tasks.waitsFor", waitsList(card, ", "))}><${Icon} name="clock" size=${13} /></span>` : null}
|
|
334
470
|
${card.commentCount ? html`<span class=${replied ? "reply" : ""} title=${replied ? t("tasks.agentReplied") : t("tasks.comments")}><${Icon} name="chat" size=${13} />${card.commentCount}</span>` : null}
|
|
335
471
|
</span>
|
|
336
|
-
|
|
472
|
+
<span class=${`tb-row-prio p-${card.priority}`}>${t(`tasks.${card.priority}`)}</span>
|
|
473
|
+
${who ? html`<span class="tb-row-who"><${OwnerChip} card=${card} cards=${cards} lead=${lead} canAssign=${writable && card.status !== "done" && card.status !== "cancelled"} onPick=${onOwner} /></span>` : null}
|
|
337
474
|
<span class="tb-row-time muted" title=${t("taskview.changed", longTime(card.updatedAt))}>${relTime(card.updatedAt, now)}</span>
|
|
475
|
+
${onMore ? html`<button type="button" class="icon-btn tb-more" aria-label=${t("taskview.more")} title=${t("taskview.more")}
|
|
476
|
+
onClick=${(e) => { e.stopPropagation(); onMore(card, e.currentTarget); }}><${Icon} name="more" size=${16} /></button>` : null}
|
|
338
477
|
</div>
|
|
339
478
|
${hasSubs && expanded && !subsAsRows ? html`<${SubList} subs=${subs} older=${progress.total - subs.length} onOpen=${onOpen} />` : null}
|
|
340
479
|
</li>`;
|
|
@@ -8,7 +8,7 @@ import { Dialog } from "/assets/ui-dialog.js";
|
|
|
8
8
|
import { Icon } from "/assets/ui-icons.js";
|
|
9
9
|
import { Skeleton } from "/assets/ui-states.js";
|
|
10
10
|
import { GroupMark, InstanceAvatar, dotLabel, dotState, groupKind, groupLabel, groupOf, namesOf, namesStore } from "/assets/instance-nav.js";
|
|
11
|
-
import { Who, boardApi, errorText, reviewLabel } from "./fleet-task-common.js";
|
|
11
|
+
import { Who, boardApi, errorText, reviewLabel, waitsList, waitsOn } from "./fleet-task-common.js";
|
|
12
12
|
|
|
13
13
|
const LABEL = { back: "tasks.workSentBack", doing: "tasks.workDoing", blocked: "tasks.workBlocked", review: "tasks.workReview", main: "tasks.workMain", ready: "tasks.workReady", waiting: "tasks.workWaiting" };
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ export function workLines(w) {
|
|
|
25
25
|
...(w.review || []).map((c) => line("review", c)),
|
|
26
26
|
...(w.mains || []).map((c) => line("main", c, c.progress && c.progress.total ? t("tasks.workSubs", c.progress.done, c.progress.total) : "")),
|
|
27
27
|
...(w.ready || []).map((c) => line("ready", c, c.assignee ? "" : t("tasks.workClaimable"))),
|
|
28
|
-
...(w.waiting || []).map((c) => line("waiting", c, t("tasks.workWaitsFor", (c
|
|
28
|
+
...(w.waiting || []).map((c) => line("waiting", c, waitsOn(c) ? t("tasks.workWaitsFor", waitsList(c, t("tasks.workJoin"))) : "")),
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
|