rvlib-shipkit 2.20.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.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/checks/SK004-gitignore-policy.check.ts +6 -3
- package/src/cli/cmd_GlobalProcesses.ts +2 -107
- package/src/cli/cmd_Home.ts +1 -1
- package/src/cli/cmd_Overview.ts +2 -1
- package/src/cli/cmd_Releases.ts +39 -3
- package/src/cli/cmd_Review.ts +22 -13
- package/src/cli/cmd_Social.ts +13 -7
- package/src/cli/cmd_Sound.ts +17 -4
- package/src/cli/cmd_Trailer.ts +67 -1
- package/src/cli/registry.ts +2 -1
- package/src/collections/collection-types.ts +1 -1
- package/src/collections/review.ts +23 -4
- package/src/core/layout.ts +6 -0
- package/src/home/gui-app/ShipkitGui.swift +35 -0
- package/src/home/gui-app.ts +1 -0
- package/src/home/pm-switch.ts +112 -0
- package/src/identities/identities.ts +11 -6
- package/src/messages/brief.ts +3 -3
- package/src/messages/score.ts +2 -0
- package/src/releases/add.ts +33 -5
- package/src/releases/before.ts +31 -0
- package/src/releases/from-card.ts +104 -19
- package/src/releases/model.ts +73 -13
- package/src/releases/pictures.ts +29 -8
- package/src/review/http.ts +1 -1
- package/src/review/model.ts +12 -2
- package/src/review/stage-card.ts +1 -1
- package/src/review/store.ts +12 -2
- package/src/review/trailer-desk.ts +19 -0
- package/src/review/trailer-model.ts +65 -0
- package/src/review/trailer-routes.ts +98 -1
- package/src/review/trailer-voices.ts +144 -0
- package/src/review/watchers.ts +58 -1
- package/src/serve/hub-app/benign-errors.ts +22 -0
- package/src/serve/hub-app/hash-route.ts +27 -15
- package/src/serve/hub-app/home-st.ts +8 -0
- package/src/serve/hub-app/hub-app.tsx +2 -0
- package/src/serve/hub-app/project-list.css +7 -2
- package/src/serve/hub-app/project-list.tsx +9 -0
- package/src/serve/hub-app/projects-svc.ts +16 -6
- package/src/serve/hub-app/releases/releases-page.tsx +121 -28
- package/src/serve/hub-app/releases/releases-st.ts +46 -4
- package/src/serve/hub-app/releases.css +30 -3
- package/src/serve/hub-app/repo-sections.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +15 -10
- package/src/serve/hub-app/review/clip-st.ts +3 -1
- package/src/serve/hub-app/review/kit.tsx +3 -3
- package/src/serve/hub-app/review/trailer-page.tsx +31 -6
- package/src/serve/hub-app/review/trailer-st.ts +168 -8
- package/src/serve/hub-app/review/trailer-timeline.tsx +36 -4
- package/src/serve/hub-app/review/trailer-voices-st.ts +370 -0
- package/src/serve/hub-app/review/trailer-voices.tsx +574 -0
- package/src/serve/hub-app/review.css +88 -0
- package/src/serve/hub-app/social/comms-page.tsx +10 -5
- package/src/serve/hub-app/social/next-release.tsx +118 -0
- package/src/serve/hub-app/social/social-model.ts +2 -0
- package/src/serve/hub-app/social/social-st.ts +38 -1
- package/src/serve/hub-app/social.css +8 -0
- package/src/serve/hub-app/tree-build.ts +2 -0
- package/src/serve/project-gutter-route.ts +8 -0
- package/src/serve/project-gutter.ts +4 -2
- package/src/shot/box.ts +33 -12
- package/src/shot/client.ts +1 -1
- package/src/shot/shooter.ts +19 -9
- package/src/social/desk-index.ts +49 -8
- package/src/social/discord-layout.ts +6 -2
- package/src/social/drafts.ts +1 -1
- package/src/social/kinds.ts +3 -2
- package/src/social/load.ts +26 -7
- package/src/social/publish/index.ts +24 -9
- package/src/social/release-stage.ts +133 -29
- package/src/social/routes.ts +2 -1
- package/src/social/stage.ts +39 -20
- package/src/trailer/bed.ts +111 -0
- package/src/trailer/build.ts +57 -38
- package/src/trailer/ffmpeg.ts +6 -0
- package/src/trailer/grammar.ts +23 -2
- package/src/trailer/graph.ts +12 -1
- package/src/trailer/shot-plan.ts +75 -0
- package/src/trailer/shot-state.ts +191 -0
- package/src/trailer/sound/audio.ts +28 -0
- package/src/trailer/sound/brand.ts +53 -3
- package/src/trailer/sound/gen.ts +61 -2
- package/src/trailer/sound/index.ts +25 -11
- package/src/trailer/sound/presets.ts +86 -5
- package/src/trailer/sound/run.ts +1 -1
- package/src/trailer/sound/takes.ts +94 -0
- package/src/trailer/titles.ts +36 -0
- package/src/trailer/url.ts +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// the trailer page's Voices (wiki tools/trailer/trailer-sound.md, Your own voice): every `voice "<line>"` of a trailer's
|
|
2
|
+
// working cuts, one row a text, with the sound the cut plays now, his take, and where it sits in each cut. A line of a
|
|
3
|
+
// recorded voice he has not read yet is waiting: the count on the page, its trailer and the hub's trailer row
|
|
4
|
+
import { existsSync, statSync } from 'node:fs'
|
|
5
|
+
import { join, relative } from 'node:path'
|
|
6
|
+
import { recordVoices, type TrailerSoundInput, voiceTweak } from '../trailer/sound/brand.ts'
|
|
7
|
+
import { recordedLine, standinPreset, takeRun } from '../trailer/sound/presets.ts'
|
|
8
|
+
import { brandSound, repoTakes, runOf } from '../trailer/sound/index.ts'
|
|
9
|
+
import { runSpec, soundCache, soundRun } from '../trailer/sound/run.ts'
|
|
10
|
+
import { takeKey, takeOf, takeWords } from '../trailer/sound/takes.ts'
|
|
11
|
+
import { cutInfo, cutsOf, parseCut, timelineOf, trailerDir, trailerIds } from './trailer-desk.ts'
|
|
12
|
+
import type { VoiceLine, VoicesDesk, VoiceUse } from './trailer-model.ts'
|
|
13
|
+
|
|
14
|
+
/** a line's sound as the cut plays it now, or as its standin reads it: its cache key when it is made */
|
|
15
|
+
function madeKey(root: string, dir: string, text: string, by: string | undefined, seed: number | undefined, line: number, brand: TrailerSoundInput | undefined, standin = false): string | null {
|
|
16
|
+
try {
|
|
17
|
+
const req = { kind: 'voice' as const, text, ...(by ? { by } : {}), ...(seed !== undefined ? { seed } : {}), line, dir }
|
|
18
|
+
const run = standin ? standinPreset(req, brand) : runOf(root, req, brand)
|
|
19
|
+
if (!run) return null
|
|
20
|
+
const spec = runSpec(run, { root, dir })
|
|
21
|
+
return existsSync(spec.file) ? spec.key : null
|
|
22
|
+
} catch {
|
|
23
|
+
return null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** the voices of one trailer folder; null when it is none */
|
|
28
|
+
export async function voicesDesk(root: string, id: string, brand?: TrailerSoundInput): Promise<VoicesDesk | null> {
|
|
29
|
+
const dir = trailerDir(root, id)
|
|
30
|
+
if (!dir) return null
|
|
31
|
+
const b = brand ?? (await brandSound(root).catch(() => undefined))
|
|
32
|
+
const recorders = recordVoices(b)
|
|
33
|
+
const errors: string[] = []
|
|
34
|
+
const byKey = new Map<string, VoiceLine>()
|
|
35
|
+
for (const c of cutsOf(dir)) {
|
|
36
|
+
if (c.version || !c.trailer) continue
|
|
37
|
+
let parsed
|
|
38
|
+
try {
|
|
39
|
+
parsed = parseCut(c.trailer).trailer
|
|
40
|
+
} catch (e) {
|
|
41
|
+
errors.push(`${c.cut}.trailer: ${(e as Error).message}`)
|
|
42
|
+
continue
|
|
43
|
+
}
|
|
44
|
+
const info = cutInfo(root, dir, id, c)
|
|
45
|
+
const own = timelineOf(parsed)
|
|
46
|
+
const tl = info.timeline ?? own
|
|
47
|
+
const spanOf = (name: string) => tl.shots.find((x) => x.name === name) ?? own.shots.find((x) => x.name === name)
|
|
48
|
+
// every line's start on the cut: a line has the room until the next one starts, or the cut ends
|
|
49
|
+
const starts = parsed.shots.flatMap((s) => (s.offcut ? [] : s.voices.map((v) => (spanOf(s.name)?.start ?? 0) + v.at))).sort((a, z) => a - z)
|
|
50
|
+
for (const s of parsed.shots) {
|
|
51
|
+
if (s.offcut) continue
|
|
52
|
+
const span = spanOf(s.name)
|
|
53
|
+
if (!span) continue
|
|
54
|
+
for (const v of s.voices) {
|
|
55
|
+
if (v.text === undefined || v.run) continue
|
|
56
|
+
const by = v.gen?.by
|
|
57
|
+
let rec = null
|
|
58
|
+
let reader: string
|
|
59
|
+
try {
|
|
60
|
+
rec = recordedLine({ text: v.text, ...(by ? { by } : {}) }, b, repoTakes(root))
|
|
61
|
+
const standin = rec?.standin.name ?? "the brand's voice"
|
|
62
|
+
reader = !rec ? (by ?? "the brand's voice") : rec.take ? rec.who : rec.kept ? `${standin}: takes off, ${rec.who}'s take kept` : `${standin}, standing in for ${rec.who}`
|
|
63
|
+
} catch (e) {
|
|
64
|
+
errors.push(`${c.cut}.trailer:${v.line}: ${(e as Error).message}`)
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
const key = takeKey(v.text)
|
|
68
|
+
const use: VoiceUse = {
|
|
69
|
+
cut: c.cut,
|
|
70
|
+
line: v.line,
|
|
71
|
+
file: relative(root, c.trailer),
|
|
72
|
+
shot: s.name,
|
|
73
|
+
shotStart: span.start,
|
|
74
|
+
shotEnd: span.end,
|
|
75
|
+
at: span.start + v.at,
|
|
76
|
+
room: (starts.find((x) => x > span.start + v.at + 1e-6) ?? tl.total) - (span.start + v.at),
|
|
77
|
+
volume: v.volume,
|
|
78
|
+
by: by ?? null,
|
|
79
|
+
mine: rec !== null,
|
|
80
|
+
reader,
|
|
81
|
+
made: madeKey(root, c.trailer.replace(/\/[^/]+$/, ''), v.text, by, v.gen?.seed, v.line, b),
|
|
82
|
+
standin: rec ? { name: rec.standin.name ?? "the brand's voice", made: madeKey(root, c.trailer.replace(/\/[^/]+$/, ''), v.text, by, v.gen?.seed, v.line, b, true) } : null,
|
|
83
|
+
video: info.video ? { mtime: info.video.mtime } : null,
|
|
84
|
+
}
|
|
85
|
+
const row = byKey.get(key)
|
|
86
|
+
if (row) {
|
|
87
|
+
row.uses.push(use)
|
|
88
|
+
if (rec && !row.mine) row.voice = rec.voice
|
|
89
|
+
row.mine ||= use.mine
|
|
90
|
+
continue
|
|
91
|
+
}
|
|
92
|
+
byKey.set(key, { key, text: v.text, words: takeWords(v.text), voice: rec?.voice ?? recorders[0]?.name ?? null, mine: use.mine, take: null, uses: [use] })
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const lines = [...byKey.values()]
|
|
97
|
+
for (const l of lines) {
|
|
98
|
+
const t = l.voice ? takeOf(root, l.voice, l.text) : null
|
|
99
|
+
const tweak = l.voice ? voiceTweak(b, l.voice) : undefined
|
|
100
|
+
const made = t ? runSpec(takeRun(l.text, t, tweak), { root, dir: root }) : null
|
|
101
|
+
// a take not made with this leveller or tweak yet (a new one, a take from before it) is made in the background:
|
|
102
|
+
// the next read draws and plays it
|
|
103
|
+
if (t && made && !existsSync(made.file)) void soundRun(takeRun(l.text, t, tweak), { root, dir: root }, () => undefined).catch((e: Error) => console.error(`FAIL: take ${l.key}: ${e.message}`))
|
|
104
|
+
l.take = t ? { file: t.path, mtime: t.mtime, offset: t.offset ?? (await autoOffsetKept(root, t)), dragged: t.offset !== null, mask: t.mask, made: made && existsSync(made.file) ? made.key : null } : null
|
|
105
|
+
}
|
|
106
|
+
const first = recorders[0]
|
|
107
|
+
return {
|
|
108
|
+
trailer: id,
|
|
109
|
+
recorder: first ? { voice: first.name, who: first.voice.record, takes: first.voice.takes !== false } : null,
|
|
110
|
+
lines,
|
|
111
|
+
waiting: lines.filter((l) => l.mine && !l.take).length,
|
|
112
|
+
errors,
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** each trailer folder's waiting lines, the brand read once; a repo with no trailer never loads its brand */
|
|
117
|
+
export async function voicesWaiting(root: string): Promise<Record<string, number>> {
|
|
118
|
+
if (trailerIds(root).length === 0) return {}
|
|
119
|
+
const b = await brandSound(root).catch(() => undefined)
|
|
120
|
+
if (recordVoices(b).length === 0) return {}
|
|
121
|
+
const out: Record<string, number> = {}
|
|
122
|
+
for (const id of trailerIds(root)) out[id] = (await voicesDesk(root, id, b))?.waiting ?? 0
|
|
123
|
+
return out
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const autos = new Map<string, number>()
|
|
127
|
+
|
|
128
|
+
/** a take's offset when he never dragged it, as the build finds it (gen.ts autoOffset), read once a recording and mask */
|
|
129
|
+
async function autoOffsetKept(root: string, t: { path: string; mtime: number; mask: [number, number][] }): Promise<number> {
|
|
130
|
+
const key = `${t.path}\0${t.mtime}\0${JSON.stringify(t.mask)}`
|
|
131
|
+
const kept = autos.get(key)
|
|
132
|
+
if (kept !== undefined) return kept
|
|
133
|
+
const { autoOffset } = await import('../trailer/sound/gen.ts')
|
|
134
|
+
const o = await autoOffset(join(root, t.path), t.mask).catch(() => 0)
|
|
135
|
+
autos.set(key, o)
|
|
136
|
+
return o
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** a made line's file in the sound cache, by its key; null when absent */
|
|
140
|
+
export function madeFile(root: string, key: string): string | null {
|
|
141
|
+
if (!/^[0-9a-f]{16}$/.test(key)) return null
|
|
142
|
+
const f = join(soundCache(root), `${key}.wav`)
|
|
143
|
+
return existsSync(f) && statSync(f).isFile() ? f : null
|
|
144
|
+
}
|
package/src/review/watchers.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// who listens: each `sk review watch` registers one file per process beside the store (`.shipkit/review-watchers/`),
|
|
2
2
|
// out of its watch, so a registration never wakes the watchers. A file alone is never trusted: its pid is probed
|
|
3
|
-
import {
|
|
3
|
+
import { spawnSync } from 'node:child_process'
|
|
4
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync, writeSync } from 'node:fs'
|
|
4
5
|
import { join } from 'node:path'
|
|
5
6
|
import type { WatchFilter, Watcher } from './model.ts'
|
|
6
7
|
|
|
@@ -33,6 +34,62 @@ export function registerWatch(dir: string, filter: WatchFilter, now = new Date()
|
|
|
33
34
|
})
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/** what a watch lives for: its parent at start, every process above it then, and the reader of its output */
|
|
38
|
+
export interface Owner {
|
|
39
|
+
parent: number
|
|
40
|
+
above: readonly number[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** the processes above `pid`, nearest first, launchd left out, from the lines of `ps -axo pid=,ppid=` */
|
|
44
|
+
export function ancestorsOf(pid: number, table: string): number[] {
|
|
45
|
+
const up = new Map<number, number>()
|
|
46
|
+
for (const line of table.split('\n')) {
|
|
47
|
+
const [p, pp] = line.trim().split(/\s+/).map(Number)
|
|
48
|
+
if (Number.isInteger(p) && Number.isInteger(pp)) up.set(p as number, pp as number)
|
|
49
|
+
}
|
|
50
|
+
const out: number[] = []
|
|
51
|
+
for (let p = up.get(pid); p !== undefined && p > 1 && !out.includes(p); p = up.get(p)) out.push(p)
|
|
52
|
+
return out
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** why the watch has no owner any more, else null */
|
|
56
|
+
export function ownerGone(o: Owner, now: { ppid: number; alive: (pid: number) => boolean; readerGone: boolean }): string | null {
|
|
57
|
+
if (now.ppid !== o.parent) return `its parent ${o.parent} is gone`
|
|
58
|
+
const dead = o.above.find((p) => !now.alive(p))
|
|
59
|
+
if (dead !== undefined) return `process ${dead} above it is gone`
|
|
60
|
+
return now.readerGone ? 'nothing reads its output' : null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** a zero byte write to a pipe nobody reads fails with EPIPE on macOS (Linux answers 0: a real line's EPIPE ends it there) */
|
|
64
|
+
function readerGone(): boolean {
|
|
65
|
+
try {
|
|
66
|
+
writeSync(1, new Uint8Array(0))
|
|
67
|
+
return false
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return (e as NodeJS.ErrnoException).code === 'EPIPE'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** this process exits once its owner is gone, checked every `everyMs`: a killed agent's shell often lives on, waiting
|
|
74
|
+
* on a pipeline, so the parent alone is not enough */
|
|
75
|
+
export function exitWithOwner(everyMs = 2000): void {
|
|
76
|
+
const ps = spawnSync('ps', ['-axo', 'pid=,ppid='], { encoding: 'utf8' })
|
|
77
|
+
const owner: Owner = { parent: process.ppid, above: ancestorsOf(process.pid, ps.stdout ?? '') }
|
|
78
|
+
const end = (why: string): never => {
|
|
79
|
+
try {
|
|
80
|
+
process.stderr.write(`review watch: exits, ${why}\n`)
|
|
81
|
+
} catch {}
|
|
82
|
+
process.exit(0)
|
|
83
|
+
}
|
|
84
|
+
process.stdout.on('error', (e: NodeJS.ErrnoException) => {
|
|
85
|
+
if (e.code === 'EPIPE') end('nothing reads its output')
|
|
86
|
+
})
|
|
87
|
+
setInterval(() => {
|
|
88
|
+
const why = ownerGone(owner, { ppid: process.ppid, alive: pidAlive, readerGone: readerGone() })
|
|
89
|
+
if (why !== null) end(why)
|
|
90
|
+
}, everyMs)
|
|
91
|
+
}
|
|
92
|
+
|
|
36
93
|
/** every live watcher, by pid; a file whose process is gone is deleted */
|
|
37
94
|
export function liveWatchers(dir: string, alive: (pid: number) => boolean = pidAlive): Watcher[] {
|
|
38
95
|
const folder = watchersDir(dir)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// the browser reports a ResizeObserver loop as a window 'error' event, yet it
|
|
2
|
+
// is a notice, not a failure: the spec delivers the skipped notifications next
|
|
3
|
+
// frame. Bun's dev overlay listens for 'error' and paints it as a runtime
|
|
4
|
+
// error. A capture listener on the target runs before Bun's bubble one, so
|
|
5
|
+
// stopImmediatePropagation keeps the overlay for real errors only.
|
|
6
|
+
const BENIGN = [
|
|
7
|
+
'ResizeObserver loop completed with undelivered notifications.', // webkit, chromium
|
|
8
|
+
'ResizeObserver loop limit exceeded', // older chromium
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
export const isBenignError = (message: unknown): boolean =>
|
|
12
|
+
typeof message === 'string' && BENIGN.some(b => message.includes(b))
|
|
13
|
+
|
|
14
|
+
export const quietBenignErrors = (target: EventTarget): void => {
|
|
15
|
+
target.addEventListener(
|
|
16
|
+
'error',
|
|
17
|
+
e => {
|
|
18
|
+
if (isBenignError((e as ErrorEvent).message)) e.stopImmediatePropagation()
|
|
19
|
+
},
|
|
20
|
+
{ capture: true },
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -43,11 +43,12 @@ export type HashSel =
|
|
|
43
43
|
| { t: 'review'; id: string | null; q?: string }
|
|
44
44
|
/** a trailer's cuts, played with their notes: a trailer folder and one of its cuts, null for the first; the note
|
|
45
45
|
* open on it, and the notes filter when it is not the page's default (all) */
|
|
46
|
-
| { 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 }
|
|
47
47
|
/** the store pages: a store, null for the first; a thing of it to scroll to (a picture's path, `field:<heading>`) */
|
|
48
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
|
|
50
|
-
|
|
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 }
|
|
51
52
|
/** the messages page: its tab, the run it scores by when not the newest */
|
|
52
53
|
| { t: 'messages'; tab: MessagesTab; run?: string }
|
|
53
54
|
/** the Veille: the post picked, null for none; the window, chips, folds and lightbox as `window=3d&tags=a,b` */
|
|
@@ -60,6 +61,9 @@ export type HashSel =
|
|
|
60
61
|
/** a repo's own page (wiki tools/shipkit/project-pages.md): the repo, the page, the page's own keys as a query */
|
|
61
62
|
| { t: 'page'; repo: string; id: string; q?: string }
|
|
62
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
|
+
|
|
63
67
|
/** whose a gate check is */
|
|
64
68
|
export type CheckOwner = 'shipkit' | 'repo'
|
|
65
69
|
|
|
@@ -74,7 +78,9 @@ export type ParsedHash = {
|
|
|
74
78
|
/** a trailer address only: the note open, the notes filter */
|
|
75
79
|
note?: string
|
|
76
80
|
filter?: 'open' | 'all'
|
|
77
|
-
/** a
|
|
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` */
|
|
78
84
|
q?: string
|
|
79
85
|
}
|
|
80
86
|
|
|
@@ -125,14 +131,15 @@ export function hashFor(sel: HashSel | null): string | null {
|
|
|
125
131
|
// page:review:<id>?view=1&subject=place, the query only when it says something
|
|
126
132
|
case 'review': return `${sel.id == null ? REVIEW : `${REVIEW}:${sel.id}`}${sel.q ? `?${sel.q}` : ''}`
|
|
127
133
|
case 'trailer': {
|
|
128
|
-
// page:trailer:<trailer>/<cut>/<note>?filter=all
|
|
134
|
+
// page:trailer:<trailer>/<cut>/<note>?filter=all&voices=<line>, each part only when it says something
|
|
129
135
|
const note = sel.trailer != null && sel.note ? `/${sel.cut ?? ''}/${sel.note}` : sel.cut == null ? '' : `/${sel.cut}`
|
|
130
|
-
|
|
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}` : ''}`
|
|
131
138
|
}
|
|
132
139
|
// page:stores:<store>/<asset>, the asset as it is: a path or a heading carries any character
|
|
133
140
|
case 'stores': return sel.store == null ? STORES : `${STORES}:${sel.store}${sel.asset ? `/${sel.asset}` : ''}`
|
|
134
|
-
// page:releases:<version
|
|
135
|
-
case 'releases': return sel.version == null ? RELEASES : `${RELEASES}:${sel.version}`
|
|
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' : ''}`
|
|
136
143
|
// page:messages:<tab>?run=<run>, the tab only past the first, the run only when picked
|
|
137
144
|
case 'messages': return `${sel.tab === 'messages' ? MESSAGES : `${MESSAGES}:${sel.tab}`}${sel.run ? `?run=${sel.run}` : ''}`
|
|
138
145
|
// page:veille:<platform>:<id>?window=3d, the query only when it says something
|
|
@@ -179,8 +186,10 @@ export function parseHash(raw: string): ParsedHash {
|
|
|
179
186
|
const qi = raw.indexOf('?')
|
|
180
187
|
const path = qi === -1 ? raw : raw.slice(0, qi)
|
|
181
188
|
const [trailer = '', cut = '', note = ''] = path.slice(TRAILER.length + 1).split('/')
|
|
182
|
-
const
|
|
183
|
-
|
|
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 } : {}) }
|
|
184
193
|
}
|
|
185
194
|
// the store rides in `col`, the thing named in `id`: everything after the first slash
|
|
186
195
|
// the tab rides in `id`, the run in `q`; a tab this build does not name opens the first
|
|
@@ -190,9 +199,12 @@ export function parseHash(raw: string): ParsedHash {
|
|
|
190
199
|
const run = qi === -1 ? null : new URLSearchParams(raw.slice(qi + 1)).get('run')
|
|
191
200
|
return { kind: 'messages', col: null, id: isMessagesTab(tab) ? tab : 'messages', tools: null, ...(run ? { q: run } : {}) }
|
|
192
201
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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' } : {}) }
|
|
196
208
|
}
|
|
197
209
|
if (raw === STORES || raw.startsWith(`${STORES}:`)) {
|
|
198
210
|
const rest = raw.slice(STORES.length + 1)
|
|
@@ -274,9 +286,9 @@ export function selOf(p: ParsedHash): HashSel | null {
|
|
|
274
286
|
case 'when': return { t: 'when' }
|
|
275
287
|
case 'checks': return { t: 'checks', from: p.id as CheckOwner }
|
|
276
288
|
case 'review': return { t: 'review', id: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
|
|
277
|
-
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 } : {}) }
|
|
278
290
|
case 'stores': return { t: 'stores', store: p.col, ...(p.id ? { asset: p.id } : {}) }
|
|
279
|
-
case 'releases': return { t: 'releases', version: p.id === '' ? null : p.id }
|
|
291
|
+
case 'releases': return { t: 'releases', version: p.id === '' ? null : p.id, ...(p.q === 'notes' ? { tab: 'notes' as const } : {}) }
|
|
280
292
|
case 'messages': return { t: 'messages', tab: isMessagesTab(p.id) ? p.id : 'messages', ...(p.q ? { run: p.q } : {}) }
|
|
281
293
|
case 'veille': return { t: 'veille', post: p.id === '' ? null : p.id, ...(p.q ? { q: p.q } : {}) }
|
|
282
294
|
case 'comms': return { t: 'comms', draft: p.col, ...(p.id ? { part: p.id } : {}), ...(p.q ? { q: p.q } : {}) }
|
|
@@ -131,6 +131,10 @@ export class HomeSt {
|
|
|
131
131
|
if (m != null) {
|
|
132
132
|
this.projects.onSelect = (name) => this.select(name)
|
|
133
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
|
+
}
|
|
134
138
|
this.projects.onPlace = (p) => this.navigate(PLACE_PATH[p])
|
|
135
139
|
this.projects.onPicker = () => this.palette.toggle()
|
|
136
140
|
this.projects.pickerOpen = () => this.palette.open
|
|
@@ -146,6 +150,10 @@ export class HomeSt {
|
|
|
146
150
|
if (this.projects.list.some((p) => p.name === name && p.current)) own.showReview(card, WAITING)
|
|
147
151
|
else void this.openInHome(name, `#${hashFor({ t: 'review', id: card, q: WAITING })}`)
|
|
148
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
|
+
}
|
|
149
157
|
own.markSeen()
|
|
150
158
|
this.selected = own.key
|
|
151
159
|
}
|
|
@@ -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'
|
|
@@ -474,4 +475,5 @@ const EmbedApp = observer(({ page }: { page: EmbedPage }) => {
|
|
|
474
475
|
// paints it at once; a slow or absent store costs at most SCREEN_WAIT_MS
|
|
475
476
|
await Promise.race([home.shown?.cols.restore(), new Promise((ok) => setTimeout(ok, SCREEN_WAIT_MS))])
|
|
476
477
|
|
|
478
|
+
quietBenignErrors(window)
|
|
477
479
|
createRoot(document.getElementById('root')!).render(<StrictMode>{embed == null ? <App /> : <EmbedApp page={embed} />}</StrictMode>)
|
|
@@ -73,11 +73,14 @@
|
|
|
73
73
|
/* ⌘1 to ⌘9 select the first nine rows (keys.ts): the hint sits at the row's end */
|
|
74
74
|
.pjkey{flex:none;font:10px/1 ui-monospace,Menlo,monospace;color:var(--dim);opacity:.6;background:none;border:0;padding:0}
|
|
75
75
|
.pjrow:hover .pjkey,.pjrow.cur .pjkey{opacity:1}
|
|
76
|
-
/* what waits on the owner, at the end of the row: the review cards
|
|
77
|
-
|
|
76
|
+
/* what waits on the owner, at the end of the row: the review cards and the trailer lines to record (a click opens
|
|
77
|
+
each), then the open asks */
|
|
78
|
+
.pga,.pgr,.pgvox{flex:none;min-width:16px;height:16px;padding:0 var(--s1);border-radius:8px;
|
|
78
79
|
font-size:10px;font-weight:700;line-height:16px;text-align:center;color:var(--bg);background:var(--warn)}
|
|
79
80
|
.pgr{background:var(--review);cursor:pointer}
|
|
80
81
|
.pgr:hover{box-shadow:0 0 0 2px var(--review)}
|
|
82
|
+
.pgvox{background:var(--accent);cursor:pointer}
|
|
83
|
+
.pgvox:hover{box-shadow:0 0 0 2px var(--accent)}
|
|
81
84
|
/* Claude sessions running: a thin edge on the left that breathes */
|
|
82
85
|
.pgs{position:absolute;left:0;top:5px;bottom:5px;width:2px;border-radius:1px;background:var(--accent);pointer-events:none;animation:pgpulse 2.4s ease-in-out infinite}
|
|
83
86
|
/* the home only: the repo's hub state (starting, crashed) */
|
|
@@ -147,4 +150,6 @@
|
|
|
147
150
|
.pjlist.rail .pga,.pjlist.rail .pgr{position:absolute;top:0;min-width:14px;height:14px;padding:0 var(--s0);border-radius:7px;font-size:9px;line-height:14px}
|
|
148
151
|
.pjlist.rail .pga{right:calc(50% - var(--ri,24px) / 2 - 4px)}
|
|
149
152
|
.pjlist.rail .pgr{left:calc(50% - var(--ri,24px) / 2 - 4px)}
|
|
153
|
+
/* the voice pill rides the icon's bottom left corner on the rail */
|
|
154
|
+
.pjlist.rail .pgvox{position:absolute;bottom:0;left:calc(50% - var(--ri,24px) / 2 - 4px);min-width:14px;height:14px;padding:0 var(--s0);border-radius:7px;font-size:9px;line-height:14px}
|
|
150
155
|
.pjlist.rail .pgd,.pjlist.rail .pgw{position:absolute;bottom:var(--s0);right:calc(50% - var(--ri,24px) / 2 - 2px)}
|
|
@@ -110,6 +110,10 @@ export const Row = observer(({ app, p, i }: { app: ListHost; p: Project; i: numb
|
|
|
110
110
|
<b className="pgr" aria-label={`${face.cards} review card${face.cards === 1 ? '' : 's'} wait on you: open them`}
|
|
111
111
|
onClick={(e) => { e.stopPropagation(); s.review(p.name) }} onDoubleClick={(e) => e.stopPropagation()}>{face.cards}</b>
|
|
112
112
|
) : null}
|
|
113
|
+
{face.voices != null ? (
|
|
114
|
+
<b className="pgvox" title={`${face.voices} trailer line${face.voices === 1 ? '' : 's'} wait for your voice: record them`}
|
|
115
|
+
onClick={(e) => { e.stopPropagation(); s.voices(p.name) }} onDoubleClick={(e) => e.stopPropagation()}>🎙{face.voices}</b>
|
|
116
|
+
) : null}
|
|
113
117
|
{face.badge != null ? <b className="pga">{face.badge}</b> : null}
|
|
114
118
|
{face.busy ? <i className="pgs" /> : null}
|
|
115
119
|
{dot != null ? <i className={`pgd ${dot}`} /> : null}
|
|
@@ -178,6 +182,11 @@ export const Card = ({ p, now }: { p: Project; now: number }) => {
|
|
|
178
182
|
{m.needs.cards.more > 0 ? <span className="pgcmore">+{m.needs.cards.more}</span> : null}
|
|
179
183
|
</div>
|
|
180
184
|
)}
|
|
185
|
+
{m.needs.voices == null ? null : (
|
|
186
|
+
<div className="pgcneed">
|
|
187
|
+
<span className="pgcask">🎙 {m.needs.voices} trailer line{m.needs.voices === 1 ? '' : 's'} to record in your voice</span>
|
|
188
|
+
</div>
|
|
189
|
+
)}
|
|
181
190
|
{m.needs.asks == null ? null : (
|
|
182
191
|
<div className="pgcneed">
|
|
183
192
|
<span className="pgcask">{m.needs.asks.count} ask{m.needs.asks.count === 1 ? '' : 's'}: {m.needs.asks.titles.join(' · ')}</span>
|
|
@@ -148,12 +148,14 @@ export function sortNames(list: Project[], mode: SortMode): string[] {
|
|
|
148
148
|
export type HubDot = 'starting' | 'crashed' | null
|
|
149
149
|
|
|
150
150
|
/** what the icon face shows, and nothing more: what waits on the owner as
|
|
151
|
-
*
|
|
152
|
-
* on hands), a dim name while VS Code
|
|
153
|
-
* icon stays whole), and a pulsing edge
|
|
154
|
-
|
|
151
|
+
* pills (the review cards waiting on a verdict, the trailer lines waiting
|
|
152
|
+
* on his voice, the open asks waiting on hands), a dim name while VS Code
|
|
153
|
+
* does not have the folder open (the icon stays whole), and a pulsing edge
|
|
154
|
+
* while Claude sessions run */
|
|
155
|
+
export type Face = { cards: number | null; voices: number | null; badge: number | null; dim: boolean; busy: boolean }
|
|
155
156
|
export const faceOf = (p: Project): Face => ({
|
|
156
157
|
cards: p.cards.length > 0 ? p.cards.length : null,
|
|
158
|
+
voices: p.voices > 0 ? p.voices : null,
|
|
157
159
|
badge: p.asks > 0 ? p.asks : null,
|
|
158
160
|
dim: p.vscode === false,
|
|
159
161
|
busy: p.sessions != null && p.sessions > 0,
|
|
@@ -164,7 +166,7 @@ export const faceOf = (p: Project): Face => ({
|
|
|
164
166
|
* human, and label and value rows. Each part leaves out an unknown fact */
|
|
165
167
|
export type CardModel = {
|
|
166
168
|
head: { name: string; current: boolean; icon: string | null; version: string | null; branch: string | null; description: string | null }
|
|
167
|
-
needs: { cards: { count: number; titles: string[]; more: number } | null; asks: { count: number; titles: string[]; more: number } | null; gate: string | null } | null
|
|
169
|
+
needs: { cards: { count: number; titles: string[]; more: number } | null; voices: number | null; asks: { count: number; titles: string[]; more: number } | null; gate: string | null } | null
|
|
168
170
|
facts: { k: 'release' | 'live' | 'activity'; v: string; tone?: 'warn' }[]
|
|
169
171
|
}
|
|
170
172
|
|
|
@@ -194,7 +196,7 @@ export function cardModel(p: Project, now: number): CardModel {
|
|
|
194
196
|
if (act.length > 0) facts.push({ k: 'activity', v: act.join(' · ') })
|
|
195
197
|
return {
|
|
196
198
|
head: { name: p.name, current: p.current, icon: p.icon, version: p.version, branch, description: p.description },
|
|
197
|
-
needs: cards == null && asks == null && gate == null ? null : { cards, asks, gate },
|
|
199
|
+
needs: cards == null && asks == null && gate == null && p.voices === 0 ? null : { cards, voices: p.voices > 0 ? p.voices : null, asks, gate },
|
|
198
200
|
facts,
|
|
199
201
|
}
|
|
200
202
|
}
|
|
@@ -242,6 +244,8 @@ export class ProjectsSvc {
|
|
|
242
244
|
/** a click on a row's review pill: that repo's review page on its first
|
|
243
245
|
* waiting card. The home and a hub of its own each set it */
|
|
244
246
|
onReview: (name: string, card: string | null) => void = (name) => this.select(name)
|
|
247
|
+
/** a click on a row's voice pill: that repo's trailer page, on Voices */
|
|
248
|
+
onVoices: (name: string) => void = (name) => this.select(name)
|
|
245
249
|
/** the two places at the top of the list, the overview and the plan:
|
|
246
250
|
* the home sets it, a hub of its own has none */
|
|
247
251
|
onPlace: ((p: Place) => void) | null = null
|
|
@@ -313,6 +317,12 @@ export class ProjectsSvc {
|
|
|
313
317
|
this.onReview(name, this.list.find((p) => p.name === name)?.cards[0]?.id ?? null)
|
|
314
318
|
}
|
|
315
319
|
|
|
320
|
+
/** the voice pill: the trailer lines that wait on his voice in that repo */
|
|
321
|
+
voices(name: string): void {
|
|
322
|
+
this.selected = name
|
|
323
|
+
this.onVoices(name)
|
|
324
|
+
}
|
|
325
|
+
|
|
316
326
|
|
|
317
327
|
/** the repo above (-1) or below (+1) the selected one, round the ends;
|
|
318
328
|
* with none selected, down starts at the top and up at the bottom */
|