@skillcdn/console 0.5.0 → 0.5.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 (490) hide show
  1. package/README.md +87 -12
  2. package/SKILLCDN.md +3 -3
  3. package/dist/agent-page.d.ts.map +1 -1
  4. package/dist/agent-page.js +7 -6
  5. package/dist/agent-page.js.map +1 -1
  6. package/dist/api.d.ts +9 -7
  7. package/dist/api.d.ts.map +1 -1
  8. package/dist/api.js +8 -6
  9. package/dist/api.js.map +1 -1
  10. package/dist/charts.d.ts +103 -0
  11. package/dist/charts.d.ts.map +1 -0
  12. package/dist/charts.js +182 -0
  13. package/dist/charts.js.map +1 -0
  14. package/dist/cli/cli.d.ts +58 -2
  15. package/dist/cli/cli.d.ts.map +1 -1
  16. package/dist/cli/cli.js +1742 -472
  17. package/dist/cli/cli.js.map +1 -1
  18. package/dist/cli/command-words.d.ts +20 -0
  19. package/dist/cli/command-words.d.ts.map +1 -0
  20. package/dist/cli/command-words.js +51 -0
  21. package/dist/cli/command-words.js.map +1 -0
  22. package/dist/cli/credentials.d.ts +54 -5
  23. package/dist/cli/credentials.d.ts.map +1 -1
  24. package/dist/cli/credentials.js +126 -20
  25. package/dist/cli/credentials.js.map +1 -1
  26. package/dist/cli/directory.d.ts +19 -4
  27. package/dist/cli/directory.d.ts.map +1 -1
  28. package/dist/cli/directory.js +16 -8
  29. package/dist/cli/directory.js.map +1 -1
  30. package/dist/cli/format.d.ts +70 -9
  31. package/dist/cli/format.d.ts.map +1 -1
  32. package/dist/cli/format.js +267 -40
  33. package/dist/cli/format.js.map +1 -1
  34. package/dist/cli/help.d.ts +13 -4
  35. package/dist/cli/help.d.ts.map +1 -1
  36. package/dist/cli/help.js +101 -58
  37. package/dist/cli/help.js.map +1 -1
  38. package/dist/cli/machine-check.d.ts +36 -0
  39. package/dist/cli/machine-check.d.ts.map +1 -0
  40. package/dist/cli/machine-check.js +151 -0
  41. package/dist/cli/machine-check.js.map +1 -0
  42. package/dist/cli/main.js +76 -2
  43. package/dist/cli/main.js.map +1 -1
  44. package/dist/cli/pack.d.ts +69 -60
  45. package/dist/cli/pack.d.ts.map +1 -1
  46. package/dist/cli/pack.js +241 -270
  47. package/dist/cli/pack.js.map +1 -1
  48. package/dist/cli/plugin-check.d.ts +42 -0
  49. package/dist/cli/plugin-check.d.ts.map +1 -1
  50. package/dist/cli/plugin-check.js +221 -36
  51. package/dist/cli/plugin-check.js.map +1 -1
  52. package/dist/cli/plugin-cli.d.ts +6 -1
  53. package/dist/cli/plugin-cli.d.ts.map +1 -1
  54. package/dist/cli/plugin-cli.js +21 -4
  55. package/dist/cli/plugin-cli.js.map +1 -1
  56. package/dist/cli/plugin-main.js +1 -0
  57. package/dist/cli/plugin-main.js.map +1 -1
  58. package/dist/cli/runner-host.d.ts +7 -0
  59. package/dist/cli/runner-host.d.ts.map +1 -1
  60. package/dist/cli/runner-host.js +2 -0
  61. package/dist/cli/runner-host.js.map +1 -1
  62. package/dist/cli/secret-notes.d.ts +8 -0
  63. package/dist/cli/secret-notes.d.ts.map +1 -0
  64. package/dist/cli/secret-notes.js +48 -0
  65. package/dist/cli/secret-notes.js.map +1 -0
  66. package/dist/cli/serve.d.ts +33 -1
  67. package/dist/cli/serve.d.ts.map +1 -1
  68. package/dist/cli/serve.js +252 -3
  69. package/dist/cli/serve.js.map +1 -1
  70. package/dist/client.d.ts +54 -9
  71. package/dist/client.d.ts.map +1 -1
  72. package/dist/client.js +77 -80
  73. package/dist/client.js.map +1 -1
  74. package/dist/components/agent-page.d.ts +164 -8
  75. package/dist/components/agent-page.d.ts.map +1 -1
  76. package/dist/components/agent-page.js +588 -151
  77. package/dist/components/agent-page.js.map +1 -1
  78. package/dist/components/agents.d.ts.map +1 -1
  79. package/dist/components/agents.js +1 -1
  80. package/dist/components/agents.js.map +1 -1
  81. package/dist/components/board.d.ts.map +1 -1
  82. package/dist/components/board.js +3 -2
  83. package/dist/components/board.js.map +1 -1
  84. package/dist/components/categories.js +1 -1
  85. package/dist/components/categories.js.map +1 -1
  86. package/dist/components/charts.d.ts +157 -0
  87. package/dist/components/charts.d.ts.map +1 -0
  88. package/dist/components/charts.js +182 -0
  89. package/dist/components/charts.js.map +1 -0
  90. package/dist/components/decision-list.d.ts.map +1 -1
  91. package/dist/components/decision-list.js +1 -1
  92. package/dist/components/decision-list.js.map +1 -1
  93. package/dist/components/desk-records.d.ts +102 -0
  94. package/dist/components/desk-records.d.ts.map +1 -0
  95. package/dist/components/desk-records.js +221 -0
  96. package/dist/components/desk-records.js.map +1 -0
  97. package/dist/components/desk.d.ts +85 -0
  98. package/dist/components/desk.d.ts.map +1 -0
  99. package/dist/components/desk.js +135 -0
  100. package/dist/components/desk.js.map +1 -0
  101. package/dist/components/event-feed.d.ts.map +1 -1
  102. package/dist/components/event-feed.js +7 -3
  103. package/dist/components/event-feed.js.map +1 -1
  104. package/dist/components/goals.d.ts +2 -0
  105. package/dist/components/goals.d.ts.map +1 -1
  106. package/dist/components/goals.js +1 -1
  107. package/dist/components/goals.js.map +1 -1
  108. package/dist/components/home.d.ts.map +1 -1
  109. package/dist/components/home.js +14 -6
  110. package/dist/components/home.js.map +1 -1
  111. package/dist/components/icon.d.ts +31 -0
  112. package/dist/components/icon.d.ts.map +1 -0
  113. package/dist/components/icon.js +169 -0
  114. package/dist/components/icon.js.map +1 -0
  115. package/dist/components/markdown.d.ts +6 -0
  116. package/dist/components/markdown.d.ts.map +1 -1
  117. package/dist/components/markdown.js +10 -2
  118. package/dist/components/markdown.js.map +1 -1
  119. package/dist/components/people.js +1 -1
  120. package/dist/components/people.js.map +1 -1
  121. package/dist/components/plugin-frame.d.ts.map +1 -1
  122. package/dist/components/plugin-frame.js +7 -0
  123. package/dist/components/plugin-frame.js.map +1 -1
  124. package/dist/components/plugin-settings.d.ts.map +1 -1
  125. package/dist/components/plugin-settings.js +54 -3
  126. package/dist/components/plugin-settings.js.map +1 -1
  127. package/dist/components/projects.d.ts +17 -4
  128. package/dist/components/projects.d.ts.map +1 -1
  129. package/dist/components/projects.js +51 -12
  130. package/dist/components/projects.js.map +1 -1
  131. package/dist/components/rules.d.ts +8 -10
  132. package/dist/components/rules.d.ts.map +1 -1
  133. package/dist/components/rules.js +35 -13
  134. package/dist/components/rules.js.map +1 -1
  135. package/dist/components/sessions.d.ts.map +1 -1
  136. package/dist/components/sessions.js +3 -2
  137. package/dist/components/sessions.js.map +1 -1
  138. package/dist/components/setup.d.ts +9 -3
  139. package/dist/components/setup.d.ts.map +1 -1
  140. package/dist/components/setup.js +12 -6
  141. package/dist/components/setup.js.map +1 -1
  142. package/dist/components/shell.d.ts.map +1 -1
  143. package/dist/components/shell.js +3 -2
  144. package/dist/components/shell.js.map +1 -1
  145. package/dist/components/tokens.js +1 -1
  146. package/dist/components/tokens.js.map +1 -1
  147. package/dist/components/ui.d.ts +5 -2
  148. package/dist/components/ui.d.ts.map +1 -1
  149. package/dist/components/ui.js +10 -7
  150. package/dist/components/ui.js.map +1 -1
  151. package/dist/connect-page.js +1 -1
  152. package/dist/connect-page.js.map +1 -1
  153. package/dist/console.css +1172 -106
  154. package/dist/console.d.ts +5 -0
  155. package/dist/console.d.ts.map +1 -1
  156. package/dist/console.js +52 -39
  157. package/dist/console.js.map +1 -1
  158. package/dist/data.d.ts.map +1 -1
  159. package/dist/data.js +32 -33
  160. package/dist/data.js.map +1 -1
  161. package/dist/desk-page.d.ts +38 -0
  162. package/dist/desk-page.d.ts.map +1 -0
  163. package/dist/desk-page.js +184 -0
  164. package/dist/desk-page.js.map +1 -0
  165. package/dist/desk-records-page.d.ts +18 -0
  166. package/dist/desk-records-page.d.ts.map +1 -0
  167. package/dist/desk-records-page.js +130 -0
  168. package/dist/desk-records-page.js.map +1 -0
  169. package/dist/desk-records.d.ts +247 -0
  170. package/dist/desk-records.d.ts.map +1 -0
  171. package/dist/desk-records.js +543 -0
  172. package/dist/desk-records.js.map +1 -0
  173. package/dist/desk.d.ts +122 -0
  174. package/dist/desk.d.ts.map +1 -0
  175. package/dist/desk.js +211 -0
  176. package/dist/desk.js.map +1 -0
  177. package/dist/feed-stream.d.ts +39 -0
  178. package/dist/feed-stream.d.ts.map +1 -0
  179. package/dist/feed-stream.js +117 -0
  180. package/dist/feed-stream.js.map +1 -0
  181. package/dist/home-tiles.d.ts +19 -3
  182. package/dist/home-tiles.d.ts.map +1 -1
  183. package/dist/home-tiles.js +147 -42
  184. package/dist/home-tiles.js.map +1 -1
  185. package/dist/i18n/en.d.ts +228 -6
  186. package/dist/i18n/en.d.ts.map +1 -1
  187. package/dist/i18n/en.js +309 -9
  188. package/dist/i18n/en.js.map +1 -1
  189. package/dist/i18n/ko.d.ts.map +1 -1
  190. package/dist/i18n/ko.js +366 -85
  191. package/dist/i18n/ko.js.map +1 -1
  192. package/dist/i18n/particles.d.ts +7 -0
  193. package/dist/i18n/particles.d.ts.map +1 -0
  194. package/dist/i18n/particles.js +72 -0
  195. package/dist/i18n/particles.js.map +1 -0
  196. package/dist/icons/glyphs.d.ts +605 -0
  197. package/dist/icons/glyphs.d.ts.map +1 -0
  198. package/dist/icons/glyphs.js +104 -0
  199. package/dist/icons/glyphs.js.map +1 -0
  200. package/dist/icons/index.d.ts +59 -0
  201. package/dist/icons/index.d.ts.map +1 -0
  202. package/dist/icons/index.js +157 -0
  203. package/dist/icons/index.js.map +1 -0
  204. package/dist/index.d.ts +9 -0
  205. package/dist/index.d.ts.map +1 -1
  206. package/dist/index.js +9 -0
  207. package/dist/index.js.map +1 -1
  208. package/dist/limits.d.ts +20 -0
  209. package/dist/limits.d.ts.map +1 -1
  210. package/dist/limits.js +20 -0
  211. package/dist/limits.js.map +1 -1
  212. package/dist/marks.d.ts +9 -0
  213. package/dist/marks.d.ts.map +1 -1
  214. package/dist/marks.js +9 -0
  215. package/dist/marks.js.map +1 -1
  216. package/dist/onboarding.d.ts +6 -0
  217. package/dist/onboarding.d.ts.map +1 -1
  218. package/dist/onboarding.js +5 -5
  219. package/dist/onboarding.js.map +1 -1
  220. package/dist/plugin/context.d.ts +42 -11
  221. package/dist/plugin/context.d.ts.map +1 -1
  222. package/dist/plugin/limits.d.ts +2 -0
  223. package/dist/plugin/limits.d.ts.map +1 -1
  224. package/dist/plugin/limits.js +2 -0
  225. package/dist/plugin/limits.js.map +1 -1
  226. package/dist/plugin/manifest.d.ts +13 -0
  227. package/dist/plugin/manifest.d.ts.map +1 -1
  228. package/dist/plugin/manifest.js +30 -3
  229. package/dist/plugin/manifest.js.map +1 -1
  230. package/dist/plugin/rest-schemas.d.ts +55 -0
  231. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  232. package/dist/plugin/rest-schemas.js +37 -0
  233. package/dist/plugin/rest-schemas.js.map +1 -1
  234. package/dist/plugin/sandbox.d.ts.map +1 -1
  235. package/dist/plugin/sandbox.js +4 -1
  236. package/dist/plugin/sandbox.js.map +1 -1
  237. package/dist/plugin/testing.d.ts +6 -2
  238. package/dist/plugin/testing.d.ts.map +1 -1
  239. package/dist/plugin/testing.js +52 -10
  240. package/dist/plugin/testing.js.map +1 -1
  241. package/dist/plugin/web.d.ts +3 -0
  242. package/dist/plugin/web.d.ts.map +1 -1
  243. package/dist/plugin/web.js +5 -1
  244. package/dist/plugin/web.js.map +1 -1
  245. package/dist/plugin.d.ts +1 -1
  246. package/dist/plugin.d.ts.map +1 -1
  247. package/dist/plugin.js +1 -1
  248. package/dist/plugin.js.map +1 -1
  249. package/dist/records.d.ts +283 -0
  250. package/dist/records.d.ts.map +1 -0
  251. package/dist/records.js +543 -0
  252. package/dist/records.js.map +1 -0
  253. package/dist/routes.d.ts +3 -1
  254. package/dist/routes.d.ts.map +1 -1
  255. package/dist/routes.js +3 -1
  256. package/dist/routes.js.map +1 -1
  257. package/dist/rules.d.ts +30 -11
  258. package/dist/rules.d.ts.map +1 -1
  259. package/dist/rules.js +98 -45
  260. package/dist/rules.js.map +1 -1
  261. package/dist/runner/acp.d.ts +1 -1
  262. package/dist/runner/acp.d.ts.map +1 -1
  263. package/dist/runner/acp.js +32 -21
  264. package/dist/runner/acp.js.map +1 -1
  265. package/dist/runner/awake.d.ts +35 -0
  266. package/dist/runner/awake.d.ts.map +1 -0
  267. package/dist/runner/awake.js +95 -0
  268. package/dist/runner/awake.js.map +1 -0
  269. package/dist/runner/claude.d.ts +1 -1
  270. package/dist/runner/claude.d.ts.map +1 -1
  271. package/dist/runner/claude.js +100 -18
  272. package/dist/runner/claude.js.map +1 -1
  273. package/dist/runner/codex.d.ts +1 -1
  274. package/dist/runner/codex.d.ts.map +1 -1
  275. package/dist/runner/codex.js +20 -17
  276. package/dist/runner/codex.js.map +1 -1
  277. package/dist/runner/config.d.ts +5 -0
  278. package/dist/runner/config.d.ts.map +1 -1
  279. package/dist/runner/config.js +9 -0
  280. package/dist/runner/config.js.map +1 -1
  281. package/dist/runner/desk.d.ts +43 -2
  282. package/dist/runner/desk.d.ts.map +1 -1
  283. package/dist/runner/desk.js +168 -13
  284. package/dist/runner/desk.js.map +1 -1
  285. package/dist/runner/process.d.ts.map +1 -1
  286. package/dist/runner/process.js +11 -4
  287. package/dist/runner/process.js.map +1 -1
  288. package/dist/runner/redact.d.ts +39 -4
  289. package/dist/runner/redact.d.ts.map +1 -1
  290. package/dist/runner/redact.js +81 -5
  291. package/dist/runner/redact.js.map +1 -1
  292. package/dist/runner/runner.d.ts +28 -3
  293. package/dist/runner/runner.d.ts.map +1 -1
  294. package/dist/runner/runner.js +371 -54
  295. package/dist/runner/runner.js.map +1 -1
  296. package/dist/runner/slack.d.ts.map +1 -1
  297. package/dist/runner/slack.js +10 -4
  298. package/dist/runner/slack.js.map +1 -1
  299. package/dist/runner/task-scheduler.d.ts +20 -0
  300. package/dist/runner/task-scheduler.d.ts.map +1 -1
  301. package/dist/runner/task-scheduler.js +34 -4
  302. package/dist/runner/task-scheduler.js.map +1 -1
  303. package/dist/runner/types.d.ts +51 -1
  304. package/dist/runner/types.d.ts.map +1 -1
  305. package/dist/runner/types.js +26 -0
  306. package/dist/runner/types.js.map +1 -1
  307. package/dist/runner.d.ts +6 -6
  308. package/dist/runner.d.ts.map +1 -1
  309. package/dist/runner.js +5 -5
  310. package/dist/runner.js.map +1 -1
  311. package/dist/schemas.d.ts +603 -6
  312. package/dist/schemas.d.ts.map +1 -1
  313. package/dist/schemas.js +156 -20
  314. package/dist/schemas.js.map +1 -1
  315. package/dist/services.d.ts +22 -5
  316. package/dist/services.d.ts.map +1 -1
  317. package/dist/services.js +41 -17
  318. package/dist/services.js.map +1 -1
  319. package/dist/setup-guide.d.ts +17 -4
  320. package/dist/setup-guide.d.ts.map +1 -1
  321. package/dist/setup-guide.js +48 -41
  322. package/dist/setup-guide.js.map +1 -1
  323. package/dist/tokens.d.ts.map +1 -1
  324. package/dist/tokens.js +5 -1
  325. package/dist/tokens.js.map +1 -1
  326. package/dist/vocabulary.d.ts +21 -3
  327. package/dist/vocabulary.d.ts.map +1 -1
  328. package/dist/vocabulary.js +19 -3
  329. package/dist/vocabulary.js.map +1 -1
  330. package/docs/specs/cli.md +73 -44
  331. package/docs/specs/plugins.md +40 -22
  332. package/docs/specs/records.md +113 -0
  333. package/docs/specs/rest.md +30 -21
  334. package/docs/specs/runner.md +46 -22
  335. package/package.json +11 -2
  336. package/skills/building-a-console/SKILL.md +4 -4
  337. package/skills/building-a-plugin/SKILL.md +6 -6
  338. package/skills/deploying-a-console/SKILL.md +4 -4
  339. package/skills/deploying-a-console/references/resources.md +41 -4
  340. package/skills/deploying-a-console/references/running-it-again.md +3 -2
  341. package/skills/keeping-a-desk/SKILL.md +133 -0
  342. package/skills/keeping-a-desk/collections.md +96 -0
  343. package/skills/planning-the-board/SKILL.md +14 -18
  344. package/skills/planning-the-board/references/a-task.md +2 -2
  345. package/skills/planning-the-board/references/project-rules.md +13 -14
  346. package/skills/planning-the-board/references/setting-up.md +15 -13
  347. package/skills/running-an-agent/SKILL.md +47 -56
  348. package/skills/working-the-board/SKILL.md +63 -44
  349. package/skills/working-the-board/references/terms.md +9 -5
  350. package/skills/working-the-board/references/the-pack.md +12 -10
  351. package/skills/working-the-board/references/the-sentence.md +2 -2
  352. package/src/agent-page.tsx +16 -2
  353. package/src/api.ts +109 -3
  354. package/src/charts.ts +250 -0
  355. package/src/cli/cli.ts +2226 -580
  356. package/src/cli/command-words.ts +56 -0
  357. package/src/cli/credentials.ts +181 -20
  358. package/src/cli/directory.ts +28 -10
  359. package/src/cli/format.ts +332 -49
  360. package/src/cli/help.ts +113 -57
  361. package/src/cli/machine-check.ts +223 -0
  362. package/src/cli/main.ts +72 -2
  363. package/src/cli/pack.ts +333 -372
  364. package/src/cli/plugin-check.ts +275 -34
  365. package/src/cli/plugin-cli.ts +28 -4
  366. package/src/cli/plugin-main.ts +1 -0
  367. package/src/cli/runner-host.ts +8 -0
  368. package/src/cli/secret-notes.ts +63 -0
  369. package/src/cli/serve.ts +295 -2
  370. package/src/client.ts +215 -177
  371. package/src/components/agent-page.tsx +1044 -281
  372. package/src/components/agents.tsx +9 -5
  373. package/src/components/board.tsx +3 -15
  374. package/src/components/categories.tsx +2 -2
  375. package/src/components/charts.tsx +680 -0
  376. package/src/components/decision-list.tsx +11 -7
  377. package/src/components/desk-records.tsx +724 -0
  378. package/src/components/desk.tsx +471 -0
  379. package/src/components/event-feed.tsx +12 -3
  380. package/src/components/goals.tsx +33 -25
  381. package/src/components/home.tsx +42 -6
  382. package/src/components/icon.tsx +337 -0
  383. package/src/components/markdown.tsx +22 -2
  384. package/src/components/people.tsx +1 -1
  385. package/src/components/plugin-frame.tsx +7 -0
  386. package/src/components/plugin-settings.tsx +171 -12
  387. package/src/components/projects.tsx +68 -17
  388. package/src/components/rules.tsx +94 -34
  389. package/src/components/sessions.tsx +2 -13
  390. package/src/components/setup.tsx +20 -5
  391. package/src/components/shell.tsx +3 -20
  392. package/src/components/tokens.tsx +1 -1
  393. package/src/components/ui.tsx +16 -8
  394. package/src/connect-page.tsx +1 -1
  395. package/src/console.tsx +104 -62
  396. package/src/data.ts +37 -34
  397. package/src/desk-page.tsx +332 -0
  398. package/src/desk-records-page.tsx +256 -0
  399. package/src/desk-records.ts +808 -0
  400. package/src/desk.ts +329 -0
  401. package/src/feed-stream.ts +144 -0
  402. package/src/home-tiles.ts +170 -46
  403. package/src/i18n/en.ts +323 -11
  404. package/src/i18n/ko.ts +378 -87
  405. package/src/i18n/particles.ts +79 -0
  406. package/src/icons/glyphs.ts +112 -0
  407. package/src/icons/index.ts +195 -0
  408. package/src/index.ts +125 -0
  409. package/src/limits.ts +20 -0
  410. package/src/marks.ts +12 -0
  411. package/src/onboarding.ts +14 -6
  412. package/src/plugin/context.ts +55 -12
  413. package/src/plugin/limits.ts +2 -0
  414. package/src/plugin/manifest.ts +38 -2
  415. package/src/plugin/rest-schemas.ts +41 -0
  416. package/src/plugin/sandbox.ts +4 -1
  417. package/src/plugin/testing.ts +63 -12
  418. package/src/plugin/web.ts +9 -2
  419. package/src/plugin.ts +2 -0
  420. package/src/records.ts +702 -0
  421. package/src/routes.ts +3 -1
  422. package/src/rules.ts +108 -47
  423. package/src/runner/acp.ts +49 -30
  424. package/src/runner/awake.ts +135 -0
  425. package/src/runner/claude.ts +131 -26
  426. package/src/runner/codex.ts +37 -26
  427. package/src/runner/config.ts +9 -0
  428. package/src/runner/desk.ts +200 -15
  429. package/src/runner/process.ts +11 -4
  430. package/src/runner/redact.ts +92 -6
  431. package/src/runner/runner.ts +457 -56
  432. package/src/runner/slack.ts +10 -4
  433. package/src/runner/task-scheduler.ts +36 -4
  434. package/src/runner/types.ts +67 -1
  435. package/src/runner.ts +27 -2
  436. package/src/schemas.ts +177 -18
  437. package/src/services.ts +55 -16
  438. package/src/setup-guide.ts +49 -40
  439. package/src/styles/README.md +16 -5
  440. package/src/styles/base.css +17 -0
  441. package/src/styles/console.css +10 -0
  442. package/src/styles/drawn-by-pages.json +1 -1
  443. package/src/styles/pages/agents.css +103 -1
  444. package/src/styles/pages/board.css +0 -10
  445. package/src/styles/pages/calendar.css +1 -1
  446. package/src/styles/pages/connect.css +0 -10
  447. package/src/styles/pages/decisions.css +3 -1
  448. package/src/styles/pages/desk.css +126 -0
  449. package/src/styles/pages/documents.css +5 -0
  450. package/src/styles/pages/feed.css +5 -2
  451. package/src/styles/pages/home.css +5 -0
  452. package/src/styles/pages/roadmap.css +2 -2
  453. package/src/styles/pages/settings.css +11 -0
  454. package/src/styles/pages/task.css +0 -20
  455. package/src/styles/pages/thread.css +1 -1
  456. package/src/styles/parts/bars.css +80 -0
  457. package/src/styles/parts/calendar.css +1 -1
  458. package/src/styles/parts/callout.css +1 -0
  459. package/src/styles/parts/chart.css +173 -0
  460. package/src/styles/parts/detail.css +22 -0
  461. package/src/styles/parts/empty.css +2 -0
  462. package/src/styles/parts/eyebrow.css +1 -1
  463. package/src/styles/parts/facts.css +1 -1
  464. package/src/styles/parts/figures.css +65 -0
  465. package/src/styles/parts/form.css +2 -1
  466. package/src/styles/parts/icon.css +191 -0
  467. package/src/styles/parts/input.css +14 -4
  468. package/src/styles/parts/legend.css +48 -0
  469. package/src/styles/parts/mark.css +36 -0
  470. package/src/styles/parts/menu.css +1 -7
  471. package/src/styles/parts/page.css +1 -1
  472. package/src/styles/parts/panel.css +10 -0
  473. package/src/styles/parts/person.css +5 -2
  474. package/src/styles/parts/progress.css +5 -2
  475. package/src/styles/parts/rows.css +1 -0
  476. package/src/styles/parts/series.css +32 -0
  477. package/src/styles/parts/settings.css +5 -0
  478. package/src/styles/parts/share.css +25 -0
  479. package/src/styles/parts/spark.css +23 -0
  480. package/src/styles/parts/stat.css +69 -0
  481. package/src/styles/tokens.css +31 -10
  482. package/src/tokens.ts +5 -1
  483. package/src/vocabulary.ts +25 -3
  484. package/template/desk-web/README.md +8 -0
  485. package/template/desk-web/index.html +13 -0
  486. package/template/desk-web/package.json +25 -0
  487. package/template/desk-web/src/main.tsx +24 -0
  488. package/template/desk-web/src/page.tsx +51 -0
  489. package/template/desk-web/tsconfig.json +16 -0
  490. package/template/desk-web/vite.config.ts +15 -0
@@ -1,12 +1,13 @@
1
1
  import type { ReactNode } from "react";
2
2
  import {
3
+ type FirstSignIn,
3
4
  hostOfLogin,
4
5
  type RestAgentInvitation,
5
6
  type RestAgentInvitationMade,
6
7
  type RestAgentSetup,
7
8
  } from "../api.js";
8
9
  import { useWords } from "../i18n/index.js";
9
- import { type SetupGuide, setupSentenceOf } from "../setup-guide.js";
10
+ import { SETUP_INSTALL, type SetupGuide } from "../setup-guide.js";
10
11
  import { AvatarPicture, Badge, Button, Callout, CopyButton, cx, personName, Time } from "./ui.js";
11
12
 
12
13
  // The way a machine is led to an agent account (ADR-0088): the invitation as a supervisor sees
@@ -106,7 +107,7 @@ export function AgentInvitationPanel(props: AgentInvitationPanelProps) {
106
107
  {made !== undefined ? (
107
108
  <Callout tone="warning" title={words.made.title}>
108
109
  <p>{words.made.say}</p>
109
- <Line text={setupSentenceOf(made.command)} />
110
+ <Line text={words.made.line(made.command, SETUP_INSTALL)} />
110
111
  <p>{words.made.orRun}</p>
111
112
  <Line text={made.command} />
112
113
  <p>
@@ -146,6 +147,11 @@ export interface AgentStartStepsProps {
146
147
  readonly provider: string;
147
148
  /** Whether anyone has signed in with the account. */
148
149
  readonly signedIn: boolean;
150
+ /**
151
+ * What its first sign-in is held to at a git host (ADR-0126), as the console answers it of
152
+ * the account: left out, as a console older than the answer leaves it, the login alone.
153
+ */
154
+ readonly firstSignIn?: FirstSignIn | undefined;
149
155
  /** Whether an invitation stands. */
150
156
  readonly invited: boolean;
151
157
  /** Whether the account's command is signed in on a machine. */
@@ -161,8 +167,9 @@ export interface AgentStartStepsProps {
161
167
  * done: the account it signs in with, an invitation, the one line on its machine, its runner.
162
168
  * Each is said done as the console sees it, so that whoever looks reads what is next. Who makes
163
169
  * the account at the provider is not said: the account is named, and when it has to be there
164
- * (ADR-0094), which at a git host is already, since until its first sign-in the console lets in
165
- * whoever holds the login.
170
+ * (ADR-0094), which at a git host is already, since a login there is whoever's registers it:
171
+ * the step says whether the host said which account the login is, and marks the account not
172
+ * confirmed where it did not (ADR-0126).
166
173
  */
167
174
  export function AgentStartSteps(props: AgentStartStepsProps) {
168
175
  const words = useWords().agents.page.start;
@@ -170,11 +177,15 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
170
177
  const heard = props.heard;
171
178
  const onMachine = props.onMachine || heard;
172
179
  const signedIn = props.signedIn || onMachine;
180
+ const atGitHost = hostOfLogin(props.login) === "gh";
181
+ const heldTo = props.firstSignIn ?? "login";
173
182
  const steps: readonly {
174
183
  readonly key: string;
175
184
  readonly title: string;
176
185
  readonly body: string;
177
186
  readonly done: boolean;
187
+ /** What is to be seen of a step that is not done, beside its title. */
188
+ readonly mark?: string | undefined;
178
189
  readonly more?: ReactNode;
179
190
  }[] = [
180
191
  {
@@ -182,8 +193,11 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
182
193
  title: words.account.title,
183
194
  body: signedIn
184
195
  ? words.account.done(props.login)
185
- : words.account.at[hostOfLogin(props.login)](props.login, props.provider),
196
+ : atGitHost
197
+ ? words.account.at.gh[heldTo](props.login, props.provider)
198
+ : words.account.at.google(props.login, props.provider),
186
199
  done: signedIn,
200
+ mark: !signedIn && atGitHost && heldTo !== "account" ? words.account.notConfirmed : undefined,
187
201
  },
188
202
  {
189
203
  key: "invitation",
@@ -226,6 +240,7 @@ export function AgentStartSteps(props: AgentStartStepsProps) {
226
240
  <span className="sc-step-title">
227
241
  {step.title}
228
242
  {step.done && <Badge tone="success">{words.done}</Badge>}
243
+ {!step.done && step.mark !== undefined && <Badge tone="warning">{step.mark}</Badge>}
229
244
  </span>
230
245
  <p className="sc-step-body">{step.body}</p>
231
246
  {step.more}
@@ -1,6 +1,7 @@
1
1
  import { Fragment, type ReactNode, useEffect, useId, useRef, useState } from "react";
2
2
  import type { RestPerson } from "../api.js";
3
3
  import { useWords } from "../i18n/index.js";
4
+ import { Icon } from "./icon.js";
4
5
  import { Avatar, cx, personName } from "./ui.js";
5
6
 
6
7
  // The frame every page sits in (ADR-0010): a header that names the workspace and the project the
@@ -299,16 +300,7 @@ function TabGroup(props: { readonly item: NavItem; readonly onNavigate: (href: s
299
300
  }}
300
301
  >
301
302
  <span className="sc-tab-label">{item.label}</span>
302
- <svg className="sc-menu-caret" viewBox="0 0 16 16" aria-hidden="true">
303
- <path
304
- d="M4 6l4 4 4-4"
305
- fill="none"
306
- stroke="currentColor"
307
- strokeWidth="1.5"
308
- strokeLinecap="round"
309
- strokeLinejoin="round"
310
- />
311
- </svg>
303
+ <Icon name="chevron-down" size="xs" className="sc-menu-caret" />
312
304
  </button>
313
305
  <div
314
306
  id={id}
@@ -392,16 +384,7 @@ function PersonMenu(props: {
392
384
  <summary className="sc-menu-summary" aria-label={words.shell.menu(personName(person))}>
393
385
  <Avatar person={person} size="sm" />
394
386
  <span className="sc-person-login">{personName(person)}</span>
395
- <svg className="sc-menu-caret" viewBox="0 0 16 16" aria-hidden="true">
396
- <path
397
- d="M4 6l4 4 4-4"
398
- fill="none"
399
- stroke="currentColor"
400
- strokeWidth="1.5"
401
- strokeLinecap="round"
402
- strokeLinejoin="round"
403
- />
404
- </svg>
387
+ <Icon name="chevron-down" size="xs" className="sc-menu-caret" />
405
388
  </summary>
406
389
  <div className="sc-menu-panel">
407
390
  <p className="sc-menu-who">
@@ -112,7 +112,7 @@ export function TokenList(props: TokenListProps) {
112
112
  </div>
113
113
  {props.onRevoke !== undefined && (
114
114
  <Button
115
- variant="danger"
115
+ variant="ghost"
116
116
  size="sm"
117
117
  disabled={props.busy === true}
118
118
  onClick={() => props.onRevoke?.(token)}
@@ -510,8 +510,13 @@ export function ProgressBar(props: {
510
510
  return (
511
511
  <div className="sc-progress">
512
512
  <div className="sc-progress-bar" {...said}>
513
- <span className="sc-progress-done" style={{ width: `${share(counts.done)}%` }} />
514
- <span className="sc-progress-working" style={{ width: `${share(working)}%` }} />
513
+ {/* A part of nothing is not drawn: it would leave its gap at the bar's edge. */}
514
+ {counts.done > 0 && (
515
+ <span className="sc-progress-done" style={{ width: `${share(counts.done)}%` }} />
516
+ )}
517
+ {working > 0 && (
518
+ <span className="sc-progress-working" style={{ width: `${share(working)}%` }} />
519
+ )}
515
520
  </div>
516
521
  {props.words !== false && (
517
522
  <span className="sc-progress-words">
@@ -557,17 +562,20 @@ export function EmptyState(props: {
557
562
  );
558
563
  }
559
564
 
560
- /** An instant as people read one in a language: the date, and the time of day. */
561
- export function formatInstant(iso: string, language?: string): string {
565
+ /**
566
+ * An instant as people read one in a language: the day and the time of day, with the year
567
+ * where it is another than this one's, as a day alone is written (formatDay).
568
+ */
569
+ export function formatInstant(iso: string, language?: string, now: Date = new Date()): string {
562
570
  const date = new Date(iso);
563
571
  if (Number.isNaN(date.getTime())) {
564
572
  return iso;
565
573
  }
566
574
  return date.toLocaleString(language, {
567
- year: "numeric",
575
+ ...(date.getFullYear() === now.getFullYear() ? {} : { year: "numeric" }),
568
576
  month: "short",
569
577
  day: "numeric",
570
- hour: "2-digit",
578
+ hour: "numeric",
571
579
  minute: "2-digit",
572
580
  });
573
581
  }
@@ -606,8 +614,8 @@ export function Time(props: {
606
614
  const shown = date.toLocaleString(
607
615
  tag,
608
616
  dayOf(date) === dayOf(props.against === undefined ? new Date() : new Date(props.against))
609
- ? { hour: "2-digit", minute: "2-digit" }
610
- : { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" },
617
+ ? { hour: "numeric", minute: "2-digit" }
618
+ : { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" },
611
619
  );
612
620
  return (
613
621
  <time className="sc-time" dateTime={props.iso} title={full}>
@@ -69,7 +69,7 @@ export function ConnectPage(props: ConnectPageProps) {
69
69
  );
70
70
  const ask = (
71
71
  <>
72
- <section className="sc-panel" aria-label={words.aria}>
72
+ <section className="sc-panel sc-panel-form" aria-label={words.aria}>
73
73
  <ConnectCodeForm busy={busy} onSubmit={(typed) => navigation.go(connectHref(typed))} />
74
74
  </section>
75
75
  </>
package/src/console.tsx CHANGED
@@ -17,7 +17,6 @@ import {
17
17
  type FileUpload,
18
18
  OPEN_TASK_STATES,
19
19
  PROJECT_RULES_TEMPLATE,
20
- REFERENCE_RULES,
21
20
  type RestAgent,
22
21
  type RestAgentProposal,
23
22
  type RestAnswerInput,
@@ -65,6 +64,7 @@ import {
65
64
  DecisionList,
66
65
  type DecisionListProps,
67
66
  } from "./components/decision-list.js";
67
+ import { DeskWords } from "./components/desk.js";
68
68
  import { EventFeed, type EventFeedProps } from "./components/event-feed.js";
69
69
  import { GoalForm, GoalList, type GoalListProps, GoalView, goalMonth } from "./components/goals.js";
70
70
  import { HomeGrid, type HomeGridProps, type ProjectGlance } from "./components/home.js";
@@ -260,6 +260,11 @@ export interface CustomPageContext {
260
260
  /** The client, for what the data does not carry. */
261
261
  readonly client: ConsoleClient;
262
262
  readonly navigation: Navigation;
263
+ /**
264
+ * The query of the address the page is at, as the browser has it (`?view=figures`), or `""`:
265
+ * how a page of one's own is shown is said by its address, as every page's is (ADR-0010).
266
+ */
267
+ readonly search: string;
263
268
  /** The words of the language the pages speak, and its tag. */
264
269
  readonly words: Messages;
265
270
  readonly language: string;
@@ -586,7 +591,7 @@ function ProjectsPage(props: {
586
591
  </div>
587
592
  {error !== undefined && <Callout tone="danger">{error}</Callout>}
588
593
  {making && (
589
- <section className="sc-panel sc-panel-form" aria-label={words.form.aria}>
594
+ <section className="sc-panel sc-panel-form sc-panel-form-lead" aria-label={words.form.aria}>
590
595
  <ProjectForm
591
596
  busy={busy}
592
597
  skillsSource={data.me?.workspace.skills.source}
@@ -1401,13 +1406,10 @@ function ProjectPage(props: {
1401
1406
  const viewHref = (view: GoalTaskView) => goalHref(key, goal.id, { view });
1402
1407
  return (
1403
1408
  <>
1404
- <div className="sc-page-head">
1405
- <h1 className="sc-page-title">{roadmap.one}</h1>
1406
- <LinkButton href={projectHref(key, "roadmap")}>{roadmap.all}</LinkButton>
1407
- </div>
1408
1409
  {error !== undefined && <Callout tone="danger">{error}</Callout>}
1409
1410
  <GoalView
1410
1411
  goal={goal}
1412
+ allHref={projectHref(key, "roadmap")}
1411
1413
  tasks={data.tasks}
1412
1414
  taskHref={href}
1413
1415
  docHref={toDoc}
@@ -1574,27 +1576,30 @@ function ProjectPage(props: {
1574
1576
  <div className="sc-page-head">
1575
1577
  <h1 className="sc-page-title">{words.feed.title}</h1>
1576
1578
  </div>
1577
- <components.EventFeed
1578
- events={data.events}
1579
- href={(event) => {
1580
- const task = event.taskId === null ? undefined : tasksById.get(event.taskId);
1581
- if (task !== undefined) {
1582
- return href(task);
1583
- }
1584
- if (event.decisionId !== null) {
1585
- return decisionHref(key, event.decisionId);
1586
- }
1587
- if (event.goalId !== null) {
1588
- return goalHref(key, event.goalId);
1589
- }
1590
- // The rules are a page shown on the settings, not among the documents (ADR-0023).
1591
- if (event.data.path === RULES_PATH) {
1592
- return projectSettingsHref(key);
1593
- }
1594
- return event.data.path === undefined ? undefined : toDoc(event.data.path);
1595
- }}
1596
- empty={<EmptyState title={words.feed.empty} />}
1597
- />
1579
+ {/* The feed names its own region; the pane it stands on is no second one of that name. */}
1580
+ <div className="sc-panel">
1581
+ <components.EventFeed
1582
+ events={data.events}
1583
+ href={(event) => {
1584
+ const task = event.taskId === null ? undefined : tasksById.get(event.taskId);
1585
+ if (task !== undefined) {
1586
+ return href(task);
1587
+ }
1588
+ if (event.decisionId !== null) {
1589
+ return decisionHref(key, event.decisionId);
1590
+ }
1591
+ if (event.goalId !== null) {
1592
+ return goalHref(key, event.goalId);
1593
+ }
1594
+ // The rules are a page shown on the settings, not among the documents (ADR-0023).
1595
+ if (event.data.path === RULES_PATH) {
1596
+ return projectSettingsHref(key);
1597
+ }
1598
+ return event.data.path === undefined ? undefined : toDoc(event.data.path);
1599
+ }}
1600
+ empty={<EmptyState title={words.feed.empty} />}
1601
+ />
1602
+ </div>
1598
1603
  </>
1599
1604
  );
1600
1605
  }
@@ -1723,9 +1728,6 @@ function ProjectSettingsPage(props: {
1723
1728
  const head = (
1724
1729
  <div className="sc-page-head">
1725
1730
  <h1 className="sc-page-title">{settings.title}</h1>
1726
- {owner && route.form === undefined && (
1727
- <LinkButton href={projectSettingsHref(key, "edit")}>{words.common.edit}</LinkButton>
1728
- )}
1729
1731
  </div>
1730
1732
  );
1731
1733
  if (route.form === "edit") {
@@ -1837,6 +1839,17 @@ function ProjectSettingsPage(props: {
1837
1839
  {head}
1838
1840
  {error !== undefined && <Callout tone="danger">{error}</Callout>}
1839
1841
  <section className="sc-panel" aria-label={settings.aria}>
1842
+ <div className="sc-section-head">
1843
+ <h2 className="sc-section-title">{words.nav.projects}</h2>
1844
+ {owner && (
1845
+ <a
1846
+ className="sc-button sc-button-secondary sc-button-sm"
1847
+ href={projectSettingsHref(key, "edit")}
1848
+ >
1849
+ {words.common.edit}
1850
+ </a>
1851
+ )}
1852
+ </div>
1840
1853
  <dl className="sc-facts sc-facts-plain">
1841
1854
  <div>
1842
1855
  <dt>{form.name}</dt>
@@ -1942,8 +1955,9 @@ function ProjectSettingsPage(props: {
1942
1955
  * signed in on (board #309), which a console that holds a token does not offer, and so does not
1943
1956
  * name.
1944
1957
  */
1945
- function SettingsViews(props: { readonly on: "workspace" | "sessions" }) {
1946
- const views = useWords().settings.views;
1958
+ function SettingsViews(props: { readonly on: "workspace" | "sessions" | "categories" }) {
1959
+ const settings = useWords().settings;
1960
+ const views = settings.views;
1947
1961
  return (
1948
1962
  <nav className="sc-subtabs sc-settings-views" aria-label={views.aria}>
1949
1963
  <a
@@ -1960,6 +1974,13 @@ function SettingsViews(props: { readonly on: "workspace" | "sessions" }) {
1960
1974
  >
1961
1975
  {views.sessions}
1962
1976
  </a>
1977
+ <a
1978
+ className={cx("sc-tab", props.on === "categories" && "sc-tab-current")}
1979
+ href={PATHS.categories}
1980
+ aria-current={props.on === "categories" ? "page" : undefined}
1981
+ >
1982
+ {settings.categories}
1983
+ </a>
1963
1984
  </nav>
1964
1985
  );
1965
1986
  }
@@ -2088,7 +2109,7 @@ function WorkspaceSettingsPage(props: {
2088
2109
  <RulesForm
2089
2110
  rules={rules}
2090
2111
  scope="workspace"
2091
- template={REFERENCE_RULES}
2112
+ template=""
2092
2113
  busy={busy}
2093
2114
  onSubmit={(input) =>
2094
2115
  void act(async () => {
@@ -2104,12 +2125,6 @@ function WorkspaceSettingsPage(props: {
2104
2125
  })
2105
2126
  }
2106
2127
  onCancel={() => navigation.back(PATHS.settings)}
2107
- onReset={() =>
2108
- void act(async () => {
2109
- setRules(await data.actions.archiveRules());
2110
- navigation.replace(PATHS.settings);
2111
- })
2112
- }
2113
2128
  />
2114
2129
  )}
2115
2130
  </section>
@@ -2503,6 +2518,8 @@ function PlatePage(props: {
2503
2518
  readonly lead?: string | undefined;
2504
2519
  /** What stands beside the title: the way back, on another person's plate. */
2505
2520
  readonly aside?: ReactNode;
2521
+ /** What stands under the head and over the plate: the agents that need the person, on their own. */
2522
+ readonly under?: ReactNode;
2506
2523
  /** A day of the week shown at the top, from the address; today's week when it names none. */
2507
2524
  readonly week: string | undefined;
2508
2525
  readonly weekHref: (day: string) => string;
@@ -2558,6 +2575,7 @@ function PlatePage(props: {
2558
2575
  {props.aside}
2559
2576
  </div>
2560
2577
  )}
2578
+ {props.under}
2561
2579
  {problem !== undefined && <Callout tone="danger">{problem}</Callout>}
2562
2580
  {forbidden && refused !== undefined ? (
2563
2581
  <EmptyState
@@ -2834,22 +2852,20 @@ function WorkPage(props: {
2834
2852
  const words = useWords();
2835
2853
  const { plate } = props.data.actions;
2836
2854
  return (
2837
- <>
2838
- <AgentsNeedingYou agents={props.data.agents} me={props.data.me?.person?.id} />
2839
- <PlatePage
2840
- components={props.components}
2841
- load={plate}
2842
- remember={`work:${props.data.me?.person?.id ?? ""}`}
2843
- early="work"
2844
- title={words.work.title}
2845
- week={props.week}
2846
- weekStart={weekStartOf(props.data.me?.workspace)}
2847
- weekHref={workHref}
2848
- loading={words.work.loading}
2849
- couldNotLoad={words.work.couldNotLoad}
2850
- empty={words.work.empty}
2851
- />
2852
- </>
2855
+ <PlatePage
2856
+ components={props.components}
2857
+ under={<AgentsNeedingYou agents={props.data.agents} me={props.data.me?.person?.id} />}
2858
+ load={plate}
2859
+ remember={`work:${props.data.me?.person?.id ?? ""}`}
2860
+ early="work"
2861
+ title={words.work.title}
2862
+ week={props.week}
2863
+ weekStart={weekStartOf(props.data.me?.workspace)}
2864
+ weekHref={workHref}
2865
+ loading={words.work.loading}
2866
+ couldNotLoad={words.work.couldNotLoad}
2867
+ empty={words.work.empty}
2868
+ />
2853
2869
  );
2854
2870
  }
2855
2871
 
@@ -3095,8 +3111,9 @@ function WorkspacePage(props: {
3095
3111
  return (
3096
3112
  <>
3097
3113
  <div className="sc-page-head">
3098
- <h1 className="sc-page-title">{categories.title}</h1>
3114
+ <h1 className="sc-page-title">{words.settings.title}</h1>
3099
3115
  </div>
3116
+ {!holdsToken(data) && <SettingsViews on="categories" />}
3100
3117
  {error !== undefined && <Callout tone="danger">{error}</Callout>}
3101
3118
  <components.CategoryList
3102
3119
  categories={data.categories}
@@ -3177,7 +3194,10 @@ function WorkspacePage(props: {
3177
3194
  {narrowed && <p className="sc-lead">{words.people.narrowed}</p>}
3178
3195
  {error !== undefined && <Callout tone="danger">{error}</Callout>}
3179
3196
  {makingTeam && (
3180
- <section className="sc-panel sc-panel-form" aria-label={words.teams.newAria}>
3197
+ <section
3198
+ className="sc-panel sc-panel-form sc-panel-form-lead"
3199
+ aria-label={words.teams.newAria}
3200
+ >
3181
3201
  <TeamForm
3182
3202
  busy={busy}
3183
3203
  onSubmit={(input) =>
@@ -3224,7 +3244,10 @@ function WorkspacePage(props: {
3224
3244
  />
3225
3245
  )}
3226
3246
  {making && (
3227
- <section className="sc-panel sc-panel-form" aria-label={words.people.letInAria}>
3247
+ <section
3248
+ className="sc-panel sc-panel-form sc-panel-form-lead"
3249
+ aria-label={words.people.letInAria}
3250
+ >
3228
3251
  <ListingForm
3229
3252
  providers={data.me?.signIn ?? []}
3230
3253
  busy={busy}
@@ -3446,7 +3469,10 @@ function WorkspacePage(props: {
3446
3469
  />
3447
3470
  )}
3448
3471
  {making && (
3449
- <section className="sc-panel sc-panel-form" aria-label={agents.makeAria}>
3472
+ <section
3473
+ className="sc-panel sc-panel-form sc-panel-form-lead"
3474
+ aria-label={agents.makeAria}
3475
+ >
3450
3476
  <TokenForm
3451
3477
  daysAtMost={data.me?.workspace.tokenDaysAtMost}
3452
3478
  busy={busy}
@@ -3468,6 +3494,7 @@ function WorkspacePage(props: {
3468
3494
  empty={<EmptyState title={agents.empty.title} body={agents.empty.body} />}
3469
3495
  />
3470
3496
  <ConnectWords origin={origin} />
3497
+ <DeskWords origin={origin} />
3471
3498
  </section>
3472
3499
  )}
3473
3500
  </>
@@ -3559,7 +3586,11 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
3559
3586
  /** The tab the page shown is under, once the tabs are known. */
3560
3587
  let here: string | undefined;
3561
3588
  let content: React.ReactNode;
3562
- if (data.me === undefined) {
3589
+ // The shell waits for the workspace's lists as it waits for who is asking: its tabs name the
3590
+ // plugins, and tabs drawn before those are known move under the pointer when they arrive.
3591
+ const listsToCome =
3592
+ data.me !== undefined && data.me.person !== null && !data.loaded && data.error === undefined;
3593
+ if (data.me === undefined || listsToCome) {
3563
3594
  content = (
3564
3595
  <Ground>
3565
3596
  <div className="sc-loading">
@@ -3674,7 +3705,10 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
3674
3705
  href: projectHref(projectKey),
3675
3706
  label: words.nav.board,
3676
3707
  current:
3677
- route.name === "board" || route.name === "task" || route.name === "new-task",
3708
+ route.name === "board" ||
3709
+ route.name === "task" ||
3710
+ route.name === "new-task" ||
3711
+ route.name === "archive",
3678
3712
  },
3679
3713
  {
3680
3714
  href: projectHref(projectKey, "roadmap"),
@@ -3752,7 +3786,15 @@ export function createConsole(config: ConsoleConfig = {}): ConsoleApp {
3752
3786
  return found === undefined ? (
3753
3787
  <NothingHere />
3754
3788
  ) : (
3755
- found.render({ data, project, client, navigation, words, language: pack.tag })
3789
+ found.render({
3790
+ data,
3791
+ project,
3792
+ client,
3793
+ navigation,
3794
+ search: location.search,
3795
+ words,
3796
+ language: pack.tag,
3797
+ })
3756
3798
  );
3757
3799
  };
3758
3800
  let page: ReactNode;
package/src/data.ts CHANGED
@@ -4,7 +4,6 @@ import {
4
4
  type CommentInput,
5
5
  type ConsoleClient,
6
6
  type DocumentFilter,
7
- EVENT_KINDS,
8
7
  type FileUpload,
9
8
  LIST_LIMIT,
10
9
  type ProjectClient,
@@ -73,8 +72,8 @@ import {
73
72
  type RestWorkspace,
74
73
  type RestWorkspacePackConnect,
75
74
  type RestWorkspacePatch,
76
- restEventSchema,
77
75
  } from "./api.js";
76
+ import { followFeed, whileFeedSettles } from "./feed-stream.js";
78
77
 
79
78
  // What the console shows, and how it stays current: the workspace (who is signed in, the
80
79
  // projects, the people, the tokens) is loaded once; the project the page is on is loaded whole,
@@ -325,7 +324,11 @@ async function readFeed(
325
324
  key: string,
326
325
  signal: AbortSignal,
327
326
  ): Promise<RestEvent[]> {
328
- const result = await client.project(key).events(0, { latest: true }, signal);
327
+ // Asked again where the console cannot say yet where the feed stands: never begun from nothing.
328
+ const result = await whileFeedSettles(
329
+ () => client.project(key).events(0, { latest: true }, signal),
330
+ { signal },
331
+ );
329
332
  return result.items.slice(-FEED_KEEP);
330
333
  }
331
334
 
@@ -608,7 +611,7 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
608
611
  }
609
612
  const controller = new AbortController();
610
613
  const { signal } = controller;
611
- let source: EventSource | undefined;
614
+ let unfollow: (() => void) | undefined;
612
615
  let reloadTimer: ReturnType<typeof setTimeout> | undefined;
613
616
  const scope = client.project(projectKey);
614
617
  const run = async () => {
@@ -653,42 +656,38 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
653
656
  });
654
657
  }
655
658
  });
656
- if (typeof EventSource === "undefined") {
659
+ // The stream begins after the feed read, and is opened again from the last event that
660
+ // arrived when the browser gives it up, while the console restarts say (`feed-stream.ts`).
661
+ if (signal.aborted) {
657
662
  return;
658
663
  }
659
- source = new EventSource(scope.eventStreamUrl(lastEvent.current));
660
- source.onopen = () => setLive(true);
661
- source.onerror = () => setLive(false);
662
- const arrived = (message: MessageEvent) => {
663
- const parsed = restEventSchema.safeParse(JSON.parse(String(message.data)));
664
- if (!parsed.success || parsed.data.id <= lastEvent.current) {
665
- return;
666
- }
667
- lastEvent.current = parsed.data.id;
668
- const event = parsed.data;
669
- setEvents((current) => [...current, event].slice(-FEED_KEEP));
670
- clearTimeout(reloadTimer);
671
- reloadTimer = setTimeout(() => {
672
- refreshProject(signal).catch(() => undefined);
673
- if (event.kind.startsWith("project.")) {
674
- refreshWorkspace(signal).catch(() => undefined);
675
- }
676
- // A decision raised or answered here may be one of the person's own: the count beside
677
- // My decisions follows it.
678
- if (event.kind.startsWith("decision.")) {
679
- refreshMe(signal).catch(() => undefined);
680
- }
681
- }, RELOAD_DELAY_MS);
682
- };
683
- for (const kind of EVENT_KINDS) {
684
- source.addEventListener(kind, arrived);
685
- }
664
+ unfollow = followFeed({
665
+ url: (after) => scope.eventStreamUrl(after),
666
+ after: lastEvent.current,
667
+ onLive: setLive,
668
+ onEvent: (event) => {
669
+ lastEvent.current = event.id;
670
+ setEvents((current) => [...current, event].slice(-FEED_KEEP));
671
+ clearTimeout(reloadTimer);
672
+ reloadTimer = setTimeout(() => {
673
+ refreshProject(signal).catch(() => undefined);
674
+ if (event.kind.startsWith("project.")) {
675
+ refreshWorkspace(signal).catch(() => undefined);
676
+ }
677
+ // A decision raised or answered here may be one of the person's own: the count
678
+ // beside My decisions follows it.
679
+ if (event.kind.startsWith("decision.")) {
680
+ refreshMe(signal).catch(() => undefined);
681
+ }
682
+ }, RELOAD_DELAY_MS);
683
+ },
684
+ });
686
685
  };
687
686
  void run();
688
687
  return () => {
689
688
  controller.abort();
690
689
  clearTimeout(reloadTimer);
691
- source?.close();
690
+ unfollow?.();
692
691
  setLive(false);
693
692
  };
694
693
  }, [client, projectKey, signedIn, generation, refreshProject, refreshWorkspace, refreshMe]);
@@ -964,7 +963,11 @@ export function useConsoleData(client: ConsoleClient, projectKey: string | undef
964
963
  const history: RestEvent[] = [];
965
964
  let after = 0;
966
965
  for (let page = 0; page < FEED_MAX_PAGES; page += 1) {
967
- const result = await scope().events(after, { task: taskId }, signal);
966
+ const from = after;
967
+ const result = await whileFeedSettles(
968
+ () => scope().events(from, { task: taskId }, signal),
969
+ { signal },
970
+ );
968
971
  history.push(...result.items);
969
972
  after = result.items.at(-1)?.id ?? after;
970
973
  if (!result.more) {