rvlib-shipkit 2.11.0 → 2.13.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 (298) hide show
  1. package/CHANGELOG.md +56 -12
  2. package/README.md +1 -1
  3. package/package.json +4 -2
  4. package/src/agent-time/store.ts +2 -2
  5. package/src/check.ts +1 -1
  6. package/src/checks/SK001-package-json-shape.check.ts +4 -0
  7. package/src/checks/SK003-claude-md-shape.check.ts +1 -1
  8. package/src/checks/SK004-gitignore-policy.check.ts +27 -2
  9. package/src/checks/SK005-rvlib-versions.check.ts +1 -1
  10. package/src/checks/SK008-reviewer-agent.check.ts +2 -2
  11. package/src/checks/SK012-config-barrel-import.check.ts +1 -1
  12. package/src/checks/SK015-nested-repo.check.ts +1 -1
  13. package/src/checks/SK035-public-clean.check.ts +46 -0
  14. package/src/checks/SK036-draft-media-size.check.ts +28 -0
  15. package/src/cli/cmd_Backup.ts +152 -0
  16. package/src/cli/cmd_Ci.ts +8 -11
  17. package/src/cli/cmd_Drill.ts +145 -0
  18. package/src/cli/cmd_Home.ts +50 -3
  19. package/src/cli/cmd_Media.ts +96 -5
  20. package/src/cli/cmd_Review.ts +8 -2
  21. package/src/cli/cmd_Shot.ts +5 -2
  22. package/src/cli/cmd_Smoke.ts +4 -1
  23. package/src/cli/cmd_Social.ts +226 -0
  24. package/src/cli/cmd_Start.ts +1 -1
  25. package/src/cli/cmd_Time.ts +1 -1
  26. package/src/cli/cmd_Trailer.ts +9 -2
  27. package/src/cli/cmd_Veille.ts +173 -0
  28. package/src/cli/family-pages.ts +3 -0
  29. package/src/cli/registry.ts +13 -2
  30. package/src/cli.ts +5 -2
  31. package/src/collections/actions.ts +1 -49
  32. package/src/collections/checks.ts +2 -1
  33. package/src/collections/collection-types.ts +11 -2
  34. package/src/collections/providers.ts +4 -4
  35. package/src/collections/review.ts +2 -1
  36. package/src/collections/tests.ts +19 -8
  37. package/src/contracts/apply-contracts.ts +1 -3
  38. package/src/contracts/contract-manifests.ts +2 -3
  39. package/src/contracts/contract-types.ts +0 -1
  40. package/src/contracts/contracts-engine.ts +0 -3
  41. package/src/core/app-icon.ts +9 -3
  42. package/src/core/bun-builtins.ts +2 -2
  43. package/src/core/discover-checks.ts +37 -5
  44. package/src/core/fix-scope.ts +4 -2
  45. package/src/core/floor-resolve.ts +68 -48
  46. package/src/core/floor.ts +9 -0
  47. package/src/core/git-root.ts +24 -0
  48. package/src/core/last-good.ts +3 -1
  49. package/src/core/layout.ts +8 -0
  50. package/src/core/log-stamp.ts +36 -0
  51. package/src/core/loop-watch.ts +93 -0
  52. package/src/core/machine-link.ts +134 -0
  53. package/src/core/memory-watch.ts +41 -0
  54. package/src/core/one-way-in-policy.ts +27 -19
  55. package/src/core/run-ci.ts +6 -8
  56. package/src/core/run-fixers.ts +9 -9
  57. package/src/core/slots.ts +21 -0
  58. package/src/core/tree-rev.ts +60 -0
  59. package/src/core/unit-files.ts +42 -0
  60. package/src/drill/render.ts +140 -0
  61. package/src/drill/run.ts +269 -0
  62. package/src/fleet/scan-fleet.ts +6 -5
  63. package/src/home/daemon-jobs.ts +201 -0
  64. package/src/home/global-context.ts +34 -1
  65. package/src/home/home-routes.ts +22 -15
  66. package/src/home/hubs.ts +10 -3
  67. package/src/home/inbox-shape.ts +61 -6
  68. package/src/home/inbox.ts +75 -4
  69. package/src/home/lib-watch.ts +10 -3
  70. package/src/home/machine-stores.ts +15 -29
  71. package/src/home/run-daemon.ts +15 -18
  72. package/src/home/run-pm.ts +2 -0
  73. package/src/home/serve-daemon.ts +4 -3
  74. package/src/home/serve-web.ts +110 -1
  75. package/src/hooks/commit-message.ts +28 -19
  76. package/src/hooks/leak-guard.ts +10 -3
  77. package/src/hooks/run-hooks.ts +2 -6
  78. package/src/identities/identities.ts +334 -0
  79. package/src/identities/machine-route.ts +126 -0
  80. package/src/identities/machine.ts +62 -0
  81. package/src/init-repo.ts +1 -1
  82. package/src/ledger/check-stats.ts +10 -9
  83. package/src/ledger/gate-checks.ts +32 -1
  84. package/src/ledger/record-kept.ts +112 -0
  85. package/src/ledger/repo-view.ts +10 -0
  86. package/src/ledger/run-log.ts +17 -12
  87. package/src/ledger/run-timeline.ts +8 -4
  88. package/src/ledger/store.ts +7 -0
  89. package/src/ledger/suite-log.ts +17 -13
  90. package/src/media-kinds.ts +9 -1
  91. package/src/media-store/backup/daemon.ts +73 -0
  92. package/src/media-store/backup/keys.ts +25 -0
  93. package/src/media-store/backup/manifest.ts +193 -0
  94. package/src/media-store/backup/restore.ts +192 -0
  95. package/src/media-store/backup/run.ts +278 -0
  96. package/src/media-store/backup/secret.ts +86 -0
  97. package/src/media-store/backup/snapshot.ts +64 -0
  98. package/src/media-store/backup/sources.ts +199 -0
  99. package/src/media-store/content.ts +11 -1
  100. package/src/media-store/daemon.ts +56 -70
  101. package/src/media-store/hand.ts +58 -0
  102. package/src/media-store/put.ts +122 -0
  103. package/src/media-store/space.ts +73 -11
  104. package/src/pages/forward.ts +35 -0
  105. package/src/pages/frame-client.ts +118 -0
  106. package/src/pages/routes.ts +29 -0
  107. package/src/pages/unit.ts +92 -0
  108. package/src/plan/planner.ts +12 -0
  109. package/src/plan/repo-source.ts +19 -5
  110. package/src/reflect/transcript.ts +35 -10
  111. package/src/release/public-clean.ts +301 -0
  112. package/src/release/published-here.ts +22 -0
  113. package/src/release/run-bump.ts +2 -1
  114. package/src/release/run-release.ts +4 -1
  115. package/src/repo-config.ts +53 -2
  116. package/src/review/http.ts +16 -2
  117. package/src/review/media-kind.ts +3 -3
  118. package/src/review/media-read.ts +3 -3
  119. package/src/review/model.ts +24 -5
  120. package/src/review/notes.ts +77 -0
  121. package/src/review/project.ts +6 -38
  122. package/src/review/routes.ts +8 -13
  123. package/src/review/store.ts +46 -4
  124. package/src/review/trailer-media.ts +24 -3
  125. package/src/review/trailer-shots.ts +106 -0
  126. package/src/review/unit.ts +1 -1
  127. package/src/scaffold/files/agent-handoff.md +3 -0
  128. package/src/scaffold/files/agent-index.md +4 -12
  129. package/src/scaffold/project-scaffold.ts +5 -4
  130. package/src/serve/embed.ts +1 -1
  131. package/src/serve/hub-app/col-card.tsx +3 -17
  132. package/src/serve/hub-app/col-tables-view.tsx +2 -1
  133. package/src/serve/hub-app/cols-svc.ts +12 -14
  134. package/src/serve/hub-app/dock-st.ts +4 -2
  135. package/src/serve/hub-app/dock-view.tsx +2 -0
  136. package/src/serve/hub-app/frames-st.ts +35 -0
  137. package/src/serve/hub-app/hash-route.ts +64 -1
  138. package/src/serve/hub-app/home-st.ts +31 -7
  139. package/src/serve/hub-app/home-strip.css +9 -1
  140. package/src/serve/hub-app/home-strip.tsx +7 -6
  141. package/src/serve/hub-app/home.html +5 -0
  142. package/src/serve/hub-app/hub-app.tsx +49 -5
  143. package/src/serve/hub-app/hub.css +29 -11
  144. package/src/serve/hub-app/icons.tsx +16 -1
  145. package/src/serve/hub-app/identities-st.ts +210 -0
  146. package/src/serve/hub-app/identities-view.tsx +352 -0
  147. package/src/serve/hub-app/identities.css +48 -0
  148. package/src/serve/hub-app/identity-address.ts +52 -0
  149. package/src/serve/hub-app/inbox-st.ts +59 -6
  150. package/src/serve/hub-app/inbox-view.tsx +48 -6
  151. package/src/serve/hub-app/inbox.css +12 -1
  152. package/src/serve/hub-app/index.html +3 -0
  153. package/src/serve/hub-app/keys.ts +10 -2
  154. package/src/serve/hub-app/list-walk.ts +89 -0
  155. package/src/serve/hub-app/machine-st.ts +12 -0
  156. package/src/serve/hub-app/media-view.tsx +2 -1
  157. package/src/serve/hub-app/pages-frames.tsx +134 -0
  158. package/src/serve/hub-app/pages-svc.ts +111 -0
  159. package/src/serve/hub-app/palette-st.ts +18 -3
  160. package/src/serve/hub-app/palette-view.tsx +9 -2
  161. package/src/serve/hub-app/planned-view.tsx +2 -1
  162. package/src/serve/hub-app/project-list.css +18 -14
  163. package/src/serve/hub-app/project-list.tsx +88 -49
  164. package/src/serve/hub-app/projects-svc.ts +33 -3
  165. package/src/serve/hub-app/repo-sections.ts +19 -2
  166. package/src/serve/hub-app/repo-st.ts +75 -19
  167. package/src/serve/hub-app/review/review-cells.tsx +3 -3
  168. package/src/serve/hub-app/review/review-kit.ts +30 -7
  169. package/src/serve/hub-app/review/review-page.tsx +1 -1
  170. package/src/serve/hub-app/review/review-st.ts +33 -11
  171. package/src/serve/hub-app/review/review-thread.tsx +11 -9
  172. package/src/serve/hub-app/review/review-views.tsx +84 -19
  173. package/src/serve/hub-app/review/thread-st.ts +1 -10
  174. package/src/serve/hub-app/review/trailer-page.tsx +2 -1
  175. package/src/serve/hub-app/review.css +17 -8
  176. package/src/serve/hub-app/site/site-part.tsx +173 -0
  177. package/src/serve/hub-app/site/site-st.ts +157 -0
  178. package/src/serve/hub-app/site.css +35 -0
  179. package/src/serve/hub-app/social/calendar.tsx +182 -0
  180. package/src/serve/hub-app/social/comms-page.tsx +306 -0
  181. package/src/serve/hub-app/social/kit.tsx +244 -0
  182. package/src/serve/hub-app/social/post-card.tsx +456 -0
  183. package/src/serve/hub-app/social/problems.tsx +60 -0
  184. package/src/serve/hub-app/social/social-model.ts +154 -0
  185. package/src/serve/hub-app/social/social-page.tsx +674 -0
  186. package/src/serve/hub-app/social/social-st.ts +986 -0
  187. package/src/serve/hub-app/social.css +289 -0
  188. package/src/serve/hub-app/stores/stores-page.tsx +311 -0
  189. package/src/serve/hub-app/stores/stores-st.ts +286 -0
  190. package/src/serve/hub-app/stores.css +54 -0
  191. package/src/serve/hub-app/test-view.tsx +9 -2
  192. package/src/serve/hub-app/tests-svc.ts +16 -1
  193. package/src/serve/hub-app/timeline-geometry.ts +1 -1
  194. package/src/serve/hub-app/timeline-view.tsx +3 -2
  195. package/src/serve/hub-app/tree-build.ts +6 -0
  196. package/src/serve/hub-app/tree-row.tsx +27 -4
  197. package/src/serve/hub-app/tree-svc.ts +18 -49
  198. package/src/serve/hub-app/veille/veille-page.tsx +514 -0
  199. package/src/serve/hub-app/veille/veille-st.ts +443 -0
  200. package/src/serve/hub-app/veille.css +84 -0
  201. package/src/serve/hub-runtime.ts +14 -9
  202. package/src/serve/project-gutter-route.ts +44 -12
  203. package/src/serve/resources-wire.ts +48 -0
  204. package/src/serve/run-lanes.ts +7 -4
  205. package/src/serve/same-origin.ts +1 -1
  206. package/src/serve/serve-hub.ts +27 -18
  207. package/src/serve/tracked-watch.ts +24 -3
  208. package/src/serve/warm-cell.ts +5 -1
  209. package/src/shipkit-files.ts +15 -4
  210. package/src/shipkit.ts +0 -1
  211. package/src/shot/box.ts +162 -0
  212. package/src/shot/browser-slot.ts +62 -0
  213. package/src/shot/client.ts +43 -7
  214. package/src/shot/clip-encoder.ts +93 -12
  215. package/src/shot/film-box.ts +188 -0
  216. package/src/shot/shooter.ts +50 -15
  217. package/src/shot/shot-ask.ts +10 -2
  218. package/src/shot/stepped-clip.ts +5 -4
  219. package/src/site/desk.ts +242 -0
  220. package/src/site/routes.ts +66 -0
  221. package/src/site/unit.ts +62 -0
  222. package/src/social/brands.ts +22 -0
  223. package/src/social/compose.ts +97 -0
  224. package/src/social/desk-index.ts +123 -0
  225. package/src/social/desk-wire.ts +64 -0
  226. package/src/social/drafts.ts +183 -0
  227. package/src/social/house.ts +24 -0
  228. package/src/social/load.ts +319 -0
  229. package/src/social/md.ts +70 -0
  230. package/src/social/media-facts.ts +53 -0
  231. package/src/social/media-kind.ts +189 -0
  232. package/src/social/media-limit.ts +42 -0
  233. package/src/social/media-of.ts +30 -0
  234. package/src/social/migrate.ts +123 -0
  235. package/src/social/open.ts +17 -0
  236. package/src/social/post-url.ts +158 -0
  237. package/src/social/presence.ts +332 -0
  238. package/src/social/public-read.ts +53 -0
  239. package/src/social/publish/bluesky.ts +168 -0
  240. package/src/social/publish/discord.ts +76 -0
  241. package/src/social/publish/index.ts +24 -0
  242. package/src/social/publish/secret.ts +13 -0
  243. package/src/social/push.ts +31 -0
  244. package/src/social/richtext.ts +37 -0
  245. package/src/social/routes.ts +180 -0
  246. package/src/social/stats.ts +134 -0
  247. package/src/social/text.ts +267 -0
  248. package/src/social/tracker-route.ts +39 -0
  249. package/src/social/tracker.ts +255 -0
  250. package/src/social/unit.ts +53 -0
  251. package/src/social/writes.ts +130 -0
  252. package/src/start-repo.ts +14 -9
  253. package/src/stores/collection.ts +27 -0
  254. package/src/stores/desk.ts +336 -0
  255. package/src/stores/model.ts +187 -0
  256. package/src/stores/routes.ts +126 -0
  257. package/src/stores/unit.ts +57 -0
  258. package/src/suite/calibrate.ts +127 -0
  259. package/src/suite/core-counters.ts +91 -0
  260. package/src/suite/judge-suites.ts +94 -34
  261. package/src/suite/suite-cli.ts +44 -10
  262. package/src/suite/suite-cpu-preload.ts +34 -9
  263. package/src/trailer/adapter.ts +4 -0
  264. package/src/trailer/build.ts +42 -11
  265. package/src/trailer/ffmpeg.ts +11 -0
  266. package/src/trailer/footage.ts +30 -13
  267. package/src/trailer/grammar.ts +18 -2
  268. package/src/trailer/graph.ts +28 -6
  269. package/src/trailer/passage.ts +21 -6
  270. package/src/trailer/plan.ts +74 -3
  271. package/src/trailer/shelf.ts +16 -0
  272. package/src/trailer/stitch.ts +67 -26
  273. package/src/trailer/url.ts +1 -1
  274. package/src/trailer/versions.ts +24 -0
  275. package/src/ts/gate-typecheck.ts +32 -0
  276. package/src/ts/typecheck-cli.ts +9 -11
  277. package/src/tui/tui-app.tsx +0 -1
  278. package/src/veille/asks.ts +155 -0
  279. package/src/veille/auto.ts +31 -0
  280. package/src/veille/batch.ts +27 -0
  281. package/src/veille/chrome.ts +127 -0
  282. package/src/veille/collection.ts +28 -0
  283. package/src/veille/desk.ts +242 -0
  284. package/src/veille/identity.ts +80 -0
  285. package/src/veille/import.ts +68 -0
  286. package/src/veille/log.ts +183 -0
  287. package/src/veille/platforms.ts +118 -0
  288. package/src/veille/reads.ts +66 -0
  289. package/src/veille/replied.ts +110 -0
  290. package/src/veille/routes.ts +185 -0
  291. package/src/veille/service.ts +81 -0
  292. package/src/veille/watch.ts +116 -0
  293. package/src/veille/worth.ts +46 -0
  294. package/src/wiki/scan-md.ts +18 -0
  295. package/src/collections/posts.ts +0 -142
  296. package/src/contracts/manifests/social.contract.ts +0 -20
  297. package/src/scaffold/files/agent-coding.md +0 -35
  298. package/src/ts/typecheck-cache.ts +0 -11
@@ -53,6 +53,8 @@ export class ColsSvc {
53
53
  private last: Answer | null = null
54
54
  private keptCat: string | null | undefined = undefined
55
55
  private restoring: Promise<void> | null = null
56
+ /** the ETag of the last answer taken */
57
+ private tag: string | null = null
56
58
  actErr = ''
57
59
  remarkDraft = ''
58
60
  proofDraft = ''
@@ -64,7 +66,7 @@ export class ColsSvc {
64
66
  private timer: ReturnType<typeof setInterval> | null = null
65
67
 
66
68
  constructor(private st: RepoSt) {
67
- makeAutoObservable<this, 'st' | 'timer' | 'keptAt' | 'restoring' | 'readKept' | 'last' | 'keptCat'>(this, { st: false, timer: false, keptAt: false, restoring: false, readKept: false, last: false, keptCat: false })
69
+ makeAutoObservable<this, 'st' | 'timer' | 'keptAt' | 'restoring' | 'readKept' | 'last' | 'keptCat' | 'tag'>(this, { st: false, timer: false, keptAt: false, restoring: false, readKept: false, last: false, keptCat: false, tag: false })
68
70
  }
69
71
 
70
72
  /** one check's row of the plan, null when no plan covers it */
@@ -135,7 +137,16 @@ export class ColsSvc {
135
137
  try {
136
138
  const r = await reach(this.st.url(fresh ? '/api/resources.json?fresh=1' : '/api/resources.json'))
137
139
  if (!r.ok) throw new Error(await r.text())
140
+ // the browser revalidates the tag and hands back what it holds:
141
+ // the same tag is the same answer, so nothing is parsed or swapped
142
+ const tag = r.headers.get('ETag')
143
+ if (tag != null && tag === this.tag && this.loaded) {
144
+ await r.body?.cancel()
145
+ runInAction(() => { this.fetchErr = null })
146
+ return
147
+ }
138
148
  const j = (await r.json()) as Answer
149
+ this.tag = tag
139
150
  runInAction(() => {
140
151
  this.colMeta = j.collections
141
152
  this.fetched = j.resources
@@ -252,19 +263,6 @@ export class ColsSvc {
252
263
  const url = this.proofDraft.trim()
253
264
  return url !== '' ? this.act('ask-proof', { file, url }) : this.act('ask-done', { file })
254
265
  }
255
- postPick(channel: string, file: string): Promise<boolean> {
256
- return this.act('post-pick', { channel, file })
257
- }
258
- async postPosted(channel: string, file: string): Promise<boolean> {
259
- const url = this.proofDraft.trim()
260
- if (url === '') {
261
- this.actErr = 'paste the posted URL first — the proof is the point'
262
- return false
263
- }
264
- const ok = await this.act('post-posted', { channel, file, url })
265
- if (ok) runInAction(() => { this.proofDraft = '' })
266
- return ok
267
- }
268
266
  async remark(body: Record<string, unknown>): Promise<void> {
269
267
  const text = this.remarkDraft.trim()
270
268
  if (text === '') return
@@ -97,7 +97,7 @@ export function lineWords(view: HouseView | null, now: number): string {
97
97
  /** a pill of the dock's header: a word or two in a dim box, its hover the
98
98
  * whole story. The last run adds its repo, its verdict and its age */
99
99
  export type DockPill = {
100
- key: 'state' | 'queued' | 'held' | 'last' | 'settling' | 'window'
100
+ key: 'state' | 'queued' | `held:${number}` | 'last' | 'settling' | 'window'
101
101
  tone: 'dim' | 'accent' | 'warn'
102
102
  text: string
103
103
  title: string
@@ -139,10 +139,12 @@ export function dockPills(view: HouseView | null, now: number, size: DockSize):
139
139
  : { key: 'state', tone: 'dim', text: 'idle', title: flight }]
140
140
  if (queued > 0) out.push({ key: 'queued', tone: 'dim', text: `${queued} queued`, title: flight })
141
141
  const settling: string[] = []
142
+ // a loaded machine holds several lines at once: each pill keyed by its place, never by its text, which ticks
143
+ let held = 0
142
144
  for (const line of view.held ?? []) {
143
145
  const m = line.match(SETTLING)
144
146
  if (m != null) settling.push(`${m[1]} ${m[2]}`)
145
- else out.push({ key: 'held', tone: 'warn', text: line.replace(/ on \d+ cores$/, ''), title: line })
147
+ else out.push({ key: `held:${held++}`, tone: 'warn', text: line.replace(/ on \d+ cores$/, ''), title: line })
146
148
  }
147
149
  if (last != null) {
148
150
  const v = PILL_MARK[last.bar.status]
@@ -13,6 +13,7 @@ import { CycleButton } from './cycle-button.tsx'
13
13
  import { DOCK_KEY } from './keys.ts'
14
14
  import { DOCK_SIZES, SLIM_WINDOW_MS, windowWords, type DockPill } from './dock-st.ts'
15
15
  import { PillRow } from './pill-row.tsx'
16
+ import { ListFoot } from './project-list.tsx'
16
17
  import { TimelineChart } from './timeline-chart.tsx'
17
18
  import type { PlacedGroup } from './timeline-geometry.ts'
18
19
 
@@ -91,6 +92,7 @@ export const Dock = observer(({ app }: { app: HomeSt }) => {
91
92
  <CycleButton options={DOCK_SIZES} value={d.size} onChange={(s) => d.setSize(s)} shortcut={DOCK_KEY} title={DOCK_HELP} />
92
93
  <PillRow items={d.pills.map((p) => ({ key: p.key, title: p.title, node: <PillFace app={app} p={p} /> }))} />
93
94
  {d.error !== '' ? <span className="warnline">{d.error}</span> : null}
95
+ <ListFoot app={app} />
94
96
  <CopyUrl />
95
97
  </div>
96
98
  {d.size === 'line' ? null : <div className="dbody">
@@ -0,0 +1,35 @@
1
+ // the repo pages' frames kept alive (wiki build/shipkit/project-pages.md, Kept frames): the last few opened, across
2
+ // repos, newest first. A switch back to one is a show, never a load; one past the cap unloads the oldest, and of the
3
+ // hidden ones one 3D page at most: its scene holds gigabytes while hidden. A node of the home (home-st.ts)
4
+ import { makeAutoObservable } from 'mobx'
5
+
6
+ export const PAGE_FRAMES_KEPT = 3
7
+ /** hidden 3D pages kept, the shown one aside */
8
+ export const PAGE_GL_HIDDEN = 1
9
+
10
+ export type FrameRef = { repo: string; id: string; gl?: true }
11
+
12
+ export class FrameCache {
13
+ /** newest first, at most PAGE_FRAMES_KEPT */
14
+ kept: FrameRef[] = []
15
+
16
+ constructor(private readonly cap = PAGE_FRAMES_KEPT) {
17
+ makeAutoObservable(this)
18
+ }
19
+
20
+ /** this page opened: it is the newest; a hidden 3D page past PAGE_GL_HIDDEN goes, then the oldest past the cap */
21
+ touch(repo: string, id: string, gl = false): void {
22
+ let hiddenGl = 0
23
+ const rest = this.kept.filter((f) => (f.repo !== repo || f.id !== id) && (f.gl !== true || ++hiddenGl <= PAGE_GL_HIDDEN))
24
+ this.kept = [{ repo, id, ...(gl ? { gl: true as const } : {}) }, ...rest].slice(0, this.cap)
25
+ }
26
+
27
+ /** a repo's kept frames in the order they stand in the page: by id, never by age, so a switch never moves one (a
28
+ * moved iframe loads again) */
29
+ of(repo: string): string[] {
30
+ return this.kept
31
+ .filter((f) => f.repo === repo)
32
+ .map((f) => f.id)
33
+ .sort()
34
+ }
35
+ }
@@ -40,12 +40,23 @@ export type HashSel =
40
40
  /** a trailer's cuts, played with their notes: a trailer folder and one of its cuts, null for the first; the note
41
41
  * open on it, and the notes filter when it is not the page's default (all) */
42
42
  | { t: 'trailer'; trailer: string | null; cut: string | null; note?: string | null; filter?: 'open' | 'all' | null }
43
+ /** the store pages: a store, null for the first; a thing of it to scroll to (a picture's path, `field:<heading>`) */
44
+ | { t: 'stores'; store: string | null; asset?: string | null }
45
+ /** the Veille: the post picked, null for none; the window, chips, folds and lightbox as `window=3d&tags=a,b` */
46
+ | { t: 'veille'; post: string | null; q?: string }
47
+ /** Communications: a draft, null for the first the list keeps, one message of its series; the list's view as
48
+ * `fam=feed&ch=x&order=old&who=me` */
49
+ | { t: 'comms'; draft: string | null; part?: string | null; q?: string }
50
+ /** Social: an identity, null for the repo's; its company (`@legal`) or an account, null for its card; a place */
51
+ | { t: 'social'; identity: string | null; account?: string | null; place?: string | null }
52
+ /** a repo's own page (wiki build/shipkit/project-pages.md): the repo, the page, the page's own keys as a query */
53
+ | { t: 'page'; repo: string; id: string; q?: string }
43
54
 
44
55
  /** whose a gate check is */
45
56
  export type CheckOwner = 'shipkit' | 'repo'
46
57
 
47
58
  export type ParsedHash = {
48
- kind: 'asset' | 'cat' | 'col' | 'item' | 'status' | 'tests' | 'admin' | 'readme' | 'processes' | 'plan' | 'git' | 'when' | 'checks' | 'review' | 'trailer' | 'none'
59
+ kind: 'asset' | 'cat' | 'col' | 'item' | 'status' | 'tests' | 'admin' | 'readme' | 'processes' | 'plan' | 'git' | 'when' | 'checks' | 'review' | 'trailer' | 'stores' | 'veille' | 'comms' | 'social' | 'page' | 'none'
49
60
  /** the collection, for an item. null for everything else */
50
61
  col: string | null
51
62
  id: string
@@ -74,6 +85,11 @@ const WHEN = 'page:when'
74
85
  const CHECKS = 'page:checks:'
75
86
  const REVIEW = 'page:review'
76
87
  const TRAILER = 'page:trailer'
88
+ const STORES = 'page:stores'
89
+ const VEILLE = 'page:veille'
90
+ const COMMS = 'page:comms'
91
+ const SOCIAL = 'page:social'
92
+ const PROJECT_PAGE = /^page:([A-Za-z0-9._-]+)\/([a-z][a-z0-9-]*)(?:\?(.*))?$/
77
93
 
78
94
  /** what this selection puts in the url. null only for no selection at all,
79
95
  * and then the hash is left alone rather than wiped */
@@ -100,12 +116,25 @@ export function hashFor(sel: HashSel | null): string | null {
100
116
  const note = sel.trailer != null && sel.note ? `/${sel.cut ?? ''}/${sel.note}` : sel.cut == null ? '' : `/${sel.cut}`
101
117
  return `${sel.trailer == null ? TRAILER : `${TRAILER}:${sel.trailer}${note}`}${sel.filter ? `?filter=${sel.filter}` : ''}`
102
118
  }
119
+ // page:stores:<store>/<asset>, the asset as it is: a path or a heading carries any character
120
+ case 'stores': return sel.store == null ? STORES : `${STORES}:${sel.store}${sel.asset ? `/${sel.asset}` : ''}`
121
+ // page:veille:<platform>:<id>?window=3d, the query only when it says something
122
+ case 'veille': return `${sel.post == null ? VEILLE : `${VEILLE}:${sel.post}`}${sel.q ? `?${sel.q}` : ''}`
123
+ // page:comms:<slug>/<part>?fam=feed, each part only when it says something
124
+ case 'comms': return `${sel.draft == null ? COMMS : `${COMMS}:${sel.draft}${sel.part ? `/${sel.part}` : ''}`}${sel.q ? `?${sel.q}` : ''}`
125
+ // page:social:<identity>/<account>/<place>
126
+ // page:<repo>/<page>?<keys>, the keys only when the page has any
127
+ case 'page': return `page:${sel.repo}/${sel.id}${sel.q ? `?${sel.q}` : ''}`
128
+ case 'social': return sel.identity == null ? SOCIAL : `${SOCIAL}:${[sel.identity, ...(sel.account ? [sel.account, ...(sel.place ? [sel.place] : [])] : [])].join('/')}`
103
129
  }
104
130
  }
105
131
 
106
132
  export function parseHash(raw: string): ParsedHash {
107
133
  const none: ParsedHash = { kind: 'none', col: null, id: '', tools: null }
108
134
  if (raw === '') return none
135
+ // a repo's own page: no built-in page name holds a slash before its first colon; the repo rides in `col`
136
+ const own = PROJECT_PAGE.exec(raw)
137
+ if (own != null) return { kind: 'page', col: own[1]!, id: own[2]!, tools: null, ...(own[3] ? { q: own[3] } : {}) }
109
138
  if (raw === STATUS) return { kind: 'status', col: null, id: '', tools: null }
110
139
  if (raw === TESTS) return { kind: 'tests', col: null, id: '', tools: null }
111
140
  if (raw === ADMIN) return { kind: 'admin', col: null, id: '', tools: null }
@@ -128,6 +157,32 @@ export function parseHash(raw: string): ParsedHash {
128
157
  const f = qi === -1 ? null : new URLSearchParams(raw.slice(qi + 1)).get('filter')
129
158
  return { kind: 'trailer', col: trailer === '' ? null : trailer, id: cut, tools: null, ...(note ? { note } : {}), ...(f === 'open' || f === 'all' ? { filter: f } : {}) }
130
159
  }
160
+ // the store rides in `col`, the thing named in `id`: everything after the first slash
161
+ if (raw === STORES || raw.startsWith(`${STORES}:`)) {
162
+ const rest = raw.slice(STORES.length + 1)
163
+ const cut = rest.indexOf('/')
164
+ const store = cut === -1 ? rest : rest.slice(0, cut)
165
+ return { kind: 'stores', col: store === '' ? null : store, id: cut === -1 ? '' : rest.slice(cut + 1), tools: null }
166
+ }
167
+ if (raw === VEILLE || raw.startsWith(`${VEILLE}:`) || raw.startsWith(`${VEILLE}?`)) {
168
+ const qi = raw.indexOf('?')
169
+ const path = qi === -1 ? raw : raw.slice(0, qi)
170
+ const q = qi === -1 ? '' : raw.slice(qi + 1)
171
+ return { kind: 'veille', col: null, id: path.slice(VEILLE.length + 1), tools: null, ...(q ? { q } : {}) }
172
+ }
173
+ // the draft rides in `col`, its part in `id`
174
+ if (raw === COMMS || raw.startsWith(`${COMMS}:`) || raw.startsWith(`${COMMS}?`)) {
175
+ const qi = raw.indexOf('?')
176
+ const path = qi === -1 ? raw : raw.slice(0, qi)
177
+ const q = qi === -1 ? '' : raw.slice(qi + 1)
178
+ const [draft = '', part = ''] = path.slice(COMMS.length + 1).split('/')
179
+ return { kind: 'comms', col: draft === '' ? null : draft, id: part, tools: null, ...(q ? { q } : {}) }
180
+ }
181
+ // the identity rides in `col`, `<account>/<place>` in `id`
182
+ if (raw === SOCIAL || raw.startsWith(`${SOCIAL}:`)) {
183
+ const [identity = '', ...rest] = raw.slice(SOCIAL.length + 1).split('/')
184
+ return { kind: 'social', col: identity === '' ? null : identity, id: rest.join('/'), tools: null }
185
+ }
131
186
  if (raw === `${CHECKS}shipkit` || raw === `${CHECKS}repo`) return { kind: 'checks', col: null, id: raw.slice(CHECKS.length), tools: null }
132
187
  if (raw.startsWith(`${PROCESSES}:`)) {
133
188
  const id = raw.slice(PROCESSES.length + 1)
@@ -183,6 +238,14 @@ export function selOf(p: ParsedHash): HashSel | null {
183
238
  case 'checks': return { t: 'checks', from: p.id as CheckOwner }
184
239
  case 'review': return { t: 'review', id: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
185
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 } : {}) }
241
+ case 'stores': return { t: 'stores', store: p.col, ...(p.id ? { asset: p.id } : {}) }
242
+ case 'veille': return { t: 'veille', post: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
243
+ case 'comms': return { t: 'comms', draft: p.col, ...(p.id ? { part: p.id } : {}), ...(p.q ? { q: p.q } : {}) }
244
+ case 'page': return { t: 'page', repo: p.col!, id: p.id, ...(p.q ? { q: p.q } : {}) }
245
+ case 'social': {
246
+ const [account = '', place = ''] = p.id.split('/')
247
+ return { t: 'social', identity: p.col, ...(account ? { account } : {}), ...(account && place ? { place } : {}) }
248
+ }
186
249
  }
187
250
  }
188
251
 
@@ -15,11 +15,14 @@ import { currentHash, hashFor } from './hash-route.ts'
15
15
  import { MachineSt, type MachineOpts } from './machine-st.ts'
16
16
  import { LayoutSt } from './layout-st.ts'
17
17
  import { ThemeSt } from './theme-st.ts'
18
+ import { FrameCache } from './frames-st.ts'
18
19
  import { DockSt } from './dock-st.ts'
19
20
  import { PaletteSt } from './palette-st.ts'
20
21
  import { PlannedSt } from './planned-st.ts'
21
22
  import { ActivitySt } from './activity-st.ts'
22
23
  import { InsightsSt } from './insights-st.ts'
24
+ import { IdentitiesSt } from './identities-st.ts'
25
+ import { identityAddress, parseIdentityHash, type IdentitySel } from './identity-address.ts'
23
26
  import { InboxSt } from './inbox-st.ts'
24
27
  import { ProjectsSvc } from './projects-svc.ts'
25
28
  import { parseFilter, RepoSt } from './repo-st.ts'
@@ -29,10 +32,10 @@ import { openSection, repoSections, sectionOfRepo } from './repo-sections.ts'
29
32
  export const PREFETCH_WAIT_MS = 10_000
30
33
 
31
34
  /** what the page shows: the machine overview, the inbox, the plan, the activity, the insights, the archived repos, or one repo */
32
- export type Page = 'overview' | 'inbox' | 'planned' | 'activity' | 'insights' | 'archived' | 'repo'
35
+ export type Page = 'overview' | 'inbox' | 'planned' | 'activity' | 'insights' | 'identities' | 'archived' | 'repo'
33
36
 
34
37
  /** the address of each page of the home that is no repo's */
35
- export const PLACE_PATH = { overview: '/', inbox: '/inbox', planned: '/planned', activity: '/activity', insights: '/insights', archived: '/archived' } as const
38
+ export const PLACE_PATH = { overview: '/', inbox: '/inbox', planned: '/planned', activity: '/activity', insights: '/insights', identities: '/identities', archived: '/archived' } as const
36
39
 
37
40
  /** where a repo's hub answers on the home */
38
41
  export const repoBase = (name: string): string => `/r/${encodeURIComponent(name)}`
@@ -54,6 +57,7 @@ export function routeOf(pathname: string): { page: Page; repo: string | null } {
54
57
  if (/^\/planned\/?$/.test(pathname)) return { page: 'planned', repo: null }
55
58
  if (/^\/activity\/?$/.test(pathname)) return { page: 'activity', repo: null }
56
59
  if (/^\/insights\/?$/.test(pathname)) return { page: 'insights', repo: null }
60
+ if (/^\/identities\/?$/.test(pathname)) return { page: 'identities', repo: null }
57
61
  if (/^\/archived\/?$/.test(pathname)) return { page: 'archived', repo: null }
58
62
  return { page: 'overview', repo: null }
59
63
  }
@@ -80,6 +84,8 @@ export class HomeSt {
80
84
  /** what every repo committed and holds, polled while it is the page */
81
85
  activity: ActivitySt
82
86
  insights: InsightsSt
87
+ /** who speaks for each repo, read while it is the page */
88
+ identities: IdentitiesSt
83
89
  /** everything that waits on the owner in every repo, polled while it is the page */
84
90
  inbox: InboxSt
85
91
  /** the one picker, cmd+j */
@@ -90,6 +96,8 @@ export class HomeSt {
90
96
  dock: DockSt
91
97
  /** dark, light or the system's */
92
98
  readonly theme = new ThemeSt()
99
+ /** the repo pages' frames kept alive, across repos (frames-st.ts) */
100
+ readonly frames = new FrameCache()
93
101
  page: Page
94
102
  /** the key of the repo picked last: its name on the home, '' for the one
95
103
  * repo of a hub of its own. A global page keeps it (only `shown` says
@@ -110,13 +118,14 @@ export class HomeSt {
110
118
  this.planned = new PlannedSt(this)
111
119
  this.activity = new ActivitySt(this)
112
120
  this.insights = new InsightsSt(this)
121
+ this.identities = new IdentitiesSt(this)
113
122
  this.inbox = new InboxSt(this)
114
123
  this.palette = new PaletteSt(this)
115
124
  this.layout = new LayoutSt()
116
125
  this.dock = new DockSt(this)
117
126
  this.machine = o.home ? new MachineSt(this, o) : null
118
127
  this.page = o.home ? 'overview' : 'repo'
119
- makeAutoObservable<this, 'disposers' | 'onUrl' | 'prefetching' | 'base'>(this, { base: false, machine: false, projects: false, planned: false, activity: false, insights: false, inbox: false, palette: false, layout: false, theme: false, dock: false, repos: observableShallow, disposers: false, onUrl: false, prefetching: false })
128
+ makeAutoObservable<this, 'disposers' | 'onUrl' | 'prefetching' | 'base'>(this, { base: false, machine: false, projects: false, planned: false, activity: false, insights: false, identities: false, inbox: false, palette: false, layout: false, theme: false, frames: false, dock: false, repos: observableShallow, disposers: false, onUrl: false, prefetching: false })
120
129
  const m = this.machine
121
130
  if (m != null) {
122
131
  this.projects.onSelect = (name) => this.select(name)
@@ -125,6 +134,8 @@ export class HomeSt {
125
134
  this.projects.onPicker = () => this.palette.toggle()
126
135
  this.projects.pickerOpen = () => this.palette.open
127
136
  this.projects.onArchived = () => this.navigate(PLACE_PATH.archived)
137
+ this.projects.onIdentity = (id) => this.openIdentity({ id, part: null, place: null })
138
+ this.projects.identityLit = () => (this.page === 'identities' ? this.identities.shownId : null)
128
139
  this.projects.dotOf = (name) => m.dotOf(name)
129
140
  this.projects.warnOf = (name) => m.warnOf(name)
130
141
  } else {
@@ -156,6 +167,7 @@ export class HomeSt {
156
167
  if (this.page === 'planned') return 'planned'
157
168
  if (this.page === 'activity') return 'activity'
158
169
  if (this.page === 'insights') return 'insights'
170
+ if (this.page === 'identities') return this.identities.shown?.name ?? 'identities'
159
171
  if (this.page === 'archived') return 'archived'
160
172
  const r = this.shown
161
173
  return r == null || r.name === '' ? 'hub' : `${r.name} · hub`
@@ -248,6 +260,12 @@ export class HomeSt {
248
260
  this.show(r.page, r.repo, 'push')
249
261
  }
250
262
 
263
+ /** an identity, one of its sections or accounts: the home's identity view on it, in place */
264
+ openIdentity(sel: IdentitySel): void {
265
+ this.identities.select(sel)
266
+ this.show('identities', null, 'push')
267
+ }
268
+
251
269
  /** the inbox on one item, or on its list: an item is a history entry of its own, so back returns to the list */
252
270
  openInbox(item: { repo: string; id: string } | null): void {
253
271
  const was = this.inbox.open
@@ -273,6 +291,7 @@ export class HomeSt {
273
291
  if (r.page === 'overview' && this.inbox.phone && location.search === '') return this.show('inbox', null, 'replace')
274
292
  if (r.page === 'inbox') this.inbox.fromSearch(location.search)
275
293
  if (r.page === 'planned') this.planned.query = new URLSearchParams(location.search).get('q') ?? ''
294
+ if (r.page === 'identities') this.identities.select(parseIdentityHash(location.hash))
276
295
  if (r.page === 'repo') this.repo(r.repo!).filter = parseFilter(location.search)
277
296
  this.show(r.page, r.repo, 'none')
278
297
  this.shown?.applyHash()
@@ -285,7 +304,7 @@ export class HomeSt {
285
304
  const prevPage = this.page
286
305
  const next = page === 'repo' && repo != null ? this.repo(repo) : null
287
306
  // the page already shown is never a second history entry
288
- if (how === 'push' && page === this.page && next === prev && page !== 'planned' && page !== 'inbox') how = 'none'
307
+ if (how === 'push' && page === this.page && next === prev && page !== 'planned' && page !== 'inbox' && page !== 'identities') how = 'none'
289
308
  if (prev != null && prev !== next) prev.pause()
290
309
  next?.markSeen()
291
310
  this.page = page
@@ -293,17 +312,22 @@ export class HomeSt {
293
312
  if (next != null) this.selected = next.key
294
313
  this.projects.selected = this.selected
295
314
  this.projects.away = next == null
296
- this.projects.place = page === 'repo' || page === 'archived' ? null : page
315
+ this.projects.place = page === 'repo' || page === 'archived' || page === 'identities' ? null : page
297
316
  if (how !== 'none') {
298
- const to = next != null ? `${repoPage(next.key)}${next.search}${next.hash}` : page === 'planned' ? this.planned.address : page === 'inbox' ? `${PLACE_PATH.inbox}${this.inbox.search}` : page === 'activity' || page === 'insights' || page === 'archived' ? PLACE_PATH[page] : '/'
317
+ const to = next != null ? `${repoPage(next.key)}${next.search}${next.hash}` : page === 'planned' ? this.planned.address : page === 'inbox' ? `${PLACE_PATH.inbox}${this.inbox.search}` : page === 'identities' ? identityAddress(this.identities.sel) : page === 'activity' || page === 'insights' || page === 'archived' ? PLACE_PATH[page] : '/'
318
+ // the identity view picked again is never a second entry
319
+ if (how === 'push' && page === 'identities' && prevPage === 'identities' && `${location.pathname}${location.hash}` === to) how = 'none'
320
+ // a walk with the arrows is one entry, so back returns to where it started
321
+ if (how === 'push' && page === 'identities' && this.identities.entry.how() === 'replace' && prevPage === 'identities') how = 'replace'
299
322
  // an inbox item marks its entry, so its back button goes back rather than forward to the list
300
323
  const state = page === 'inbox' && this.inbox.open != null ? { inbox: 'item' } : null
301
324
  if (how === 'push') history.pushState(state, '', to)
302
- else history.replaceState(state, '', to)
325
+ else if (how === 'replace') history.replaceState(state, '', to)
303
326
  }
304
327
  if (page === 'planned') this.planned.start()
305
328
  else this.planned.stop()
306
329
  if (page === 'insights' && prevPage !== 'insights') this.insights.start()
330
+ if (page === 'identities' && prevPage !== 'identities') this.identities.start()
307
331
  if (page === 'inbox') this.inbox.start()
308
332
  else this.inbox.stop()
309
333
  if (page === 'activity') this.activity.start()
@@ -1,6 +1,6 @@
1
1
  /* the home's strip over a hub page, and the overview. hub.css owns every
2
2
  token and the base controls: no colour is written here. */
3
- .hstrip{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--s2);height:32px;flex:none;padding:0 var(--s3);border-bottom:1px solid var(--line);background:var(--bg-top);overflow:hidden;white-space:nowrap}
3
+ .hstrip{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--s2);height:40px;flex:none;padding:0 var(--s3);border-bottom:1px solid var(--line);background:var(--bg-top);overflow:hidden;white-space:nowrap}
4
4
  .hstrip .sp{flex:1}
5
5
  .hplace{font-size:12px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
6
6
  .hrepo{display:inline-flex;align-items:center;gap:var(--s2);min-width:0;flex:0 1 auto}
@@ -159,3 +159,11 @@
159
159
  .pdetail>.cstitle{margin:var(--s3) 0 var(--s1)}
160
160
  .pdetail>.cstitle:first-child{margin-top:0}
161
161
  .pdetail .hlog{margin-top:0}
162
+ /* the identities after the places (wiki build/shipkit/social.md, Identities): one round avatar each, its initial on
163
+ its colour without one, ringed in its colour while its view shows */
164
+ .hids{flex:none;display:inline-flex;align-items:center;gap:var(--s1);margin-right:var(--s2);padding-right:var(--s2);border-right:1px solid var(--line)}
165
+ .hid{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:none;--idr:transparent}
166
+ .hid:hover{--idr:var(--line)}
167
+ .hid.cur{--idr:var(--idc,var(--accent))}
168
+ .hidm{width:28px;height:28px;border-radius:50%;object-fit:cover;pointer-events:none;box-shadow:0 0 0 2px var(--idr)}
169
+ .hidi{display:grid;place-items:center;background:var(--idc,var(--dim));color:var(--bg);font-size:13px;font-weight:700;user-select:none}
@@ -2,15 +2,13 @@
2
2
  // repo page the shown repo (its icon, its name in its own colour, the two
3
3
  // swatches that set those colours), its check… button and a spinner while
4
4
  // it runs, then on the right its processes and its editor icons
5
- // (header-bar.tsx); on the overview and the plan, the page's name. The strip
5
+ // (header-bar.tsx); on the overview and the plan, the page's name. It starts with the home's places as icon
6
+ // buttons (project-list.tsx Places), then the identities' avatars (Identities), so the rail holds only the repos. The strip
6
7
  // carries no trouble text: the shown hub's trouble and the machine's (the
7
8
  // daemon, pm or the web not answering, a child or a global process crashed, a
8
9
  // failed poll) are cards floating under it at the top right, only while they
9
10
  // last (float-cards.tsx). The machine not answering is said there and nowhere
10
- // else (reach.ts). The places themselves
11
- // are the place buttons at the top of the project list (the picker's ⌘J,
12
- // then ⌘K, ⌘L, ⌘') and the first three entries of the
13
- // picker. What administers one repo (reload its hub, keep it active, archive
11
+ // else (reach.ts). The places are also the first entries of the picker. What administers one repo (reload its hub, keep it active, archive
14
12
  // it) is its admin page (admin-view.tsx). NotUp stands in for the hub page
15
13
  // while its hub cannot answer, with the fix. Every link of the home is a
16
14
  // page of the same app: a plain click moves it in place.
@@ -31,6 +29,7 @@ import { Pop, Tip } from './floating.tsx'
31
29
  import { renderMd } from './md.ts'
32
30
  import { FloatCards, type Card } from './float-cards.tsx'
33
31
  import { hubCards, notUp, RepoOpeners, RepoRun, RepoTools } from './header-bar.tsx'
32
+ import { Identities, Places } from './project-list.tsx'
34
33
 
35
34
  const STATUS_WORD: Record<WorkerView['status'], string> = { up: 'up', starting: 'starting', crashed: 'crashed', down: 'down', stopping: 'stopping' }
36
35
 
@@ -249,7 +248,7 @@ const ShownRepo = observer(({ app, name }: { app: HomeSt; name: string }) => {
249
248
  const downCard = (m: MachineSt): Card[] => {
250
249
  const web = m.down !== '' && m.downWho === 'web'
251
250
  const pm = m.pmDown !== '' && !web
252
- if (m.down === '' && !pm) return []
251
+ if (m.down === '' && !pm) return m.restarting === '' ? [] : [{ key: 'down', tone: 'warn', head: 'restarting', body: m.restarting }]
253
252
  const head = m.down === '' ? 'pm down' : pm ? 'daemon and pm down' : `${m.downWho} down`
254
253
  return [{ key: 'down', tone: 'red', head, body: m.down === '' ? m.pmDown : pm ? <>{m.down}<br />{m.pmDown}</> : m.down }]
255
254
  }
@@ -343,6 +342,8 @@ export const HomeStrip = observer(({ app }: { app: HomeSt }) => {
343
342
  return (
344
343
  <>
345
344
  <div className="hstrip">
345
+ <Places s={app.projects} />
346
+ <Identities s={app.projects} />
346
347
  {name == null ? <span className="hplace">{app.page === 'overview' ? 'overview' : app.page}</span> : <ShownRepo app={app} name={name} />}
347
348
  {name == null ? null : <RepoProcesses m={m} name={name} />}
348
349
  <span className="sp" />
@@ -11,10 +11,15 @@
11
11
  <link rel="stylesheet" href="./when.css" />
12
12
  <link rel="stylesheet" href="./activity.css" />
13
13
  <link rel="stylesheet" href="./insights.css" />
14
+ <link rel="stylesheet" href="./identities.css" />
15
+ <link rel="stylesheet" href="./site.css" />
14
16
  <link rel="stylesheet" href="./readme.css" />
15
17
  <link rel="stylesheet" href="./dock.css" />
16
18
  <link rel="stylesheet" href="./controls.css" />
17
19
  <link rel="stylesheet" href="./review.css" />
20
+ <link rel="stylesheet" href="./stores.css" />
21
+ <link rel="stylesheet" href="./veille.css" />
22
+ <link rel="stylesheet" href="./social.css" />
18
23
  <link rel="stylesheet" href="./inbox.css" />
19
24
  </head>
20
25
  <body data-home>
@@ -32,6 +32,10 @@ import { AdminPage } from './admin-view.tsx'
32
32
  import { ReadmeView } from './readme-view.tsx'
33
33
  import { ReviewPage } from './review/review-page.tsx'
34
34
  import { TrailerPage } from './review/trailer-page.tsx'
35
+ import { StoresPage } from './stores/stores-page.tsx'
36
+ import { VeillePage } from './veille/veille-page.tsx'
37
+ import { CommsPage } from './social/comms-page.tsx'
38
+ import { SocialPage } from './social/social-page.tsx'
35
39
  import { ProjectList } from './project-list.tsx'
36
40
  import { Group, Panel, Separator, usePanelRef, type Layout } from 'react-resizable-panels'
37
41
  import { LIST, SIDEBAR } from './layout-st.ts'
@@ -39,9 +43,11 @@ import { ArchivedView, HomeStrip, NotUp, Overview } from './home-strip.tsx'
39
43
  import { PlannedView } from './planned-view.tsx'
40
44
  import { ActivityView } from './activity-view.tsx'
41
45
  import { InsightsView } from './insights-view.tsx'
46
+ import { IdentitiesView } from './identities-view.tsx'
42
47
  import { Palette } from './palette-view.tsx'
43
48
  import { SCREEN_WAIT_MS } from './screen-cache.ts'
44
- import { isSearchKey, pageKey, sectionKey } from './keys.ts'
49
+ import { isSearchKey, pageKey, pageLetterKey, sectionKey } from './keys.ts'
50
+ import { PageFrames } from './pages-frames.tsx'
45
51
  import { repoSections } from './repo-sections.ts'
46
52
  import { Dock } from './dock-view.tsx'
47
53
  import { DOCK } from './dock-st.ts'
@@ -50,7 +56,10 @@ import { animateDock } from './dock-anim.ts'
50
56
  // home.html marks the home's page; index.html is a hub serving on its own; `<base>/embed/?page=review` is one repo's
51
57
  // review or trailer page alone, for another tool's frame (embed.ts), its base read from where it sits
52
58
  const embedAt = /^(.*)\/embed\/?$/.exec(location.pathname)
53
- const embed: 'review' | 'trailer' | null = embedAt == null ? null : new URLSearchParams(location.search).get('page') === 'trailer' ? 'trailer' : 'review'
59
+ const EMBED_PAGES = ['review', 'trailer', 'stores', 'veille', 'comms', 'social'] as const
60
+ type EmbedPage = (typeof EMBED_PAGES)[number]
61
+ const asked = new URLSearchParams(location.search).get('page')
62
+ const embed: EmbedPage | null = embedAt == null ? null : (EMBED_PAGES.find((p) => p === asked) ?? 'review')
54
63
  const home = new HomeSt(embedAt == null ? { home: document.body.dataset.home != null } : { home: false, base: embedAt[1] ?? '' })
55
64
  // the root as a global — app code, console debugging (build/app-state-tree)
56
65
  ;(window as unknown as { app: HomeSt }).app = home
@@ -88,6 +97,10 @@ const Main = observer(({ app }: { app: RepoSt }) => {
88
97
  )
89
98
  if (app.sel?.t === 'review') return <main>{errs}<ReviewPage app={app} /></main>
90
99
  if (app.sel?.t === 'trailer') return <main>{errs}<TrailerPage app={app} /></main>
100
+ if (app.sel?.t === 'stores') return <main>{errs}<StoresPage app={app} /></main>
101
+ if (app.sel?.t === 'veille') return <main>{errs}<VeillePage app={app} /></main>
102
+ if (app.sel?.t === 'comms') return <main>{errs}<CommsPage app={app} /></main>
103
+ if (app.sel?.t === 'social') return <main>{errs}<SocialPage app={app} /></main>
91
104
  if (app.sel?.t === 'tests') return <main>{errs}<div className="stagewrap"><TestsPage app={app} check={app.sel.check} /></div></main>
92
105
  if (app.sel?.t === 'admin') return <main>{errs}<div className="stagewrap"><AdminPage app={app} /></div></main>
93
106
  if (app.sel?.t === 'plan') return <main>{errs}<div className="stagewrap"><PlanPage app={app} /></div></main>
@@ -96,6 +109,8 @@ const Main = observer(({ app }: { app: RepoSt }) => {
96
109
  if (app.sel?.t === 'when') return <main>{errs}<div className="stagewrap"><WhenPage app={app} /></div></main>
97
110
  if (app.sel?.t === 'processes') return <main>{errs}<div className="stagewrap"><ProcessesPage app={app} id={app.sel.id} /></div></main>
98
111
  if (app.sel?.t === 'status') return <main>{errs}<div className="stagewrap"><StatusCard app={app} /></div></main>
112
+ // a repo's own page is its kept frame, drawn beside this (pages-frames.tsx)
113
+ if (app.sel?.t === 'page') return null
99
114
  if (app.sel?.t === 'cat') return <main>{errs}<CatGrid app={app} /></main>
100
115
  if (app.sel?.t === 'asset') return (
101
116
  <main>
@@ -132,6 +147,22 @@ const FILTER_BY_KEY: Record<string, Filter | undefined> = { a: 'all', n: 'needs'
132
147
  * overflow is the one inline style the library lets a panel set */
133
148
  const PANEL = { overflow: 'hidden' } as const
134
149
 
150
+ /** the identity view's keys: its lightbox first, then `/` and the list's arrows, the repo tree's (list-walk.ts) */
151
+ function identityKey(e: KeyboardEvent): void {
152
+ const st = home.identities
153
+ const t = e.target as HTMLElement
154
+ if (t.tagName === 'TEXTAREA' || t.tagName === 'INPUT' || e.metaKey || e.ctrlKey || e.altKey) return
155
+ if (st.desk?.lightbox != null && st.desk.key(e, 'social')) return e.preventDefault()
156
+ if (isSearchKey(e)) {
157
+ e.preventDefault()
158
+ st.searchEl?.focus()
159
+ return
160
+ }
161
+ // the arrows need no focus, Enter and space only where no button or link claims them
162
+ const own = e.key.startsWith('Arrow') || t.closest('button, a, select, [role="button"]') == null
163
+ if (own && st.key(e.key)) e.preventDefault()
164
+ }
165
+
135
166
  /** a drag of a separator ended: the width of the panel on its left, in px,
136
167
  * from the group's layout (a percentage of the group's width) */
137
168
  const leftPx = (el: HTMLElement | null, layout: Layout, id: string): number | null => {
@@ -158,6 +189,7 @@ const Body = observer(({ app }: { app: RepoSt }) => {
158
189
  <Separator className="rsep" />
159
190
  <Panel id="main" minSize={320} className="pmain" style={PANEL} onPointerDownCapture={() => app.tree.leave()}>
160
191
  <Main app={app} />
192
+ <PageFrames app={app} />
161
193
  </Panel>
162
194
  </Group>
163
195
  )
@@ -215,6 +247,7 @@ function onKey(e: KeyboardEvent): void {
215
247
  return
216
248
  }
217
249
  if (home.palette.open) return // the picker's input owns its keys
250
+ if (home.page === 'identities') return identityKey(e)
218
251
  const app = home.shown
219
252
  if (app == null) return
220
253
  const t = e.target as HTMLElement
@@ -231,6 +264,16 @@ function onKey(e: KeyboardEvent): void {
231
264
  e.preventDefault()
232
265
  return
233
266
  }
267
+ // a repo's own page, ⌥⇧ and its letter
268
+ const letter = pageLetterKey(e)
269
+ if (letter != null) {
270
+ const p = app.pages.byKey(letter)
271
+ if (p != null) {
272
+ e.preventDefault()
273
+ app.showPage(p.id)
274
+ }
275
+ return
276
+ }
234
277
  const sk = sectionKey(e)
235
278
  if (sk != null) {
236
279
  const s = repoSections(app).find((x) => x.id === sk)
@@ -348,6 +391,7 @@ const App = observer(() => {
348
391
  {home.page === 'planned' ? <PlannedView app={home} /> : null}
349
392
  {home.page === 'activity' ? <ActivityView app={home} /> : null}
350
393
  {home.page === 'insights' ? <InsightsView app={home} /> : null}
394
+ {home.page === 'identities' ? <IdentitiesView app={home} /> : null}
351
395
  {home.page === 'archived' ? <ArchivedView app={home} /> : null}
352
396
  {home.visited.map((r) => <RepoView key={r.key} app={r} />)}
353
397
  </Panel>
@@ -365,7 +409,7 @@ const App = observer(() => {
365
409
 
366
410
  /** the embed page: the one page, no tree, no list, no dock. Its address and the frame's host follow each other: every
367
411
  * page move is posted to the parent, and the parent's `{ shipkit: 'go', hash }` moves the page; both only on this origin */
368
- const EmbedApp = observer(({ page }: { page: 'review' | 'trailer' }) => {
412
+ const EmbedApp = observer(({ page }: { page: EmbedPage }) => {
369
413
  const app = home.shown
370
414
  useEffect(() => {
371
415
  document.addEventListener('keydown', onKey)
@@ -382,7 +426,7 @@ const EmbedApp = observer(({ page }: { page: 'review' | 'trailer' }) => {
382
426
  }, [])
383
427
  useEffect(() => {
384
428
  if (app == null) return
385
- if (app.sel?.t !== page) app.go(page === 'review' ? { t: 'review', id: null } : { t: 'trailer', trailer: null, cut: null })
429
+ if (app.sel?.t !== page) app.go(page === 'review' ? { t: 'review', id: null } : page === 'trailer' ? { t: 'trailer', trailer: null, cut: null } : page === 'veille' ? { t: 'veille', post: null } : page === 'comms' ? { t: 'comms', draft: null } : page === 'social' ? { t: 'social', identity: null } : { t: 'stores', store: null })
386
430
  if (window.parent === window) return
387
431
  return reaction(
388
432
  () => (app.sel == null ? '' : (hashFor(app.sel) ?? '')),
@@ -391,7 +435,7 @@ const EmbedApp = observer(({ page }: { page: 'review' | 'trailer' }) => {
391
435
  )
392
436
  }, [app, page])
393
437
  if (app == null) return null
394
- return <main className="embed" style={{ position: 'fixed', inset: 0 }}>{page === 'review' ? <ReviewPage app={app} /> : <TrailerPage app={app} />}</main>
438
+ return <main className="embed" style={{ position: 'fixed', inset: 0 }}>{page === 'review' ? <ReviewPage app={app} /> : page === 'trailer' ? <TrailerPage app={app} /> : page === 'veille' ? <VeillePage app={app} /> : page === 'comms' ? <CommsPage app={app} /> : page === 'social' ? <SocialPage app={app} /> : <StoresPage app={app} />}</main>
395
439
  })
396
440
 
397
441
  // the shown repo's kept screen is read before the first paint, so a refresh