rvlib-shipkit 2.27.0 → 2.28.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/agent-time/hooks.ts +10 -3
- package/src/agent-time/live.ts +11 -5
- package/src/agent-time/registry.ts +289 -0
- package/src/agent-time/store.ts +2 -2
- package/src/annex/born.ts +2 -2
- package/src/annex/offload.ts +12 -11
- package/src/asks/ask-after.ts +6 -2
- package/src/asks/ask-bar-fold.ts +57 -0
- package/src/asks/ask-migrate.ts +280 -0
- package/src/asks/ask-steps-fold.ts +166 -0
- package/src/asks/ask-store.ts +586 -0
- package/src/assets/kits/identity-kit.ts +106 -38
- package/src/assets/kits/poster-thumbnail.ts +282 -0
- package/src/checks/SK003-claude-md-shape.check.ts +92 -25
- package/src/checks/SK004-gitignore-policy.check.ts +8 -4
- package/src/checks/SK013-one-way-in-policy.check.ts +10 -0
- package/src/checks/SK026-asks-autoclose.check.ts +9 -23
- package/src/checks/SK038-speaks-as.check.ts +3 -3
- package/src/checks/SK042-post-kinds.check.ts +26 -24
- package/src/checks/SK049-thread-answers-hook.check.ts +81 -0
- package/src/checks/SK050-retired-commands.check.ts +127 -0
- package/src/cli/cmd_Asks.ts +204 -53
- package/src/cli/cmd_Backup.ts +151 -8
- package/src/cli/cmd_Calls.ts +1 -0
- package/src/cli/cmd_Commands.ts +140 -34
- package/src/cli/cmd_Contracts.ts +1 -0
- package/src/cli/cmd_Keys.ts +1 -0
- package/src/cli/cmd_Lanes.ts +15 -4
- package/src/cli/cmd_Messages.ts +152 -1
- package/src/cli/cmd_Needs.ts +1 -0
- package/src/cli/cmd_Review.ts +931 -229
- package/src/cli/cmd_Secret.ts +255 -34
- package/src/cli/cmd_Social.ts +36 -33
- package/src/cli/cmd_SocialDrafts.ts +235 -0
- package/src/cli/cmd_Sound.ts +22 -1
- package/src/cli/cmd_Start.ts +3 -2
- package/src/cli/cmd_ThreadHolds.ts +34 -0
- package/src/cli/cmd_ThreadKinds.ts +146 -0
- package/src/cli/cmd_ThreadReflect.ts +83 -0
- package/src/cli/cmd_ThreadSyncNeeds.ts +62 -0
- package/src/cli/cmd_Vault.ts +1 -1
- package/src/cli/cmd_When.ts +1 -0
- package/src/cli/family-help.ts +2 -2
- package/src/cli/family-pages.ts +1 -1
- package/src/cli/kit/builtins.ts +1 -0
- package/src/cli/kit/verb.ts +6 -2
- package/src/cli/registry.ts +21 -2
- package/src/cli.ts +5 -2
- package/src/collections/actions.ts +25 -74
- package/src/collections/collection-types.ts +9 -5
- package/src/collections/md-body.ts +5 -3
- package/src/collections/pings.ts +13 -6
- package/src/collections/providers.ts +53 -61
- package/src/collections/reflections.ts +9 -4
- package/src/core/discover-checks.ts +18 -3
- package/src/core/git.ts +31 -0
- package/src/core/house-layout.ts +17 -0
- package/src/core/layout.ts +10 -5
- package/src/core/locked-write.ts +4 -1
- package/src/core/machine-db.ts +5 -3
- package/src/core/migrate-layout.ts +8 -10
- package/src/home/activity.ts +8 -15
- package/src/home/daemon-jobs.ts +13 -1
- package/src/home/home-paths.ts +6 -3
- package/src/home/home-routes.ts +8 -0
- package/src/home/inbox-shape.ts +233 -100
- package/src/home/inbox.ts +26 -71
- package/src/home/machine-fold.ts +10 -15
- package/src/home/machine-host.ts +19 -1
- package/src/home/other-macs.ts +2 -2
- package/src/home/serve-web.ts +6 -5
- package/src/home/space-page.ts +1 -1
- package/src/home/vault-page.ts +51 -17
- package/src/home/vault-words.ts +2 -2
- package/src/hooks/one-way-in-guard.ts +24 -2
- package/src/hq/files-send.ts +27 -28
- package/src/hq/hq-db.ts +4 -1
- package/src/hq/hq-local.ts +37 -4
- package/src/hq/hq-routes.ts +10 -2
- package/src/hq/hq-store.ts +6 -2
- package/src/hq/kinds/ask.ts +6 -6
- package/src/hq/outbox.ts +5 -3
- package/src/hq/replica.ts +1 -2
- package/src/hq/vault-route.ts +112 -0
- package/src/identities/collection.ts +2 -2
- package/src/identities/identities.ts +9 -8
- package/src/identities/machine-route.ts +8 -3
- package/src/ledger/db.ts +8 -1
- package/src/media-store/backup/daemon.ts +48 -8
- package/src/media-store/backup/keys.ts +1 -1
- package/src/media-store/backup/manifest.ts +20 -2
- package/src/media-store/backup/prune.ts +365 -0
- package/src/media-store/backup/retention.ts +122 -0
- package/src/media-store/backup/run.ts +14 -8
- package/src/media-store/backup/sources.ts +18 -17
- package/src/media-store/backup/thread-copy.ts +340 -0
- package/src/media-store/copy/config.ts +3 -4
- package/src/media-store/copy/store.ts +2 -2
- package/src/media-store/db.ts +2 -2
- package/src/media-store/forget.ts +118 -0
- package/src/media-store/purge.ts +3 -2
- package/src/media-store/space-listing.ts +20 -4
- package/src/media-store/space.ts +6 -5
- package/src/messages/guard.ts +49 -0
- package/src/messages/model.ts +1 -1
- package/src/messages/objects.ts +201 -0
- package/src/messages/routes.ts +2 -2
- package/src/messages/score.ts +1 -1
- package/src/messages/write.ts +285 -0
- package/src/pages/frame-client.ts +181 -4
- package/src/reflections/reflections-queue.ts +1 -1
- package/src/release/gate-checkout.ts +2 -1
- package/src/release/git-facts.ts +3 -2
- package/src/release/public-clean.ts +3 -2
- package/src/repo-config.ts +40 -18
- package/src/review/anim.ts +1 -1
- package/src/review/answer-kinds.ts +131 -0
- package/src/review/band.ts +53 -0
- package/src/review/branch-hold.ts +84 -0
- package/src/review/card-db.ts +16 -6
- package/src/review/card-rows.ts +4 -3
- package/src/review/cells.ts +297 -65
- package/src/review/close.ts +92 -0
- package/src/review/draft-card.ts +8 -16
- package/src/review/draft-model.ts +2 -2
- package/src/review/events.ts +171 -0
- package/src/review/format.ts +128 -14
- package/src/review/glyphs.ts +63 -0
- package/src/review/gone.ts +1 -1
- package/src/review/holds-sync.ts +62 -0
- package/src/review/holds.ts +85 -0
- package/src/review/house-kind-defs.ts +41 -0
- package/src/review/inbox-hook.ts +22 -9
- package/src/review/inbox-read.ts +201 -0
- package/src/review/instructions.ts +199 -0
- package/src/review/kind-apply.ts +61 -0
- package/src/review/kind-catalog.ts +96 -0
- package/src/review/kinds.ts +278 -0
- package/src/review/lane-ask.ts +109 -0
- package/src/review/model.ts +396 -86
- package/src/review/move.ts +3 -3
- package/src/review/need-address.ts +15 -0
- package/src/review/need-threads.ts +93 -0
- package/src/review/object-card.ts +48 -0
- package/src/review/object-read.ts +31 -0
- package/src/review/owner-verdict.ts +36 -0
- package/src/review/parties.ts +182 -0
- package/src/review/previews.ts +3 -1
- package/src/review/projections.ts +235 -0
- package/src/review/referring.ts +54 -0
- package/src/review/reflection-object.ts +195 -0
- package/src/review/routes.ts +137 -32
- package/src/review/secret-route.ts +80 -0
- package/src/review/snooze.ts +38 -0
- package/src/review/stage-card.ts +4 -4
- package/src/review/store.ts +366 -85
- package/src/review/supersede.ts +116 -0
- package/src/review/take-back.ts +52 -0
- package/src/review/thread-fold.ts +20 -7
- package/src/review/threads.ts +236 -39
- package/src/review/traces.ts +218 -0
- package/src/review/trailer-card.ts +2 -2
- package/src/review/unit.ts +71 -5
- package/src/review/verdict-items.ts +73 -0
- package/src/review/verdict-write.ts +15 -0
- package/src/review/wait.ts +85 -0
- package/src/review/watchers.ts +22 -9
- package/src/scaffold/files/claude-settings-local.json +2 -0
- package/src/secrets/archive-mark.ts +52 -0
- package/src/secrets/archive.ts +83 -0
- package/src/secrets/copy.ts +14 -14
- package/src/secrets/keychain-write.ts +48 -0
- package/src/secrets/keychain.ts +8 -5
- package/src/secrets/lapse-mark.ts +33 -0
- package/src/secrets/lapse.ts +60 -0
- package/src/secrets/list.ts +16 -22
- package/src/secrets/manager.ts +31 -16
- package/src/secrets/read.ts +161 -33
- package/src/secrets/tail.ts +31 -0
- package/src/serve/hub-app/asks-page.tsx +2 -1
- package/src/serve/hub-app/auto-text.tsx +14 -6
- package/src/serve/hub-app/benign-errors.ts +15 -1
- package/src/serve/hub-app/card-head.tsx +49 -0
- package/src/serve/hub-app/check-view.tsx +3 -2
- package/src/serve/hub-app/code-copy.ts +35 -0
- package/src/serve/hub-app/col-card.tsx +31 -40
- package/src/serve/hub-app/col-list-page.tsx +5 -2
- package/src/serve/hub-app/col-tables-view.tsx +7 -4
- package/src/serve/hub-app/col-tables.ts +5 -5
- package/src/serve/hub-app/cols-svc.ts +4 -79
- package/src/serve/hub-app/commands/commands-page.tsx +2 -1
- package/src/serve/hub-app/controls.css +83 -0
- package/src/serve/hub-app/frames-st.ts +17 -1
- package/src/serve/hub-app/git-view.tsx +3 -2
- package/src/serve/hub-app/home-st.ts +57 -6
- package/src/serve/hub-app/home-strip.css +1 -6
- package/src/serve/hub-app/home-strip.tsx +2 -1
- package/src/serve/hub-app/home.html +3 -0
- package/src/serve/hub-app/house-wiki-view.tsx +20 -0
- package/src/serve/hub-app/hub-app.tsx +48 -32
- package/src/serve/hub-app/hub-types.ts +2 -0
- package/src/serve/hub-app/hub.css +50 -61
- package/src/serve/hub-app/icons.tsx +14 -4
- package/src/serve/hub-app/identities-view.tsx +4 -3
- package/src/serve/hub-app/inbox-st.ts +203 -42
- package/src/serve/hub-app/inbox-view.tsx +189 -101
- package/src/serve/hub-app/inbox.css +47 -44
- package/src/serve/hub-app/index.html +3 -0
- package/src/serve/hub-app/instructions.css +30 -0
- package/src/serve/hub-app/keys.ts +5 -3
- package/src/serve/hub-app/machine-st.ts +2 -2
- package/src/serve/hub-app/machines-view.tsx +4 -11
- package/src/serve/hub-app/machines.css +0 -9
- package/src/serve/hub-app/markdown.css +51 -0
- package/src/serve/hub-app/md-copy.tsx +18 -40
- package/src/serve/hub-app/md.ts +25 -9
- package/src/serve/hub-app/media-view.tsx +2 -2
- package/src/serve/hub-app/messages/messages-page.tsx +2 -1
- package/src/serve/hub-app/messages/messages-st.ts +1 -1
- package/src/serve/hub-app/messages.css +0 -1
- package/src/serve/hub-app/objects.css +51 -0
- package/src/serve/hub-app/page-keys.ts +1 -1
- package/src/serve/hub-app/pages-frames.tsx +11 -1
- package/src/serve/hub-app/palette-st.ts +4 -4
- package/src/serve/hub-app/pane-boundary.tsx +72 -0
- package/src/serve/hub-app/pane-errors.ts +54 -0
- package/src/serve/hub-app/plan-view.tsx +3 -2
- package/src/serve/hub-app/planned-view.tsx +3 -3
- package/src/serve/hub-app/planned.css +0 -4
- package/src/serve/hub-app/processes-view.tsx +3 -2
- package/src/serve/hub-app/project-list.css +5 -13
- package/src/serve/hub-app/project-list.tsx +3 -6
- package/src/serve/hub-app/projects-svc.ts +6 -2
- package/src/serve/hub-app/readme.css +9 -15
- package/src/serve/hub-app/reflections-page.tsx +54 -1
- package/src/serve/hub-app/releases/releases-page.tsx +3 -2
- package/src/serve/hub-app/releases.css +0 -1
- package/src/serve/hub-app/review/code-colors.ts +30 -0
- package/src/serve/hub-app/review/diff-view.tsx +75 -0
- package/src/serve/hub-app/review/dock.tsx +104 -0
- package/src/serve/hub-app/review/draft-card.tsx +2 -2
- package/src/serve/hub-app/review/group-block.tsx +209 -0
- package/src/serve/hub-app/review/instructions-view.tsx +116 -0
- package/src/serve/hub-app/review/item-verdict.tsx +38 -0
- package/src/serve/hub-app/review/kind-states.tsx +193 -0
- package/src/serve/hub-app/review/kind-view.tsx +1 -37
- package/src/serve/hub-app/review/kit.tsx +57 -54
- package/src/serve/hub-app/review/lane-bar.tsx +64 -0
- package/src/serve/hub-app/review/object-card.tsx +62 -0
- package/src/serve/hub-app/review/object-panel.tsx +179 -0
- package/src/serve/hub-app/review/question-views.tsx +385 -0
- package/src/serve/hub-app/review/review-cells.tsx +86 -105
- package/src/serve/hub-app/review/review-list.tsx +104 -47
- package/src/serve/hub-app/review/review-page.tsx +5 -4
- package/src/serve/hub-app/review/review-st.ts +68 -28
- package/src/serve/hub-app/review/review-thread.tsx +171 -40
- package/src/serve/hub-app/review/review-views.tsx +35 -31
- package/src/serve/hub-app/review/thread-close.tsx +124 -0
- package/src/serve/hub-app/review/thread-control.tsx +4 -4
- package/src/serve/hub-app/review/thread-st.ts +222 -22
- package/src/serve/hub-app/review/trailer-card.tsx +1 -1
- package/src/serve/hub-app/review/trailer-timeline.tsx +2 -2
- package/src/serve/hub-app/review.css +216 -57
- package/src/serve/hub-app/section-head.tsx +51 -0
- package/src/serve/hub-app/social/calendar.tsx +5 -11
- package/src/serve/hub-app/social/comms-page.tsx +23 -10
- package/src/serve/hub-app/social/kit.tsx +8 -15
- package/src/serve/hub-app/social/next-release.tsx +3 -5
- package/src/serve/hub-app/social/post-card.tsx +3 -0
- package/src/serve/hub-app/social/post-page.tsx +80 -0
- package/src/serve/hub-app/social/problems.tsx +5 -9
- package/src/serve/hub-app/social/social-model.ts +13 -5
- package/src/serve/hub-app/social/social-page.tsx +1 -1
- package/src/serve/hub-app/social/social-st.ts +42 -5
- package/src/serve/hub-app/social.css +7 -17
- package/src/serve/hub-app/space.css +1 -1
- package/src/serve/hub-app/stores/stores-page.tsx +6 -2
- package/src/serve/hub-app/thread-row.tsx +101 -0
- package/src/serve/hub-app/time-ago.tsx +3 -2
- package/src/serve/hub-app/time-view.tsx +2 -1
- package/src/serve/hub-app/time.css +2 -5
- package/src/serve/hub-app/tree-row.tsx +1 -9
- package/src/serve/hub-app/vault-view.tsx +4 -4
- package/src/serve/hub-app/veille/veille-page.tsx +2 -11
- package/src/serve/hub-app/veille.css +0 -1
- package/src/serve/hub-app/waiting-svc.ts +4 -4
- package/src/serve/hub-app/when-view.tsx +6 -3
- package/src/serve/hub-app/wiki-st.ts +30 -4
- package/src/serve/hub-app/wikis-view.tsx +4 -3
- package/src/serve/hub-runtime.ts +20 -6
- package/src/serve/project-gutter-route.ts +16 -6
- package/src/serve/project-gutter.ts +6 -53
- package/src/serve/same-origin.ts +3 -0
- package/src/serve/secret-gate.ts +21 -0
- package/src/serve/serve-hub.ts +29 -20
- package/src/serve/tailnet-caller.ts +117 -0
- package/src/shipkit.ts +2 -2
- package/src/site/desk.ts +2 -2
- package/src/smoke/run-smoke.ts +3 -4
- package/src/social/brands.ts +4 -0
- package/src/social/card-drafts.ts +11 -19
- package/src/social/desk-index.ts +34 -13
- package/src/social/drafts.ts +4 -4
- package/src/social/import-drafts.ts +244 -0
- package/src/social/kind-pages.ts +3 -3
- package/src/social/kinds.ts +1 -1
- package/src/social/load.ts +89 -64
- package/src/social/media-kind.ts +68 -161
- package/src/social/media-of.ts +5 -4
- package/src/social/open.ts +3 -2
- package/src/social/post-object.ts +120 -0
- package/src/social/post-sources.ts +136 -0
- package/src/social/post-text.ts +103 -0
- package/src/social/posts.ts +378 -0
- package/src/social/presence.ts +7 -5
- package/src/social/publish/index.ts +17 -5
- package/src/social/publish/secret.ts +2 -2
- package/src/social/release-stage.ts +58 -57
- package/src/social/routes.ts +64 -24
- package/src/social/stage.ts +42 -57
- package/src/social/text.ts +4 -3
- package/src/social/thumbnail.ts +135 -43
- package/src/social/tracker.ts +1 -1
- package/src/social/writes.ts +12 -29
- package/src/stores/desk.ts +16 -11
- package/src/stores/unit.ts +2 -2
- package/src/trailer/sound/eleven.ts +33 -3
- package/src/urls/rows.ts +1 -1
- package/src/vault/vault-http.ts +11 -3
- package/src/vault/vault-import.ts +6 -1
- package/src/veille/identity.ts +2 -2
- package/src/wiki/graph-pages.ts +13 -1
- package/src/wiki/scan-md.ts +1 -1
- package/src/asks/asks-queue.ts +0 -424
- package/src/messages/suggest.ts +0 -96
- package/src/social/migrate.ts +0 -123
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { ChangeCard } from '../releases/releases-page.tsx'
|
|
6
6
|
import type { ReleasesSt } from '../releases/releases-st.ts'
|
|
7
|
-
import {
|
|
7
|
+
import { SectionHead } from '../section-head.tsx'
|
|
8
8
|
import { Count, Logo } from './kit.tsx'
|
|
9
9
|
import { AngleCards, Logos } from './post-card.tsx'
|
|
10
10
|
import { NEXT_PICK, sharing, type Send } from './social-model.ts'
|
|
@@ -21,10 +21,8 @@ export const NextSection = observer(({ so }: { so: SocialSt }) => {
|
|
|
21
21
|
const p = view.preview
|
|
22
22
|
return (
|
|
23
23
|
<div className="so-nextsec">
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
<span className="so-ellip">Next release (unreleased)</span>
|
|
27
|
-
</button>
|
|
24
|
+
<SectionHead label="next release (unreleased)" open={so.nextOpen} onFold={() => so.flipFold(NEXT_PICK, true)}
|
|
25
|
+
title="the release being filled, .shipkit/releases/next.md: a draft is staged from it when the release is cut" />
|
|
28
26
|
{so.nextOpen && view.error ? <div className="so-kindproblem">⚠ next.md: {view.error}</div> : null}
|
|
29
27
|
{so.nextOpen && p ? (
|
|
30
28
|
<button className={`so-draftrow so-nextrow${so.nextPicked ? ' on' : ''}`} onClick={() => so.pickDraft(NEXT_PICK)} title="not staged: nothing to post until the release is cut">
|
|
@@ -324,6 +324,9 @@ export const PostCard = observer((p: { so: SocialSt; a: DeskAccount; post: Socia
|
|
|
324
324
|
{p.where ? <PlaceLink so={so} a={p.a} post={post} /> : null}
|
|
325
325
|
</span>
|
|
326
326
|
)}
|
|
327
|
+
<button className="so-linkbtn" title="its own page: its link, its versions, the threads that refer to it" onClick={() => void so.openPost(post.slug, post.key)}>
|
|
328
|
+
page ▸
|
|
329
|
+
</button>
|
|
327
330
|
<ThreadControl st={so.st} address={`draft:${post.slug}/${post.key}`} name={`${post.slug} · ${post.key}`} />
|
|
328
331
|
<PosterButton so={so} a={p.a} post={post} />
|
|
329
332
|
{posted ? <ViewButton post={post} /> : !p.head ? <span className={`so-badge ${post.status === 'picked' ? 't-warn' : 't-dim'}`}>{STATUS[post.status] ?? post.status}</span> : null}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// a post's own page in Communications (wiki tools/shipkit/social.md, Posts and their groups): its account and place, its
|
|
2
|
+
// state and link, its words, its versions, and every thread that refers to it, the open ones first, one click to each
|
|
3
|
+
import { observer } from 'mobx-react-lite'
|
|
4
|
+
import { hashFor } from '../hash-route.ts'
|
|
5
|
+
import type { SocialSt } from './social-st.ts'
|
|
6
|
+
|
|
7
|
+
const WHY: Record<string, string> = { import: 'imported', stage: 'staged', save: 'saved', text: 'its words rewritten', posted: 'marked posted', clear: 'its link taken back', publish: 'published', drop: 'dropped', undrop: 'taken back', discard: 'dropped by a discard', restore: 'restored' }
|
|
8
|
+
const STATE: Record<string, string> = { draft: 'in draft', posted: 'posted', dropped: 'dropped' }
|
|
9
|
+
|
|
10
|
+
export const PostPage = observer(({ so }: { so: SocialSt }) => {
|
|
11
|
+
const at = so.postOpen
|
|
12
|
+
const o = so.postPage
|
|
13
|
+
if (at == null) return null
|
|
14
|
+
return (
|
|
15
|
+
<div className="so-colin so-postpage" data-post={`${at.slug}/${at.key}`}>
|
|
16
|
+
<div className="so-partline">
|
|
17
|
+
<button className="so-linkbtn" onClick={() => so.closePost()}>
|
|
18
|
+
◂ the group
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
{o == null ? (
|
|
22
|
+
<div className="rv-dim">Reading the post…</div>
|
|
23
|
+
) : (
|
|
24
|
+
<>
|
|
25
|
+
<div className="so-pagehead">
|
|
26
|
+
<h2 className="so-h">
|
|
27
|
+
{o.post.account}
|
|
28
|
+
{o.post.place ? <span className="rv-dim so-light"> · {o.post.place}</span> : null}
|
|
29
|
+
<span className="rv-dim so-light"> · {o.group.title || o.slug}</span>
|
|
30
|
+
</h2>
|
|
31
|
+
<span className={`so-badge ${o.post.state === 'posted' ? 't-ok' : o.post.state === 'dropped' ? 't-dim' : 't-warn'}`}>{STATE[o.post.state] ?? o.post.state}</span>
|
|
32
|
+
</div>
|
|
33
|
+
{o.post.state === 'posted' ? (
|
|
34
|
+
<div className="so-meta">
|
|
35
|
+
<a href={o.post.url} target="_blank" rel="noreferrer">
|
|
36
|
+
{o.post.url} ↗
|
|
37
|
+
</a>
|
|
38
|
+
{o.post.postedAt != null ? <span className="rv-dim">posted {new Date(o.post.postedAt).toLocaleString()}</span> : <span className="rv-dim">posted, its moment unknown</span>}
|
|
39
|
+
</div>
|
|
40
|
+
) : null}
|
|
41
|
+
{o.post.refused && o.post.state === 'draft' ? <div className="so-kindproblem">⛔ {o.post.refused}</div> : null}
|
|
42
|
+
{o.post.title ? <b>{o.post.title}</b> : null}
|
|
43
|
+
<div className="so-card so-text so-pre">{o.post.text}</div>
|
|
44
|
+
{o.post.media ? <div className="rv-dim rv-small">its media: {o.post.media}</div> : null}
|
|
45
|
+
<b>Threads that refer to it</b>
|
|
46
|
+
{o.threads.length === 0 ? <div className="rv-dim rv-small">none yet: « open a thread » makes one</div> : null}
|
|
47
|
+
<div className="so-threadrefs">
|
|
48
|
+
{o.threads.map((t) => (
|
|
49
|
+
<a key={t.key} className={`so-threadref${t.open ? ' open' : ''}`} href={`#${hashFor({ t: 'review', id: t.id })}`} title={t.key}>
|
|
50
|
+
<span className={`so-badge ${t.open ? 't-warn' : 't-dim'}`}>{t.open ? 'open' : 'done'}</span> {t.title}
|
|
51
|
+
</a>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
<b>Its group</b>
|
|
55
|
+
<div className="rv-dim rv-small">
|
|
56
|
+
{o.group.kind} · {o.group.drafts} in draft · {o.group.posted} posted · {o.group.dropped} dropped
|
|
57
|
+
</div>
|
|
58
|
+
<div className="so-threadrefs">
|
|
59
|
+
{o.group.posts.map((p) => (
|
|
60
|
+
<button key={p.key} className={`so-linkbtn${p.key === o.key ? ' on' : ''}`} onClick={() => void so.openPost(o.slug, p.key)}>
|
|
61
|
+
{p.account}
|
|
62
|
+
{p.key.includes('/') ? ` · ${p.key.split('/')[1]}` : ''} · {STATE[p.state] ?? p.state}
|
|
63
|
+
</button>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
<details className="ob-versions">
|
|
67
|
+
<summary>
|
|
68
|
+
{o.history.length} version{o.history.length === 1 ? '' : 's'} of it
|
|
69
|
+
</summary>
|
|
70
|
+
{o.history.map((h) => (
|
|
71
|
+
<div key={h.id} className="rv-small">
|
|
72
|
+
v{h.version} · {WHY[h.why] ?? h.why} · {STATE[h.state] ?? h.state} · {h.sender} · {new Date(h.at).toLocaleString()}
|
|
73
|
+
</div>
|
|
74
|
+
))}
|
|
75
|
+
</details>
|
|
76
|
+
</>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
})
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// A problem never lands as a raw path at the top of a page
|
|
4
4
|
import { observer } from 'mobx-react-lite'
|
|
5
5
|
import { useState } from 'react'
|
|
6
|
-
import {
|
|
6
|
+
import { SectionHead } from '../section-head.tsx'
|
|
7
7
|
import type { SocialSt } from './social-st.ts'
|
|
8
8
|
|
|
9
9
|
type Problem = { key: string; what: string; why: string; slug: string | null }
|
|
10
10
|
|
|
11
|
-
const DRAFT = /(?:^|\/)
|
|
11
|
+
const DRAFT = /(?:^|\/)draft:(\d{8}-\d{6}-[^:/\s]+): (.*)$/
|
|
12
12
|
const OVER = /^## (\S+?)(?:\/\S+)? is (\d+) on (.+?), over its (\d+)$/
|
|
13
13
|
const FILE = /^\S*\/identities\/(\S+?): (.*)$/
|
|
14
14
|
|
|
@@ -31,15 +31,11 @@ export const Problems = observer(({ so, lines }: { so: SocialSt | null; lines: r
|
|
|
31
31
|
const titleOf = (slug: string): string | null => so?.desk?.drafts.find((d) => d.slug === slug)?.title || null
|
|
32
32
|
const all = lines.map((l) => problemOf(l, titleOf))
|
|
33
33
|
const drafts = all.filter((p) => p.slug != null).length
|
|
34
|
-
const label = drafts === all.length ?
|
|
34
|
+
const label = drafts === all.length ? `draft${drafts === 1 ? '' : 's'} with a problem` : `problem${all.length === 1 ? '' : 's'}`
|
|
35
35
|
return (
|
|
36
36
|
<div className="so-problems">
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
<span className="so-ellip so-grow">{label}</span>
|
|
40
|
-
<b className="rsecn nwarn">{all.length}</b>
|
|
41
|
-
<span className="so-probcaret">{open ? '▾' : '›'}</span>
|
|
42
|
-
</button>
|
|
37
|
+
<SectionHead label={label} n={all.length} open={open} onFold={() => setOpen(!open)} tone="var(--warn)" hook="so-probhead"
|
|
38
|
+
title="what the load found wrong: one line each" />
|
|
43
39
|
{open
|
|
44
40
|
? all.map((p) => {
|
|
45
41
|
const body = (
|
|
@@ -46,13 +46,14 @@ export type Fam = keyof typeof FAMS
|
|
|
46
46
|
export const famOf = (v: unknown): Fam | null => (v === 'feed' || v === 'vertical' ? v : null)
|
|
47
47
|
export const FAM_LABEL: Readonly<Record<Fam, string>> = { feed: 'Feed', vertical: 'Vertical' }
|
|
48
48
|
|
|
49
|
-
/** what the lists count as waiting: a message not posted, its draft not rejected */
|
|
50
|
-
export const waiting = (p: Pick<SocialPost, 'posted' | 'status'>): boolean => p.posted === '' && p.status !== 'rejected'
|
|
51
|
-
export const draftWaiting = (d: Pick<Draft, 'status' | 'posts'>): boolean => d.status !== 'rejected' && d.posts.some((p) => p.posted === '')
|
|
49
|
+
/** what the lists count as waiting: a message not posted and not dropped, its draft not rejected */
|
|
50
|
+
export const waiting = (p: Pick<SocialPost, 'posted' | 'status' | 'dropped'>): boolean => p.posted === '' && !p.dropped && p.status !== 'rejected'
|
|
51
|
+
export const draftWaiting = (d: Pick<Draft, 'status' | 'posts'>): boolean => d.status !== 'rejected' && d.posts.some((p) => p.posted === '' && !p.dropped)
|
|
52
52
|
|
|
53
53
|
/** how far some messages are posted: every one, some, none */
|
|
54
54
|
export const posting = (c: { posted: number; of: number }): 'all' | 'some' | 'none' => (c.of > 0 && c.posted === c.of ? 'all' : c.posted > 0 ? 'some' : 'none')
|
|
55
|
-
|
|
55
|
+
/** a dropped message counts in neither: he will not post it */
|
|
56
|
+
export const countsOf = (posts: readonly Pick<SocialPost, 'posted' | 'dropped'>[]): { posted: number; of: number } => ({ posted: posts.filter((p) => p.posted !== '').length, of: posts.filter((p) => p.posted !== '' || !p.dropped).length })
|
|
56
57
|
|
|
57
58
|
/** the day a draft was made, from its folder name: « 28/10 » */
|
|
58
59
|
export const madeOn = (slug: string): string => `${slug.slice(6, 8)}/${slug.slice(4, 6)}`
|
|
@@ -180,7 +181,12 @@ export function kindChoices(drafts: readonly Pick<Draft, 'kind'>[], kinds: reado
|
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
/** the list's view as the address carries it, each key only when it is not the default */
|
|
183
|
-
|
|
184
|
+
/** a post's state, the index's filter: in draft, posted, dropped */
|
|
185
|
+
export type PostState = 'draft' | 'posted' | 'dropped'
|
|
186
|
+
export const POST_STATES: readonly PostState[] = ['draft', 'posted', 'dropped']
|
|
187
|
+
export const postStateOf = (p: Pick<SocialPost, 'posted' | 'dropped'>): PostState => (p.posted !== '' ? 'posted' : p.dropped ? 'dropped' : 'draft')
|
|
188
|
+
|
|
189
|
+
export type CommsView = { fam: Fam | null; channel: string | null; newestFirst: boolean; who: string | null; kind: string | null; state: PostState | null }
|
|
184
190
|
|
|
185
191
|
export function commsQuery(v: CommsView): string {
|
|
186
192
|
const q = new URLSearchParams()
|
|
@@ -189,6 +195,7 @@ export function commsQuery(v: CommsView): string {
|
|
|
189
195
|
if (!v.newestFirst) q.set('order', 'old')
|
|
190
196
|
if (v.who) q.set('who', v.who)
|
|
191
197
|
if (v.kind != null) q.set('kind', v.kind)
|
|
198
|
+
if (v.state != null) q.set('state', v.state)
|
|
192
199
|
return q.toString()
|
|
193
200
|
}
|
|
194
201
|
|
|
@@ -201,5 +208,6 @@ export function readCommsQuery(q: string): Partial<CommsView> {
|
|
|
201
208
|
if (p.has('order')) out.newestFirst = p.get('order') !== 'old'
|
|
202
209
|
if (p.has('who')) out.who = p.get('who') || null
|
|
203
210
|
if (p.has('kind')) out.kind = p.get('kind')
|
|
211
|
+
if (p.has('state')) out.state = (POST_STATES as readonly string[]).includes(p.get('state') ?? '') ? (p.get('state') as PostState) : null
|
|
204
212
|
return out
|
|
205
213
|
}
|
|
@@ -220,7 +220,7 @@ const PlaceRow = observer(({ so, a, id, name, when, on }: { so: SocialSt; a: Des
|
|
|
220
220
|
|
|
221
221
|
const Middle = observer(({ so }: { so: SocialSt }) => {
|
|
222
222
|
const i = so.socialIdentity
|
|
223
|
-
if (!i) return <div className="rv-empty">{so.desk ? 'no identity: write
|
|
223
|
+
if (!i) return <div className="rv-empty">{so.desk ? 'no identity: write wiki/identities/<id>/identity.md in the house repo' : so.loadError ?? so.waitText}</div>
|
|
224
224
|
if (so.onLegal) return <LegalPage so={so} i={i} />
|
|
225
225
|
const a = so.currentAccount
|
|
226
226
|
if (!a) return <IdentityPage so={so} i={i} />
|
|
@@ -13,6 +13,7 @@ import type { RepoSt } from '../repo-st.ts'
|
|
|
13
13
|
import { copyText, postJson } from '../review/review-kit.ts'
|
|
14
14
|
import { serialWrites } from './serial-writes.ts'
|
|
15
15
|
import { threadHost } from '../review/thread-control.tsx'
|
|
16
|
+
import type { PostObject } from '../../../social/post-object.ts'
|
|
16
17
|
import {
|
|
17
18
|
caption,
|
|
18
19
|
commsQuery,
|
|
@@ -26,6 +27,8 @@ import {
|
|
|
26
27
|
ME,
|
|
27
28
|
NEXT_PICK,
|
|
28
29
|
partsOf,
|
|
30
|
+
POST_STATES,
|
|
31
|
+
postStateOf,
|
|
29
32
|
readCommsQuery,
|
|
30
33
|
waiting,
|
|
31
34
|
type CommsView,
|
|
@@ -39,6 +42,7 @@ import {
|
|
|
39
42
|
type Media,
|
|
40
43
|
type Picture,
|
|
41
44
|
type Place,
|
|
45
|
+
type PostState,
|
|
42
46
|
type SocialPost,
|
|
43
47
|
type Timeline,
|
|
44
48
|
} from './social-model.ts'
|
|
@@ -109,6 +113,11 @@ export class SocialSt {
|
|
|
109
113
|
who: string | null = null
|
|
110
114
|
/** the kind the list keeps, a word of the set or one off it; null, every one */
|
|
111
115
|
kind: string | null = null
|
|
116
|
+
/** the posts the index keeps by their state; null, every one */
|
|
117
|
+
postState: PostState | null = null
|
|
118
|
+
/** the post whose own page the middle shows, by its group and key; null, the group */
|
|
119
|
+
postOpen: { slug: string; key: string } | null = null
|
|
120
|
+
postPage: PostObject | null = null
|
|
112
121
|
draftQuery = ''
|
|
113
122
|
calendarOpen = true
|
|
114
123
|
/** the drafts whose sub entries he folded in the list */
|
|
@@ -174,6 +183,7 @@ export class SocialSt {
|
|
|
174
183
|
this.newestFirst = v.newestFirst ?? true
|
|
175
184
|
this.who = v.who ?? null
|
|
176
185
|
this.kind = typeof v.kind === 'string' ? v.kind : null
|
|
186
|
+
this.postState = (POST_STATES as readonly (string | null | undefined)[]).includes(v.state) ? (v.state as PostState) : null
|
|
177
187
|
for (const slug of kept<unknown[]>(SERIES, [])) if (typeof slug === 'string') this.foldedSeries[slug] = true
|
|
178
188
|
this.calendarOpen = kept<boolean>(CALENDAR, true)
|
|
179
189
|
for (const [k, x] of Object.entries(kept<Record<string, unknown>>(FOLDS, {}))) if (typeof x === 'boolean') this.folds[k] = x
|
|
@@ -456,9 +466,9 @@ export class SocialSt {
|
|
|
456
466
|
return this.fam === null ? null : FAMS[this.fam]
|
|
457
467
|
}
|
|
458
468
|
|
|
459
|
-
/** a
|
|
469
|
+
/** a post to an account of the family the list keeps, in the state it keeps; every one with neither */
|
|
460
470
|
inFamilyPost(p: SocialPost): boolean {
|
|
461
|
-
return this.family === null || this.postAccount(p)?.family === this.family
|
|
471
|
+
return (this.family === null || this.postAccount(p)?.family === this.family) && (this.postState === null || postStateOf(p) === this.postState)
|
|
462
472
|
}
|
|
463
473
|
|
|
464
474
|
familyPosts(d: Draft): SocialPost[] {
|
|
@@ -467,7 +477,7 @@ export class SocialSt {
|
|
|
467
477
|
|
|
468
478
|
/** `byKind` false: every filter but the kind's, the drafts its choices count */
|
|
469
479
|
private kept(d: Draft, byKind = true): boolean {
|
|
470
|
-
return (this.family === null || this.familyPosts(d).length > 0) && (this.channel === null || d.posts.some((p) => p.platform === this.channel)) && (this.who === null || d.identity === this.who) && (!byKind || this.kindShown === null || d.kind === this.kindShown)
|
|
480
|
+
return ((this.family === null && this.postState === null) || this.familyPosts(d).length > 0) && (this.channel === null || d.posts.some((p) => p.platform === this.channel)) && (this.who === null || d.identity === this.who) && (!byKind || this.kindShown === null || d.kind === this.kindShown)
|
|
471
481
|
}
|
|
472
482
|
|
|
473
483
|
/** the kind the list keeps, or null when the word it remembers is neither a kind of the repo nor one a draft names:
|
|
@@ -585,7 +595,7 @@ export class SocialSt {
|
|
|
585
595
|
|
|
586
596
|
/** the list's view as the address carries it */
|
|
587
597
|
get commsAddress(): string {
|
|
588
|
-
return commsQuery({ fam: this.fam, channel: this.channel, newestFirst: this.newestFirst, who: this.who, kind: this.kind })
|
|
598
|
+
return commsQuery({ fam: this.fam, channel: this.channel, newestFirst: this.newestFirst, who: this.who, kind: this.kind, state: this.postState })
|
|
589
599
|
}
|
|
590
600
|
|
|
591
601
|
/** an address's query: a key it leaves out keeps what the page remembers */
|
|
@@ -599,9 +609,10 @@ export class SocialSt {
|
|
|
599
609
|
if (v.who !== undefined) this.who = v.who
|
|
600
610
|
if (v.channel !== undefined) this.channel = v.channel
|
|
601
611
|
if (v.kind !== undefined) this.kind = v.kind
|
|
612
|
+
if (v.state !== undefined) this.postState = v.state
|
|
602
613
|
// a channel outside the family would hide every draft
|
|
603
614
|
if (this.channel !== null && this.desk != null && !this.channels.includes(this.channel)) this.channel = null
|
|
604
|
-
keep(VIEW, { fam: this.fam, channel: this.channel, newestFirst: this.newestFirst, who: this.who, kind: this.kind })
|
|
615
|
+
keep(VIEW, { fam: this.fam, channel: this.channel, newestFirst: this.newestFirst, who: this.who, kind: this.kind, state: this.postState })
|
|
605
616
|
}
|
|
606
617
|
|
|
607
618
|
/** a filter, the order: the view changes, the address follows it */
|
|
@@ -612,6 +623,8 @@ export class SocialSt {
|
|
|
612
623
|
|
|
613
624
|
/** a draft, or one message of its series: the list stops hiding a draft opened from elsewhere */
|
|
614
625
|
selectDraft(slug: string | null, part: string | null): void {
|
|
626
|
+
// an address names a group: the post page it may show goes
|
|
627
|
+
this.closePost()
|
|
615
628
|
this.draftSlug = slug
|
|
616
629
|
this.draftPart = part
|
|
617
630
|
const d = slug == null ? undefined : this.drafts.find((x) => x.slug === slug)
|
|
@@ -621,6 +634,7 @@ export class SocialSt {
|
|
|
621
634
|
if (this.channel !== null && !d.posts.some((p) => p.platform === this.channel)) clear.channel = null
|
|
622
635
|
if (this.who !== null && d.identity !== this.who) clear.who = null
|
|
623
636
|
if (this.kind !== null && d.kind !== this.kind) clear.kind = null
|
|
637
|
+
if (this.postState !== null && !d.posts.some((p) => postStateOf(p) === this.postState)) clear.state = null
|
|
624
638
|
if (Object.keys(clear).length > 0) this.applyView(clear)
|
|
625
639
|
}
|
|
626
640
|
}
|
|
@@ -628,6 +642,7 @@ export class SocialSt {
|
|
|
628
642
|
/** a click on a draft, a series' message, a calendar dot */
|
|
629
643
|
pickDraft(slug: string, part: string | null = null): void {
|
|
630
644
|
this.phonePane = 'detail'
|
|
645
|
+
this.closePost()
|
|
631
646
|
this.st.showComms(slug, part)
|
|
632
647
|
}
|
|
633
648
|
|
|
@@ -1186,6 +1201,28 @@ export class SocialSt {
|
|
|
1186
1201
|
}
|
|
1187
1202
|
|
|
1188
1203
|
/** a draft named on the Social page, opened in Communications */
|
|
1204
|
+
/** a post's own page in the middle: its link, its words, its versions, the threads that refer to it */
|
|
1205
|
+
async openPost(slug: string, key: string): Promise<void> {
|
|
1206
|
+
this.postOpen = { slug, key }
|
|
1207
|
+
this.postPage = null
|
|
1208
|
+
this.phonePane = 'detail'
|
|
1209
|
+
try {
|
|
1210
|
+
const r = await fetch(this.url(`api/social/post.json?slug=${encodeURIComponent(slug)}&key=${encodeURIComponent(key)}`))
|
|
1211
|
+
if (!r.ok) throw new Error(await r.text())
|
|
1212
|
+
const o = (await r.json()) as PostObject
|
|
1213
|
+
runInAction(() => {
|
|
1214
|
+
if (this.postOpen?.slug === slug && this.postOpen.key === key) this.postPage = o
|
|
1215
|
+
})
|
|
1216
|
+
} catch (e) {
|
|
1217
|
+
runInAction(() => (this.error = (e as Error).message))
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
closePost(): void {
|
|
1222
|
+
this.postOpen = null
|
|
1223
|
+
this.postPage = null
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1189
1226
|
openDraft(slug: string): void {
|
|
1190
1227
|
this.phonePane = 'detail'
|
|
1191
1228
|
if (this.nav != null) this.nav.draft(slug)
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
.so-grow{flex:1;min-width:0}
|
|
9
9
|
.so-ellip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
|
|
10
10
|
.so-light{font-weight:400}
|
|
11
|
-
.so-click{cursor:pointer}
|
|
12
11
|
.so-small{font-size:12px;font-weight:700}
|
|
13
12
|
.so-section{font-size:13.5px;margin-top:var(--s1)}
|
|
14
13
|
.so-good{color:var(--ok)}
|
|
@@ -50,19 +49,14 @@ a.so-icon:visited{color:var(--dim)}
|
|
|
50
49
|
.so-card{background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:var(--s2) var(--s3);display:flex;flex-direction:column;gap:var(--s1);min-width:0}
|
|
51
50
|
.so-foldcard{padding:0;gap:0;overflow:hidden}
|
|
52
51
|
.so-foldcard.t-warn{background:color-mix(in srgb,var(--warn) 8%,var(--panel));color:var(--ink)}
|
|
53
|
-
.so-foldhead{display:flex;align-items:center;gap:var(--s2);padding-right:var(--s2)}
|
|
54
|
-
.so-foldtitle{flex:1;min-width:0;display:flex;align-items:center;gap:var(--s2);border:0;background:none;padding:var(--s2) var(--s3);text-align:left;font-size:13px;cursor:pointer}
|
|
55
|
-
.so-foldtitle b{flex:none}
|
|
56
|
-
.so-summary{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim);font-size:12px}
|
|
57
52
|
.so-foldbody{padding:0 var(--s3) var(--s3);font-size:13px}
|
|
58
|
-
.so-chev{flex:none;display:inline-flex;
|
|
53
|
+
.so-chev{flex:none;display:inline-flex;width:14px;cursor:pointer}
|
|
59
54
|
.so-fold{flex:none;border:0;background:none;color:var(--dim);font-size:12px;padding:0 var(--s1);cursor:pointer}
|
|
60
55
|
.so-fold:hover{color:var(--ink)}
|
|
61
56
|
.so-md p{margin:0 0 var(--s1)}
|
|
62
57
|
.so-md ul,.so-md ol{margin:0 0 var(--s1);padding-left:var(--s4)}
|
|
63
|
-
.so-md code{background:var(--panel2);border-radius:3px;padding:0 var(--s1);font-size:.92em}
|
|
64
58
|
.so-angles{display:flex;flex-direction:column;gap:var(--s1)}
|
|
65
|
-
.so-angles .
|
|
59
|
+
.so-angles .ch{min-height:28px}
|
|
66
60
|
|
|
67
61
|
/* a flush card's rows */
|
|
68
62
|
.so-row{display:flex;align-items:flex-start;gap:var(--s2);padding:var(--s1) var(--s3);border-top:1px solid var(--line);font-size:13px;min-width:0}
|
|
@@ -108,8 +102,8 @@ a.so-icon:visited{color:var(--dim)}
|
|
|
108
102
|
.so-kindwarn{color:var(--warn);margin-right:var(--s1);font-weight:700}
|
|
109
103
|
.so-kindproblem{font-size:12px;color:var(--warn);border-left:3px solid var(--warn);padding:2px var(--s2);background:color-mix(in srgb,var(--warn) 8%,transparent);border-radius:3px}
|
|
110
104
|
/* the next release (next-release.tsx): a dashed section on top of the list, never a draft */
|
|
111
|
-
.so-nextsec{display:flex;flex-direction:column;gap:2px;margin-bottom:var(--s2);padding:var(--s1);border:1px dashed var(--line);border-radius:8px}
|
|
112
|
-
.so-
|
|
105
|
+
.so-nextsec{display:flex;flex-direction:column;gap:2px;margin-bottom:var(--s2);padding:0 0 var(--s1);border:1px dashed var(--line);border-radius:8px;overflow:hidden}
|
|
106
|
+
.so-nextsec>:not(.sh){margin:0 var(--s1)}
|
|
113
107
|
.so-nextrow .so-rowtitle{font-style:italic}
|
|
114
108
|
.so-nextnote{font-size:12px;color:var(--dim);border-left:3px solid var(--line);padding:2px var(--s2)}
|
|
115
109
|
.so-preview{border-style:dashed}
|
|
@@ -206,8 +200,7 @@ a.so-kind:hover{text-decoration:underline}
|
|
|
206
200
|
|
|
207
201
|
/* the calendar */
|
|
208
202
|
.so-cal{flex:none;border-bottom:1px solid var(--line);background:var(--panel);padding:var(--s1) var(--s3) var(--s2)}
|
|
209
|
-
.so-
|
|
210
|
-
.so-calhead .sp{flex:1}
|
|
203
|
+
.so-cal>.ch{margin:calc(-1 * var(--s1)) calc(-1 * var(--s3)) 0}
|
|
211
204
|
.so-legendkinds{display:flex;gap:var(--s3);align-items:center;overflow:hidden;font-size:11px;color:var(--dim)}
|
|
212
205
|
.so-legendkinds > span{display:inline-flex;align-items:center;gap:var(--s1);white-space:nowrap}
|
|
213
206
|
.so-calgrid{display:grid;margin-top:var(--s0)}
|
|
@@ -323,11 +316,8 @@ a.so-go:visited{color:var(--accent)}
|
|
|
323
316
|
/* what a load found wrong (problems.tsx): one folded row in the tree's shape, its count a badge; open, one line a
|
|
324
317
|
problem, a draft's a click to it */
|
|
325
318
|
.so-problems{display:flex;flex-direction:column;font-size:12.5px}
|
|
326
|
-
.so-
|
|
327
|
-
.so-
|
|
328
|
-
.so-probhead:hover,.so-probrow:hover{background:var(--panel2)}
|
|
329
|
-
.so-probcaret{flex:none;width:12px;color:var(--dim)}
|
|
330
|
-
.so-probrow{color:var(--ink);padding-left:calc(var(--s3) + var(--s4) + var(--s2))}
|
|
319
|
+
.so-probrow{display:flex;align-items:center;gap:var(--s2);width:100%;min-width:0;height:26px;padding:0 var(--s3) 0 calc(var(--s3) + var(--s1) + var(--s0));background:none;border:0;border-radius:0;color:var(--ink);text-align:left;cursor:pointer;font-size:12.5px}
|
|
320
|
+
.so-probrow:hover{background:var(--panel2)}
|
|
331
321
|
.so-probrow b{flex:none;max-width:55%;font-weight:600}
|
|
332
322
|
div.so-probrow{cursor:default}
|
|
333
323
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.sptable .tvtable td:first-child{max-width:340px}
|
|
8
8
|
.spname{display:inline-flex;align-items:baseline;gap:var(--s1);white-space:nowrap}
|
|
9
9
|
.spind{display:inline-block;flex:none}
|
|
10
|
-
.spcaret{display:inline-flex;align-items:center;justify-content:center;width:14px;flex:none;
|
|
10
|
+
.spcaret{display:inline-flex;align-items:center;justify-content:center;width:14px;flex:none;transform:translateY(1px)}
|
|
11
11
|
.spfile{color:var(--ink);text-decoration:none}
|
|
12
12
|
.spfile:hover{color:var(--accent);text-decoration:underline}
|
|
13
13
|
.spkey{margin-left:var(--s2);font:11px ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
@@ -109,7 +109,11 @@ const StoreCard = observer(({ so, s, on }: { so: StoresSt; s: StoreView; on: boo
|
|
|
109
109
|
</div>
|
|
110
110
|
<div className="sto-files">
|
|
111
111
|
{s.files.map((f) => (
|
|
112
|
-
|
|
112
|
+
'href' in f ? (
|
|
113
|
+
<a key={f.href} href={f.href} onClick={(e) => e.stopPropagation()} title="open its thread">{f.label} ↗</a>
|
|
114
|
+
) : (
|
|
115
|
+
<a key={f.abs} href={editorHref('', f.abs) ?? '#'} onClick={(e) => e.stopPropagation()} title={`open ${f.abs} in VS Code`}>{f.label} ↗</a>
|
|
116
|
+
)
|
|
113
117
|
))}
|
|
114
118
|
</div>
|
|
115
119
|
</div>
|
|
@@ -128,7 +132,7 @@ function useFocus(so: StoresSt): void {
|
|
|
128
132
|
}, [focus, ready, so])
|
|
129
133
|
}
|
|
130
134
|
|
|
131
|
-
const Md = ({ text }: { text: string }) => <div className="sto-md" dangerouslySetInnerHTML={{ __html: renderMd(text) }} />
|
|
135
|
+
const Md = ({ text }: { text: string }) => <div className="md mdflow sto-md" dangerouslySetInnerHTML={{ __html: renderMd(text) }} />
|
|
132
136
|
|
|
133
137
|
const StoreTexts = observer(({ so }: { so: StoresSt }) => {
|
|
134
138
|
const s = so.current
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// THE row of a thread in a list, on every page that lists threads (the threads page, the inbox). Where the list is
|
|
2
|
+
// wide enough, ONE line: the title cut with an ellipsis (the whole title and the hidden words on hover), then muted at
|
|
3
|
+
// the right what it waits on as a glyph, the holder's light, the age; a 20px picture at its start. Narrower, the title
|
|
4
|
+
// on two lines and the meta under it. A thread that waits on nothing of his (no verb) reads idle: a dim title, no
|
|
5
|
+
// glyph. Rows part by a hairline, never a box each. Its look lives in controls.css (.rv-row, .tr*) and nowhere else.
|
|
6
|
+
//
|
|
7
|
+
// the one constraint a reader breaks first: a row carries at most ONE pill, and only for what is exceptional and needs
|
|
8
|
+
// him (broken, on his turn). Who acts now, the lane, the state are muted words, a glyph or a dot, never a pill:
|
|
9
|
+
// tests/hub-thread-row.test.ts fails a row that grows a pill set again, that loses its one line, and a list that draws
|
|
10
|
+
// a thread row of its own
|
|
11
|
+
import type { ReactNode } from 'react'
|
|
12
|
+
import { BAND_WORDS, type Band } from '../../review/band.ts'
|
|
13
|
+
import type { OwnerWait } from '../../review/wait.ts'
|
|
14
|
+
import type { ClockSvc } from './clock-svc.ts'
|
|
15
|
+
import { Icon, ICON } from './icons.tsx'
|
|
16
|
+
import { TimeAgo } from './time-ago.tsx'
|
|
17
|
+
|
|
18
|
+
/** who acts now on a thread, its band (review/band.ts): his turn, set aside, a live agent, an agent's move nobody works, nobody */
|
|
19
|
+
export type RowTurn = Band
|
|
20
|
+
|
|
21
|
+
/** the one pill a row may carry: something exceptional, in its words */
|
|
22
|
+
export type RowPill = { words: string; tone: 'red' | 'warn'; title?: string }
|
|
23
|
+
|
|
24
|
+
export type ThreadRowProps = {
|
|
25
|
+
/** the thread's head id, `data-head` on the row */
|
|
26
|
+
head: string
|
|
27
|
+
title: string
|
|
28
|
+
/** the row the page shows open */
|
|
29
|
+
on?: boolean
|
|
30
|
+
/** handled: nobody owes anything on it */
|
|
31
|
+
muted?: boolean
|
|
32
|
+
/** agent words he has not read */
|
|
33
|
+
unread?: boolean
|
|
34
|
+
/** a real picture's url; no picture, no square */
|
|
35
|
+
thumb?: string | null
|
|
36
|
+
/** the dot of who acts now; leave it out where the group's head already says it */
|
|
37
|
+
turn?: RowTurn
|
|
38
|
+
/** the verb it waits on from him; none, and the row reads idle */
|
|
39
|
+
need?: OwnerWait
|
|
40
|
+
/** what the verb asks, on its glyph's hover */
|
|
41
|
+
needSays?: string
|
|
42
|
+
/** the icon of what waits on him first (review/object-panel.tsx waitGlyph): its name, its path, its words */
|
|
43
|
+
glyph?: { name: string; d: string; says: string; hue?: number | null } | null
|
|
44
|
+
/** the project, where a list spans several */
|
|
45
|
+
project?: string
|
|
46
|
+
/** who holds it, plain words with its light (kit.tsx HolderChip plain), and what it does now */
|
|
47
|
+
holder?: ReactNode
|
|
48
|
+
/** more plain words of the meta (« v2 », « auto », « back Fri 10:00 »), each its own span */
|
|
49
|
+
words?: readonly ReactNode[]
|
|
50
|
+
/** the holder's name and the words as text, under the title in its tooltip: one line shows neither */
|
|
51
|
+
hint?: string
|
|
52
|
+
/** the newest move, its age at the line's end */
|
|
53
|
+
at?: number
|
|
54
|
+
/** the one clock of the page (clock-svc.ts), or a store that reads it */
|
|
55
|
+
clock?: Pick<ClockSvc, 'now'>
|
|
56
|
+
pill?: RowPill | null
|
|
57
|
+
/** the row's words on hover */
|
|
58
|
+
tip?: string
|
|
59
|
+
/** a link row (the inbox), else a click row */
|
|
60
|
+
href?: string
|
|
61
|
+
onClick?: (e: React.MouseEvent) => void
|
|
62
|
+
ref?: React.Ref<HTMLDivElement & HTMLAnchorElement>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const TURN_TIP = BAND_WORDS
|
|
66
|
+
|
|
67
|
+
/** a verb of his turn as its glyph, the word for a screen reader and on hover: the row, the threads filter and the
|
|
68
|
+
* inbox's « what to do » draw the same four */
|
|
69
|
+
export const VerbGlyph = ({ verb, says }: { verb: OwnerWait; says?: string }) => (
|
|
70
|
+
<span className={`trverb v-${verb}`} title={says ?? verb} role="img" aria-label={verb}><Icon d={ICON[verb]} /></span>
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
export const ThreadRow = (p: ThreadRowProps) => {
|
|
74
|
+
const cls = `rv-row one${p.on ? ' on' : ''}${p.muted ? ' muted' : ''}${p.need ? ' waiting' : ' idle'}`
|
|
75
|
+
const body = (
|
|
76
|
+
<>
|
|
77
|
+
{p.thumb ? <img className="trthumb" src={p.thumb} alt="" loading="lazy" /> : null}
|
|
78
|
+
<div className="trbody">
|
|
79
|
+
<div className="rv-rowtitle" title={p.hint ? `${p.title}\n${p.hint}` : p.title}>
|
|
80
|
+
{p.unread ? <i className="trunread" title="a message of the agent to read" /> : null}
|
|
81
|
+
{p.glyph ? <span className="trglyph" data-glyph={p.glyph.name} title={p.glyph.says} role="img" aria-label={p.glyph.says} {...(p.glyph.hue != null ? { 'data-hue': '', style: { ['--kh' as string]: p.glyph.hue } } : {})}><Icon d={p.glyph.d} /></span> : null}
|
|
82
|
+
{p.title}
|
|
83
|
+
</div>
|
|
84
|
+
<div className="trmeta">
|
|
85
|
+
{p.turn ? <i className={`trturn turn-${p.turn}`} title={TURN_TIP[p.turn]} aria-label={TURN_TIP[p.turn]} /> : null}
|
|
86
|
+
{p.pill ? <span className={`trpill ${p.pill.tone}`} title={p.pill.title}>{p.pill.words}</span> : null}
|
|
87
|
+
{p.need ? <VerbGlyph verb={p.need} {...(p.needSays ? { says: p.needSays } : {})} /> : null}
|
|
88
|
+
{p.project ? <span className="trm">{p.project}</span> : null}
|
|
89
|
+
{p.holder ? <span className="trm trholder">{p.holder}</span> : null}
|
|
90
|
+
{(p.words ?? []).map((w, i) => <span key={i} className="trm">{w}</span>)}
|
|
91
|
+
{p.at != null && p.clock ? <span className="trm trage"><TimeAgo clock={p.clock} at={p.at} short /></span> : null}
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</>
|
|
95
|
+
)
|
|
96
|
+
return p.href != null ? (
|
|
97
|
+
<a ref={p.ref} data-head={p.head} className={cls} href={p.href} title={p.tip} onClick={p.onClick}>{body}</a>
|
|
98
|
+
) : (
|
|
99
|
+
<div ref={p.ref} data-head={p.head} className={cls} title={p.tip} onClick={p.onClick}>{body}</div>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
@@ -21,8 +21,9 @@ export const stampWords = (at: number): string => {
|
|
|
21
21
|
return `${d.toLocaleDateString()} ${d.toLocaleTimeString()}`
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/** `short`: the age alone (« 20m »), for a slot too thin for « ago » */
|
|
25
|
+
export const TimeAgo = observer(({ clock, at, stamp, short }: { clock: Pick<ClockSvc, 'now'>; at: number; stamp?: boolean; short?: boolean }) => (
|
|
26
|
+
<span className="ago" title={stampWords(at)}>{stamp === true ? `${stampWords(at)} ` : ''}{short === true ? ageWords(at, clock.now).replace(/ ago$/, '') : ageWords(at, clock.now)}</span>
|
|
26
27
|
))
|
|
27
28
|
|
|
28
29
|
/** a moment ahead, in words that move with the clock, with the exact stamp in
|
|
@@ -12,6 +12,7 @@ import { group, Hint } from './time-charts.tsx'
|
|
|
12
12
|
import type { HomeSt } from './home-st.ts'
|
|
13
13
|
import { KeptCols, LIST_COL, PANEL } from './kept-cols.tsx'
|
|
14
14
|
import { entriesOf, TITLES } from './time-pages.tsx'
|
|
15
|
+
import { SectionHead } from './section-head.tsx'
|
|
15
16
|
|
|
16
17
|
const SINCE_WORDS: Record<Since, string> = { '1d': '1 day', '7d': '7 days', '30d': '30 days' }
|
|
17
18
|
|
|
@@ -23,7 +24,7 @@ const EntryList = observer(({ app }: { app: HomeSt }) => {
|
|
|
23
24
|
<nav className="tvlist rv-scroll" aria-label="the pages of the time view">
|
|
24
25
|
{entries.map((e, i) => (
|
|
25
26
|
<div key={e.id}>
|
|
26
|
-
{i === 0 || entries[i - 1]?.group !== e.group ? <
|
|
27
|
+
{i === 0 || entries[i - 1]?.group !== e.group ? <SectionHead label={e.group} /> : null}
|
|
27
28
|
<button type="button" className={`tventry${st.entry === e.id ? ' on' : ''}`} aria-current={st.entry === e.id ? 'page' : undefined} onClick={() => st.setEntry(e.id)}>
|
|
28
29
|
<Hint tip={TITLES[e.id]}>{e.label}</Hint>
|
|
29
30
|
<em>{d == null ? '' : e.figure(d)}</em>
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
/* the left panel */
|
|
12
12
|
.tvlist{padding:0 0 var(--s4)}
|
|
13
|
-
/* a section header: a darker band across the whole row, so it reads as a header and never as an entry */
|
|
14
|
-
.tvgroup{margin:var(--s2) 0 var(--s1);padding:var(--s1) var(--s4);background:var(--hi2);color:var(--ink);font-size:11px;font-weight:650;letter-spacing:.06em;text-transform:uppercase}
|
|
15
|
-
.tvlist > div:first-child .tvgroup{margin-top:0}
|
|
16
13
|
.tventry{display:flex;align-items:center;justify-content:space-between;gap:var(--s2);width:100%;height:30px;padding:0 var(--s4);background:none;border:0;border-radius:0;color:var(--dim);font:inherit;font-size:13px;text-align:left;cursor:pointer;white-space:nowrap}
|
|
17
14
|
.tventry span{overflow:hidden;text-overflow:ellipsis}
|
|
18
15
|
.tventry em{flex:none;font-style:normal;font-size:11.5px;font-variant-numeric:tabular-nums}
|
|
@@ -96,7 +93,7 @@
|
|
|
96
93
|
/* the table of every figure; a table wider than the page scrolls by itself, the page never does */
|
|
97
94
|
.tvwide{overflow-x:auto}
|
|
98
95
|
.tvtable{width:100%;border-collapse:collapse;font-size:13px}
|
|
99
|
-
/* its header row's look is every table's (
|
|
96
|
+
/* its header row's look is every table's (markdown.css .md th) */
|
|
100
97
|
.tvtable th{text-align:left;padding:var(--s1) var(--s3) var(--s1) var(--s2);border-bottom:1px solid var(--line);white-space:nowrap}
|
|
101
98
|
.tvtable td{padding:var(--s1) var(--s3) var(--s1) var(--s2);border-bottom:1px solid var(--hi3);vertical-align:top;white-space:nowrap}
|
|
102
99
|
.tvtable td:first-child{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -113,7 +110,7 @@
|
|
|
113
110
|
.tvsort:hover{color:var(--ink)}
|
|
114
111
|
.tvsort.on{color:var(--ink)}
|
|
115
112
|
.tvtable td.tvmore{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--dim)}
|
|
116
|
-
.tvfold{display:inline-block;width:var(--s4);font-style:normal;line-height:1;vertical-align:middle
|
|
113
|
+
.tvfold{display:inline-block;width:var(--s4);font-style:normal;line-height:1;vertical-align:middle}
|
|
117
114
|
.tvtable tr.tvchild td{border-bottom-color:transparent;color:var(--dim);font-size:12.5px}
|
|
118
115
|
.tvtable tr.tvchild td:first-child{padding-left:var(--s4);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
|
|
119
116
|
.tvtip{max-width:560px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12.5px;line-height:1.4}
|