rvlib-shipkit 2.19.0 → 2.21.0

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 (196) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.json +1 -1
  3. package/src/annex/annex.ts +227 -0
  4. package/src/annex/offload.ts +279 -0
  5. package/src/checks/SK004-gitignore-policy.check.ts +6 -3
  6. package/src/checks/SK040-release-words.check.ts +43 -0
  7. package/src/checks/SK041-annex-links.check.ts +28 -0
  8. package/src/checks/SK042-post-kinds.check.ts +73 -0
  9. package/src/cli/cmd_Annex.ts +179 -0
  10. package/src/cli/cmd_Commands.ts +4 -1
  11. package/src/cli/cmd_GlobalProcesses.ts +2 -107
  12. package/src/cli/cmd_Home.ts +4 -3
  13. package/src/cli/cmd_Messages.ts +155 -0
  14. package/src/cli/cmd_Overview.ts +2 -1
  15. package/src/cli/cmd_Releases.ts +84 -0
  16. package/src/cli/cmd_Review.ts +176 -12
  17. package/src/cli/cmd_Shot.ts +4 -4
  18. package/src/cli/cmd_Social.ts +151 -8
  19. package/src/cli/cmd_Sound.ts +17 -4
  20. package/src/cli/cmd_Trailer.ts +67 -1
  21. package/src/cli/family-pages.ts +2 -0
  22. package/src/cli/kit/index.ts +1 -1
  23. package/src/cli/kit/verb.ts +11 -3
  24. package/src/cli/registry.ts +7 -1
  25. package/src/collections/collection-types.ts +8 -1
  26. package/src/collections/providers.ts +4 -1
  27. package/src/collections/review.ts +23 -4
  28. package/src/commands/model.ts +36 -0
  29. package/src/commands/registry.ts +49 -0
  30. package/src/commands/routes.ts +59 -0
  31. package/src/commands/runner.ts +35 -0
  32. package/src/commands/runs.ts +112 -0
  33. package/src/core/app-icon.ts +4 -3
  34. package/src/core/icon-type.ts +8 -0
  35. package/src/core/jobs.ts +4 -3
  36. package/src/core/layout.ts +11 -2
  37. package/src/core/squircle.ts +95 -0
  38. package/src/home/daemon-jobs.ts +26 -2
  39. package/src/home/global-units.ts +3 -0
  40. package/src/home/gui-app/ShipkitGui.swift +337 -5
  41. package/src/home/gui-app.ts +64 -33
  42. package/src/home/hmr-keep.ts +134 -0
  43. package/src/home/home-start.ts +2 -2
  44. package/src/home/lib-watch.ts +21 -11
  45. package/src/home/pm-switch.ts +112 -0
  46. package/src/home/pm.ts +1 -1
  47. package/src/home/process-apps.ts +181 -0
  48. package/src/home/resources.ts +3 -3
  49. package/src/home/run-web.ts +7 -4
  50. package/src/home/serve-web.ts +64 -14
  51. package/src/identities/collection.ts +49 -0
  52. package/src/identities/identities.ts +121 -14
  53. package/src/identities/machine.ts +4 -3
  54. package/src/identities/rating.ts +33 -0
  55. package/src/identities/shown.ts +170 -0
  56. package/src/identities/steps.ts +5 -0
  57. package/src/media-store/purge.ts +15 -1
  58. package/src/media-store/remote.ts +22 -6
  59. package/src/messages/brief.ts +117 -0
  60. package/src/messages/collection.ts +40 -0
  61. package/src/messages/model.ts +171 -0
  62. package/src/messages/routes.ts +15 -0
  63. package/src/messages/score.ts +182 -0
  64. package/src/messages/tabs.ts +13 -0
  65. package/src/release/notes.ts +130 -0
  66. package/src/release/run-bump.ts +41 -18
  67. package/src/release/run-release.ts +22 -4
  68. package/src/release/run-releases.ts +17 -15
  69. package/src/release/unit-resolve.ts +9 -0
  70. package/src/releases/add.ts +94 -0
  71. package/src/releases/before.ts +31 -0
  72. package/src/releases/collection.ts +36 -0
  73. package/src/releases/from-card.ts +151 -0
  74. package/src/releases/model.ts +327 -0
  75. package/src/releases/pictures.ts +110 -0
  76. package/src/releases/routes.ts +36 -0
  77. package/src/releases/store.ts +71 -0
  78. package/src/repo-config.ts +5 -0
  79. package/src/review/cells.ts +0 -11
  80. package/src/review/format.ts +10 -6
  81. package/src/review/http.ts +1 -1
  82. package/src/review/model.ts +102 -3
  83. package/src/review/notes.ts +2 -48
  84. package/src/review/routes.ts +28 -10
  85. package/src/review/stage-card.ts +197 -0
  86. package/src/review/stage-routes.ts +123 -0
  87. package/src/review/store.ts +47 -1
  88. package/src/review/trailer-card.ts +99 -0
  89. package/src/review/trailer-desk.ts +76 -4
  90. package/src/review/trailer-model.ts +106 -7
  91. package/src/review/trailer-notes.ts +45 -0
  92. package/src/review/trailer-routes.ts +119 -13
  93. package/src/review/trailer-voices.ts +144 -0
  94. package/src/review/watchers.ts +58 -1
  95. package/src/serve/hub-app/app-bridge.ts +71 -0
  96. package/src/serve/hub-app/benign-errors.ts +22 -0
  97. package/src/serve/hub-app/commands/commands-page.tsx +122 -0
  98. package/src/serve/hub-app/commands/commands-st.ts +177 -0
  99. package/src/serve/hub-app/commands.css +24 -0
  100. package/src/serve/hub-app/hash-route.ts +59 -8
  101. package/src/serve/hub-app/home-st.ts +19 -2
  102. package/src/serve/hub-app/home.html +3 -0
  103. package/src/serve/hub-app/hub-app.tsx +8 -0
  104. package/src/serve/hub-app/icons.tsx +5 -0
  105. package/src/serve/hub-app/identities-view.tsx +4 -1
  106. package/src/serve/hub-app/identities.css +1 -0
  107. package/src/serve/hub-app/index.html +3 -0
  108. package/src/serve/hub-app/keys.ts +2 -2
  109. package/src/serve/hub-app/machine-st.ts +41 -10
  110. package/src/serve/hub-app/messages/messages-page.tsx +354 -0
  111. package/src/serve/hub-app/messages/messages-st.ts +74 -0
  112. package/src/serve/hub-app/messages.css +35 -0
  113. package/src/serve/hub-app/project-list.css +7 -2
  114. package/src/serve/hub-app/project-list.tsx +9 -0
  115. package/src/serve/hub-app/projects-svc.ts +16 -6
  116. package/src/serve/hub-app/releases/releases-page.tsx +187 -0
  117. package/src/serve/hub-app/releases/releases-st.ts +111 -0
  118. package/src/serve/hub-app/releases.css +52 -0
  119. package/src/serve/hub-app/repo-sections.ts +16 -2
  120. package/src/serve/hub-app/repo-st.ts +66 -10
  121. package/src/serve/hub-app/review/clip-st.ts +34 -4
  122. package/src/serve/hub-app/review/kit.tsx +3 -3
  123. package/src/serve/hub-app/review/note-place.ts +31 -0
  124. package/src/serve/hub-app/review/review-cells.tsx +27 -3
  125. package/src/serve/hub-app/review/review-st.ts +77 -2
  126. package/src/serve/hub-app/review/review-thread.tsx +9 -31
  127. package/src/serve/hub-app/review/review-views.tsx +164 -58
  128. package/src/serve/hub-app/review/thread-st.ts +108 -41
  129. package/src/serve/hub-app/review/trailer-card.tsx +187 -0
  130. package/src/serve/hub-app/review/trailer-page.tsx +92 -36
  131. package/src/serve/hub-app/review/trailer-st.ts +306 -34
  132. package/src/serve/hub-app/review/trailer-timeline.tsx +68 -23
  133. package/src/serve/hub-app/review/trailer-voices-st.ts +370 -0
  134. package/src/serve/hub-app/review/trailer-voices.tsx +574 -0
  135. package/src/serve/hub-app/review.css +137 -6
  136. package/src/serve/hub-app/social/comms-page.tsx +65 -28
  137. package/src/serve/hub-app/social/identity-pictures.ts +46 -8
  138. package/src/serve/hub-app/social/kit.tsx +9 -6
  139. package/src/serve/hub-app/social/next-release.tsx +118 -0
  140. package/src/serve/hub-app/social/post-card.tsx +10 -2
  141. package/src/serve/hub-app/social/social-model.ts +39 -3
  142. package/src/serve/hub-app/social/social-page.tsx +179 -65
  143. package/src/serve/hub-app/social/social-st.ts +117 -27
  144. package/src/serve/hub-app/social/stage-popup.tsx +268 -0
  145. package/src/serve/hub-app/social/stage-st.ts +310 -0
  146. package/src/serve/hub-app/social/step-layout.ts +42 -0
  147. package/src/serve/hub-app/social.css +68 -1
  148. package/src/serve/hub-app/tree-build.ts +40 -1
  149. package/src/serve/hub-app/tree-svc.ts +10 -3
  150. package/src/serve/project-gutter-route.ts +12 -2
  151. package/src/serve/project-gutter.ts +4 -2
  152. package/src/serve/same-origin.ts +24 -1
  153. package/src/serve/serve-hub.ts +15 -1
  154. package/src/shipkit-files.ts +9 -7
  155. package/src/shot/box.ts +33 -12
  156. package/src/shot/client.ts +1 -1
  157. package/src/shot/shooter.ts +22 -12
  158. package/src/shot/shot-ask.ts +14 -3
  159. package/src/shot/shot.shipkit.ts +1 -1
  160. package/src/social/desk-index.ts +49 -8
  161. package/src/social/discord-layout.ts +54 -7
  162. package/src/social/drafts.ts +1 -1
  163. package/src/social/fit.ts +84 -0
  164. package/src/social/identity-words.ts +74 -0
  165. package/src/social/kind-pages.ts +41 -0
  166. package/src/social/kinds.ts +93 -0
  167. package/src/social/load.ts +125 -10
  168. package/src/social/media-limit.ts +63 -2
  169. package/src/social/presence.ts +1 -1
  170. package/src/social/publish/bluesky.ts +58 -19
  171. package/src/social/publish/index.ts +47 -6
  172. package/src/social/reach.ts +49 -0
  173. package/src/social/release-stage.ts +277 -0
  174. package/src/social/routes.ts +44 -8
  175. package/src/social/stage.ts +246 -0
  176. package/src/social/strip.ts +85 -0
  177. package/src/social/text.ts +6 -2
  178. package/src/social/unit.ts +57 -1
  179. package/src/social/writes.ts +11 -0
  180. package/src/trailer/bed.ts +111 -0
  181. package/src/trailer/build.ts +72 -40
  182. package/src/trailer/ffmpeg.ts +6 -0
  183. package/src/trailer/grammar.ts +37 -6
  184. package/src/trailer/graph.ts +12 -1
  185. package/src/trailer/public-words.ts +41 -0
  186. package/src/trailer/shot-plan.ts +75 -0
  187. package/src/trailer/shot-state.ts +191 -0
  188. package/src/trailer/sound/audio.ts +28 -0
  189. package/src/trailer/sound/brand.ts +53 -3
  190. package/src/trailer/sound/gen.ts +61 -2
  191. package/src/trailer/sound/index.ts +25 -11
  192. package/src/trailer/sound/presets.ts +86 -5
  193. package/src/trailer/sound/run.ts +1 -1
  194. package/src/trailer/sound/takes.ts +94 -0
  195. package/src/trailer/titles.ts +36 -0
  196. package/src/trailer/url.ts +1 -1
@@ -0,0 +1,122 @@
1
+ // a repo's commands page (wiki tools/shipkit/hub.md, The commands page): the command the tree opened, its examples,
2
+ // its args and its runs, and the shown run's log as it prints. The tree is the list (tree-build.ts commandResources)
3
+ import { observer } from 'mobx-react-lite'
4
+ import { useEffect, useRef } from 'react'
5
+ import type { CommandRow } from '../../../cli/cmd_Commands.ts'
6
+ import { exampleArgs, type RunView } from '../../../commands/model.ts'
7
+ import type { RepoSt } from '../repo-st.ts'
8
+ import type { CommandsSt } from './commands-st.ts'
9
+
10
+ /** a run's length as he reads it: 4.2 s, 73 s, 3 min 12 s */
11
+ export const fmtDur = (ms: number): string => {
12
+ const s = Math.max(0, ms) / 1000
13
+ if (s < 10) return `${s.toFixed(1)} s`
14
+ if (s < 120) return `${Math.round(s)} s`
15
+ return `${Math.floor(s / 60)} min ${Math.round(s % 60)} s`
16
+ }
17
+
18
+ const STATE_WORD = { running: 'running', done: 'ended', lost: 'lost: its runner died with no exit code' } as const
19
+
20
+ const runTone = (r: RunView): string => (r.state === 'running' ? 'warn' : r.state === 'lost' || (r.exit?.code ?? 0) !== 0 ? 'red' : 'ok')
21
+
22
+ const RunLine = observer(({ app, r }: { app: RepoSt; r: RunView }) => {
23
+ const c = app.commands
24
+ const took = r.exit != null ? fmtDur(r.exit.finishedAt - r.startedAt) : r.state === 'running' ? fmtDur(app.clock.now - r.startedAt) : ''
25
+ return (
26
+ <button className={`cmdrunline${c.runId === r.id ? ' on' : ''}`} onClick={() => app.showCommands(r.path, r.id)} title={new Date(r.startedAt).toLocaleString()}>
27
+ <span className={`tl ${runTone(r)}`}>{r.state === 'running' ? '●' : r.exit?.code === 0 ? '✓' : '✗'}</span>
28
+ <code>{r.line}</code>
29
+ <span className="dim">{r.exit != null ? `exit ${r.exit.code}` : STATE_WORD[r.state]}{took ? `, ${took}` : ''}{r.reach === 'tailnet' ? ', from another device' : ''}</span>
30
+ </button>
31
+ )
32
+ })
33
+
34
+ const CommandCard = observer(({ app, row }: { app: RepoSt; row: CommandRow }) => {
35
+ const c = app.commands
36
+ const args = c.draft(row.path)
37
+ return (
38
+ <section className="csec">
39
+ <div className="cmdhead"><code className="cmdname">{c.bin} {row.path}</code>{row.effect === 'outward' ? <span className="cmdout">outward: asks before it runs</span> : null}</div>
40
+ <div>{row.description}</div>
41
+ {row.examples.length > 0 ? (
42
+ <div className="cmdexs">
43
+ {row.examples.map(([label, line]) => {
44
+ const a = exampleArgs(c.bin, row.path, line)
45
+ return (
46
+ <div key={line} className="cmdex">
47
+ <button className="primary" disabled={a == null || c.starting} title={a == null ? 'an example of another command' : `run ${line}`} onClick={() => a != null && void c.runIt(row, a)}>▶</button>
48
+ <code>{line}</code>
49
+ <span className="dim">{label}</span>
50
+ </div>
51
+ )
52
+ })}
53
+ </div>
54
+ ) : null}
55
+ <form className="row" onSubmit={(e) => { e.preventDefault(); void c.runIt(row, args) }}>
56
+ <code className="dim">{c.bin} {row.path}</code>
57
+ <input value={args} placeholder="args, as you would type them" onChange={(e) => c.setDraft(row.path, e.target.value)} />
58
+ <button type="submit" className="primary" disabled={c.starting}>run</button>
59
+ </form>
60
+ {row.options.length > 0 ? (
61
+ <details className="cmdopts">
62
+ <summary className="dim">{row.options.length} options</summary>
63
+ <table><tbody>{row.options.map((o) => <tr key={o.definition}><td><code>{o.definition}</code></td><td className="dim">{o.description}</td></tr>)}</tbody></table>
64
+ </details>
65
+ ) : null}
66
+ </section>
67
+ )
68
+ })
69
+
70
+ const LogPane = observer(({ app, c }: { app: RepoSt; c: CommandsSt }) => {
71
+ const pre = useRef<HTMLPreElement>(null)
72
+ const stuck = useRef(true)
73
+ const text = c.shown
74
+ useEffect(() => {
75
+ const el = pre.current
76
+ if (el != null && stuck.current) el.scrollTop = el.scrollHeight
77
+ }, [text])
78
+ const r = c.run
79
+ if (r == null) return null
80
+ return (
81
+ <section className="csec cmdlogsec">
82
+ <div className="cmdhead">
83
+ <RunLine app={app} r={r} />
84
+ {r.state === 'running' ? <button onClick={() => void c.stopRun()}>stop</button> : null}
85
+ </div>
86
+ <pre ref={pre} className="cmdlog" onScroll={(e) => { const el = e.currentTarget; stuck.current = el.scrollHeight - el.scrollTop - el.clientHeight < 24 }}>
87
+ {text === '' ? <span className="dim">{r.state === 'running' ? 'no output yet' : 'it printed nothing'}</span> : text}
88
+ </pre>
89
+ </section>
90
+ )
91
+ })
92
+
93
+ export const CommandsPage = observer(({ app }: { app: RepoSt }) => {
94
+ const c = app.commands
95
+ useEffect(() => {
96
+ c.start()
97
+ return () => c.stop()
98
+ }, [c])
99
+ const row = c.row
100
+ const runs = row == null ? c.runs : c.cmdRuns
101
+ return (
102
+ <div className="stagewrap">
103
+ <div className="colcard cmdpage">
104
+ <div className="chead">
105
+ <span className="tid">commands</span>
106
+ <h3 className="ctitle">{c.bin || app.name}</h3>
107
+ </div>
108
+ <div className="usays">the project CLI, run from here: a command that acts beyond this machine, and any run from another device, asks first</div>
109
+ {c.error !== '' ? <div className="warnline">{c.error}</div> : null}
110
+ {c.view == null && c.error === '' ? <div className="dim twait"><span className="spin" />reading the commands…</div> : null}
111
+ {row != null ? <CommandCard app={app} row={row} /> : c.rows.length > 0 ? <div className="dim">{c.rows.length} commands: pick one in the tree, under commands</div> : null}
112
+ <LogPane app={app} c={c} />
113
+ {runs.length > 0 ? (
114
+ <section className="csec">
115
+ <div className="cstitle">{row == null ? 'the last runs' : 'its last runs'} ({runs.length})</div>
116
+ {runs.map((r) => <RunLine key={r.id} app={app} r={r} />)}
117
+ </section>
118
+ ) : null}
119
+ </div>
120
+ </div>
121
+ )
122
+ })
@@ -0,0 +1,177 @@
1
+ // a repo's commands page as state (wiki tools/shipkit/hub.md, The commands page): its project CLI's registry and
2
+ // runs, read with the repo (they are rows of the tree) and again when the page opens, and the shown run's log tailed
3
+ // from where the last read stopped while it runs. The
4
+ // args he types for a command are kept per repo in this browser, so a reopen finds them
5
+ import { makeAutoObservable, observableRef, runInAction } from 'mobx'
6
+ import type { CommandRow } from '../../../cli/cmd_Commands.ts'
7
+ import { type CommandsView, confirmWhy, type LogView, type RunView } from '../../../commands/model.ts'
8
+ import { ownTrouble, reach } from '../reach.ts'
9
+ import type { RepoSt } from '../repo-st.ts'
10
+
11
+ /** how often the shown run's log is read while it runs */
12
+ export const TAIL_MS = 500
13
+ /** the most log the page keeps: the tail of a long run */
14
+ const LOG_KEEP = 2 * 1024 * 1024
15
+
16
+ /** a log as a terminal leaves it: a line rewritten with `\r` shows its last state */
17
+ export const shownLog = (text: string): string => text.split('\n').map((l) => l.slice(l.lastIndexOf('\r') + 1)).join('\n')
18
+
19
+ const draftsKey = (repo: string): string => `sk-commands-args:${repo}`
20
+
21
+ export class CommandsSt {
22
+ view: CommandsView | null = null
23
+ error = ''
24
+ /** the command open, by its words */
25
+ cmd: string | null = null
26
+ /** the run shown, by its id */
27
+ runId: string | null = null
28
+ run: RunView | null = null
29
+ log = ''
30
+ private next = 0
31
+ /** the args typed per command */
32
+ drafts: Record<string, string> = {}
33
+ starting = false
34
+ private timer: ReturnType<typeof setInterval> | null = null
35
+ private reading = false
36
+
37
+ constructor(private readonly st: RepoSt) {
38
+ makeAutoObservable<this, 'st' | 'timer' | 'reading' | 'next' | 'onBack'>(this, { st: false, timer: false, reading: false, next: false, onBack: false, view: observableRef, run: observableRef })
39
+ }
40
+
41
+ get bin(): string {
42
+ return this.view?.bin ?? ''
43
+ }
44
+
45
+ get rows(): CommandRow[] {
46
+ return this.view?.rows ?? []
47
+ }
48
+
49
+ get runs(): RunView[] {
50
+ return this.view?.runs ?? []
51
+ }
52
+
53
+ /** the runs still going: the section's count */
54
+ get running(): number {
55
+ return this.runs.filter((r) => r.state === 'running').length
56
+ }
57
+
58
+ get row(): CommandRow | null {
59
+ return this.rows.find((r) => r.path === this.cmd) ?? null
60
+ }
61
+
62
+ /** the runs of the open command, newest first */
63
+ get cmdRuns(): RunView[] {
64
+ return this.runs.filter((r) => r.path === this.cmd)
65
+ }
66
+
67
+ get shown(): string {
68
+ return shownLog(this.log)
69
+ }
70
+
71
+ draft(path: string): string {
72
+ return this.drafts[path] ?? ''
73
+ }
74
+
75
+ setDraft(path: string, v: string): void {
76
+ this.drafts[path] = v
77
+ try { localStorage.setItem(draftsKey(this.st.key), JSON.stringify(this.drafts)) } catch { /* a private window keeps none */ }
78
+ }
79
+
80
+ /** the address moved: a run shown from its first byte when it changed */
81
+ select(cmd: string | null, run: string | null): void {
82
+ this.cmd = cmd
83
+ if (run === this.runId) return
84
+ this.runId = run
85
+ this.run = this.runs.find((r) => r.id === run) ?? null
86
+ this.log = ''
87
+ this.next = 0
88
+ if (run != null && this.timer != null) void this.tail()
89
+ }
90
+
91
+ start(): void {
92
+ if (this.timer != null) return
93
+ try { this.drafts = JSON.parse(localStorage.getItem(draftsKey(this.st.key)) ?? '{}') as Record<string, string> } catch { this.drafts = {} }
94
+ window.addEventListener('focus', this.onBack)
95
+ void this.load().then(() => this.tail())
96
+ this.timer = setInterval(() => { if (this.run?.state === 'running') void this.tail() }, TAIL_MS)
97
+ }
98
+
99
+ stop(): void {
100
+ if (this.timer != null) clearInterval(this.timer)
101
+ this.timer = null
102
+ window.removeEventListener('focus', this.onBack)
103
+ }
104
+
105
+ private readonly onBack = (): void => void this.load()
106
+
107
+ async load(): Promise<void> {
108
+ try {
109
+ const r = await reach(this.st.url('/api/commands'))
110
+ if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
111
+ const v = (await r.json()) as CommandsView
112
+ runInAction(() => {
113
+ this.view = v
114
+ this.error = v.error ?? ''
115
+ if (this.runId != null && this.run == null) this.run = v.runs.find((x) => x.id === this.runId) ?? null
116
+ })
117
+ } catch (e) {
118
+ runInAction(() => { this.error = ownTrouble(e, this.st.home.machine, (m) => `read the commands: ${m}`) })
119
+ }
120
+ }
121
+
122
+ /** the shown run's log since the last read, its state with it; the list again once it ended */
123
+ async tail(): Promise<void> {
124
+ const id = this.runId
125
+ if (id == null || this.reading) return
126
+ this.reading = true
127
+ try {
128
+ for (;;) {
129
+ const r = await reach(this.st.url(`/api/commands/runs/${id}?from=${this.next}`))
130
+ if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
131
+ const v = (await r.json()) as LogView
132
+ if (id !== this.runId) return
133
+ const ended = this.run?.state === 'running' && v.run.state !== 'running'
134
+ runInAction(() => {
135
+ this.run = v.run
136
+ this.log = (this.log + v.text).slice(-LOG_KEEP)
137
+ this.next = v.next
138
+ })
139
+ if (ended) void this.load()
140
+ if (v.next >= v.size) return
141
+ }
142
+ } catch (e) {
143
+ runInAction(() => { this.error = ownTrouble(e, this.st.home.machine, (m) => `read the run: ${m}`) })
144
+ } finally {
145
+ this.reading = false
146
+ }
147
+ }
148
+
149
+ /** run a command with its args; a confirm first when it acts on the world or he is on another device */
150
+ async runIt(row: CommandRow, args: string): Promise<void> {
151
+ if (this.starting || this.view == null) return
152
+ const line = `${this.bin} ${row.path}${args.trim() === '' ? '' : ` ${args.trim()}`}`
153
+ const why = confirmWhy(row, this.view.reach)
154
+ if (why != null && !confirm(`Run « ${line} »?\n\nThis asks first: ${why}.`)) return
155
+ this.starting = true
156
+ try {
157
+ const r = await reach(this.st.url('/api/commands/run'), { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ path: row.path, args, confirmed: why != null }) })
158
+ const body = (await r.json()) as { run?: RunView; error?: string; confirm?: string }
159
+ if (!r.ok || body.run == null) throw new Error(body.error ?? body.confirm ?? `HTTP ${r.status}`)
160
+ const run = body.run
161
+ runInAction(() => { if (this.view != null) this.view = { ...this.view, runs: [run, ...this.view.runs] } })
162
+ this.st.showCommands(row.path, run.id)
163
+ } catch (e) {
164
+ runInAction(() => { this.error = ownTrouble(e, this.st.home.machine, (m) => `run ${line}: ${m}`) })
165
+ } finally {
166
+ runInAction(() => { this.starting = false })
167
+ }
168
+ }
169
+
170
+ async stopRun(): Promise<void> {
171
+ const id = this.runId
172
+ if (id == null) return
173
+ const r = await reach(this.st.url(`/api/commands/runs/${id}/stop`), { method: 'POST' }).catch(() => null)
174
+ if (r != null && !r.ok) runInAction(() => { this.error = `stop: ${r.status}` })
175
+ void this.tail()
176
+ }
177
+ }
@@ -0,0 +1,24 @@
1
+ /* the commands page (hub-app/commands/, wiki tools/shipkit/hub.md, The commands page): the command the tree opened,
2
+ its log and its runs, one column like the git page */
3
+ .cmdpage{display:flex;flex-direction:column;gap:var(--s3)}
4
+ .cmdpage>.csec{display:flex;flex-direction:column;gap:var(--s2)}
5
+ /* a command line reads as text in a line, never the hub's boxed code block */
6
+ .colcard.cmdpage code{display:inline;background:none;border:0;padding:0;margin:0;max-height:none;overflow:visible;font:12.5px ui-monospace,Menlo,monospace;color:var(--ink);white-space:nowrap}
7
+ .cmdrunline{display:flex;gap:var(--s2);align-items:baseline;text-align:left;border-color:transparent;padding:var(--s1) var(--s2);min-width:0;width:100%}
8
+ .colcard.cmdpage .cmdrunline code{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}
9
+ .cmdrunline .dim{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
10
+ .cmdrunline.on{background:var(--sel);border-color:var(--accent)}
11
+ .cmdout{flex:none;font-size:11px;color:var(--warn);border:1px solid var(--warn);border-radius:999px;padding:0 var(--s1)}
12
+ .cmdhead{display:flex;gap:var(--s2);align-items:center;flex-wrap:wrap}
13
+ .cmdhead .cmdrunline{flex:1;width:auto}
14
+ .colcard.cmdpage .cmdname{font-size:14px;font-weight:600}
15
+ .cmdexs{display:flex;flex-direction:column;gap:var(--s1)}
16
+ .cmdex{display:grid;grid-template-columns:auto minmax(0,max-content) minmax(0,1fr);gap:var(--s2);align-items:baseline}
17
+ .colcard.cmdpage .cmdex code{white-space:pre-wrap;word-break:break-word}
18
+ .cmdex button{padding:0 var(--s2)}
19
+ .colcard.cmdpage form.row{margin-top:0}
20
+ .colcard.cmdpage form.row input{min-width:0}
21
+ .cmdopts table{border-collapse:collapse;font-size:12.5px}
22
+ .cmdopts td{padding:var(--s0) var(--s2) var(--s0) 0;vertical-align:top}
23
+ .cmdlog{margin:0;max-height:60vh;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:4px;padding:var(--s2);font:12px/1.45 ui-monospace,Menlo,monospace;white-space:pre-wrap;word-break:break-word}
24
+ @media (max-width:900px){.cmdex{grid-template-columns:auto minmax(0,1fr)}.cmdex .dim{grid-column:2}.colcard.cmdpage form.row>code{display:none}}
@@ -9,6 +9,8 @@
9
9
  /** every selection the page can show. Each one has an address, so nothing
10
10
  * that decides which page is on screen lives outside the url */
11
11
  import { RUNS_ID } from '../../collections/collection-types.ts'
12
+ import { isMessagesTab, type MessagesTab } from '../../messages/tabs.ts'
13
+ import { isVersion } from '../../releases/model.ts'
12
14
  import { runsTab, runsTabId } from './runs-tabs.ts'
13
15
 
14
16
  export type HashSel =
@@ -31,6 +33,8 @@ export type HashSel =
31
33
  | { t: 'plan' }
32
34
  /** the repo's git: branch, upstream, uncommitted files, recent commits */
33
35
  | { t: 'git' }
36
+ /** the project CLI run from the page: a command by its words, null for none open; one of its runs shown */
37
+ | { t: 'commands'; cmd: string | null; run?: string | null }
34
38
  /** what runs when: every check on every context, with the legend */
35
39
  | { t: 'when' }
36
40
  /** the checks one owner ships: shipkit's, or the repo's own */
@@ -39,9 +43,14 @@ export type HashSel =
39
43
  | { t: 'review'; id: string | null; q?: string }
40
44
  /** a trailer's cuts, played with their notes: a trailer folder and one of its cuts, null for the first; the note
41
45
  * open on it, and the notes filter when it is not the page's default (all) */
42
- | { t: 'trailer'; trailer: string | null; cut: string | null; note?: string | null; filter?: 'open' | 'all' | null }
46
+ | { t: 'trailer'; trailer: string | null; cut: string | null; note?: string | null; filter?: 'open' | 'all' | null; voices?: string }
43
47
  /** the store pages: a store, null for the first; a thing of it to scroll to (a picture's path, `field:<heading>`) */
44
48
  | { t: 'stores'; store: string | null; asset?: string | null }
49
+ /** the releases page on a version (`next` or X.Y.Z), null for the first; its view when the address names one, else
50
+ * the one this browser remembers */
51
+ | { t: 'releases'; version: string | null; tab?: ReleasesTab }
52
+ /** the messages page: its tab, the run it scores by when not the newest */
53
+ | { t: 'messages'; tab: MessagesTab; run?: string }
45
54
  /** the Veille: the post picked, null for none; the window, chips, folds and lightbox as `window=3d&tags=a,b` */
46
55
  | { t: 'veille'; post: string | null; q?: string }
47
56
  /** Communications: a draft, null for the first the list keeps, one message of its series; the list's view as
@@ -52,11 +61,14 @@ export type HashSel =
52
61
  /** a repo's own page (wiki tools/shipkit/project-pages.md): the repo, the page, the page's own keys as a query */
53
62
  | { t: 'page'; repo: string; id: string; q?: string }
54
63
 
64
+ /** the releases page's two views: the changes as a grid of cards, or the release as one long page of notes */
65
+ export type ReleasesTab = 'cards' | 'notes'
66
+
55
67
  /** whose a gate check is */
56
68
  export type CheckOwner = 'shipkit' | 'repo'
57
69
 
58
70
  export type ParsedHash = {
59
- kind: 'asset' | 'cat' | 'col' | 'item' | 'status' | 'tests' | 'admin' | 'readme' | 'processes' | 'plan' | 'git' | 'when' | 'checks' | 'review' | 'trailer' | 'stores' | 'veille' | 'comms' | 'social' | 'page' | 'none'
71
+ kind: 'asset' | 'cat' | 'col' | 'item' | 'status' | 'tests' | 'admin' | 'readme' | 'processes' | 'plan' | 'git' | 'commands' | 'when' | 'checks' | 'review' | 'trailer' | 'stores' | 'releases' | 'messages' | 'veille' | 'comms' | 'social' | 'page' | 'none'
60
72
  /** the collection, for an item. null for everything else */
61
73
  col: string | null
62
74
  id: string
@@ -66,7 +78,9 @@ export type ParsedHash = {
66
78
  /** a trailer address only: the note open, the notes filter */
67
79
  note?: string
68
80
  filter?: 'open' | 'all'
69
- /** a review address only: its view and list filters, as `view=1&subject=place` */
81
+ /** a trailer address only: the Voices view, on its line's key ('' its first) */
82
+ voices?: string
83
+ /** a review address: its view and list filters, as `view=1&subject=place`; a releases address: `notes` */
70
84
  q?: string
71
85
  }
72
86
 
@@ -81,11 +95,14 @@ const README = 'page:readme'
81
95
  const PROCESSES = 'page:processes'
82
96
  const PLAN = 'page:plan'
83
97
  const GIT = 'page:git'
98
+ const COMMANDS = 'page:commands'
84
99
  const WHEN = 'page:when'
85
100
  const CHECKS = 'page:checks:'
86
101
  const REVIEW = 'page:review'
87
102
  const TRAILER = 'page:trailer'
88
103
  const STORES = 'page:stores'
104
+ const RELEASES = 'page:releases'
105
+ const MESSAGES = 'page:messages'
89
106
  const VEILLE = 'page:veille'
90
107
  const COMMS = 'page:comms'
91
108
  const SOCIAL = 'page:social'
@@ -107,17 +124,24 @@ export function hashFor(sel: HashSel | null): string | null {
107
124
  case 'processes': return sel.id == null ? PROCESSES : `${PROCESSES}:${sel.id}`
108
125
  case 'plan': return PLAN
109
126
  case 'git': return GIT
127
+ // page:commands:<words joined by />@<run>, each part only when it says something
128
+ case 'commands': return sel.cmd == null ? COMMANDS : `${COMMANDS}:${sel.cmd.split(' ').join('/')}${sel.run ? `@${sel.run}` : ''}`
110
129
  case 'when': return WHEN
111
130
  case 'checks': return `${CHECKS}${sel.from}`
112
131
  // page:review:<id>?view=1&subject=place, the query only when it says something
113
132
  case 'review': return `${sel.id == null ? REVIEW : `${REVIEW}:${sel.id}`}${sel.q ? `?${sel.q}` : ''}`
114
133
  case 'trailer': {
115
- // page:trailer:<trailer>/<cut>/<note>?filter=all, each part only when it says something
134
+ // page:trailer:<trailer>/<cut>/<note>?filter=all&voices=<line>, each part only when it says something
116
135
  const note = sel.trailer != null && sel.note ? `/${sel.cut ?? ''}/${sel.note}` : sel.cut == null ? '' : `/${sel.cut}`
117
- return `${sel.trailer == null ? TRAILER : `${TRAILER}:${sel.trailer}${note}`}${sel.filter ? `?filter=${sel.filter}` : ''}`
136
+ const q = [sel.filter ? `filter=${sel.filter}` : '', sel.voices !== undefined ? (sel.voices ? `voices=${sel.voices}` : 'voices') : ''].filter(Boolean).join('&')
137
+ return `${sel.trailer == null ? TRAILER : `${TRAILER}:${sel.trailer}${note}`}${q ? `?${q}` : ''}`
118
138
  }
119
139
  // page:stores:<store>/<asset>, the asset as it is: a path or a heading carries any character
120
140
  case 'stores': return sel.store == null ? STORES : `${STORES}:${sel.store}${sel.asset ? `/${sel.asset}` : ''}`
141
+ // page:releases:<version>?view=notes, the view only for the notes
142
+ case 'releases': return `${sel.version == null ? RELEASES : `${RELEASES}:${sel.version}`}${sel.tab === 'notes' ? '?view=notes' : ''}`
143
+ // page:messages:<tab>?run=<run>, the tab only past the first, the run only when picked
144
+ case 'messages': return `${sel.tab === 'messages' ? MESSAGES : `${MESSAGES}:${sel.tab}`}${sel.run ? `?run=${sel.run}` : ''}`
121
145
  // page:veille:<platform>:<id>?window=3d, the query only when it says something
122
146
  case 'veille': return `${sel.post == null ? VEILLE : `${VEILLE}:${sel.post}`}${sel.q ? `?${sel.q}` : ''}`
123
147
  // page:comms:<slug>/<part>?fam=feed, each part only when it says something
@@ -142,6 +166,14 @@ export function parseHash(raw: string): ParsedHash {
142
166
  if (raw === PROCESSES) return { kind: 'processes', col: null, id: '', tools: null }
143
167
  if (raw === PLAN) return { kind: 'plan', col: null, id: '', tools: null }
144
168
  if (raw === GIT) return { kind: 'git', col: null, id: '', tools: null }
169
+ // the command's words ride in `id`, the run in `col`
170
+ if (raw === COMMANDS || raw.startsWith(`${COMMANDS}:`)) {
171
+ const rest = raw.slice(COMMANDS.length + 1)
172
+ const at = rest.indexOf('@')
173
+ const words = (at === -1 ? rest : rest.slice(0, at)).split('/').join(' ')
174
+ const run = at === -1 ? '' : rest.slice(at + 1)
175
+ return { kind: 'commands', col: run === '' ? null : run, id: words, tools: null }
176
+ }
145
177
  if (raw === WHEN) return { kind: 'when', col: null, id: '', tools: null }
146
178
  if (raw === REVIEW || raw.startsWith(`${REVIEW}:`) || raw.startsWith(`${REVIEW}?`)) {
147
179
  const qi = raw.indexOf('?')
@@ -154,10 +186,26 @@ export function parseHash(raw: string): ParsedHash {
154
186
  const qi = raw.indexOf('?')
155
187
  const path = qi === -1 ? raw : raw.slice(0, qi)
156
188
  const [trailer = '', cut = '', note = ''] = path.slice(TRAILER.length + 1).split('/')
157
- const f = qi === -1 ? null : new URLSearchParams(raw.slice(qi + 1)).get('filter')
158
- return { kind: 'trailer', col: trailer === '' ? null : trailer, id: cut, tools: null, ...(note ? { note } : {}), ...(f === 'open' || f === 'all' ? { filter: f } : {}) }
189
+ const params = new URLSearchParams(qi === -1 ? '' : raw.slice(qi + 1))
190
+ const f = params.get('filter')
191
+ const voices = params.get('voices')
192
+ return { kind: 'trailer', col: trailer === '' ? null : trailer, id: cut, tools: null, ...(note ? { note } : {}), ...(f === 'open' || f === 'all' ? { filter: f } : {}), ...(voices !== null ? { voices } : {}) }
159
193
  }
160
194
  // the store rides in `col`, the thing named in `id`: everything after the first slash
195
+ // the tab rides in `id`, the run in `q`; a tab this build does not name opens the first
196
+ if (raw === MESSAGES || raw.startsWith(`${MESSAGES}:`) || raw.startsWith(`${MESSAGES}?`)) {
197
+ const qi = raw.indexOf('?')
198
+ const tab = (qi === -1 ? raw : raw.slice(0, qi)).slice(MESSAGES.length + 1)
199
+ const run = qi === -1 ? null : new URLSearchParams(raw.slice(qi + 1)).get('run')
200
+ return { kind: 'messages', col: null, id: isMessagesTab(tab) ? tab : 'messages', tools: null, ...(run ? { q: run } : {}) }
201
+ }
202
+ // the view rides in `q`, only the notes
203
+ if (raw === RELEASES || raw.startsWith(`${RELEASES}:`) || raw.startsWith(`${RELEASES}?`)) {
204
+ const qi = raw.indexOf('?')
205
+ const v = (qi === -1 ? raw : raw.slice(0, qi)).slice(RELEASES.length + 1)
206
+ const notes = qi !== -1 && new URLSearchParams(raw.slice(qi + 1)).get('view') === 'notes'
207
+ return { kind: 'releases', col: null, id: isVersion(v) ? v : '', tools: null, ...(notes ? { q: 'notes' } : {}) }
208
+ }
161
209
  if (raw === STORES || raw.startsWith(`${STORES}:`)) {
162
210
  const rest = raw.slice(STORES.length + 1)
163
211
  const cut = rest.indexOf('/')
@@ -234,11 +282,14 @@ export function selOf(p: ParsedHash): HashSel | null {
234
282
  case 'processes': return { t: 'processes', id: p.id === '' ? null : p.id }
235
283
  case 'plan': return { t: 'plan' }
236
284
  case 'git': return { t: 'git' }
285
+ case 'commands': return { t: 'commands', cmd: p.id === '' ? null : p.id, ...(p.col ? { run: p.col } : {}) }
237
286
  case 'when': return { t: 'when' }
238
287
  case 'checks': return { t: 'checks', from: p.id as CheckOwner }
239
288
  case 'review': return { t: 'review', id: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
240
- case 'trailer': return { t: 'trailer', trailer: p.col, cut: p.id === '' ? null : p.id, ...(p.note ? { note: p.note } : {}), ...(p.filter ? { filter: p.filter } : {}) }
289
+ case 'trailer': return { t: 'trailer', trailer: p.col, cut: p.id === '' ? null : p.id, ...(p.note ? { note: p.note } : {}), ...(p.filter ? { filter: p.filter } : {}), ...(p.voices !== undefined ? { voices: p.voices } : {}) }
241
290
  case 'stores': return { t: 'stores', store: p.col, ...(p.id ? { asset: p.id } : {}) }
291
+ case 'releases': return { t: 'releases', version: p.id === '' ? null : p.id, ...(p.q === 'notes' ? { tab: 'notes' as const } : {}) }
292
+ case 'messages': return { t: 'messages', tab: isMessagesTab(p.id) ? p.id : 'messages', ...(p.q ? { run: p.q } : {}) }
242
293
  case 'veille': return { t: 'veille', post: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
243
294
  case 'comms': return { t: 'comms', draft: p.col, ...(p.id ? { part: p.id } : {}), ...(p.q ? { q: p.q } : {}) }
244
295
  case 'page': return { t: 'page', repo: p.col!, id: p.id, ...(p.q ? { q: p.q } : {}) }
@@ -10,7 +10,8 @@
10
10
  // the one constraint a reader breaks first: the url and the tree move
11
11
  // together, and only `show` moves the page. A list click, a link, back,
12
12
  // forward and a hand edited address all land there.
13
- import { makeAutoObservable, observableShallow, reaction, type IReactionDisposer } from 'mobx'
13
+ import { makeAutoObservable, observableShallow, reaction } from 'mobx'
14
+ import { startAppBridge } from './app-bridge.ts'
14
15
  import { currentHash, hashFor } from './hash-route.ts'
15
16
  import { MachineSt, type MachineOpts } from './machine-st.ts'
16
17
  import { LayoutSt } from './layout-st.ts'
@@ -105,7 +106,7 @@ export class HomeSt {
105
106
  selected: string | null = null
106
107
  /** every repo visited, by key, kept for the life of the page */
107
108
  repos = new Map<string, RepoSt>()
108
- private disposers: IReactionDisposer[] = []
109
+ private disposers: (() => void)[] = []
109
110
  /** a read ahead is going: one repo at a time, never two loops */
110
111
  private prefetching = false
111
112
  private readonly onUrl = (): void => this.fromUrl()
@@ -130,6 +131,10 @@ export class HomeSt {
130
131
  if (m != null) {
131
132
  this.projects.onSelect = (name) => this.select(name)
132
133
  this.projects.onReview = (name, card) => this.openReview(name, card)
134
+ this.projects.onVoices = (name) => {
135
+ this.repo(name).showTrailer(null, null, null, null, '')
136
+ this.show('repo', name, 'push')
137
+ }
133
138
  this.projects.onPlace = (p) => this.navigate(PLACE_PATH[p])
134
139
  this.projects.onPicker = () => this.palette.toggle()
135
140
  this.projects.pickerOpen = () => this.palette.open
@@ -145,6 +150,10 @@ export class HomeSt {
145
150
  if (this.projects.list.some((p) => p.name === name && p.current)) own.showReview(card, WAITING)
146
151
  else void this.openInHome(name, `#${hashFor({ t: 'review', id: card, q: WAITING })}`)
147
152
  }
153
+ this.projects.onVoices = (name) => {
154
+ if (this.projects.list.some((p) => p.name === name && p.current)) own.showTrailer(null, null, null, null, '')
155
+ else void this.openInHome(name, `#${hashFor({ t: 'trailer', trailer: null, cut: null, voices: '' })}`)
156
+ }
148
157
  own.markSeen()
149
158
  this.selected = own.key
150
159
  }
@@ -195,6 +204,14 @@ export class HomeSt {
195
204
  // the embed page shows one repo's page alone: no dock, so no request for the house's runs
196
205
  if (this.base === undefined) this.dock.boot()
197
206
  this.disposers.push(reaction(() => this.title, (t) => { document.title = t }, { fireImmediately: true }))
207
+ // the shipkit app's Dock badge and notifications: the home's whole house count, a no-op in a browser tab
208
+ if (this.machine != null) {
209
+ this.disposers.push(startAppBridge({
210
+ projects: this.projects,
211
+ cardUrl: (repo, id) => `${location.origin}${repoPage(repo)}#${hashFor({ t: 'review', id, q: WAITING })}`,
212
+ hooks: { openCard: (repo, id) => this.openReview(repo, id), openInbox: () => this.navigate(PLACE_PATH.inbox) },
213
+ }))
214
+ }
198
215
  // back, forward, a pasted link and a hand edited hash all arrive
199
216
  // here; fromUrl is idempotent, so the two events firing together
200
217
  // for one move cost nothing
@@ -18,6 +18,9 @@
18
18
  <link rel="stylesheet" href="./controls.css" />
19
19
  <link rel="stylesheet" href="./review.css" />
20
20
  <link rel="stylesheet" href="./stores.css" />
21
+ <link rel="stylesheet" href="./messages.css" />
22
+ <link rel="stylesheet" href="./releases.css" />
23
+ <link rel="stylesheet" href="./commands.css" />
21
24
  <link rel="stylesheet" href="./veille.css" />
22
25
  <link rel="stylesheet" href="./social.css" />
23
26
  <link rel="stylesheet" href="./inbox.css" />
@@ -8,6 +8,7 @@
8
8
  // input and one severity filter persisted at
9
9
  // ?f=needs · ?f=red. A row opens its item view, an asset row opens the atelier.
10
10
  import { reaction, runInAction } from 'mobx'
11
+ import { quietBenignErrors } from './benign-errors.ts'
11
12
  import { observer } from 'mobx-react-lite'
12
13
  import { StrictMode, useEffect, useLayoutEffect, useRef } from 'react'
13
14
  import { createRoot } from 'react-dom/client'
@@ -28,11 +29,14 @@ import { ProcessesPage } from './processes-view.tsx'
28
29
  import { PlanPage } from './plan-view.tsx'
29
30
  import { WhenPage } from './when-view.tsx'
30
31
  import { GitPage } from './git-view.tsx'
32
+ import { CommandsPage } from './commands/commands-page.tsx'
31
33
  import { AdminPage } from './admin-view.tsx'
32
34
  import { ReadmeView } from './readme-view.tsx'
33
35
  import { ReviewPage } from './review/review-page.tsx'
34
36
  import { TrailerPage } from './review/trailer-page.tsx'
35
37
  import { StoresPage } from './stores/stores-page.tsx'
38
+ import { MessagesPage } from './messages/messages-page.tsx'
39
+ import { ReleasesPage } from './releases/releases-page.tsx'
36
40
  import { VeillePage } from './veille/veille-page.tsx'
37
41
  import { CommsPage } from './social/comms-page.tsx'
38
42
  import { SocialPage } from './social/social-page.tsx'
@@ -98,6 +102,8 @@ const Main = observer(({ app }: { app: RepoSt }) => {
98
102
  if (app.sel?.t === 'review') return <main>{errs}<ReviewPage app={app} /></main>
99
103
  if (app.sel?.t === 'trailer') return <main>{errs}<TrailerPage app={app} /></main>
100
104
  if (app.sel?.t === 'stores') return <main>{errs}<StoresPage app={app} /></main>
105
+ if (app.sel?.t === 'releases') return <main>{errs}<div className="stagewrap"><ReleasesPage app={app} /></div></main>
106
+ if (app.sel?.t === 'messages') return <main>{errs}<div className="stagewrap"><MessagesPage app={app} /></div></main>
101
107
  if (app.sel?.t === 'veille') return <main>{errs}<VeillePage app={app} /></main>
102
108
  if (app.sel?.t === 'comms') return <main>{errs}<CommsPage app={app} /></main>
103
109
  if (app.sel?.t === 'social') return <main>{errs}<SocialPage app={app} /></main>
@@ -105,6 +111,7 @@ const Main = observer(({ app }: { app: RepoSt }) => {
105
111
  if (app.sel?.t === 'admin') return <main>{errs}<div className="stagewrap"><AdminPage app={app} /></div></main>
106
112
  if (app.sel?.t === 'plan') return <main>{errs}<div className="stagewrap"><PlanPage app={app} /></div></main>
107
113
  if (app.sel?.t === 'git') return <main>{errs}<div className="stagewrap"><GitPage app={app} /></div></main>
114
+ if (app.sel?.t === 'commands') return <main>{errs}<CommandsPage app={app} /></main>
108
115
  if (app.sel?.t === 'checks') return <main>{errs}<CheckTable app={app} id="checks" from={app.sel.from} /></main>
109
116
  if (app.sel?.t === 'when') return <main>{errs}<div className="stagewrap"><WhenPage app={app} /></div></main>
110
117
  if (app.sel?.t === 'processes') return <main>{errs}<div className="stagewrap"><ProcessesPage app={app} id={app.sel.id} /></div></main>
@@ -468,4 +475,5 @@ const EmbedApp = observer(({ page }: { page: EmbedPage }) => {
468
475
  // paints it at once; a slow or absent store costs at most SCREEN_WAIT_MS
469
476
  await Promise.race([home.shown?.cols.restore(), new Promise((ok) => setTimeout(ok, SCREEN_WAIT_MS))])
470
477
 
478
+ quietBenignErrors(window)
471
479
  createRoot(document.getElementById('root')!).render(<StrictMode>{embed == null ? <App /> : <EmbedApp page={embed} />}</StrictMode>)
@@ -9,6 +9,7 @@ export const ICON = {
9
9
  when: 'M10 3a7 7 0 1 0 .01 0M10 6v4l2.5 2',
10
10
  plan: 'M5.5 3h9M5.5 17h9M6.5 3c0 4 7 4 7 7s-7 3-7 7M13.5 3c0 4-7 4-7 7s7 3 7 7',
11
11
  git: 'M6 5v10M6 3a2 2 0 1 0 0 .01M6 17a2 2 0 1 0 0 .01M14 5a2 2 0 1 0 0 .01M14 7c0 4.5-8 3.5-8 7',
12
+ commands: 'M2.5 4.5h15v11h-15zM5.5 8l2.5 2-2.5 2M10 12.5h4',
12
13
  reflections: 'M4 3.5h12v9H9l-4 3.5v-3.5H4zM7.5 7h5M7.5 9.5h3',
13
14
  monitor: 'M3 4h14v9H3zM7 16.5h6M10 13v3.5',
14
15
  archived: 'M2.5 4h15v3.5h-15zM4 7.5V16h12V7.5M8 10.5h4',
@@ -42,6 +43,10 @@ export const ICON = {
42
43
  // a shop front: an awning over a door
43
44
  veille: 'M10 4.5c-4 0-7 3.5-7.5 5.5.5 2 3.5 5.5 7.5 5.5s7-3.5 7.5-5.5c-.5-2-3.5-5.5-7.5-5.5zM10 7a3 3 0 1 0 0 6 3 3 0 0 0 0-6z',
44
45
  stores: 'M3 4h14l1 4H2zM2 8c0 1.4 1.3 2.5 2.7 2.5S7.3 9.4 7.3 8c0 1.4 1.3 2.5 2.7 2.5S12.7 9.4 12.7 8c0 1.4 1.3 2.5 2.7 2.5S18 9.4 18 8M4 10.5V17h12v-6.5M8 17v-4h4v4',
46
+ // a tag on a string: a version, named and dated
47
+ releases: 'M3 3.5h7l7 7-6.5 6.5-7-7zM6.5 6.5h.01',
48
+ // a speech bubble with two lines: the words a public line says
49
+ messages: 'M3 4.5h14v9H8l-4 3v-3H3zM6 8h8M6 10.5h5',
45
50
  // a megaphone (the drafts he posts), two people (the identities and their accounts)
46
51
  comms: 'M3 8h3l8-4v12l-8-4H3zM6 12l1.5 4.5',
47
52
  social: 'M7 9a2.5 2.5 0 1 0 0-5a2.5 2.5 0 1 0 0 5M2.5 16c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5M13.5 9a2 2 0 1 0 0-4M13 11.5c2.5 0 4.5 1.8 4.5 4.5',