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