rvlib-shipkit 2.13.0 → 2.14.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 +32 -13
- package/package.json +1 -1
- package/src/assets/run-assets.ts +2 -2
- package/src/assets/server/studio-server.ts +27 -23
- package/src/check.ts +3 -3
- package/src/checks/SK001-package-json-shape.check.ts +4 -4
- package/src/checks/SK002-contracts-fulfillness.check.ts +2 -2
- package/src/checks/SK003-claude-md-shape.check.ts +19 -12
- package/src/checks/SK004-gitignore-policy.check.ts +18 -4
- package/src/checks/SK005-rvlib-versions.check.ts +1 -1
- package/src/checks/SK006-npm-publish-safety.check.ts +3 -3
- package/src/checks/SK007-github-visibility.check.ts +2 -2
- package/src/checks/SK008-reviewer-agent.check.ts +1 -1
- package/src/checks/SK010-undeclared-unit.check.ts +2 -2
- package/src/checks/SK011-sibling-unit-ranges.check.ts +2 -2
- package/src/checks/SK012-config-barrel-import.check.ts +1 -1
- package/src/checks/SK013-one-way-in-policy.check.ts +2 -2
- package/src/checks/SK015-nested-repo.check.ts +2 -2
- package/src/checks/SK016-legacy-check-shapes.check.ts +2 -2
- package/src/checks/SK017-vscode-hub-task.check.ts +2 -2
- package/src/checks/SK018-test-files-run.check.ts +2 -2
- package/src/checks/SK019-tests-run-in-units.check.ts +2 -2
- package/src/checks/SK020-self-spawning-check.check.ts +2 -2
- package/src/checks/SK022-machine-runs-the-pin.check.ts +2 -2
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK025-release-drift.check.ts +2 -2
- package/src/checks/SK026-asks-autoclose.check.ts +2 -2
- package/src/checks/SK027-agent-wiki-links.check.ts +8 -2
- package/src/checks/SK028-readme.check.ts +2 -2
- package/src/checks/SK029-explicit-check-files.check.ts +3 -3
- package/src/checks/SK030-cache-audit.check.ts +7 -5
- package/src/checks/SK031-trace-audit.check.ts +7 -7
- package/src/checks/SK032-ignored-inputs.check.ts +3 -3
- package/src/checks/SK033-global-contribution.check.ts +11 -4
- package/src/checks/SK034-commit-gates-armed.check.ts +2 -2
- package/src/checks/SK035-public-clean.check.ts +4 -4
- package/src/checks/SK036-draft-media-size.check.ts +2 -2
- package/src/checks/SK037-keyword-additions.check.ts +43 -0
- package/src/cli/cmd_Backup.ts +2 -2
- package/src/cli/cmd_Commands.ts +4 -4
- package/src/cli/cmd_ConfigKeys.ts +2 -2
- package/src/cli/cmd_Drill.ts +1 -1
- package/src/cli/cmd_Home.ts +1 -1
- package/src/cli/cmd_Init.ts +1 -1
- package/src/cli/cmd_Media.ts +4 -4
- package/src/cli/cmd_Mv.ts +14 -7
- package/src/cli/cmd_Review.ts +2 -2
- package/src/cli/cmd_Smoke.ts +1 -1
- package/src/cli/cmd_Social.ts +3 -3
- package/src/cli/cmd_Sound.ts +1 -1
- package/src/cli/cmd_TraceAudit.ts +6 -6
- package/src/cli/cmd_Trailer.ts +2 -2
- package/src/cli/cmd_Veille.ts +2 -2
- package/src/cli/cmd_When.ts +2 -2
- package/src/cli/family-pages.ts +19 -19
- package/src/collections/collection-types.ts +2 -2
- package/src/collections/review.ts +1 -1
- package/src/comfy/comfy-panel.ts +2 -2
- package/src/contracts/manifests/discord.contract.ts +1 -1
- package/src/contracts/manifests/identity.contract.ts +1 -1
- package/src/contracts/manifests/itch.contract.ts +1 -1
- package/src/contracts/manifests/steam.contract.ts +1 -1
- package/src/core/agent-dir-at.ts +12 -0
- package/src/core/agent-dir.ts +16 -0
- package/src/core/budget.ts +1 -1
- package/src/core/canonical-scripts.ts +2 -2
- package/src/core/discover-checks.ts +1 -1
- package/src/core/global-contribution.ts +4 -1
- package/src/core/ignored-block.ts +1 -1
- package/src/core/ignored-inputs.ts +3 -2
- package/src/core/layout.ts +3 -3
- package/src/core/loop-watch.ts +1 -1
- package/src/core/motherhome.ts +2 -2
- package/src/core/one-way-in-policy.ts +8 -8
- package/src/core/run-ci.ts +3 -3
- package/src/core/runs-matrix.ts +1 -1
- package/src/core/slots.ts +14 -5
- package/src/core/trace-audit.ts +50 -9
- package/src/core/tree-rev.ts +1 -1
- package/src/drill/run.ts +1 -1
- package/src/home/daemon-jobs.ts +1 -1
- package/src/home/global-context.ts +11 -8
- package/src/home/gui-app/ShipkitGui.swift +91 -2
- package/src/home/inbox-shape.ts +1 -1
- package/src/home/inbox.ts +1 -1
- package/src/home/pm-config.ts +4 -1
- package/src/home/pm-inputs.ts +2 -0
- package/src/home/resources.ts +7 -2
- package/src/home/run-pm.ts +1 -1
- package/src/home/serve-web.ts +2 -2
- package/src/hooks/commit-message.ts +1 -1
- package/src/hooks/hook-gates.ts +1 -1
- package/src/hooks/leak-guard.ts +61 -8
- package/src/hooks/run-hooks.ts +18 -18
- package/src/identities/identities.ts +1 -1
- package/src/identities/machine-route.ts +1 -1
- package/src/identities/machine.ts +1 -1
- package/src/init-repo.ts +2 -2
- package/src/ledger/gate-checks.ts +1 -1
- package/src/ledger/record-kept.ts +1 -1
- package/src/media-kinds.ts +1 -1
- package/src/media-store/backup/daemon.ts +1 -1
- package/src/media-store/backup/keys.ts +1 -1
- package/src/media-store/backup/manifest.ts +1 -1
- package/src/media-store/backup/restore.ts +1 -1
- package/src/media-store/backup/run.ts +1 -1
- package/src/media-store/backup/secret.ts +1 -1
- package/src/media-store/backup/snapshot.ts +1 -1
- package/src/media-store/backup/sources.ts +1 -1
- package/src/media-store/content.ts +1 -1
- package/src/media-store/daemon.ts +1 -1
- package/src/media-store/db.ts +1 -1
- package/src/media-store/fact.ts +1 -1
- package/src/media-store/hand.ts +1 -1
- package/src/media-store/kind.ts +1 -1
- package/src/media-store/purge.ts +1 -1
- package/src/media-store/put.ts +1 -1
- package/src/media-store/remote.ts +1 -1
- package/src/media-store/space.ts +1 -1
- package/src/mv/mv-md.ts +63 -22
- package/src/pages/forward.ts +1 -1
- package/src/pages/frame-client.ts +1 -1
- package/src/pages/routes.ts +1 -1
- package/src/pages/unit.ts +1 -1
- package/src/plan/planner.ts +1 -1
- package/src/plan/repo-source.ts +1 -1
- package/src/release/public-clean.ts +25 -7
- package/src/release/run-bump.ts +1 -1
- package/src/release/run-release.ts +3 -3
- package/src/repo-config.ts +23 -16
- package/src/review/anim.ts +1 -1
- package/src/review/auto.ts +1 -1
- package/src/review/cells.ts +15 -1
- package/src/review/format.ts +2 -2
- package/src/review/marks.ts +1 -1
- package/src/review/media-kind.ts +1 -1
- package/src/review/media-read.ts +1 -1
- package/src/review/model.ts +14 -4
- package/src/review/notes.ts +52 -4
- package/src/review/previews.ts +1 -1
- package/src/review/project.ts +1 -1
- package/src/review/role.ts +1 -1
- package/src/review/routes.ts +14 -2
- package/src/review/store.ts +2 -2
- package/src/review/threads.ts +1 -1
- package/src/review/trailer-desk.ts +3 -3
- package/src/review/trailer-media.ts +1 -1
- package/src/review/trailer-model.ts +1 -1
- package/src/review/trailer-routes.ts +1 -1
- package/src/review/trailer-shots.ts +1 -1
- package/src/review/unit.ts +1 -1
- package/src/scaffold/files/tsconfig.json +1 -1
- package/src/scaffold/project-scaffold.ts +1 -1
- package/src/serve/embed.ts +1 -1
- package/src/serve/hub-app/check-words.ts +1 -1
- package/src/serve/hub-app/frames-st.ts +1 -1
- package/src/serve/hub-app/hash-route.ts +1 -1
- package/src/serve/hub-app/home-st.ts +1 -1
- package/src/serve/hub-app/home-strip.css +1 -1
- package/src/serve/hub-app/hub-app.tsx +2 -2
- package/src/serve/hub-app/identities-st.ts +1 -1
- package/src/serve/hub-app/identities-view.tsx +5 -4
- package/src/serve/hub-app/identity-address.ts +1 -1
- package/src/serve/hub-app/inbox-st.ts +1 -1
- package/src/serve/hub-app/inbox-view.tsx +1 -1
- package/src/serve/hub-app/kept-cols.tsx +30 -0
- package/src/serve/hub-app/keys.ts +1 -1
- package/src/serve/hub-app/media-svc.ts +1 -1
- package/src/serve/hub-app/pages-frames.tsx +1 -1
- package/src/serve/hub-app/pages-svc.ts +1 -1
- package/src/serve/hub-app/projects-svc.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +1 -1
- package/src/serve/hub-app/review/review-board.tsx +1 -1
- package/src/serve/hub-app/review/review-cells.tsx +3 -2
- package/src/serve/hub-app/review/review-page.tsx +5 -4
- package/src/serve/hub-app/review/review-st.ts +15 -7
- package/src/serve/hub-app/review/review-thread.tsx +52 -5
- package/src/serve/hub-app/review/review-views.tsx +50 -33
- package/src/serve/hub-app/review/thread-st.ts +79 -27
- package/src/serve/hub-app/review/trailer-page.tsx +5 -4
- package/src/serve/hub-app/review/trailer-st.ts +1 -1
- package/src/serve/hub-app/review.css +9 -1
- package/src/serve/hub-app/site/site-part.tsx +1 -1
- package/src/serve/hub-app/site/site-st.ts +1 -1
- package/src/serve/hub-app/social/calendar.tsx +1 -1
- package/src/serve/hub-app/social/comms-page.tsx +29 -5
- package/src/serve/hub-app/social/kit.tsx +1 -1
- package/src/serve/hub-app/social/post-card.tsx +1 -1
- package/src/serve/hub-app/social/social-model.ts +1 -1
- package/src/serve/hub-app/social/social-page.tsx +12 -5
- package/src/serve/hub-app/social/social-st.ts +31 -3
- package/src/serve/hub-app/social.css +1 -1
- package/src/serve/hub-app/stores/stores-page.tsx +5 -4
- package/src/serve/hub-app/stores/stores-st.ts +1 -1
- package/src/serve/hub-app/stores.css +1 -1
- package/src/serve/hub-app/tree-row.tsx +1 -1
- package/src/serve/hub-app/veille/veille-page.tsx +5 -4
- package/src/serve/hub-app/veille/veille-st.ts +1 -1
- package/src/serve/hub-app/veille.css +1 -1
- package/src/serve/hub-runtime.ts +6 -2
- package/src/serve/project-gutter-route.ts +1 -1
- package/src/shot/box.ts +5 -7
- package/src/shot/browser-slot.ts +18 -6
- package/src/shot/client.ts +1 -2
- package/src/shot/clip-encoder.ts +16 -13
- package/src/shot/film-box.ts +132 -28
- package/src/shot/shooter.ts +21 -2
- package/src/shot/stepped-clip.ts +1 -1
- package/src/site/desk.ts +2 -2
- package/src/site/routes.ts +1 -1
- package/src/site/unit.ts +1 -1
- package/src/social/card-drafts.ts +24 -0
- package/src/social/compose.ts +2 -2
- package/src/social/desk-index.ts +1 -1
- package/src/social/desk-wire.ts +1 -1
- package/src/social/drafts.ts +3 -3
- package/src/social/load.ts +14 -1
- package/src/social/media-facts.ts +1 -1
- package/src/social/media-kind.ts +1 -1
- package/src/social/media-limit.ts +1 -1
- package/src/social/media-of.ts +1 -1
- package/src/social/migrate.ts +1 -1
- package/src/social/post-url.ts +1 -1
- package/src/social/presence.ts +2 -2
- package/src/social/public-read.ts +1 -1
- package/src/social/publish/bluesky.ts +1 -1
- package/src/social/publish/discord.ts +1 -1
- package/src/social/push.ts +10 -4
- package/src/social/richtext.ts +1 -1
- package/src/social/routes.ts +10 -4
- package/src/social/stats.ts +1 -1
- package/src/social/text.ts +1 -1
- package/src/social/tracker-route.ts +1 -1
- package/src/social/tracker.ts +1 -1
- package/src/social/unit.ts +1 -1
- package/src/social/writes.ts +1 -1
- package/src/stores/collection.ts +1 -1
- package/src/stores/desk.ts +1 -1
- package/src/stores/model.ts +1 -1
- package/src/stores/routes.ts +1 -1
- package/src/stores/unit.ts +1 -1
- package/src/suite/judge-suites.ts +1 -1
- package/src/trace/tracer.ts +12 -5
- package/src/trailer/adapter.ts +1 -1
- package/src/trailer/build.ts +6 -4
- package/src/trailer/holes.ts +1 -1
- package/src/trailer/passage.ts +1 -1
- package/src/trailer/prune.ts +1 -1
- package/src/trailer/states.ts +1 -1
- package/src/trailer/versions.ts +1 -1
- package/src/trailer/words.ts +1 -1
- package/src/tui/run-tui.ts +1 -1
- package/src/tui/tui-store.ts +1 -1
- package/src/veille/asks.ts +1 -1
- package/src/veille/auto.ts +1 -1
- package/src/veille/batch.ts +1 -1
- package/src/veille/chrome.ts +1 -1
- package/src/veille/collection.ts +1 -1
- package/src/veille/desk.ts +1 -1
- package/src/veille/identity.ts +1 -1
- package/src/veille/import.ts +1 -1
- package/src/veille/log.ts +1 -1
- package/src/veille/platforms.ts +1 -1
- package/src/veille/reads.ts +1 -1
- package/src/veille/replied.ts +1 -1
- package/src/veille/routes.ts +2 -2
- package/src/veille/watch.ts +1 -1
- package/src/veille/worth.ts +2 -2
|
@@ -19,15 +19,24 @@ import { Caret } from '../icons.tsx'
|
|
|
19
19
|
const ZOOM_LABEL: Record<Zoom, string> = { fit: 'Fit', '1': '100 %', '1.5': '150 %', '2': '200 %' }
|
|
20
20
|
const toneClass = (s: string | undefined): string => (s ? ` re-${s}` : '')
|
|
21
21
|
|
|
22
|
-
/** one version as its views draw it: `live` when
|
|
22
|
+
/** one version as its views draw it: `live` when his answer goes to it and it draws his draft; `claim` when it is the
|
|
23
|
+
* newest while his answer sits on an older version: it takes his marks, and the first one brings his answer here */
|
|
23
24
|
export interface Ver {
|
|
24
25
|
rv: ReviewSt
|
|
25
26
|
card: ThreadSt
|
|
26
27
|
cell: VersionCell
|
|
27
28
|
live: boolean
|
|
29
|
+
claim: boolean
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
const itemOf = (ver: Ver): Item => ver.cell.item
|
|
33
|
+
/** the version takes his marks: OK, Fix, No, a rectangle, a word, a star, a pick */
|
|
34
|
+
const takes = (ver: Ver): boolean => ver.live || ver.claim
|
|
35
|
+
/** a mark on a claiming version: his answer comes to it first, then the mark lands in its own draft */
|
|
36
|
+
const mark = (ver: Ver, f: () => void): void => {
|
|
37
|
+
if (ver.claim) ver.card.answerNewest()
|
|
38
|
+
f()
|
|
39
|
+
}
|
|
31
40
|
|
|
32
41
|
/** a version's views: its bar (rows or full, « Circle » on a phone, the zoom), then each view as a sub cell or a row */
|
|
33
42
|
export const VersionViews = observer(({ ver }: { ver: Ver }) => {
|
|
@@ -35,7 +44,7 @@ export const VersionViews = observer(({ ver }: { ver: Ver }) => {
|
|
|
35
44
|
const item = itemOf(ver)
|
|
36
45
|
const views = item.views
|
|
37
46
|
const rows = card.rows(item)
|
|
38
|
-
const drawable = ver
|
|
47
|
+
const drawable = takes(ver) && views.some((v) => !isGallery(v) && !v.clip && !v.audio)
|
|
39
48
|
// a draft card's history is no view of its own: its frames cycle in place over the live one
|
|
40
49
|
const history = item.wip ? views.find(isGallery) : undefined
|
|
41
50
|
const options = rows || (card.full[item.id] === true)
|
|
@@ -81,7 +90,7 @@ const ViewCell = observer(({ ver, v: live, i, frames }: { ver: Ver; v: ReviewVie
|
|
|
81
90
|
<span className="rv-viewn">{viewTag(cell.n, i)}</span>
|
|
82
91
|
<h4 className="rv-viewname" onClick={() => card.toggleView(cell.id, i)}>{v.label || <span className="rv-dim">{viewName(v, i)}</span>}</h4>
|
|
83
92
|
<span className="rv-kind">{viewKind(v, false)}</span>
|
|
84
|
-
{ver
|
|
93
|
+
{takes(ver) ? <ReactionToggles ver={ver} view={i} /> : shown?.status ? <SentReaction status={shown.status} /> : null}
|
|
85
94
|
<span className="sp" />
|
|
86
95
|
{open && media?.marks && media.marks.length > 0 ? <button className={rv.marksOn ? 'primary' : ''} onMouseDown={keepFocus} onClick={() => rv.toggleMarks()}>marks · M</button> : null}
|
|
87
96
|
{open && media && isPair(media.files) && !media.audio && !rv.phone.on ? <CompareModes c={rv.compare} /> : null}
|
|
@@ -106,7 +115,7 @@ const ViewNotes = observer(({ ver, i, gallery, word = true }: { ver: Ver; i: num
|
|
|
106
115
|
const views = itemOf(ver).views
|
|
107
116
|
const draft = ver.live ? card.draft.rects.map((r, k) => [r, k] as const).filter(([r]) => (r.view ?? 0) === i) : []
|
|
108
117
|
const reaction = ver.live ? card.reactionOf(i) : null
|
|
109
|
-
if (said.length === 0 && draft.length === 0 && !(ver
|
|
118
|
+
if (said.length === 0 && draft.length === 0 && !(takes(ver) && word)) return null
|
|
110
119
|
return (
|
|
111
120
|
<div className="rv-viewnotes">
|
|
112
121
|
{said.map((s, k) => {
|
|
@@ -139,9 +148,9 @@ const ViewNotes = observer(({ ver, i, gallery, word = true }: { ver: Ver; i: num
|
|
|
139
148
|
<button className="ghost rv-x" title="delete this note" aria-label="delete this note" onClick={() => card.removeRect(k)}>✕</button>
|
|
140
149
|
</div>
|
|
141
150
|
))}
|
|
142
|
-
{ver
|
|
151
|
+
{takes(ver) && word ? (
|
|
143
152
|
<AutoText className="rv-word" placeholder={gallery ? 'a word on these images' : 'a word on this view'} value={reaction?.comment ?? ''}
|
|
144
|
-
onKeyDown={blurOnEscape} onText={(t) => card.setReactionComment(i, undefined, t)} />
|
|
153
|
+
onKeyDown={blurOnEscape} onText={(t) => mark(ver, () => card.setReactionComment(i, undefined, t))} />
|
|
145
154
|
) : null}
|
|
146
155
|
</div>
|
|
147
156
|
)
|
|
@@ -172,7 +181,7 @@ const OptionRow = observer(({ ver, v, i }: { ver: Ver; v: ReviewView; i: number
|
|
|
172
181
|
const unfolded = card.rowOpen(item, i)
|
|
173
182
|
const file = playable ? ('video' in playable.files ? playable.files.video : 'audio' in playable.files ? playable.files.audio : '') : ''
|
|
174
183
|
const duration = playable?.clip?.duration ?? playable?.audio?.duration ?? 0
|
|
175
|
-
const showWord = ver
|
|
184
|
+
const showWord = takes(ver) && (word || (reaction?.comment ?? '') !== '')
|
|
176
185
|
const active = ver.live && card.view === i
|
|
177
186
|
// an unfolded clip plays under its own bar: the row keeps no second clock
|
|
178
187
|
const clock2 = c !== null && !(unfolded && playable?.clip)
|
|
@@ -199,14 +208,14 @@ const OptionRow = observer(({ ver, v, i }: { ver: Ver; v: ReviewView; i: number
|
|
|
199
208
|
)}
|
|
200
209
|
{c && clock2 ? <span className="rv-mono rv-opttime">{clock(c.time)} / {clock(duration)}</span> : null}
|
|
201
210
|
<span className="rv-optacts">
|
|
202
|
-
{choice ? <Stars
|
|
203
|
-
{ver
|
|
211
|
+
{choice ? <Stars ver={ver} view={i} given={reaction?.stars} /> : takes(ver) ? <ReactionToggles ver={ver} view={i} /> : reaction?.status ? <SentReaction status={reaction.status} /> : null}
|
|
212
|
+
{takes(ver) ? <button className={`rv-optword${showWord ? ' on' : ''}`} title="a word on this one" onMouseDown={keepFocus} onClick={() => setWord(!word)}>✎ word</button> : null}
|
|
204
213
|
{playable?.clip || !playable ? (
|
|
205
214
|
<button className={unfolded ? 'on' : ''} title={unfolded ? 'fold it back to its row' : 'show it full under its row'} onMouseDown={keepFocus} onClick={() => card.toggleRow(item, i)}><Caret v open={unfolded} /> {unfolded ? 'fold' : 'show'}</button>
|
|
206
215
|
) : null}
|
|
207
216
|
{playable?.audio ? <a className="rv-dl" href={rv.fileUrl(id, file)} download={`${id}-${file}`} title="download the sound">⤓</a> : null}
|
|
208
|
-
{choice && ver
|
|
209
|
-
<button className={`rv-pick${picked ? ' on' : ''}`} title="pick this one: it is your answer (P)" disabled={card.busy} onClick={() => void card.choose(i)}>
|
|
217
|
+
{choice && takes(ver) ? (
|
|
218
|
+
<button className={`rv-pick${picked ? ' on' : ''}`} title="pick this one: it is your answer (P)" disabled={card.busy} onClick={() => mark(ver, () => void card.choose(i))}>
|
|
210
219
|
{picked ? '✓ picked' : 'pick'}
|
|
211
220
|
</button>
|
|
212
221
|
) : choice && picked ? <span className="rv-pick on">✓ picked</span> : null}
|
|
@@ -216,7 +225,7 @@ const OptionRow = observer(({ ver, v, i }: { ver: Ver; v: ReviewView; i: number
|
|
|
216
225
|
{!ver.live && reaction?.comment ? <div className="rv-optnote rv-saidtext">« {reaction.comment} »</div> : null}
|
|
217
226
|
{showWord ? (
|
|
218
227
|
<AutoText className="rv-word" placeholder="a word on this one" value={reaction?.comment ?? ''} autoFocus={word && !reaction?.comment}
|
|
219
|
-
onKeyDown={blurOnEscape} onText={(t) => card.setReactionComment(i, undefined, t)} />
|
|
228
|
+
onKeyDown={blurOnEscape} onText={(t) => mark(ver, () => card.setReactionComment(i, undefined, t))} />
|
|
220
229
|
) : null}
|
|
221
230
|
{c && playable?.audio ? <SoundEl clip={c} src={rv.fileUrl(id, file)} /> : null}
|
|
222
231
|
{unfolded ? (
|
|
@@ -249,12 +258,14 @@ const Gone = ({ files }: { files: readonly string[] }) => (
|
|
|
249
258
|
const clock = (t: number): string => `${Math.floor(t / 60)}:${String(Math.floor(t % 60)).padStart(2, '0')}`
|
|
250
259
|
|
|
251
260
|
/** an option's score: STARS stars, a click on the one given clears it; an older version's stars as he gave them */
|
|
252
|
-
const Stars = observer(({
|
|
261
|
+
const Stars = observer(({ ver, view, given }: { ver: Ver; view: number; given: number | undefined }) => {
|
|
262
|
+
const { card } = ver
|
|
263
|
+
const live = takes(ver)
|
|
253
264
|
const n = given ?? 0
|
|
254
265
|
return (
|
|
255
266
|
<span className="rv-stars" title={live ? `your score (⇧1 to ⇧${STARS} on the row playing)` : 'your score'}>
|
|
256
267
|
{Array.from({ length: STARS }, (_, k) => (
|
|
257
|
-
<button key={k} className={k < n ? 'on' : ''} disabled={!live} aria-label={`${k + 1} of ${STARS}`} onMouseDown={keepFocus} onClick={() => card.setStars(view, k + 1)}>{k < n ? '★' : '☆'}</button>
|
|
268
|
+
<button key={k} className={k < n ? 'on' : ''} disabled={!live} aria-label={`${k + 1} of ${STARS}`} onMouseDown={keepFocus} onClick={() => mark(ver, () => card.setStars(view, k + 1))}>{k < n ? '★' : '☆'}</button>
|
|
258
269
|
))}
|
|
259
270
|
</span>
|
|
260
271
|
)
|
|
@@ -320,13 +331,14 @@ const FrameSlider = observer(({ card, frames }: { card: ThreadSt; frames: Galler
|
|
|
320
331
|
})
|
|
321
332
|
|
|
322
333
|
/** the owner's reaction to one view or tile of the newest version: OK, fix or no; a click on the chosen one clears it */
|
|
323
|
-
const ReactionToggles = observer(({
|
|
324
|
-
const
|
|
334
|
+
const ReactionToggles = observer(({ ver, view, tile, small }: { ver: Ver; view: number; tile?: number; small?: boolean }) => {
|
|
335
|
+
const { card } = ver
|
|
336
|
+
const cur = ver.claim ? undefined : card.reactionOf(view, tile)?.status
|
|
325
337
|
return (
|
|
326
338
|
<span className="rv-reacts">
|
|
327
339
|
{REACTIONS.map((o) => (
|
|
328
340
|
<button key={o.status} title={o.tip} className={`rv-react re-${o.status}${small ? '' : ' big'}${cur === o.status ? ' on' : ''}${cur && cur !== o.status ? ' off' : ''}`}
|
|
329
|
-
onMouseDown={keepFocus} onClick={() => card.react(view, tile, o.status)}>
|
|
341
|
+
onMouseDown={keepFocus} onClick={() => mark(ver, () => card.react(view, tile, o.status))}>
|
|
330
342
|
{o.glyph} {o.label}
|
|
331
343
|
</button>
|
|
332
344
|
))}
|
|
@@ -356,10 +368,10 @@ const Gallery = observer(({ ver, v, view }: { ver: Ver; v: GalleryView; view: nu
|
|
|
356
368
|
<img src={big ? rv.fitUrl(id, t.file) : rv.thumbUrl(id, t.file)} alt={t.label} draggable={false} loading="lazy" />
|
|
357
369
|
</div>
|
|
358
370
|
<div className="rv-tilelabel" title={t.label}>{t.label}</div>
|
|
359
|
-
{ver
|
|
371
|
+
{takes(ver) ? (
|
|
360
372
|
<>
|
|
361
|
-
<ReactionToggles
|
|
362
|
-
<AutoText className="rv-word" placeholder="a word" value={r?.comment ?? ''} onKeyDown={blurOnEscape} onText={(t) => card.setReactionComment(view, k, t)} />
|
|
373
|
+
<ReactionToggles ver={ver} view={view} tile={k} small />
|
|
374
|
+
<AutoText className="rv-word" placeholder="a word" value={r?.comment ?? ''} onKeyDown={blurOnEscape} onText={(t) => mark(ver, () => card.setReactionComment(view, k, t))} />
|
|
363
375
|
</>
|
|
364
376
|
) : r?.status ? <SentReaction status={r.status} /> : null}
|
|
365
377
|
</div>
|
|
@@ -390,7 +402,7 @@ const MediaBody = observer(({ ver, v, i, zoom }: { ver: Ver; v: MediaView; i: nu
|
|
|
390
402
|
<div style={scroll}>
|
|
391
403
|
<div style={{ width: scale ? `${v.size.w * scale}px` : `min(100%, calc((100vh - ${room}px) * ${ratio}))`, margin: '0 auto' }}>
|
|
392
404
|
<Compare c={rv.compare} base={src(name)} mod={undefined} aspect={aspect} draw={(s) => <Marks ver={ver} src={s} side={undefined} view={i} />}
|
|
393
|
-
over={() => (ver.live ? <RectNote
|
|
405
|
+
over={() => (ver.live ? <RectNote ver={ver} view={i} sides={[undefined]} /> : null)} />
|
|
394
406
|
{bar}
|
|
395
407
|
<Downloads rv={rv} item={item} files={[{ file: name }]} />
|
|
396
408
|
</div>
|
|
@@ -416,7 +428,7 @@ const MediaBody = observer(({ ver, v, i, zoom }: { ver: Ver; v: MediaView; i: nu
|
|
|
416
428
|
<div className="rv-pairgrid" style={{ width: scale ? `${v.size.w * scale * cols + 8 * (cols - 1)}px` : fitW, gridTemplateColumns: `repeat(${cols}, 1fr)` }}>
|
|
417
429
|
<Compare c={c} base={before} mod={after} names={PAIR_NAMES} aspect={aspect}
|
|
418
430
|
draw={(s, face) => <Marks ver={ver} src={s} side={drawnSide(c.mode, s === before ? 'before' : 'after')} view={i} face={face} />}
|
|
419
|
-
over={(srcs) => (ver.live ? <RectNote
|
|
431
|
+
over={(srcs) => (ver.live ? <RectNote ver={ver} view={i} sides={srcs.map((s) => drawnSide(c.mode, s === before ? 'before' : 'after'))} /> : null)} />
|
|
420
432
|
</div>
|
|
421
433
|
</div>
|
|
422
434
|
{bar ? <div style={{ width: fitW, margin: '0 auto' }}>{bar}</div> : null}
|
|
@@ -481,7 +493,7 @@ const PhonePair = observer(({ ver, view, bar, before, after, aspect, size, scale
|
|
|
481
493
|
size: { w: number; h: number }
|
|
482
494
|
scale: number | null
|
|
483
495
|
}) => {
|
|
484
|
-
const { rv
|
|
496
|
+
const { rv } = ver
|
|
485
497
|
const ph = rv.phone
|
|
486
498
|
const c = rv.compare
|
|
487
499
|
const side = ph.pair === 'swipe' && c.mode !== 'swipe' ? 'after' : ph.pair
|
|
@@ -497,10 +509,10 @@ const PhonePair = observer(({ ver, view, bar, before, after, aspect, size, scale
|
|
|
497
509
|
<div style={{ width: scale ? `${size.w * scale}px` : '100%' }}>
|
|
498
510
|
{side === 'swipe' ? (
|
|
499
511
|
<Compare c={c} base={before} mod={after} names={PAIR_NAMES} aspect={aspect} draw={(s) => <Marks ver={ver} src={s} side={s === before ? 'before' : 'after'} view={view} />}
|
|
500
|
-
over={(srcs) => (ver.live ? <RectNote
|
|
512
|
+
over={(srcs) => (ver.live ? <RectNote ver={ver} view={view} sides={srcs.map((s) => (s === before ? 'before' : 'after'))} /> : null)} />
|
|
501
513
|
) : (
|
|
502
514
|
<Compare key={side} c={c} base={one} mod={undefined} aspect={aspect} draw={(s) => <Marks ver={ver} src={s} side={side} view={view} />}
|
|
503
|
-
over={() => (ver.live ? <RectNote
|
|
515
|
+
over={() => (ver.live ? <RectNote ver={ver} view={view} sides={[side]} /> : null)} />
|
|
504
516
|
)}
|
|
505
517
|
{bar}
|
|
506
518
|
</div>
|
|
@@ -676,10 +688,11 @@ const clamp01 = (v: number): number => Math.max(0, Math.min(1, v))
|
|
|
676
688
|
/** a drag shorter than this, on either axis, is a click: it picks nothing */
|
|
677
689
|
const MIN_DRAG = 0.01
|
|
678
690
|
|
|
679
|
-
/** one image of view `view` and its rectangles: the ones his answers sent (still), and on the
|
|
680
|
-
* draft's, a drag drawing one (never in the curtain, whose drag moves the line). A clip view of
|
|
681
|
-
* is not the active one loops on its own: a click makes it active
|
|
682
|
-
|
|
691
|
+
/** one image or clip of view `view` and its rectangles: the ones his answers sent (still), and on the version his
|
|
692
|
+
* answer goes to his draft's, a drag drawing one (never in the curtain, whose drag moves the line). A clip view of
|
|
693
|
+
* that version that is not the active one loops on its own: a click makes it active. On a claiming version (the newest,
|
|
694
|
+
* his answer on an older one) a drag draws at once and brings his answer here. `face` takes the image's place (the
|
|
695
|
+
* changes of a pair) */
|
|
683
696
|
const Marks = observer(({ ver, src, side, view, face }: { ver: Ver; src: string; side: Side | undefined; view: number; face?: ReactNode }) => {
|
|
684
697
|
const { rv, card, cell } = ver
|
|
685
698
|
const el = useRef<HTMLDivElement>(null)
|
|
@@ -689,7 +702,7 @@ const Marks = observer(({ ver, src, side, view, face }: { ver: Ver; src: string;
|
|
|
689
702
|
const shown = any && !isGallery(any) ? any : undefined
|
|
690
703
|
const clip = shown?.clip
|
|
691
704
|
const active = card.view === view
|
|
692
|
-
const drawing = ver
|
|
705
|
+
const drawing = takes(ver) && (phone.on ? phone.draw && (side === undefined || phone.pair !== 'swipe' || rv.compare.mode !== 'swipe') : side === undefined || rv.compare.mode !== 'swipe')
|
|
693
706
|
const c = clip ? card.clipOf(cell.id, view) : null
|
|
694
707
|
const at = (e: { clientX: number; clientY: number }): { x: number; y: number } => {
|
|
695
708
|
const b = el.current?.getBoundingClientRect()
|
|
@@ -706,6 +719,7 @@ const Marks = observer(({ ver, src, side, view, face }: { ver: Ver; src: string;
|
|
|
706
719
|
if (!drawing) return
|
|
707
720
|
e.preventDefault()
|
|
708
721
|
e.stopPropagation()
|
|
722
|
+
if (ver.claim) card.answerNewest()
|
|
709
723
|
// he draws on the paused frame: the rectangle keeps its time
|
|
710
724
|
if (c && !c.paused) c.pause()
|
|
711
725
|
const a = at(e)
|
|
@@ -775,8 +789,10 @@ const firstWords = (s: string): string => {
|
|
|
775
789
|
|
|
776
790
|
/** the picked rectangle's note box, beside it on the image: under it, or over it when it sits low, focused once drawn
|
|
777
791
|
* or clicked. Enter or Escape closes it (the rectangle stays), Shift Enter is a new line; `sides` are the sides the
|
|
778
|
-
* frame shows
|
|
779
|
-
|
|
792
|
+
* frame shows. Its tag names the side it marks (before or after), and a second row repeats the view's OK, Fix and No
|
|
793
|
+
* under the hand that drew it (ReactionToggles, the head's own) */
|
|
794
|
+
const RectNote = observer(({ ver, view, sides }: { ver: Ver; view: number; sides: readonly (Side | undefined)[] }) => {
|
|
795
|
+
const { card } = ver
|
|
780
796
|
const box = useRef<HTMLTextAreaElement | null>(null)
|
|
781
797
|
const i = card.rect
|
|
782
798
|
const r = i === null ? undefined : card.draft.rects[i]
|
|
@@ -792,7 +808,7 @@ const RectNote = observer(({ card, view, sides }: { card: ThreadSt; view: number
|
|
|
792
808
|
const place = below ? { top: `${(r.y + r.h) * 100}%` } : { bottom: `${(1 - r.y) * 100}%` }
|
|
793
809
|
return (
|
|
794
810
|
<div className={`rv-note${below ? ' below' : ' above'}`} style={{ ...place, ['--nx' as string]: `${r.x * 100}%` }} onPointerDown={(e) => e.stopPropagation()}>
|
|
795
|
-
<span className=
|
|
811
|
+
<span className={`rv-noten${r.side ? ` ${r.side}` : ''}`}>{i + 1}{r.side ? ` · ${r.side}` : ''}{r.t !== undefined ? ` · ${secs(r.t)}` : ''}</span>
|
|
796
812
|
<AutoText el={(t) => (box.current = t)} placeholder="what is wrong here · Enter closes" value={r.comment}
|
|
797
813
|
onText={(t) => card.setRectComment(i, t)}
|
|
798
814
|
onKeyDown={(e) => {
|
|
@@ -802,6 +818,7 @@ const RectNote = observer(({ card, view, sides }: { card: ThreadSt; view: number
|
|
|
802
818
|
}
|
|
803
819
|
}} />
|
|
804
820
|
<button className="ghost rv-x" title="delete this rectangle" aria-label="delete this rectangle" onMouseDown={keepFocus} onClick={() => card.removeRect(i)}>✕</button>
|
|
821
|
+
<span className="rv-notereacts"><ReactionToggles ver={ver} view={view} small /></span>
|
|
805
822
|
</div>
|
|
806
823
|
)
|
|
807
824
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// one open card of the review page read as a thread (wiki
|
|
1
|
+
// one open card of the review page read as a thread (wiki tools/shipkit/review.md, The review page): its cells from
|
|
2
2
|
// `GET /api/review/threads/<id>`, what he folded, the contents strip and where a click on it lands, his draft on the
|
|
3
3
|
// newest version (rectangles, reactions, stars, the pick, his word), each clip's clock. Made when a card opens,
|
|
4
4
|
// disposed when another one does. Only the newest version takes his marks: an older one shows what was said on it
|
|
@@ -105,10 +105,9 @@ export class ThreadSt {
|
|
|
105
105
|
/** the column scrolled to the newest cell once, on the first load */
|
|
106
106
|
landed = false
|
|
107
107
|
private drafts: Record<string, Draft> = {}
|
|
108
|
-
/** the older version his
|
|
108
|
+
/** the older version his answer goes to: a version landed while he wrote, or he chose to answer it. His first mark
|
|
109
|
+
* on the newest version, or « answer v4 », brings his answer back to the newest */
|
|
109
110
|
draftOn: string | null = null
|
|
110
|
-
/** he chose to keep his draft on the older version: the banner that offers the move is gone */
|
|
111
|
-
keptOn = false
|
|
112
111
|
/** the newest version's active view: the one last drawn on or picked, whose clip the keys drive */
|
|
113
112
|
view = 0
|
|
114
113
|
/** a picked rectangle of his draft: its note box opens beside it */
|
|
@@ -124,6 +123,8 @@ export class ThreadSt {
|
|
|
124
123
|
/** an option row folded or unfolded by hand, by `<item>#<view>` */
|
|
125
124
|
openRows: Record<string, boolean> = {}
|
|
126
125
|
busy = false
|
|
126
|
+
/** « 📣 post »'s box: his word while it is open, null when shut */
|
|
127
|
+
postBox: string | null = null
|
|
127
128
|
private readonly clips = new Map<string, ClipSt>()
|
|
128
129
|
/** the agent words already sent as read, by message id */
|
|
129
130
|
private readonly reading = new Set<string>()
|
|
@@ -172,19 +173,13 @@ export class ThreadSt {
|
|
|
172
173
|
this.reveal(v.asked, at)
|
|
173
174
|
}
|
|
174
175
|
if (this.draftOn !== null && !v.members.includes(this.draftOn)) this.draftOn = null
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (this.draftOn === null && !isDirty(this.drafts[v.head])) {
|
|
181
|
-
const older = [...v.members].reverse().find((id) => id !== v.head && (isDirty(this.drafts[id]) || isDirty(this.rv.storedDraft(id) ?? undefined)))
|
|
182
|
-
if (older) {
|
|
183
|
-
const d = this.drafts[older] ?? this.rv.storedDraft(older)
|
|
184
|
-
if (d) this.drafts = { ...this.drafts, [older]: d }
|
|
185
|
-
this.draftOn = older
|
|
186
|
-
}
|
|
176
|
+
// every version's draft kept in the browser is found again: an older one stays on its version (`parked`)
|
|
177
|
+
const found: Record<string, Draft> = {}
|
|
178
|
+
for (const id of v.members) {
|
|
179
|
+
const d = this.drafts[id] === undefined ? this.rv.storedDraft(id) : null
|
|
180
|
+
if (d) found[id] = d
|
|
187
181
|
}
|
|
182
|
+
if (Object.keys(found).length > 0) this.drafts = { ...this.drafts, ...found }
|
|
188
183
|
}
|
|
189
184
|
|
|
190
185
|
private defaultOpen(c: Cell, v: ThreadView): boolean {
|
|
@@ -210,10 +205,45 @@ export class ThreadSt {
|
|
|
210
205
|
return (this.cells.find((c) => c.id === h && c.kind !== 'event') as Framed | undefined) ?? null
|
|
211
206
|
}
|
|
212
207
|
|
|
208
|
+
/** an unsent draft on an older version while his answer goes to the newest: found again when the card opened, or
|
|
209
|
+
* left there by a mark on the newest. Never taken, never lost: the box offers to move it, answer it, or drop it */
|
|
210
|
+
get parked(): string | null {
|
|
211
|
+
if (this.draftOn !== null || !this.data) return null
|
|
212
|
+
const head = this.data.head
|
|
213
|
+
return [...this.data.members].reverse().find((id) => id !== head && isDirty(this.drafts[id])) ?? null
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** the newest version takes his marks while his answer sits on an older one: his first mark brings it back */
|
|
217
|
+
get claims(): boolean {
|
|
218
|
+
const n = this.newest
|
|
219
|
+
return this.draftOn !== null && n?.kind === 'version' && !n.item.wip
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** his answer goes to the newest version; the draft on the older one stays there, parked */
|
|
223
|
+
answerNewest(): void {
|
|
224
|
+
if (this.draftOn === null) return
|
|
225
|
+
this.draftOn = null
|
|
226
|
+
this.rect = null
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** his answer goes to the older version his parked draft is on */
|
|
230
|
+
answerParked(): void {
|
|
231
|
+
const p = this.parked
|
|
232
|
+
if (p === null) return
|
|
233
|
+
this.draftOn = p
|
|
234
|
+
this.rect = null
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** the parked draft dropped: his notes and his word on the older version */
|
|
238
|
+
dropParked(): void {
|
|
239
|
+
const p = this.parked
|
|
240
|
+
if (p !== null) this.put(p, null)
|
|
241
|
+
}
|
|
242
|
+
|
|
213
243
|
/** his draft moved onto the newest version: his word, and the marks whose view the newest has; what does not fit
|
|
214
244
|
* stays on the older one */
|
|
215
245
|
moveDraft(): void {
|
|
216
|
-
const from = this.draftOn
|
|
246
|
+
const from = this.draftOn ?? this.parked
|
|
217
247
|
const to = this.data?.head
|
|
218
248
|
if (from === null || !to) return
|
|
219
249
|
const d = this.drafts[from] ?? EMPTY
|
|
@@ -233,15 +263,9 @@ export class ThreadSt {
|
|
|
233
263
|
this.put(to, moved)
|
|
234
264
|
this.put(from, isDirty(left) ? left : null)
|
|
235
265
|
this.draftOn = null
|
|
236
|
-
this.keptOn = false
|
|
237
266
|
this.rect = null
|
|
238
267
|
}
|
|
239
268
|
|
|
240
|
-
/** he keeps his draft on the older version: his answer goes there */
|
|
241
|
-
keepDraftOn(): void {
|
|
242
|
-
this.keptOn = true
|
|
243
|
-
}
|
|
244
|
-
|
|
245
269
|
get headItem(): Item | null {
|
|
246
270
|
const h = this.head
|
|
247
271
|
return h?.kind === 'version' ? h.item : (h?.kind === 'note' ? (h.item ?? null) : null)
|
|
@@ -484,10 +508,7 @@ export class ThreadSt {
|
|
|
484
508
|
if (reactions.length > 0) left.reactions = reactions
|
|
485
509
|
this.put(on, isDirty(left) ? left : null)
|
|
486
510
|
}
|
|
487
|
-
if (this.draftOn === on)
|
|
488
|
-
this.draftOn = null
|
|
489
|
-
this.keptOn = false
|
|
490
|
-
}
|
|
511
|
+
if (this.draftOn === on) this.draftOn = null
|
|
491
512
|
if (this.target !== on) this.rect = null
|
|
492
513
|
}
|
|
493
514
|
|
|
@@ -686,6 +707,37 @@ export class ThreadSt {
|
|
|
686
707
|
}
|
|
687
708
|
}
|
|
688
709
|
|
|
710
|
+
openPost(): void {
|
|
711
|
+
this.postBox = ''
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
setPost(text: string): void {
|
|
715
|
+
this.postBox = text
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
closePost(): void {
|
|
719
|
+
this.postBox = null
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/** « 📣 post »: this card deserves its own public post, his word the angle; an agent writes the draft */
|
|
723
|
+
async askPost(): Promise<void> {
|
|
724
|
+
const text = this.postBox
|
|
725
|
+
const card = this.data?.head
|
|
726
|
+
if (text === null || !card || this.busy) return
|
|
727
|
+
this.busy = true
|
|
728
|
+
this.error = null
|
|
729
|
+
try {
|
|
730
|
+
await postJson(this.rv.url(`/api/review/${card}/post`), { text })
|
|
731
|
+
runInAction(() => (this.postBox = null))
|
|
732
|
+
this.rv.say('post asked: an agent writes the draft')
|
|
733
|
+
await this.rv.answered()
|
|
734
|
+
} catch (e) {
|
|
735
|
+
runInAction(() => (this.error = (e as Error).message))
|
|
736
|
+
} finally {
|
|
737
|
+
runInAction(() => (this.busy = false))
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
689
741
|
/** ⌘Enter or « reply »: his word goes to the thread's head as a reply; his marks stay in the draft */
|
|
690
742
|
async sendReply(): Promise<void> {
|
|
691
743
|
const h = this.target
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// a repo's trailer page (`#page:trailer`, wiki
|
|
1
|
+
// a repo's trailer page (`#page:trailer`, wiki tools/trailer/index.md, Frame notes): the cuts on the left, the player over
|
|
2
2
|
// its timeline and its shot cards in the middle, the notes on the right. A note pins a frame of the render on screen
|
|
3
3
|
// and becomes an item of the review store. On a phone the three stacked
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { Fragment, useEffect, useRef, useState, type ReactNode } from 'react'
|
|
6
|
-
import {
|
|
6
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
7
|
+
import { KeptCols } from '../kept-cols.tsx'
|
|
7
8
|
import { AutoText } from '../auto-text.tsx'
|
|
8
9
|
import { clock, cutsByRecent, shotAt, type CutInfo, type TrailerNote } from '../../../review/trailer-model.ts'
|
|
9
10
|
import { editorHref } from '../check-words.ts'
|
|
@@ -32,7 +33,7 @@ export const TrailerPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
32
33
|
</div>
|
|
33
34
|
)
|
|
34
35
|
return (
|
|
35
|
-
<
|
|
36
|
+
<KeptCols id="trailer">
|
|
36
37
|
<Panel id="trailer-cuts" defaultSize="15%" minSize={190} className="rv-pane" style={PANEL}>
|
|
37
38
|
<div className="rv-scroll"><CutList tr={tr} /></div>
|
|
38
39
|
</Panel>
|
|
@@ -44,7 +45,7 @@ export const TrailerPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
44
45
|
<Panel id="trailer-notes" defaultSize="28%" minSize={300} className="rv-pane" style={PANEL}>
|
|
45
46
|
<NotesColumn tr={tr} />
|
|
46
47
|
</Panel>
|
|
47
|
-
</
|
|
48
|
+
</KeptCols>
|
|
48
49
|
)
|
|
49
50
|
})
|
|
50
51
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// a repo's trailer page as state (wiki
|
|
1
|
+
// a repo's trailer page as state (wiki tools/trailer/index.md, Frame notes): a cut's render on a clip clock, its montage as a
|
|
2
2
|
// timeline, the owner's notes on its frames. The render on screen is a kept version: a new render never swaps under
|
|
3
3
|
// him, the page offers it. The desk is read while the page shows, every 3 s
|
|
4
4
|
import { makeAutoObservable, observableRef, reaction, runInAction } from 'mobx'
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
.rv-meta > button.on{border-color:var(--accent);color:var(--ink)}
|
|
101
101
|
.rv-copyid{flex:none;display:inline-flex;align-items:center;padding:var(--s0);color:var(--dim)}
|
|
102
102
|
.rv-copyid:hover{color:var(--ink)}
|
|
103
|
+
.rv-postbox{display:flex;align-items:flex-start;gap:var(--s2);margin-top:var(--s1)}
|
|
104
|
+
.rv-postbox textarea{flex:1;min-width:0}
|
|
103
105
|
.rv-toast{position:fixed;left:50%;bottom:var(--s4);transform:translateX(-50%);z-index:40;max-width:calc(100% - 2 * var(--s4));padding:var(--s1) var(--s3);border-radius:6px;border:1px solid var(--line);background:var(--panel);color:var(--ink);font-size:12.5px;box-shadow:0 6px 20px var(--shadow)}
|
|
104
106
|
.rv-threadbody{position:relative;flex:1;min-height:0;display:flex}
|
|
105
107
|
/* a sticky row inside sticks under the scroller's top padding, and the cells scroll through that band above it:
|
|
@@ -237,6 +239,8 @@ span.rv-react{display:inline-block;border:1px solid;border-radius:4px}
|
|
|
237
239
|
/* the frame's box: what sits over the frame free of its clip (the note box) shares its size */
|
|
238
240
|
.rv-framebox{position:relative;width:100%}
|
|
239
241
|
.rv-over{position:absolute;inset:0;z-index:4;pointer-events:none}
|
|
242
|
+
/* an open note box rises over the sticky rows (each view's head at 4), so the next view's verdict row never cuts it */
|
|
243
|
+
.rv-over:has(.rv-note){z-index:5}
|
|
240
244
|
.rv-frame{position:relative;width:100%;max-width:100%;border-radius:4px;border:1px solid var(--line);overflow:hidden;
|
|
241
245
|
background:repeating-conic-gradient(var(--chk1) 0 25%,var(--chk2) 0 50%) 0 0/16px 16px}
|
|
242
246
|
.rv-frame.swipe{cursor:ew-resize;touch-action:none}
|
|
@@ -265,12 +269,16 @@ span.rv-react{display:inline-block;border:1px solid;border-radius:4px}
|
|
|
265
269
|
.rv-rect.sent .rv-rectn{background:var(--k4)}
|
|
266
270
|
.rv-drag{position:absolute;border:2px dashed var(--warn)}
|
|
267
271
|
/* the picked rectangle's note box, in the picked rectangle's blue: under it, or over it (clearing its number) */
|
|
268
|
-
.rv-note{position:absolute;left:clamp(0px,var(--nx),calc(100% - min(300px,100%)));width:min(300px,100%);pointer-events:auto;display:flex;gap:var(--s1);align-items:flex-start;
|
|
272
|
+
.rv-note{position:absolute;left:clamp(0px,var(--nx),calc(100% - min(300px,100%)));width:min(300px,100%);pointer-events:auto;display:flex;flex-wrap:wrap;gap:var(--s1);align-items:flex-start;
|
|
269
273
|
padding:var(--s1);border-radius:6px;border:2px solid var(--blue);background:var(--panel);box-shadow:0 2px 10px var(--shadow)}
|
|
270
274
|
.rv-note.below{margin-top:var(--s1)}
|
|
271
275
|
.rv-note.above{margin-bottom:var(--s4)}
|
|
272
276
|
.rv-noten{flex:none;padding:0 var(--s1);border-radius:3px;background:var(--blue);color:var(--bg);font-size:11px;font-weight:800;line-height:18px;white-space:nowrap}
|
|
273
277
|
.rv-note textarea{flex:1;min-width:0}
|
|
278
|
+
/* the side the rectangle marks, beside its number: after keeps the blue, before turns to the warn tone so a wrong side shows */
|
|
279
|
+
.rv-noten.before{background:var(--warn)}
|
|
280
|
+
/* the view's OK, Fix and No again, on their own row under the words */
|
|
281
|
+
.rv-notereacts{flex:1 1 100%;display:flex;justify-content:flex-end}
|
|
274
282
|
.rv-downloads{display:flex;gap:var(--s2);justify-content:flex-end;margin-top:var(--s1)}
|
|
275
283
|
.rv-dl{font-size:11.5px;text-decoration:none}
|
|
276
284
|
.rv-gallery{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:flex-start}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the identity view's site section (wiki
|
|
1
|
+
// the identity view's site section (wiki tools/shipkit/site.md, The section): the facts (the address and whether it
|
|
2
2
|
// answers, the repo that builds it, its Site account), then the desk its repo's site unit gives: the pages on the left,
|
|
3
3
|
// the one picked live from the local preview in the middle, what is online, what changed since and the deploy on the right
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// an identity's site desk as state (wiki
|
|
1
|
+
// an identity's site desk as state (wiki tools/shipkit/site.md, The section): its answer read from the home daemon,
|
|
2
2
|
// the page picked and the width of its preview (kept in the browser), the preview started when down, the deploy he
|
|
3
3
|
// presses with its log as it streams. Read when the section opens, when the window comes back, and after a deploy
|
|
4
4
|
import { makeAutoObservable, observableRef, runInAction } from 'mobx'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the calendar over Communications (wiki
|
|
1
|
+
// the calendar over Communications (wiki tools/shipkit/social.md, The desks in the hub): four weeks, a row an account,
|
|
2
2
|
// a dot a post coloured by its draft's kind, a hollow dot a slotted draft still to post; the slots, the topics, the
|
|
3
3
|
// week ahead. Drawn from the timeline the desk route sends for the identity the list keeps (social/presence.ts)
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// a repo's Communications page (`#page:comms`, wiki
|
|
1
|
+
// a repo's Communications page (`#page:comms`, wiki tools/shipkit/social.md, The desks in the hub): the calendar on top,
|
|
2
2
|
// the drafts on the left (the family, the channel, the identity, the order), the draft picked in the middle (its angle,
|
|
3
3
|
// his notes, a card a heading), its article and media on the right. On a phone one pane at a time
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { Fragment, useEffect, useRef } from 'react'
|
|
6
|
-
import {
|
|
6
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
7
|
+
import { KeptCols } from '../kept-cols.tsx'
|
|
7
8
|
import type { RepoSt } from '../repo-st.ts'
|
|
8
9
|
import { PANEL, PhoneTop } from '../review/review-page.tsx'
|
|
9
10
|
import { SocialCalendar } from './calendar.tsx'
|
|
@@ -12,6 +13,7 @@ import { AngleCards, Cards, Logos, MediaTile } from './post-card.tsx'
|
|
|
12
13
|
import { FAM_LABEL, madeOn, posting, STATUS, countsOf, type Draft, type Fam } from './social-model.ts'
|
|
13
14
|
import { Problems } from './problems.tsx'
|
|
14
15
|
import type { SocialSt } from './social-st.ts'
|
|
16
|
+
import type { AskedPost } from '../../../review/notes.ts'
|
|
15
17
|
import { Caret } from '../icons.tsx'
|
|
16
18
|
|
|
17
19
|
export const CommsPage = observer(({ app }: { app: RepoSt }) => {
|
|
@@ -47,7 +49,7 @@ export const CommsPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
47
49
|
return (
|
|
48
50
|
<div className="so-page">
|
|
49
51
|
<SocialCalendar so={so} />
|
|
50
|
-
<
|
|
52
|
+
<KeptCols id="comms">
|
|
51
53
|
<Panel id="comms-list" defaultSize="22%" minSize={240} className="rv-pane" style={PANEL}>
|
|
52
54
|
<DraftsList so={so} />
|
|
53
55
|
</Panel>
|
|
@@ -63,7 +65,7 @@ export const CommsPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
63
65
|
<DraftSide so={so} />
|
|
64
66
|
</div>
|
|
65
67
|
</Panel>
|
|
66
|
-
</
|
|
68
|
+
</KeptCols>
|
|
67
69
|
<Lightbox so={so} />
|
|
68
70
|
<Toast so={so} />
|
|
69
71
|
</div>
|
|
@@ -115,11 +117,14 @@ const DraftsList = observer(({ so }: { so: SocialSt }) => {
|
|
|
115
117
|
</div>
|
|
116
118
|
<span className="rv-count">
|
|
117
119
|
{drafts.length < t.drafts ? `${drafts.length} of ` : ''}
|
|
118
|
-
{t.drafts} drafts · {t.waiting} to post
|
|
120
|
+
{t.drafts} drafts · {t.waiting} to post{so.asked.length > 0 ? ` · ${so.asked.length} asked` : ''}
|
|
119
121
|
</span>
|
|
120
122
|
</div>
|
|
121
123
|
<Problems so={so} lines={[...(so.loadError ? [so.loadError] : []), ...so.errors]} />
|
|
122
124
|
<div className="rv-listscroll so-rows">
|
|
125
|
+
{so.asked.map((a) => (
|
|
126
|
+
<AskedRow key={a.id} so={so} a={a} />
|
|
127
|
+
))}
|
|
123
128
|
{so.desk && so.desk.drafts.length === 0 ? <div className="rv-empty">no draft: write .shipkit/social/drafts/<YYYYMMDD-HHMMSS>-<topic>/draft.md</div> : null}
|
|
124
129
|
{drafts.map((d) => (
|
|
125
130
|
<Fragment key={d.slug}>
|
|
@@ -134,6 +139,20 @@ const DraftsList = observer(({ so }: { so: SocialSt }) => {
|
|
|
134
139
|
)
|
|
135
140
|
})
|
|
136
141
|
|
|
142
|
+
const ASKED_STATE: Record<string, string> = { claimed: 'in work', blocked: 'blocked', question: 'a question' }
|
|
143
|
+
|
|
144
|
+
/** a post he asked from a review card, no draft yet: a click opens the request on the review page */
|
|
145
|
+
const AskedRow = observer(({ so, a }: { so: SocialSt; a: AskedPost }) => (
|
|
146
|
+
<button className="so-draftrow so-asked" onClick={() => so.openNote(a.id)} title={`asked from the review card ${a.card}: an agent writes the draft${a.text ? `\n${a.text}` : ''}`}>
|
|
147
|
+
<span className="so-day">{madeOn(a.id)}</span>
|
|
148
|
+
<span className="so-rowtitle">
|
|
149
|
+
📣 {a.title}
|
|
150
|
+
{a.text ? <span className="rv-dim"> · {a.text.split('\n').at(-1)}</span> : null}
|
|
151
|
+
</span>
|
|
152
|
+
<span className="so-frac">{ASKED_STATE[a.state] ?? 'asked'}</span>
|
|
153
|
+
</button>
|
|
154
|
+
))
|
|
155
|
+
|
|
137
156
|
/** the row picked stays in view, as the arrows walk the list */
|
|
138
157
|
function useInView(on: boolean) {
|
|
139
158
|
const ref = useRef<HTMLButtonElement>(null)
|
|
@@ -226,6 +245,11 @@ const DraftPage = observer(({ so, d }: { so: SocialSt; d: Draft }) => {
|
|
|
226
245
|
</span>
|
|
227
246
|
) : null}
|
|
228
247
|
<a href={so.editorUrl(d.path)}>open in VS Code ({d.file}) ↗</a>
|
|
248
|
+
{d.review ? (
|
|
249
|
+
<button className="so-linkbtn" title={`the review card it was asked from: ${d.review}`} onClick={() => so.openNote(d.review as string)}>
|
|
250
|
+
📣 from its review card
|
|
251
|
+
</button>
|
|
252
|
+
) : null}
|
|
229
253
|
</div>
|
|
230
254
|
{d.angle ? <AngleCards key={d.slug} angle={d.angle} /> : null}
|
|
231
255
|
<NotesBox so={so} notes={so.notes[d.slug] ?? []} placeholder="a note on this draft: it goes to the review page, an agent takes it" send={(text) => so.sendNote(d, text)} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the desks' small parts (wiki
|
|
1
|
+
// the desks' small parts (wiki tools/shipkit/social.md, The desks in the hub): a platform's logo on its colour, the
|
|
2
2
|
// fold chevron and the card that folds, a count over its max, a frame of words with « Copy », a field's legend, his
|
|
3
3
|
// note box, the lightbox. A brand's hex is data: it rides as `--brand`, every other colour is a token of hub.css
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// a message's card (wiki
|
|
1
|
+
// a message's card (wiki tools/shipkit/social.md, The desks in the hub): an account's own heading, or a group's shared
|
|
2
2
|
// by its accounts with a line a platform at its foot; the fields he fills on the platform (flair, title, text, tags,
|
|
3
3
|
// the reply, the footer), its media, « Post » or « Publish », the URL that turns it green. Communications and Social
|
|
4
4
|
// draw the same card
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the desks' words and pure rules (wiki
|
|
1
|
+
// the desks' words and pure rules (wiki tools/shipkit/social.md, The desks in the hub): the desk as the hub's route
|
|
2
2
|
// sends it, a draft's angle as cards, the families of the list, a card a heading, the address's query. Pure, no
|
|
3
3
|
// browser, so the rules are pinned headless
|
|
4
4
|
import type { Draft, Desk, DeskAccount, DeskIdentity, Media, SocialPost } from '../../../social/load.ts'
|