rvlib-shipkit 1.2.0 → 1.4.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 +104 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/asks/asks-queue.ts +4 -2
- package/src/assets/kits/identity-kit.ts +15 -13
- package/src/assets/run-assets.ts +15 -10
- package/src/check.ts +26 -10
- package/src/checks/SK001-package-json-shape.check.ts +34 -5
- package/src/checks/SK002-contracts-fulfillness.check.ts +3 -3
- package/src/checks/SK004-gitignore-policy.check.ts +11 -3
- package/src/checks/SK005-rvlib-versions.check.ts +13 -1
- package/src/checks/SK006-npm-publish-safety.check.ts +5 -0
- package/src/checks/SK007-github-visibility.check.ts +9 -9
- package/src/checks/SK008-reviewer-agent.check.ts +14 -8
- package/src/checks/SK009-commit-ai-tells.check.ts +103 -61
- package/src/checks/SK013-one-way-in-policy.check.ts +10 -2
- package/src/checks/SK014-prose-ste.check.ts +16 -6
- package/src/checks/SK015-nested-repo.check.ts +5 -1
- package/src/checks/SK016-legacy-check-shapes.check.ts +11 -5
- package/src/checks/SK017-vscode-hub-task.check.ts +7 -0
- package/src/checks/SK022-machine-runs-the-pin.check.ts +6 -2
- package/src/checks/SK024-identity-colors.check.ts +5 -0
- package/src/checks/SK025-release-drift.check.ts +58 -0
- package/src/checks/SK026-asks-autoclose.check.ts +44 -0
- package/src/checks/SK027-agent-wiki-links.check.ts +50 -0
- package/src/checks/SK028-readme.check.ts +83 -0
- package/src/cli/cmd_Assets.ts +1 -1
- package/src/cli/cmd_Ci.ts +5 -0
- package/src/cli/cmd_CrossRepoActivity.ts +119 -0
- package/src/cli/cmd_GlobalProcesses.ts +155 -0
- package/src/cli/cmd_Keys.ts +17 -3
- package/src/cli/cmd_Overview.ts +98 -0
- package/src/cli/cmd_Planned.ts +117 -0
- package/src/cli.ts +9 -1
- package/src/collections/checks.ts +3 -2
- package/src/collections/collection-types.ts +15 -0
- package/src/collections/providers.ts +7 -3
- package/src/collections/test-time.ts +10 -1
- package/src/contracts/apply-contracts.ts +9 -8
- package/src/contracts/contract-types.ts +8 -2
- package/src/contracts/contracts-engine.ts +34 -13
- package/src/contracts/manifests/identity.contract.ts +6 -5
- package/src/contracts/manifests/social.contract.ts +4 -2
- package/src/contracts/manifests/steam.contract.ts +7 -3
- package/src/contracts/web-surface.ts +59 -0
- package/src/core/agent-spawn.ts +46 -0
- package/src/core/archived.ts +82 -0
- package/src/core/budget.ts +19 -9
- package/src/core/canonical-scripts.ts +12 -3
- package/src/core/check-runner.ts +66 -17
- package/src/core/discover-checks.ts +10 -5
- package/src/core/file-stamp.ts +20 -0
- package/src/{checks/SK021-github-login.check.ts → core/gh-login.ts} +45 -54
- package/src/core/identity-color.ts +1 -1
- package/src/core/layout.ts +2 -0
- package/src/core/motherhome.ts +88 -66
- package/src/core/repo-facts.ts +14 -0
- package/src/core/retention.ts +14 -5
- package/src/core/retired-checks.ts +7 -0
- package/src/core/run-check.ts +8 -7
- package/src/core/run-ci.ts +46 -15
- package/src/core/run-fix.ts +7 -2
- package/src/core/run-fixers.ts +10 -6
- package/src/core/wire.ts +49 -9
- package/src/fleet/scan-fleet.ts +2 -1
- package/src/home/activity-shape.ts +138 -0
- package/src/home/activity.ts +256 -0
- package/src/home/global-units.ts +3 -2
- package/src/home/gui-app/ShipkitGui.swift +144 -25
- package/src/home/gui-app.ts +93 -30
- package/src/home/home-launchd.ts +10 -2
- package/src/home/home-routes.ts +34 -6
- package/src/home/home-start.ts +33 -5
- package/src/home/machine-stores.ts +4 -2
- package/src/home/open-app.ts +23 -10
- package/src/home/pm-config.ts +15 -11
- package/src/home/pm-inputs.ts +76 -0
- package/src/home/pm.ts +40 -7
- package/src/home/process-rows.ts +222 -0
- package/src/home/resources.ts +99 -20
- package/src/home/run-daemon.ts +12 -7
- package/src/home/run-pm.ts +30 -5
- package/src/home/serve-web.ts +6 -3
- package/src/home/supervise.ts +16 -1
- package/src/home/widget-text.ts +119 -0
- package/src/home/widgets.ts +32 -3
- package/src/hooks/commit-message.ts +2 -3
- package/src/hooks/run-hooks.ts +32 -5
- package/src/ledger/db.ts +1 -1
- package/src/ledger/gate-checks.ts +20 -6
- package/src/ledger/house-runs.ts +43 -0
- package/src/ledger/live-timeline.ts +4 -19
- package/src/ledger/run-log.ts +39 -10
- package/src/ledger/store.ts +30 -2
- package/src/ledger/world-cache.ts +63 -14
- package/src/plan/cadence.ts +21 -5
- package/src/plan/catch-up.ts +37 -0
- package/src/plan/plan-timeline.ts +99 -0
- package/src/plan/planner.ts +138 -13
- package/src/plan/repo-source.ts +120 -8
- package/src/release/run-release.ts +9 -2
- package/src/release/unit-resolve.ts +8 -12
- package/src/repo-config.ts +17 -4
- package/src/serve/house-runs.ts +53 -0
- package/src/serve/hub-app/activity-st.ts +168 -0
- package/src/serve/hub-app/activity-view.tsx +218 -0
- package/src/serve/hub-app/activity.css +78 -0
- package/src/serve/hub-app/admin-svc.ts +41 -0
- package/src/serve/hub-app/admin-view.tsx +42 -0
- package/src/serve/hub-app/chart-view.ts +12 -5
- package/src/serve/hub-app/check-words.ts +2 -0
- package/src/serve/hub-app/checks-svc.ts +2 -1
- package/src/serve/hub-app/col-tables-view.tsx +124 -0
- package/src/serve/hub-app/col-tables.ts +115 -0
- package/src/serve/hub-app/cols-svc.ts +28 -0
- package/src/serve/hub-app/controls.css +32 -0
- package/src/serve/hub-app/cycle-button.tsx +36 -0
- package/src/serve/hub-app/dock-anim.ts +25 -0
- package/src/serve/hub-app/dock-st.ts +329 -0
- package/src/serve/hub-app/dock-view.tsx +68 -0
- package/src/serve/hub-app/dock.css +35 -0
- package/src/serve/hub-app/hash-route.ts +7 -1
- package/src/serve/hub-app/header-bar.tsx +79 -104
- package/src/serve/hub-app/home-st.ts +50 -13
- package/src/serve/hub-app/home-strip.css +81 -23
- package/src/serve/hub-app/home-strip.tsx +243 -102
- package/src/serve/hub-app/home.html +4 -0
- package/src/serve/hub-app/hub-app.tsx +103 -161
- package/src/serve/hub-app/hub-types.ts +6 -3
- package/src/serve/hub-app/hub.css +101 -39
- package/src/serve/hub-app/icons.tsx +27 -3
- package/src/serve/hub-app/index.html +4 -0
- package/src/serve/hub-app/keys.ts +44 -9
- package/src/serve/hub-app/live-svc.ts +24 -64
- package/src/serve/hub-app/machine-st.ts +65 -13
- package/src/serve/hub-app/md.ts +38 -5
- package/src/serve/hub-app/next-run.ts +1 -1
- package/src/serve/hub-app/palette-st.ts +13 -9
- package/src/serve/hub-app/palette-view.tsx +47 -0
- package/src/serve/hub-app/pill-row.tsx +65 -0
- package/src/serve/hub-app/planned-st.ts +21 -85
- package/src/serve/hub-app/planned-view.tsx +12 -7
- package/src/serve/hub-app/planned.css +5 -2
- package/src/serve/hub-app/project-list.css +43 -21
- package/src/serve/hub-app/project-list.tsx +122 -23
- package/src/serve/hub-app/projects-svc.ts +120 -12
- package/src/serve/hub-app/readme-svc.ts +38 -0
- package/src/serve/hub-app/readme-view.tsx +19 -0
- package/src/serve/hub-app/readme.css +11 -0
- package/src/serve/hub-app/repo-sections.tsx +61 -0
- package/src/serve/hub-app/repo-st.ts +26 -7
- package/src/serve/hub-app/runs-tabs.ts +1 -1
- package/src/serve/hub-app/sidebar.tsx +84 -0
- package/src/serve/hub-app/tests-view.tsx +31 -4
- package/src/serve/hub-app/timeline-chart.tsx +31 -27
- package/src/serve/hub-app/timeline-geometry.ts +40 -5
- package/src/serve/hub-app/timeline-svc.ts +2 -2
- package/src/serve/hub-app/timeline-view.tsx +29 -9
- package/src/serve/hub-runtime.ts +17 -9
- package/src/serve/other-repos.ts +8 -45
- package/src/serve/project-gutter-route.ts +100 -20
- package/src/serve/project-gutter.ts +34 -13
- package/src/serve/readme-route.ts +57 -0
- package/src/serve/serve-hub.ts +13 -8
- package/src/serve/tracked-watch.ts +33 -1
- package/src/serve/warm-cell.ts +49 -16
- package/src/shipkit-files.ts +20 -4
- package/src/suite/judge-suites.ts +42 -17
- package/src/suite/suite-cli.ts +5 -8
- package/src/wiki/lint-md.ts +2 -0
- package/src/wiki/scan-md.ts +37 -10
- package/src/checks/SK023-stores-under-cap.check.ts +0 -49
- package/src/checks/contracts.check.ts +0 -20
|
@@ -165,9 +165,7 @@ export function resolveUnits(root: string, config: RepoConfig, io: UnitReader):
|
|
|
165
165
|
tagTemplate: rc.tag ?? ROOT_TAG,
|
|
166
166
|
changelogRel: rc.changelog ?? 'CHANGELOG.md',
|
|
167
167
|
npm: rc.npm,
|
|
168
|
-
|
|
169
|
-
// declaration, and a public root package publishes by default
|
|
170
|
-
npmWhenUndeclared: 'from-private-flag',
|
|
168
|
+
undeclaredFix: 'add `release: { npm: true }` to repo.config.ts to publish it',
|
|
171
169
|
githubRelease: rc.githubRelease ?? true,
|
|
172
170
|
tsconfigRel: rc.tsconfig,
|
|
173
171
|
checkFolderName: false,
|
|
@@ -204,7 +202,7 @@ export function resolveUnits(root: string, config: RepoConfig, io: UnitReader):
|
|
|
204
202
|
tagTemplate: decl.tag ?? SUB_TAG,
|
|
205
203
|
changelogRel: decl.changelog ?? `${decl.dir}/CHANGELOG.md`,
|
|
206
204
|
npm: decl.npm,
|
|
207
|
-
|
|
205
|
+
undeclaredFix: 'add `npm: true` to this units[] entry to publish it',
|
|
208
206
|
githubRelease: decl.githubRelease ?? false,
|
|
209
207
|
tsconfigRel: decl.tsconfig,
|
|
210
208
|
// only the DEFAULT tag renders the package name into a git tag, so
|
|
@@ -226,11 +224,9 @@ function build(p: {
|
|
|
226
224
|
tagTemplate: string
|
|
227
225
|
changelogRel: string
|
|
228
226
|
npm: boolean | undefined
|
|
229
|
-
/**
|
|
230
|
-
* package
|
|
231
|
-
|
|
232
|
-
* ambiguous and REFUSES. */
|
|
233
|
-
npmWhenUndeclared: 'from-private-flag' | 'refuse'
|
|
227
|
+
/** where this unit's npm declaration goes, for the refusal a non-private
|
|
228
|
+
* package with no `npm` key gets */
|
|
229
|
+
undeclaredFix: string
|
|
234
230
|
githubRelease: boolean
|
|
235
231
|
tsconfigRel: string | undefined
|
|
236
232
|
checkFolderName: boolean
|
|
@@ -256,10 +252,10 @@ function build(p: {
|
|
|
256
252
|
// about must refuse, not quietly resolve to no-publish. A silent false
|
|
257
253
|
// here is a lib that bumps, tags and cuts a release while publishing
|
|
258
254
|
// nothing, and the only trace is one note line in a long log.
|
|
259
|
-
if (p.npm == null && !isPrivate
|
|
260
|
-
errors.push(at(
|
|
255
|
+
if (p.npm == null && !isPrivate)
|
|
256
|
+
errors.push(at(`package.json is not private and no npm target is declared: ${p.undeclaredFix}, or \`private: true\` to its package.json to keep it internal`))
|
|
261
257
|
if (errors.length > 0) return { error: errors }
|
|
262
|
-
const declaredNpm = p.npm
|
|
258
|
+
const declaredNpm = p.npm === true
|
|
263
259
|
const tsconfig = p.tsconfigRel != null ? join(p.root, p.tsconfigRel) : join(p.dir, 'tsconfig.json')
|
|
264
260
|
return {
|
|
265
261
|
unit: {
|
package/src/repo-config.ts
CHANGED
|
@@ -146,12 +146,17 @@ export type RepoConfig = {
|
|
|
146
146
|
/** notify command for new RED needs while the hub serves, `{message}` substituted, as in a push-notification CLI */
|
|
147
147
|
notifyCommand?: string
|
|
148
148
|
/** the `.shipkit/<venue>/` release contracts: which ones this repo is excused
|
|
149
|
-
* from,
|
|
149
|
+
* from, any manifest the published toolkit does not carry, and the dir
|
|
150
|
+
* its site serves when the deploy does not say. */
|
|
150
151
|
contracts?: {
|
|
151
152
|
/** venue id to the reason it is waived. The only bypass, and it always prints */
|
|
152
153
|
exempt?: Record<string, string>
|
|
153
154
|
/** manifests declared by this repo, beside the built-in venues */
|
|
154
155
|
extra?: ContractManifest[]
|
|
156
|
+
/** the dir the site serves, repo-relative, where the identity contract
|
|
157
|
+
* wants favicon.png, og.png and logo.*. Absent: the dir the deploy names
|
|
158
|
+
* (a Pages workflow's artifact path, a wrangler output dir), else `public` */
|
|
159
|
+
webRoot?: string
|
|
155
160
|
}
|
|
156
161
|
/** repo-contributed .gitignore lines, rendered INSIDE rule SK004's managed
|
|
157
162
|
* block — for ecosystem-specific names the published lib may not carry */
|
|
@@ -185,8 +190,16 @@ export type RepoConfig = {
|
|
|
185
190
|
* lint and prints a skip line carrying the reason. `defineRepo` throws on
|
|
186
191
|
* an unknown id or a blank reason */
|
|
187
192
|
ruleExempt?: Record<string, string>
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
193
|
+
/** the repo is done for now: nothing processes it. The house discovery
|
|
194
|
+
* leaves it out, so it has no rail row, no hub (no file watch, no plan
|
|
195
|
+
* rows, no automatic gates), no processes or widgets, no identity fill,
|
|
196
|
+
* no activity row, and fleet skips it. Only the archived page lists it.
|
|
197
|
+
* The button in the repo header and the page's unarchive toggle it, and
|
|
198
|
+
* only this key moves (core/archived.ts) */
|
|
199
|
+
archived?: boolean
|
|
200
|
+
/** declared github visibility INTENT (absent = 'private'): public means
|
|
201
|
+
* strangers read the tracked tree. What each check does with it:
|
|
202
|
+
* wiki/build/shipkit/built-in-checks.md */
|
|
190
203
|
visibility?: 'private' | 'public'
|
|
191
204
|
/** the reviewer agent type this repo declares: `.claude/agents/<name>.md`,
|
|
192
205
|
* whose system prompt points at `brief` (an md file holding the standing
|
|
@@ -287,7 +300,7 @@ export type RepoConfig = {
|
|
|
287
300
|
logDir?: string
|
|
288
301
|
}
|
|
289
302
|
|
|
290
|
-
const KNOWN_KEYS = new Set(['name', 'venues', 'social', 'docsBase', 'defaults', 'tasks', 'asks', 'creds', 'credsCommand', 'credsReadCommand', 'notifyCommand', 'contracts', 'gitignore', 'untrackGenerated', 'nested', 'when', 'budgets', 'ruleExempt', 'visibility', 'reviewer', 'oneWayIn', 'rules', 'release', 'units', 'notReleasable', 'hooks', 'checkDefaults', 'tui', 'serve', 'identity', 'logDir', 'prose', 'smoke', 'tests'])
|
|
303
|
+
const KNOWN_KEYS = new Set(['name', 'venues', 'social', 'docsBase', 'defaults', 'tasks', 'asks', 'creds', 'credsCommand', 'credsReadCommand', 'notifyCommand', 'contracts', 'gitignore', 'untrackGenerated', 'nested', 'when', 'budgets', 'ruleExempt', 'visibility', 'archived', 'reviewer', 'oneWayIn', 'rules', 'release', 'units', 'notReleasable', 'hooks', 'checkDefaults', 'tui', 'serve', 'identity', 'logDir', 'prose', 'smoke', 'tests'])
|
|
291
304
|
|
|
292
305
|
const KEBAB = /^[a-z0-9][a-z0-9-]*$/
|
|
293
306
|
const words = (v: unknown): boolean => Array.isArray(v) && v.length > 0 && v.every((w) => typeof w === 'string')
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// The dock's data on the server: every house repo's record, read for the
|
|
2
|
+
// live window and shaped into one view (ledger/house-runs.ts). One instance
|
|
3
|
+
// serves every page that asks, the home's daemon and a hub serving on its own
|
|
4
|
+
// alike.
|
|
5
|
+
//
|
|
6
|
+
// the one constraint a reader breaks first: this is asked every few seconds
|
|
7
|
+
// while a dock is open, so nothing here may cost a record read when nothing
|
|
8
|
+
// moved. A repo's record is opened only when its db or its write ahead log
|
|
9
|
+
// changed since the last read (the window only slides, and the shaping drops
|
|
10
|
+
// what slid out), and one shaped answer serves every request inside SHARE_MS.
|
|
11
|
+
import { existsSync } from 'fs'
|
|
12
|
+
import { parallelCap } from '../core/parallel.ts'
|
|
13
|
+
import { shapeHouse, type HouseRecord, type HouseView } from '../ledger/house-runs.ts'
|
|
14
|
+
import { LIVE_HISTORY_MS } from '../ledger/live-timeline.ts'
|
|
15
|
+
import { readWindowReadonly } from '../ledger/run-log.ts'
|
|
16
|
+
import { recordOf, recordStamp } from './project-gutter.ts'
|
|
17
|
+
|
|
18
|
+
/** how long one shaped answer serves every page that asks */
|
|
19
|
+
export const SHARE_MS = 1_000
|
|
20
|
+
|
|
21
|
+
export type HouseRepo = { name: string; path: string }
|
|
22
|
+
|
|
23
|
+
export class HouseRuns {
|
|
24
|
+
private records = new Map<string, { stamp: string; rec: HouseRecord }>()
|
|
25
|
+
private shaped: { at: number; view: HouseView } | null = null
|
|
26
|
+
/** records opened since this instance was built: what a test measures */
|
|
27
|
+
reads = 0
|
|
28
|
+
|
|
29
|
+
constructor(private list: () => HouseRepo[], private now: () => number = Date.now, private cap: () => number = parallelCap) {}
|
|
30
|
+
|
|
31
|
+
view(): HouseView {
|
|
32
|
+
const now = this.now()
|
|
33
|
+
if (this.shaped != null && now - this.shaped.at < SHARE_MS) return this.shaped.view
|
|
34
|
+
const since = now - LIVE_HISTORY_MS
|
|
35
|
+
const next = new Map<string, { stamp: string; rec: HouseRecord }>()
|
|
36
|
+
for (const r of this.list()) {
|
|
37
|
+
const path = recordOf(r.path)
|
|
38
|
+
if (path == null || !existsSync(path)) continue
|
|
39
|
+
const stamp = recordStamp(path)
|
|
40
|
+
let hit = this.records.get(r.path)
|
|
41
|
+
if (hit == null || hit.stamp !== stamp) {
|
|
42
|
+
this.reads++
|
|
43
|
+
hit = { stamp, rec: { repo: r.name, ...readWindowReadonly(path, since) } }
|
|
44
|
+
} else if (hit.rec.repo !== r.name) hit = { stamp, rec: { ...hit.rec, repo: r.name } }
|
|
45
|
+
next.set(r.path, hit)
|
|
46
|
+
}
|
|
47
|
+
// a repo gone from the list takes its rows with it
|
|
48
|
+
this.records = next
|
|
49
|
+
const view = shapeHouse({ now, cap: this.cap(), repos: [...next.values()].map((x) => x.rec) })
|
|
50
|
+
this.shaped = { at: now, view }
|
|
51
|
+
return view
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// the activity page's state: what every house repo committed in a window and
|
|
2
|
+
// what it holds uncommitted, as the daemon reads it from local git. It asks
|
|
3
|
+
// again every ACTIVITY_POLL_MS, only while the page is shown AND the tab is
|
|
4
|
+
// visible, so a page left in the background costs the daemon nothing. The
|
|
5
|
+
// window and the commit cap are remembered per viewer.
|
|
6
|
+
import { makeAutoObservable, observableRef, runInAction } from 'mobx'
|
|
7
|
+
import { clampCap, DEFAULT_CAP, DEFAULT_MINUTES, idleRow, WINDOW_MINUTES, type ActivityAnswer, type ActivityRow } from '../../home/activity-shape.ts'
|
|
8
|
+
|
|
9
|
+
// the words the page and `shipkit cross-repo-activity` share live beside the shapes
|
|
10
|
+
export { ageShort, CAP_MAX, CAP_MIN, clampCap, DEFAULT_CAP, dirtWords, filesWords, upstreamWords, windowWords } from '../../home/activity-shape.ts'
|
|
11
|
+
import type { HomeSt } from './home-st.ts'
|
|
12
|
+
|
|
13
|
+
export const ACTIVITY_POLL_MS = 60_000
|
|
14
|
+
const MINUTES_KEY = 'home:activity:minutes'
|
|
15
|
+
const CAP_KEY = 'home:activity:cap'
|
|
16
|
+
|
|
17
|
+
/** busy rows in the daemon's (rail) order, then the quiet ones below them */
|
|
18
|
+
export function splitRows(rows: ActivityRow[]): { busy: ActivityRow[]; idle: ActivityRow[] } {
|
|
19
|
+
return { busy: rows.filter((r) => !idleRow(r)), idle: rows.filter(idleRow) }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function kept(key: string): string | null {
|
|
23
|
+
try {
|
|
24
|
+
return globalThis.localStorage?.getItem(key) ?? null
|
|
25
|
+
} catch {
|
|
26
|
+
return null
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function keptMinutes(): number {
|
|
30
|
+
const n = Number(kept(MINUTES_KEY))
|
|
31
|
+
return (WINDOW_MINUTES as readonly number[]).includes(n) ? n : DEFAULT_MINUTES
|
|
32
|
+
}
|
|
33
|
+
function keep(key: string, n: number): void {
|
|
34
|
+
try { globalThis.localStorage?.setItem(key, String(n)) } catch { /* private window: the pick lasts the tab */ }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class ActivitySt {
|
|
38
|
+
data: ActivityAnswer | null = null
|
|
39
|
+
error = ''
|
|
40
|
+
minutes: number = keptMinutes()
|
|
41
|
+
/** the most commits a repo shows before a click shows the rest */
|
|
42
|
+
cap: number = clampCap(kept(CAP_KEY) ?? DEFAULT_CAP)
|
|
43
|
+
/** repos whose commits all show, past the cap */
|
|
44
|
+
expanded = new Set<string>()
|
|
45
|
+
/** repos whose failing and warning checks show under their row */
|
|
46
|
+
checksOpen = new Set<string>()
|
|
47
|
+
/** a read is in flight */
|
|
48
|
+
loading = false
|
|
49
|
+
/** when the next read goes, epoch ms */
|
|
50
|
+
nextAt = 0
|
|
51
|
+
/** the page's clock, one tick a second while shown */
|
|
52
|
+
now = Date.now()
|
|
53
|
+
private timer: ReturnType<typeof setInterval> | null = null
|
|
54
|
+
private gen = 0
|
|
55
|
+
/** a tab coming back reads only when its countdown is already due */
|
|
56
|
+
private readonly onVisible = (): void => {
|
|
57
|
+
if (this.timer != null) this.tick()
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
constructor(private st: HomeSt) {
|
|
61
|
+
makeAutoObservable<this, 'st' | 'timer' | 'gen' | 'onVisible'>(this, { st: false, timer: false, gen: false, onVisible: false, data: observableRef })
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get rows() {
|
|
65
|
+
return splitRows(this.data?.rows ?? [])
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** the answer shown is for another window than the one picked: it dims until the new one lands */
|
|
69
|
+
get stale(): boolean {
|
|
70
|
+
return this.data != null && this.data.minutes !== this.minutes
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** whole seconds to the next read */
|
|
74
|
+
get countdown(): number {
|
|
75
|
+
return Math.max(0, Math.ceil((this.nextAt - this.now) / 1000))
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
setMinutes(m: number): void {
|
|
79
|
+
this.minutes = m
|
|
80
|
+
keep(MINUTES_KEY, m)
|
|
81
|
+
void this.poll()
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** a typed cap, clamped to CAP_MIN..CAP_MAX */
|
|
85
|
+
setCap(v: unknown): void {
|
|
86
|
+
this.cap = clampCap(v)
|
|
87
|
+
keep(CAP_KEY, this.cap)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
toggle(name: string): void {
|
|
91
|
+
if (this.expanded.has(name)) this.expanded.delete(name)
|
|
92
|
+
else this.expanded.add(name)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** a click on the status dot: its checks show under the row, or hide */
|
|
96
|
+
toggleChecks(name: string): void {
|
|
97
|
+
if (this.checksOpen.has(name)) this.checksOpen.delete(name)
|
|
98
|
+
else this.checksOpen.add(name)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
openCheck(repo: string, check: string): void {
|
|
102
|
+
this.st.openCheck(repo, check)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** the repo in Fork, the git client: the daemon opens it by name */
|
|
106
|
+
async openFork(name: string): Promise<void> {
|
|
107
|
+
try {
|
|
108
|
+
const r = await fetch('/api/projects/fork', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ name }) })
|
|
109
|
+
if (!r.ok) throw new Error(await r.text())
|
|
110
|
+
runInAction(() => { this.error = '' })
|
|
111
|
+
} catch (e) {
|
|
112
|
+
runInAction(() => { this.error = `open ${name} in Fork: ${(e as Error).message}` })
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
openRepo(name: string): void {
|
|
117
|
+
this.st.select(name)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** the refresh button: a new git pass now, whatever the countdown says */
|
|
121
|
+
refresh(): void {
|
|
122
|
+
if (!this.loading) void this.poll(true)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** one read. The daemon shares an answer younger than its ttl between
|
|
126
|
+
* readers and never serves an older one; only `fresh` forces a pass */
|
|
127
|
+
async poll(fresh = false): Promise<void> {
|
|
128
|
+
const id = ++this.gen
|
|
129
|
+
runInAction(() => { this.loading = true; this.nextAt = Date.now() + ACTIVITY_POLL_MS })
|
|
130
|
+
try {
|
|
131
|
+
const r = await fetch(`/api/home/activity.json?m=${this.minutes}${fresh ? '&fresh=1' : ''}`, { signal: AbortSignal.timeout(30_000) })
|
|
132
|
+
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
|
|
133
|
+
const j = (await r.json()) as ActivityAnswer
|
|
134
|
+
runInAction(() => { if (id === this.gen) { this.data = j; this.error = '' } })
|
|
135
|
+
} catch (e) {
|
|
136
|
+
runInAction(() => { if (id === this.gen) this.error = (e as Error).message })
|
|
137
|
+
} finally {
|
|
138
|
+
// the countdown starts when the answer lands, so reads never overlap
|
|
139
|
+
runInAction(() => { if (id === this.gen) { this.loading = false; this.nextAt = Date.now() + ACTIVITY_POLL_MS } })
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** one tick a second: the countdown moves, and a due read goes, unless
|
|
144
|
+
* the tab is hidden (the daemon reads git only for a viewer) */
|
|
145
|
+
private tick(): void {
|
|
146
|
+
this.now = Date.now()
|
|
147
|
+
if (this.loading || this.now < this.nextAt) return
|
|
148
|
+
if (typeof document !== 'undefined' && document.visibilityState === 'hidden') return
|
|
149
|
+
void this.poll()
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** reads while the page is shown */
|
|
153
|
+
start(): void {
|
|
154
|
+
if (this.timer != null) return
|
|
155
|
+
void this.poll()
|
|
156
|
+
this.timer = setInterval(() => this.tick(), 1_000)
|
|
157
|
+
document.addEventListener('visibilitychange', this.onVisible)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
stop(): void {
|
|
161
|
+
if (this.timer == null) return
|
|
162
|
+
clearInterval(this.timer)
|
|
163
|
+
this.timer = null
|
|
164
|
+
this.gen++
|
|
165
|
+
this.loading = false
|
|
166
|
+
document.removeEventListener('visibilitychange', this.onVisible)
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// `/activity`: what every house repo committed in the window and what it holds
|
|
2
|
+
// uncommitted, as ONE table with a row group per repo, so a glance says which
|
|
3
|
+
// agents did what. Each commit carries its own state (↑ orange unpushed, ✓
|
|
4
|
+
// green pushed), uncommitted work is a red line above the commits, the branch
|
|
5
|
+
// is green on main and orange elsewhere. On top: the window, the commit cap
|
|
6
|
+
// (a number, 1 to 15), then when the next read goes. Repos with nothing in the
|
|
7
|
+
// window sit below the busy ones, each with its last commit in grey.
|
|
8
|
+
import { observer } from 'mobx-react-lite'
|
|
9
|
+
import type { ReactNode } from 'react'
|
|
10
|
+
import { idleRow, isMainBranch, WINDOW_MINUTES, type ActivityCommit, type ActivityRow, type StatusCheck } from '../../home/activity-shape.ts'
|
|
11
|
+
import { ageShort, CAP_MAX, CAP_MIN, dirtWords, filesWords, upstreamWords, windowWords } from './activity-st.ts'
|
|
12
|
+
import { Tip } from './floating.tsx'
|
|
13
|
+
import { Icon, ICON } from './icons.tsx'
|
|
14
|
+
import type { HomeSt } from './home-st.ts'
|
|
15
|
+
import { checkAddress, plainClick, repoPage } from './home-st.ts'
|
|
16
|
+
import { stampWords } from './time-ago.tsx'
|
|
17
|
+
|
|
18
|
+
/** the repo's icon and name; a plain click selects it in place */
|
|
19
|
+
const RepoName = observer(({ app, name }: { app: HomeSt; name: string }) => {
|
|
20
|
+
const icon = app.projects.list.find((p) => p.name === name)?.icon ?? null
|
|
21
|
+
return (
|
|
22
|
+
<a className="acrepo" href={repoPage(name)} onClick={(e) => {
|
|
23
|
+
if (!plainClick(e)) return
|
|
24
|
+
e.preventDefault()
|
|
25
|
+
app.activity.openRepo(name)
|
|
26
|
+
}}>
|
|
27
|
+
{icon == null ? null : <img src={icon} alt="" width={14} height={14} draggable={false} />}
|
|
28
|
+
<span>{name}</span>
|
|
29
|
+
</a>
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
/** a bar of exclusive buttons */
|
|
34
|
+
const Bar = <T extends number>({ label, values, value, words, set }: { label: string; values: readonly T[]; value: number; words: (v: T) => string; set: (v: T) => void }) => (
|
|
35
|
+
<div className="acwin" role="radiogroup" aria-label={label}>
|
|
36
|
+
{values.map((v) => (
|
|
37
|
+
<button key={v} role="radio" aria-checked={value === v} className={value === v ? 'on' : ''} onClick={() => set(v)}>{words(v)}</button>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
/** when the next read goes; it spins while one runs */
|
|
43
|
+
const Next = observer(({ app }: { app: HomeSt }) => {
|
|
44
|
+
const st = app.activity
|
|
45
|
+
return (
|
|
46
|
+
<button type="button" className="acnext acpill" disabled={st.loading} onClick={() => st.refresh()}
|
|
47
|
+
title="read every repo now · the page reads them again every minute while it is shown">
|
|
48
|
+
<span className={`acring${st.loading ? ' on' : ''}`}>↻</span>
|
|
49
|
+
{st.loading ? '' : ` ${st.countdown}s`}
|
|
50
|
+
</button>
|
|
51
|
+
)
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
/** one commit's cells; `old` is the last one, from before the window */
|
|
55
|
+
const Commit = ({ c, now, old }: { c: ActivityCommit; now: number; old: boolean }) => (
|
|
56
|
+
<>
|
|
57
|
+
<td className="acsha">{c.sha}</td>
|
|
58
|
+
<td className="acwhen" title={stampWords(c.at)}>{ageShort(c.at, now)}</td>
|
|
59
|
+
<td className={`actitle ${c.pushed ? 'pushed' : 'unpushed'}${old ? ' old' : ''}`} title={`${old ? 'the last commit, before the window. ' : ''}${c.pushed ? 'pushed' : 'not pushed'}: ${c.title}`}>
|
|
60
|
+
<span className="acmark">{c.pushed ? '✓' : '↑'}</span>
|
|
61
|
+
{c.branch == null ? null : <span className="acside">{c.branch}</span>}
|
|
62
|
+
{c.title}
|
|
63
|
+
</td>
|
|
64
|
+
<td className="acwho">{c.author}</td>
|
|
65
|
+
</>
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
/** the checks behind a red or orange dot, failing first. An answer from
|
|
69
|
+
* a daemon that sends no `failing` still names them, by id */
|
|
70
|
+
export const failingOf = (r: ActivityRow): StatusCheck[] => {
|
|
71
|
+
if (r.failing != null) return r.failing
|
|
72
|
+
const c = r.status
|
|
73
|
+
if (c == null) return []
|
|
74
|
+
const one = (id: string, status: 'fail' | 'warn'): StatusCheck => ({ id, title: id, status, at: c.since[id] ?? null, line: '', lines: [] })
|
|
75
|
+
return [...c.reds.map((id) => one(id, 'fail')), ...c.warns.map((id) => one(id, 'warn'))]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** each failing and warning check: its id (a link to its page), its title,
|
|
79
|
+
* how old that outcome is, and every line it printed about it */
|
|
80
|
+
export const CheckList = observer(({ app, r }: { app: HomeSt; r: ActivityRow }) => {
|
|
81
|
+
const now = app.activity.now
|
|
82
|
+
return (
|
|
83
|
+
<ul className="acchecks">
|
|
84
|
+
{failingOf(r).map((c) => (
|
|
85
|
+
<li key={c.id} className={c.status === 'fail' ? 'fail' : 'warn'}>
|
|
86
|
+
<span className="acchkhead">
|
|
87
|
+
<span className="acchkmark">{c.status === 'fail' ? '✗' : '!'}</span>
|
|
88
|
+
<a className="acchkid" href={checkAddress(r.name, c.id)} onClick={(e) => {
|
|
89
|
+
if (!plainClick(e)) return
|
|
90
|
+
e.preventDefault()
|
|
91
|
+
app.activity.openCheck(r.name, c.id)
|
|
92
|
+
}}>{c.id}</a>
|
|
93
|
+
{c.title !== c.id ? <span className="acchktitle">{c.title}</span> : null}
|
|
94
|
+
{c.at == null ? null : <span className="acdim" title={stampWords(c.at)}>{ageShort(c.at, now)}</span>}
|
|
95
|
+
</span>
|
|
96
|
+
{(c.lines ?? (c.line === '' ? [] : [c.line])).map((l, i) => <span key={i} className="acchkline">{l}</span>)}
|
|
97
|
+
</li>
|
|
98
|
+
))}
|
|
99
|
+
</ul>
|
|
100
|
+
)
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
/** the repo's checks as its own run record last saw them, only the ids it
|
|
104
|
+
* declares today: one dot, red, orange or green, with the count behind it.
|
|
105
|
+
* Hovering it floats the failing and warning checks; a click lists them
|
|
106
|
+
* under the row, so they read without hover too */
|
|
107
|
+
const Status = observer(({ app, r, span }: { app: HomeSt; r: ActivityRow; span: number }) => {
|
|
108
|
+
const c = r.status
|
|
109
|
+
if (c == null) return (
|
|
110
|
+
<td rowSpan={span} className="acstatus acdim">
|
|
111
|
+
<Tip content="no shipkit run recorded in this repo yet" placement="right">·</Tip>
|
|
112
|
+
</td>
|
|
113
|
+
)
|
|
114
|
+
const n = c.state === 'red' ? c.reds.length : c.state === 'orange' ? c.warns.length : 0
|
|
115
|
+
const tone = c.state === 'red' ? 'red' : c.state === 'orange' ? 'warn' : 'ok'
|
|
116
|
+
if (c.reds.length + c.warns.length === 0) return (
|
|
117
|
+
<td rowSpan={span} className={`acstatus t-${tone}`}>
|
|
118
|
+
<Tip content="every check passed on its last run" placement="right">●</Tip>
|
|
119
|
+
</td>
|
|
120
|
+
)
|
|
121
|
+
const open = app.activity.checksOpen.has(r.name)
|
|
122
|
+
return (
|
|
123
|
+
<td rowSpan={span} className={`acstatus t-${tone}`}>
|
|
124
|
+
<Tip content={<CheckList app={app} r={r} />} tipClass="acchktip" interactive placement="right-start" fallbacks={['bottom-start', 'left-start']}>
|
|
125
|
+
<button type="button" className={`acdot t-${tone}`} aria-expanded={open} aria-label={`${r.name}: ${c.reds.length} failing, ${c.warns.length} warning, click to ${open ? 'hide' : 'list'} them`}
|
|
126
|
+
onClick={() => app.activity.toggleChecks(r.name)}>
|
|
127
|
+
●{n > 0 ? ` ${n}` : ''}
|
|
128
|
+
</button>
|
|
129
|
+
</Tip>
|
|
130
|
+
</td>
|
|
131
|
+
)
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
const Group = observer(({ app, r, now }: { app: HomeSt; r: ActivityRow; now: number }) => {
|
|
135
|
+
const st = app.activity
|
|
136
|
+
const open = st.expanded.has(r.name)
|
|
137
|
+
const capped = open ? r.commits : r.commits.slice(0, st.cap)
|
|
138
|
+
const more = r.commits.length - capped.length
|
|
139
|
+
const folds = more > 0 || (open && r.commits.length > st.cap)
|
|
140
|
+
const dirt = r.error == null ? dirtWords(r) : ''
|
|
141
|
+
const lines = (dirt !== '' || r.error != null ? 1 : 0) + capped.length + (r.last != null ? 1 : 0) + (folds ? 1 : 0)
|
|
142
|
+
const span = Math.max(1, lines)
|
|
143
|
+
const branch = r.branch ?? (r.detached == null ? '' : `detached ${r.detached}`)
|
|
144
|
+
const head = (
|
|
145
|
+
<>
|
|
146
|
+
<td rowSpan={span} className="acname"><RepoName app={app} name={r.name} /></td>
|
|
147
|
+
<Status app={app} r={r} span={span} />
|
|
148
|
+
<td rowSpan={span} className={`acbranch ${isMainBranch(r.branch) ? 't-ok' : 't-warn'}`} title={`${branch}: ${upstreamWords(r)}`}>{branch}</td>
|
|
149
|
+
{/* the lead in to the commit list, on its first line */}
|
|
150
|
+
<td rowSpan={span} className="acforkcell">
|
|
151
|
+
<button type="button" className="acfork" title="open in Fork" aria-label={`open ${r.name} in Fork`} onClick={() => void st.openFork(r.name)}><Icon d={ICON.fork} /></button>
|
|
152
|
+
</td>
|
|
153
|
+
</>
|
|
154
|
+
)
|
|
155
|
+
const rows: ReactNode[] = []
|
|
156
|
+
if (r.error != null) rows.push(<td key="e" colSpan={4} className="acerr" title={r.error}>git failed: {r.error}</td>)
|
|
157
|
+
else if (dirt !== '') rows.push(
|
|
158
|
+
<td key="d" colSpan={4} className="acdirty">
|
|
159
|
+
<Tip className="acdirt" tipClass="acfiles" placement="bottom-start" content={<pre>{filesWords(r)}</pre>}>{dirt}</Tip>
|
|
160
|
+
</td>,
|
|
161
|
+
)
|
|
162
|
+
for (const c of capped) rows.push(<Commit c={c} now={now} old={false} />)
|
|
163
|
+
// nothing newer in the window: HEAD's last commit, grey
|
|
164
|
+
if (r.last != null) rows.push(<Commit c={r.last} now={now} old />)
|
|
165
|
+
if (folds) rows.push(<td key="m" colSpan={4}><button className="acmore" onClick={() => st.toggle(r.name)}>{open ? 'show fewer' : `${more} more`}</button></td>)
|
|
166
|
+
if (rows.length === 0) rows.push(<td key="n" colSpan={4} className="acdim">no commit yet</td>)
|
|
167
|
+
return (
|
|
168
|
+
<tbody className={`acgrp${idleRow(r) ? ' quiet' : ''}`}>
|
|
169
|
+
{rows.map((cells, i) => <tr key={i}>{i === 0 ? head : null}{cells}</tr>)}
|
|
170
|
+
{st.checksOpen.has(r.name) && failingOf(r).length > 0 ? <tr className="acchkrow"><td colSpan={8}><CheckList app={app} r={r} /></td></tr> : null}
|
|
171
|
+
</tbody>
|
|
172
|
+
)
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
export const ActivityView = observer(({ app }: { app: HomeSt }) => {
|
|
176
|
+
const st = app.activity
|
|
177
|
+
const d = st.data
|
|
178
|
+
const now = d?.now ?? st.now
|
|
179
|
+
const { busy, idle } = st.rows
|
|
180
|
+
return (
|
|
181
|
+
<div className="hall activity">
|
|
182
|
+
<div className="actop">
|
|
183
|
+
<Bar label="how far back" values={WINDOW_MINUTES} value={st.minutes} words={windowWords} set={(m) => st.setMinutes(m)} />
|
|
184
|
+
<label className="accap" title={`the most commits a repo shows, ${CAP_MIN} to ${CAP_MAX}`}>
|
|
185
|
+
{/* uncontrolled while typed, so an emptied box can take a new number; it reads back the clamped cap on blur */}
|
|
186
|
+
<input type="number" min={CAP_MIN} max={CAP_MAX} step={1} defaultValue={st.cap} aria-label="commits per repo"
|
|
187
|
+
onChange={(e) => { if (e.currentTarget.value !== '') st.setCap(e.currentTarget.value) }}
|
|
188
|
+
onBlur={(e) => { e.currentTarget.value = String(st.cap) }} />
|
|
189
|
+
<span className="acdim">commits</span>
|
|
190
|
+
</label>
|
|
191
|
+
<Next app={app} />
|
|
192
|
+
{d == null ? <span className="acdim">reading every repo…</span> : (
|
|
193
|
+
<>
|
|
194
|
+
<span className="acpill">{busy.length} busy</span>
|
|
195
|
+
<span className="acpill">{idle.length} quiet</span>
|
|
196
|
+
<span className="acpill">read in {d.ms}ms</span>
|
|
197
|
+
</>
|
|
198
|
+
)}
|
|
199
|
+
</div>
|
|
200
|
+
{st.error !== '' ? <div className="hnote">{st.error}</div> : null}
|
|
201
|
+
{d != null && busy.length === 0 ? <div className="acdim">nothing committed or uncommitted in the last {windowWords(st.minutes)}</div> : null}
|
|
202
|
+
{busy.length + idle.length === 0 ? null : (
|
|
203
|
+
<table className={`actable${st.stale ? ' stale' : ''}`}>
|
|
204
|
+
<colgroup>
|
|
205
|
+
<col className="c-name" /><col className="c-status" /><col className="c-branch" />
|
|
206
|
+
<col className="c-fork" /><col className="c-sha" /><col className="c-when" /><col /><col className="c-who" />
|
|
207
|
+
</colgroup>
|
|
208
|
+
<thead>
|
|
209
|
+
<tr><th>repo</th><th>status</th><th>branch</th><th colSpan={5}>commits, newest first</th></tr>
|
|
210
|
+
</thead>
|
|
211
|
+
{busy.map((r) => <Group key={r.name} app={app} r={r} now={now} />)}
|
|
212
|
+
{idle.map((r) => <Group key={r.name} app={app} r={r} now={now} />)}
|
|
213
|
+
</table>
|
|
214
|
+
)}
|
|
215
|
+
<p className="hdim">in the console: shipkit activity</p>
|
|
216
|
+
</div>
|
|
217
|
+
)
|
|
218
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* the activity page (activity-view.tsx): one table, a row group per repo. The
|
|
2
|
+
table is fixed width so a long title ellipses instead of scrolling the page
|
|
3
|
+
sideways; the file list floats on hover. State colours only: a branch green
|
|
4
|
+
on main, orange elsewhere; a commit orange until pushed; dirt red. */
|
|
5
|
+
.activity{font-size:13px;container-type:inline-size}
|
|
6
|
+
.actop{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s3);margin-bottom:var(--s3)}
|
|
7
|
+
.acwin{display:inline-flex;border:1px solid var(--line);border-radius:4px;overflow:hidden}
|
|
8
|
+
.acwin button{border:0;border-radius:0;padding:var(--s0) var(--s2);background:none;color:var(--dim);font-size:12px}
|
|
9
|
+
.acwin button:hover{color:var(--ink);background:var(--panel2)}
|
|
10
|
+
.acwin button.on{color:var(--accent);background:var(--sel)}
|
|
11
|
+
.accap{display:inline-flex;align-items:center;gap:var(--s1);font-size:12px}
|
|
12
|
+
.accap input{width:44px;height:22px;box-sizing:border-box;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:var(--s0) var(--s1);font:inherit;font-variant-numeric:tabular-nums}
|
|
13
|
+
.accap input:focus{outline:none;border-color:var(--accent)}
|
|
14
|
+
.acnext{display:inline-flex;align-items:center;min-width:40px;color:var(--dim);font-size:12px;font-variant-numeric:tabular-nums}
|
|
15
|
+
/* the counts beside the controls, and the refresh button, as small rounded chips */
|
|
16
|
+
.acpill{display:inline-flex;align-items:center;gap:var(--s1);padding:0 var(--s2);border:1px solid var(--line);border-radius:999px;background:var(--hi3);color:var(--dim);font-size:11.5px;line-height:20px;font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
17
|
+
button.acpill{cursor:pointer;font:inherit;font-size:11.5px}
|
|
18
|
+
button.acpill:hover:not(:disabled){color:var(--ink);border-color:var(--accent)}
|
|
19
|
+
button.acpill:disabled{cursor:default}
|
|
20
|
+
.acring{display:inline-block}
|
|
21
|
+
.acring.on{color:var(--accent);animation:acspin 1s linear infinite}
|
|
22
|
+
@keyframes acspin{to{transform:rotate(360deg)}}
|
|
23
|
+
.acdim{color:var(--dim)}
|
|
24
|
+
.actable{width:100%;table-layout:fixed;border-collapse:collapse}
|
|
25
|
+
.actable.stale{opacity:.5}
|
|
26
|
+
.actable th{text-align:left;font-weight:400;color:var(--dim);font-size:11.5px;padding:var(--s1) var(--s2);border-bottom:1px solid var(--line)}
|
|
27
|
+
.actable td{padding:var(--s0) var(--s2);vertical-align:top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
28
|
+
.acgrp{border-bottom:1px solid var(--line)}
|
|
29
|
+
.acgrp tr:first-child td{padding-top:var(--s1)}
|
|
30
|
+
.acgrp tr:last-child td{padding-bottom:var(--s1)}
|
|
31
|
+
.acgrp:hover{background:var(--panel)}
|
|
32
|
+
.actable{--acname-w:170px}.actable,.acchktip{--acmark-w:10px}.c-name{width:var(--acname-w)}.c-status{width:52px}.c-branch{width:150px}
|
|
33
|
+
.c-sha{width:72px}.c-when{width:56px}.c-who{width:90px}
|
|
34
|
+
.acrepo{display:inline-flex;align-items:center;gap:var(--s1);max-width:100%;color:var(--ink);text-decoration:none}
|
|
35
|
+
.acrepo span{overflow:hidden;text-overflow:ellipsis}
|
|
36
|
+
.acrepo img{flex:none;border-radius:3px;object-fit:contain}
|
|
37
|
+
.acrepo:hover span{text-decoration:underline}
|
|
38
|
+
.t-ok{color:var(--ok)}.t-warn{color:var(--warn)}.t-red{color:var(--red)}
|
|
39
|
+
.acstatus{white-space:nowrap;font-variant-numeric:tabular-nums;cursor:default}
|
|
40
|
+
/* the status dot is a button: hover floats its checks, a click lists them under the row */
|
|
41
|
+
.acdot{border:0;background:none;padding:0 var(--s1);margin:0 calc(-1 * var(--s1));font:inherit;font-variant-numeric:tabular-nums;color:inherit;cursor:pointer;border-radius:3px}
|
|
42
|
+
.acdot:hover,.acdot[aria-expanded="true"]{background:var(--panel2)}
|
|
43
|
+
.acchktip{z-index:40;max-width:560px;max-height:60vh;overflow:auto;background:var(--panel2);border:1px solid var(--line);border-radius:3px;box-shadow:0 2px 10px var(--shadow);padding:var(--s1) var(--s2);color:var(--ink);font-size:12px}
|
|
44
|
+
.acchecks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--s1);white-space:normal}
|
|
45
|
+
.acchecks li{display:flex;flex-direction:column;min-width:0}
|
|
46
|
+
.acchkhead{display:flex;align-items:baseline;gap:var(--s2);min-width:0}
|
|
47
|
+
.acchkmark{flex:none;width:var(--acmark-w)}
|
|
48
|
+
.acchecks .fail .acchkmark,.acchecks .fail .acchkid{color:var(--red)}
|
|
49
|
+
.acchecks .warn .acchkmark,.acchecks .warn .acchkid{color:var(--warn)}
|
|
50
|
+
.acchkid{flex:none;font:11.5px ui-monospace,Menlo,monospace;text-decoration:none}
|
|
51
|
+
.acchkid:hover{text-decoration:underline}
|
|
52
|
+
.acchktitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
53
|
+
.acchkline{margin-left:calc(var(--acmark-w) + var(--s2));color:var(--dim);font:11.5px/1.4 ui-monospace,Menlo,monospace;overflow-wrap:anywhere}
|
|
54
|
+
.acchkrow td{padding:var(--s1) var(--s2) var(--s2) calc(var(--acname-w) + var(--s2));white-space:normal}
|
|
55
|
+
.acdirty,.acdirt,.acerr{color:var(--red)}
|
|
56
|
+
.acdirt{cursor:help}
|
|
57
|
+
.acsha{font:11.5px ui-monospace,Menlo,monospace;color:var(--dim)}
|
|
58
|
+
.acwhen{color:var(--dim);font-variant-numeric:tabular-nums;text-align:right}
|
|
59
|
+
.acmark{display:inline-block;width:14px;font-size:11px}
|
|
60
|
+
.pushed .acmark{color:var(--ok)}
|
|
61
|
+
.unpushed{color:var(--warn)}
|
|
62
|
+
/* the last commit, from before the window: grey, its marker kept */
|
|
63
|
+
.actitle.old,.unpushed.old{color:var(--dim)}
|
|
64
|
+
.acside{display:inline-block;margin-right:var(--s1);padding:0 var(--s1);border:1px solid var(--line);border-radius:3px;color:var(--dim);font-size:11px}
|
|
65
|
+
.acwho{color:var(--dim)}
|
|
66
|
+
.acmore{border:0;background:none;padding:0;color:var(--accent);font-size:12px}
|
|
67
|
+
.acmore:hover{text-decoration:underline}
|
|
68
|
+
.acfiles{z-index:40;max-width:480px;max-height:60vh;overflow:hidden;background:var(--panel2);border:1px solid var(--line);border-radius:3px;box-shadow:0 2px 10px var(--shadow);padding:var(--s1) var(--s2);color:var(--ink);pointer-events:none}
|
|
69
|
+
.acfiles pre{margin:0;font:11.5px/1.4 ui-monospace,Menlo,monospace;white-space:pre-wrap;word-break:break-all}
|
|
70
|
+
/* narrow: the sha and the author go, the title keeps its room */
|
|
71
|
+
@container (max-width:680px){.c-sha,.acsha,.c-who,.acwho{display:none}.actable{--acname-w:120px}.c-branch{width:100px}.acchkrow td{padding-left:var(--s2)}}
|
|
72
|
+
/* the open in Fork button leads the commit list, quiet until its row is hovered */
|
|
73
|
+
.c-fork{width:22px}
|
|
74
|
+
.actable td.acforkcell{padding-right:0;overflow:visible}
|
|
75
|
+
.acfork{display:inline-flex;align-items:center;vertical-align:-2px;padding:0;border:0;background:none;color:var(--dim);cursor:pointer;opacity:.5}
|
|
76
|
+
.acfork .hico{width:13px;height:13px}
|
|
77
|
+
.acgrp:hover .acfork{opacity:1}
|
|
78
|
+
.acfork:hover{color:var(--accent)}
|