@rasensio/aidlc 2.20.0 → 2.22.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/dist/autopilot/answers.d.ts.map +1 -1
- package/dist/autopilot/answers.js +4 -1
- package/dist/autopilot/answers.js.map +1 -1
- package/dist/autopilot/driver.d.ts +19 -0
- package/dist/autopilot/driver.d.ts.map +1 -1
- package/dist/autopilot/driver.js +221 -51
- package/dist/autopilot/driver.js.map +1 -1
- package/dist/autopilot/presets.d.ts.map +1 -1
- package/dist/autopilot/presets.js +14 -4
- package/dist/autopilot/presets.js.map +1 -1
- package/dist/autopilot/typed.d.ts +3 -9
- package/dist/autopilot/typed.d.ts.map +1 -1
- package/dist/autopilot/typed.js +4 -6
- package/dist/autopilot/typed.js.map +1 -1
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +24 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/roadmap.d.ts.map +1 -1
- package/dist/commands/roadmap.js +3 -1
- package/dist/commands/roadmap.js.map +1 -1
- package/dist/cost/gitignore.d.ts +6 -5
- package/dist/cost/gitignore.d.ts.map +1 -1
- package/dist/cost/gitignore.js +6 -6
- package/dist/cost/gitignore.js.map +1 -1
- package/dist/cost/hooks/shim.js +3 -3
- package/dist/cost/hooks/shim.js.map +1 -1
- package/dist/doctor/migrations/cost-gitignore.d.ts +2 -1
- package/dist/doctor/migrations/cost-gitignore.d.ts.map +1 -1
- package/dist/doctor/migrations/cost-gitignore.js +13 -11
- package/dist/doctor/migrations/cost-gitignore.js.map +1 -1
- package/dist/doctor/migrations/index.d.ts.map +1 -1
- package/dist/doctor/migrations/index.js +5 -0
- package/dist/doctor/migrations/index.js.map +1 -1
- package/dist/doctor/migrations/knowledge-gitignore.d.ts +8 -1
- package/dist/doctor/migrations/knowledge-gitignore.d.ts.map +1 -1
- package/dist/doctor/migrations/knowledge-gitignore.js +20 -13
- package/dist/doctor/migrations/knowledge-gitignore.js.map +1 -1
- package/dist/doctor/migrations/nested-gitignore.d.ts +24 -5
- package/dist/doctor/migrations/nested-gitignore.d.ts.map +1 -1
- package/dist/doctor/migrations/nested-gitignore.js +62 -6
- package/dist/doctor/migrations/nested-gitignore.js.map +1 -1
- package/dist/doctor/migrations/tracked-nested-ignored.d.ts +26 -0
- package/dist/doctor/migrations/tracked-nested-ignored.d.ts.map +1 -0
- package/dist/doctor/migrations/tracked-nested-ignored.js +69 -0
- package/dist/doctor/migrations/tracked-nested-ignored.js.map +1 -0
- package/dist/knowledge/engine.d.ts.map +1 -1
- package/dist/knowledge/engine.js +5 -0
- package/dist/knowledge/engine.js.map +1 -1
- package/dist/knowledge/gitignore.d.ts +18 -0
- package/dist/knowledge/gitignore.d.ts.map +1 -0
- package/dist/knowledge/gitignore.js +25 -0
- package/dist/knowledge/gitignore.js.map +1 -0
- package/dist/roadmap/next.d.ts +6 -3
- package/dist/roadmap/next.d.ts.map +1 -1
- package/dist/roadmap/next.js +17 -1
- package/dist/roadmap/next.js.map +1 -1
- package/dist/roadmap/ready.d.ts +39 -0
- package/dist/roadmap/ready.d.ts.map +1 -0
- package/dist/roadmap/ready.js +101 -0
- package/dist/roadmap/ready.js.map +1 -0
- package/dist/roadmap/triage.d.ts +7 -0
- package/dist/roadmap/triage.d.ts.map +1 -1
- package/dist/roadmap/triage.js +12 -2
- package/dist/roadmap/triage.js.map +1 -1
- package/dist/roadmap/view-assets.d.ts.map +1 -1
- package/dist/roadmap/view-assets.js +21 -6
- package/dist/roadmap/view-assets.js.map +1 -1
- package/dist/roadmap/view-html.d.ts +12 -0
- package/dist/roadmap/view-html.d.ts.map +1 -1
- package/dist/roadmap/view-html.js +81 -7
- package/dist/roadmap/view-html.js.map +1 -1
- package/dist/roadmap/view-model.d.ts +28 -1
- package/dist/roadmap/view-model.d.ts.map +1 -1
- package/dist/roadmap/view-model.js +48 -4
- package/dist/roadmap/view-model.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is a roadmap item ready to build? (autopilot-refuses-unready-items/AC-1..AC-3, AC-6, AC-7)
|
|
3
|
+
*
|
|
4
|
+
* Ready means: at least one active `AC-n` line, read with the grammar the testing gate
|
|
5
|
+
* reads; at least one of those lines names a file path; and every path they name exists,
|
|
6
|
+
* or its parent folder does — an AC may name a file it creates. Presence and shape only:
|
|
7
|
+
* nothing here judges whether the criteria are any good.
|
|
8
|
+
*
|
|
9
|
+
* One rule, called by `pickNextAt` under `--autopilot` and by triage, so autopilot's skip
|
|
10
|
+
* and triage's warning cannot disagree (design D1).
|
|
11
|
+
*
|
|
12
|
+
* Read-only and inside the repository: `statSync` on paths built from the item's own
|
|
13
|
+
* tokens, never a read of a named file and never a write. A token that is absolute, starts
|
|
14
|
+
* with `~` or has a `..` segment is never probed (secure-defaults, path traversal).
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { statSync } from 'node:fs';
|
|
19
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
20
|
+
import { parseRequirements } from '../traceability/parser.js';
|
|
21
|
+
import { itemBody } from './paths.js';
|
|
22
|
+
// `dark-mode/AC-3` and `<instance>/AC-<n>` point at a criterion, not a file (AC-7).
|
|
23
|
+
const CRITERION_REF_RE = /^AC-(?:\d+|<[^>]*>)$/;
|
|
24
|
+
const URL_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
25
|
+
const EXTENSION_RE = /\.[A-Za-z0-9]+$/;
|
|
26
|
+
// A segment that stands for many names: only the folders before it can be checked (AC-6).
|
|
27
|
+
const WILDCARD_RE = /[*?]|<[^>]*>|\{[^}]*\}/;
|
|
28
|
+
function isDir(path) {
|
|
29
|
+
return statSync(path, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
30
|
+
}
|
|
31
|
+
function exists(path) {
|
|
32
|
+
return statSync(path, { throwIfNoEntry: false }) !== undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The roots a named path is looked up under: the project, then the repository top when the
|
|
36
|
+
* project sits below it. Found by walking up for `.git`, not by asking git (design D3).
|
|
37
|
+
*/
|
|
38
|
+
export function readinessRoots(projectRoot) {
|
|
39
|
+
const project = resolve(projectRoot);
|
|
40
|
+
for (let dir = project;; dir = dirname(dir)) {
|
|
41
|
+
if (exists(join(dir, '.git')))
|
|
42
|
+
return dir === project ? [project] : [project, dir];
|
|
43
|
+
if (dirname(dir) === dir)
|
|
44
|
+
return [project];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** The path tokens one AC line names, in order, AC-7 exclusions removed (AC-3, AC-7). */
|
|
48
|
+
export function pathTokens(line) {
|
|
49
|
+
const tokens = [];
|
|
50
|
+
for (const m of line.matchAll(/`([^`\s]+)`/g)) {
|
|
51
|
+
const token = m[1];
|
|
52
|
+
const segments = token.split('/');
|
|
53
|
+
if (!token.includes('/') && !EXTENSION_RE.test(segments[segments.length - 1]))
|
|
54
|
+
continue;
|
|
55
|
+
if (segments.length === 2 && CRITERION_REF_RE.test(segments[1]))
|
|
56
|
+
continue;
|
|
57
|
+
if (URL_RE.test(token))
|
|
58
|
+
continue;
|
|
59
|
+
if (token.startsWith('/') || token.startsWith('~') || isAbsolute(token) || segments.includes('..'))
|
|
60
|
+
continue;
|
|
61
|
+
tokens.push(token);
|
|
62
|
+
}
|
|
63
|
+
return tokens;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* True when the token, or its parent folder, exists under one of the roots. With a glob or
|
|
67
|
+
* placeholder segment, the folders before the first one must exist — the parent-folder
|
|
68
|
+
* allowance does not apply to them, so `.aidlc/stat/<instance>/x` fails (AC-6, design D5).
|
|
69
|
+
*/
|
|
70
|
+
export function pathExists(token, roots) {
|
|
71
|
+
const segments = token.split('/').filter((s) => s !== '' && s !== '.');
|
|
72
|
+
const wild = segments.findIndex((s) => WILDCARD_RE.test(s));
|
|
73
|
+
return roots.some((root) => {
|
|
74
|
+
if (wild === 0)
|
|
75
|
+
return true;
|
|
76
|
+
if (wild > 0)
|
|
77
|
+
return isDir(join(root, ...segments.slice(0, wild)));
|
|
78
|
+
return exists(join(root, ...segments)) || isDir(join(root, ...segments.slice(0, -1)));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Ready to build, or the first failing rule as `not ready: …` (AC-1, AC-2, AC-3). */
|
|
82
|
+
export function itemReadiness(raw, roots) {
|
|
83
|
+
const body = itemBody(raw);
|
|
84
|
+
const lines = body.split('\n');
|
|
85
|
+
const active = parseRequirements(body, '').defs.filter((d) => d.status === 'active');
|
|
86
|
+
if (active.length === 0)
|
|
87
|
+
return { ready: false, detail: 'not ready: no AC-n lines' };
|
|
88
|
+
let named = false;
|
|
89
|
+
for (const def of active) {
|
|
90
|
+
for (const token of pathTokens(lines[def.line - 1])) {
|
|
91
|
+
named = true;
|
|
92
|
+
if (!pathExists(token, roots)) {
|
|
93
|
+
return { ready: false, detail: `not ready: AC-${def.id} names ${token}, which does not exist` };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// An AC like "`pnpm check` is green" names nothing and fails nothing; only an item whose
|
|
98
|
+
// every AC is like that has nothing to check (AC-3).
|
|
99
|
+
return named ? { ready: true } : { ready: false, detail: 'not ready: no AC names a file path' };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=ready.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ready.js","sourceRoot":"","sources":["../../src/roadmap/ready.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,Q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K,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,oCAAoC,EAAE,CAAC;AAClG,CAAC"}
|
package/dist/roadmap/triage.d.ts
CHANGED
|
@@ -24,10 +24,17 @@ export interface TriageOptions {
|
|
|
24
24
|
/** ISO date for the history entry. */
|
|
25
25
|
at: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* `warning` is set when the item goes to `backlog` for an explicit autopilot run and is not
|
|
29
|
+
* ready to build: `<file>: not ready: …`, the reason `roadmap next --autopilot` would skip it
|
|
30
|
+
* with. Triage warns and moves; it never refuses for readiness
|
|
31
|
+
* (autopilot-refuses-unready-items/AC-4, AC-11).
|
|
32
|
+
*/
|
|
27
33
|
export type TriageResult = {
|
|
28
34
|
ok: true;
|
|
29
35
|
file: string;
|
|
30
36
|
lines: string[];
|
|
37
|
+
warning: string | null;
|
|
31
38
|
} | {
|
|
32
39
|
ok: false;
|
|
33
40
|
detail: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../src/roadmap/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAqE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../src/roadmap/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAqE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAIjH,eAAO,MAAM,cAAc,yCAA0C,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAM/H;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAanE;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,4DAA4D;AAC5D,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAK3D;AAWD,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,YAAY,CAiExG"}
|
package/dist/roadmap/triage.js
CHANGED
|
@@ -17,6 +17,7 @@ import { readItemFields } from './item-fields.js';
|
|
|
17
17
|
import { parsePriority } from './next.js';
|
|
18
18
|
import { frontmatter, listStatusAt, moveItem, primaryCheckout, roadmapRoot } from './paths.js';
|
|
19
19
|
import { applyRank, planRank } from './rank.js';
|
|
20
|
+
import { itemReadiness, readinessRoots } from './ready.js';
|
|
20
21
|
export const TRIAGE_TARGETS = ['backlog', 'park', 'decline'];
|
|
21
22
|
const PARKED = 'parked — ';
|
|
22
23
|
const DECLINED = 'declined — ';
|
|
@@ -89,7 +90,7 @@ export function triageItem(cwd, ref, to, opts) {
|
|
|
89
90
|
return { ok: false, detail: 'a reason is required — a held item with no reason cannot be told parked from declined' };
|
|
90
91
|
const full = prefixed(reason, to === 'park' ? PARKED : DECLINED);
|
|
91
92
|
const file = moveItem(item, cwd, 'hold', opts.at, full);
|
|
92
|
-
return { ok: true, file, lines: [`${to === 'park' ? 'parked' : 'declined'} ${item.filename}: ${file}`, ` reason: ${full}`] };
|
|
93
|
+
return { ok: true, file, lines: [`${to === 'park' ? 'parked' : 'declined'} ${item.filename}: ${file}`, ` reason: ${full}`], warning: null };
|
|
93
94
|
}
|
|
94
95
|
if (opts.reason !== undefined)
|
|
95
96
|
return { ok: false, detail: '--reason applies to park and decline only' };
|
|
@@ -118,6 +119,15 @@ export function triageItem(cwd, ref, to, opts) {
|
|
|
118
119
|
return { ok: false, detail: `${item.filename} has no frontmatter to write run: into` };
|
|
119
120
|
raw = withRun;
|
|
120
121
|
}
|
|
122
|
+
// Only an explicit autopilot run: an absent `run` also reads as autopilot, but warning on it
|
|
123
|
+
// would add output to every triage in projects that never use autopilot (AC-4, AC-11).
|
|
124
|
+
let warning = null;
|
|
125
|
+
const explicitRun = opts.run ?? frontmatter(raw)?.data.run;
|
|
126
|
+
if (explicitRun === 'autopilot') {
|
|
127
|
+
const readiness = itemReadiness(raw, readinessRoots(primaryCheckout(cwd)));
|
|
128
|
+
if (!readiness.ready)
|
|
129
|
+
warning = `${item.filename}: ${readiness.detail}`;
|
|
130
|
+
}
|
|
121
131
|
const file = moveItem({ ...item, raw }, cwd, 'backlog', opts.at);
|
|
122
132
|
const lines = [`moved ${item.filename} to backlog: ${file}`];
|
|
123
133
|
if (opts.run !== undefined)
|
|
@@ -129,6 +139,6 @@ export function triageItem(cwd, ref, to, opts) {
|
|
|
129
139
|
applyRank(plan);
|
|
130
140
|
lines.push(` rank: ${plan.rank}`);
|
|
131
141
|
}
|
|
132
|
-
return { ok: true, file, lines };
|
|
142
|
+
return { ok: true, file, lines, warning };
|
|
133
143
|
}
|
|
134
144
|
//# sourceMappingURL=triage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triage.js","sourceRoot":"","sources":["../../src/roadmap/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAgB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAoB,MAAM,YAAY,CAAC;AACjH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"triage.js","sourceRoot":"","sources":["../../src/roadmap/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAgB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAoB,MAAM,YAAY,CAAC;AACjH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAmBtE,MAAM,MAAM,GAAG,WAAW,CAAC;AAC3B,MAAM,QAAQ,GAAG,aAAa,CAAC;AAC/B,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,GAAY;IAClD,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC,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,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,qCAAqC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAC/F,SAAS,CAAC,IAAI,CAAC,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-assets.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"view-assets.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,UAAU,QAsJtB,CAAC;AAEF,eAAO,MAAM,WAAW,QAmUF,CAAC"}
|
|
@@ -23,12 +23,14 @@ export const VIEW_STYLE = String.raw `
|
|
|
23
23
|
--link: #3e4ab8; --accent-ink: #3e4ab8; --chip-on: #e8eafb; --focus: #5e6ad2; --unmet: #c9252d; --shade: rgba(15, 17, 20, .12);
|
|
24
24
|
--st-inbox: #6b7280; --st-backlog: #6b7280; --st-in-progress: #a87300; --st-done: #1f7a43; --st-hold: #858b96;
|
|
25
25
|
--st-inbox-bg: #ffffff; --st-backlog-bg: #eef0f3; --st-in-progress-bg: #fdf4d3; --st-done-bg: #e3f3e8; --st-hold-bg: #fafbfc;
|
|
26
|
-
--ready-bg: #e2f4e7; --ready-ink: #17643a; --blocked-bg: #fde7e7; --blocked-ink: #ae1f28;
|
|
26
|
+
--ready-bg: #e2f4e7; --ready-ink: #17643a; --blocked-bg: #fde7e7; --blocked-ink: #ae1f28;
|
|
27
|
+
--u-input: #3e4ab8; --u-output: #a14f00; --u-cache-read: #0b6e80; --u-cache-write: #8a3aa3; }
|
|
27
28
|
:root[data-theme="dark"] { color-scheme: dark; --bg: #101113; --bg-2: #16171a; --card: #1c1d21; --ink: #e8e9ec; --muted: #a0a5ae; --line: #2c2e34; --line-2: #464a53;
|
|
28
29
|
--link: #a9b0f6; --accent-ink: #a9b0f6; --chip-on: #2b2e4c; --focus: #8f98f4; --unmet: #ff6b6b; --shade: rgba(0, 0, 0, .5);
|
|
29
30
|
--st-inbox: #9aa0aa; --st-backlog: #9aa0aa; --st-in-progress: #e0b03c; --st-done: #4fbf7c; --st-hold: #7a808a;
|
|
30
31
|
--st-inbox-bg: #1c1d21; --st-backlog-bg: #25272c; --st-in-progress-bg: #2c2612; --st-done-bg: #13291c; --st-hold-bg: #18191c;
|
|
31
|
-
--ready-bg: #12301f; --ready-ink: #74dc9e; --blocked-bg: #3b1719; --blocked-ink: #ff9d9d;
|
|
32
|
+
--ready-bg: #12301f; --ready-ink: #74dc9e; --blocked-bg: #3b1719; --blocked-ink: #ff9d9d;
|
|
33
|
+
--u-input: #8f98f4; --u-output: #f0a35a; --u-cache-read: #4fc3d6; --u-cache-write: #d08ae6; }
|
|
32
34
|
* { box-sizing: border-box; }
|
|
33
35
|
body { margin: 0; color: var(--ink); background: var(--bg); font: .875rem/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
|
|
34
36
|
[hidden] { display: none !important; }
|
|
@@ -95,7 +97,7 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
|
|
|
95
97
|
.mrows { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .25rem; }
|
|
96
98
|
.mrow { display: flex; align-items: baseline; gap: .5rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--card); cursor: pointer; }
|
|
97
99
|
.hold-for { margin: 0; font-size: .75rem; color: var(--muted); }
|
|
98
|
-
.card .open, .ship .open, .mrow .open, .ship .title { border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; line-height: 1.4; }
|
|
100
|
+
.card .open, .ship .open, .mrow .open, .urow .open, .ship .title { border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; line-height: 1.4; }
|
|
99
101
|
.rank { color: var(--muted); font-weight: 600; }
|
|
100
102
|
.badge { display: inline-block; margin-right: .35rem; padding: 0 .45rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
|
|
101
103
|
.badge.ready { background: var(--ready-bg); color: var(--ready-ink); }
|
|
@@ -112,6 +114,16 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
|
|
|
112
114
|
.badge.caused { background: var(--blocked-bg); color: var(--blocked-ink); }
|
|
113
115
|
.release h3 { margin: .9rem 0 .4rem; font-size: .875rem; font-weight: 600; }
|
|
114
116
|
.ship .facts { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; }
|
|
117
|
+
.urows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; }
|
|
118
|
+
.urow { padding: .4rem .6rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--card); cursor: pointer; }
|
|
119
|
+
.urow .title { margin: 0 0 .25rem; }
|
|
120
|
+
.utotal, .nodata { color: var(--muted); font-size: .75rem; }
|
|
121
|
+
.utotal { margin-left: .5rem; }
|
|
122
|
+
.nodata { margin: 0; }
|
|
123
|
+
.ubars { display: block; max-width: 100%; height: auto; }
|
|
124
|
+
.ubars text { font-size: .75rem; fill: var(--muted); }
|
|
125
|
+
.ubars .ulabel { fill: var(--ink); }
|
|
126
|
+
.u-input { fill: var(--u-input); } .u-output { fill: var(--u-output); } .u-cache-read { fill: var(--u-cache-read); } .u-cache-write { fill: var(--u-cache-write); }
|
|
115
127
|
.deps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); gap: 1rem; align-items: start; }
|
|
116
128
|
.drows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
|
|
117
129
|
.drow { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: .75rem; padding: .5rem .625rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--card); cursor: pointer; }
|
|
@@ -271,14 +283,16 @@ export const VIEW_SCRIPT = String.raw `
|
|
|
271
283
|
board.classList.toggle('summaries', S.sum);
|
|
272
284
|
attr(sumBtn, 'aria-pressed', S.sum);
|
|
273
285
|
all('.drow').forEach(function (r) { var m = match(r, S.deps); r.hidden = !m; if (m) lit++; });
|
|
274
|
-
var ships = 0, rows = 0;
|
|
286
|
+
var ships = 0, rows = 0, uses = 0;
|
|
275
287
|
all('.ship').forEach(function (s) { var m = q === '' || s.getAttribute('data-search').indexOf(q) !== -1; s.hidden = !m; if (m) ships++; });
|
|
276
288
|
all('.mrow').forEach(function (s) { var m = q === '' || s.getAttribute('data-search').indexOf(q) !== -1; s.hidden = !m; if (m) rows++; });
|
|
289
|
+
all('.urow').forEach(function (s) { var m = q === '' || s.getAttribute('data-search').indexOf(q) !== -1; s.hidden = !m; if (m) uses++; });
|
|
277
290
|
one('#n-board').textContent = shown;
|
|
278
291
|
one('#n-deps').textContent = lit;
|
|
279
292
|
var nm = one('#n-milestones');
|
|
280
293
|
if (nm) nm.textContent = rows;
|
|
281
|
-
|
|
294
|
+
one('#n-usage').textContent = uses;
|
|
295
|
+
var n = S.tab === 'board' ? shown : S.tab === 'deps' ? lit : S.tab === 'milestones' ? rows : S.tab === 'usage' ? uses : ships;
|
|
282
296
|
one('#search-status').textContent = q === '' ? '' : n === 1 ? '1 item matches' : n + ' items match';
|
|
283
297
|
writeHash();
|
|
284
298
|
}
|
|
@@ -392,7 +406,7 @@ export const VIEW_SCRIPT = String.raw `
|
|
|
392
406
|
if (t && t.scrollIntoView) t.scrollIntoView({ block: 'start' });
|
|
393
407
|
});
|
|
394
408
|
});
|
|
395
|
-
all('.card, .ship, .mrow').forEach(function (card) {
|
|
409
|
+
all('.card, .ship, .mrow, .urow').forEach(function (card) {
|
|
396
410
|
card.addEventListener('click', function (e) {
|
|
397
411
|
if (e.target.closest('a')) return;
|
|
398
412
|
openPanel(card.getAttribute('data-ref'), one('.open', card));
|
|
@@ -445,6 +459,7 @@ export const VIEW_SCRIPT = String.raw `
|
|
|
445
459
|
}
|
|
446
460
|
if (S.tab === 'shipped') return all('.ship').filter(function (s) { return !s.hidden; });
|
|
447
461
|
if (S.tab === 'milestones') return all('.mrow').filter(function (s) { return !s.hidden; });
|
|
462
|
+
if (S.tab === 'usage') return all('.urow').filter(function (s) { return !s.hidden; });
|
|
448
463
|
return all('.drow').filter(function (r) { return !r.hidden; });
|
|
449
464
|
}
|
|
450
465
|
function step(by) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-assets.js","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"view-assets.js","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJnC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmUpC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,sEAAsE"}
|
|
@@ -45,10 +45,22 @@ export declare const PRESETS: readonly {
|
|
|
45
45
|
export declare function plainHtml(v: ViewItem): string;
|
|
46
46
|
/** A cost in dollars as page text, or nothing: a missing cost is never `$0`, nor is one under a cent (roadmap-cards-revamp/AC-12). */
|
|
47
47
|
export declare function usd(micro: number | null): string;
|
|
48
|
+
/**
|
|
49
|
+
* A cost as page text, tokens first: `45.2M tok · API price $17.38`, `45.2M tok` when
|
|
50
|
+
* unpriced, or `no data` — never `0`, never `$0` (usage-tab-in-tokens/AC-2, AC-3, AC-7). On a
|
|
51
|
+
* subscription the tokens are what is spent; the dollars are what the API would charge.
|
|
52
|
+
*/
|
|
53
|
+
export declare function costText(tokens: number | null, micro: number | null): string;
|
|
48
54
|
/** Most squares a row shows before `+N` (roadmap-cards-revamp/AC-16). */
|
|
49
55
|
export declare const SQUARES_PER_ROW = 3;
|
|
50
56
|
/** Statuses the Dependencies tab shows when the URL names none: every open state (roadmap-cards-revamp/AC-21). */
|
|
51
57
|
export declare const DEPS_DEFAULT: readonly RoadmapStatus[];
|
|
58
|
+
/**
|
|
59
|
+
* A bar's length: each type against its own largest value, so a cache read of 97% cannot
|
|
60
|
+
* shrink the other three to nothing, and never under 2 units unless the value is 0
|
|
61
|
+
* (usage-tab-in-tokens/AC-4, AC-9).
|
|
62
|
+
*/
|
|
63
|
+
export declare function barWidth(value: number, max: number): number;
|
|
52
64
|
/** The commands that apply to an item, as `[label, command]`; the page runs none (AC-29). */
|
|
53
65
|
export declare function commandsFor(v: ViewItem): [string, string][];
|
|
54
66
|
/** Render the page. Pure. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-html.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"view-html.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGlE,OAAO,EAAqD,KAAK,WAAW,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElI,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,kDAAkD;AAClD,eAAO,MAAM,YAAY,KAAK,CAAC;AAkB/B,0CAA0C;AAC1C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,iGAAiG;AACjG,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgCtD;AAmDD,wHAAwH;AACxH,eAAO,MAAM,UAAU,KAAK,CAAC;AA4B7B,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAAwC,CAAC;AAyC3F,0DAA0D;AAC1D,eAAO,MAAM,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,EAMlF,CAAC;AAkCF,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAI7C;AAED,sIAAsI;AACtI,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAGhD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAI5E;AAED,yEAAyE;AACzE,eAAO,MAAM,eAAe,IAAI,CAAC;AAwFjC,kHAAkH;AAClH,eAAO,MAAM,YAAY,EAAE,SAAS,aAAa,EAAgD,CAAC;AAkFlG;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D;AAuGD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAmB3D;AAkDD,6BAA6B;AAC7B,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAiEpD"}
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
* @module
|
|
17
17
|
*/
|
|
18
18
|
import { createHash } from 'node:crypto';
|
|
19
|
+
import { fmtTokens } from '../commands/cost.js';
|
|
19
20
|
import { escapeHtml, inline, renderMarkdown } from './markdown.js';
|
|
20
21
|
import { GROUP_NAME, MILESTONE_GROUPS, STATUS_NAME } from './milestones.js';
|
|
21
22
|
import { ROADMAP_STATUSES } from './paths.js';
|
|
22
23
|
import { VIEW_SCRIPT, VIEW_STYLE } from './view-assets.js';
|
|
23
|
-
import { shippedReleases } from './view-model.js';
|
|
24
|
+
import { hasTokens, shippedReleases, splitTotal, usageRows } from './view-model.js';
|
|
24
25
|
export { escapeHtml } from './markdown.js';
|
|
25
26
|
/** Done cards shown before "show all" (AC-18). */
|
|
26
27
|
export const DONE_VISIBLE = 20;
|
|
@@ -249,6 +250,17 @@ export function usd(micro) {
|
|
|
249
250
|
return '';
|
|
250
251
|
return micro > 0 && micro < 10_000 ? escapeHtml('<$0.01') : `$${(micro / 1_000_000).toFixed(2)}`;
|
|
251
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* A cost as page text, tokens first: `45.2M tok · API price $17.38`, `45.2M tok` when
|
|
255
|
+
* unpriced, or `no data` — never `0`, never `$0` (usage-tab-in-tokens/AC-2, AC-3, AC-7). On a
|
|
256
|
+
* subscription the tokens are what is spent; the dollars are what the API would charge.
|
|
257
|
+
*/
|
|
258
|
+
export function costText(tokens, micro) {
|
|
259
|
+
if (!hasTokens(tokens))
|
|
260
|
+
return 'no data';
|
|
261
|
+
const price = usd(micro);
|
|
262
|
+
return price === '' ? `${fmtTokens(tokens)} tok` : `${fmtTokens(tokens)} tok · API price ${price}`;
|
|
263
|
+
}
|
|
252
264
|
/** Most squares a row shows before `+N` (roadmap-cards-revamp/AC-16). */
|
|
253
265
|
export const SQUARES_PER_ROW = 3;
|
|
254
266
|
function stateWord(v) {
|
|
@@ -305,7 +317,8 @@ function depsDetail(view, byRef, v) {
|
|
|
305
317
|
['Done', v.status === 'done' ? (v.finishedAt ?? '') : ''],
|
|
306
318
|
['Release', v.release === null ? '' : escapeHtml(`${v.release.version} (${v.release.date})`)],
|
|
307
319
|
['Kind', escapeHtml(v.kind ?? '')],
|
|
308
|
-
|
|
320
|
+
// An item never promoted has no cost line; one with an instance says its cost or "no data" (usage-tab-in-tokens/AC-7).
|
|
321
|
+
['True cost', v.instanceName === null ? '' : costText(v.trueCostTokens, v.trueCostMicroUsd)],
|
|
309
322
|
['Idea → shipped', v.ideaDays === null ? '' : days(v.ideaDays)],
|
|
310
323
|
['Item', link(v.links.item, v.filename) ?? ''],
|
|
311
324
|
];
|
|
@@ -365,14 +378,19 @@ function shippedSection(view, byRef) {
|
|
|
365
378
|
const releases = shippedReleases(view).map((r) => {
|
|
366
379
|
const rows = r.refs.map((ref) => {
|
|
367
380
|
const v = byRef.get(ref);
|
|
368
|
-
const facts = [
|
|
381
|
+
const facts = [
|
|
382
|
+
v.kind === null ? '' : escapeHtml(v.kind),
|
|
383
|
+
v.ideaDays === null ? '' : `${days(v.ideaDays)} idea → done`,
|
|
384
|
+
costText(v.trueCostTokens, v.trueCostMicroUsd),
|
|
385
|
+
].filter((f) => f !== '');
|
|
369
386
|
const caused = v.causedBugfixes === 0 ? '' : ` <span class="badge caused">caused ${v.causedBugfixes} ${v.causedBugfixes === 1 ? 'bugfix' : 'bugfixes'}</span>`;
|
|
370
387
|
return (`<li class="ship" id="ship-${ref}" data-ref="${ref}" data-search="${escapeHtml(`${v.title} ${v.id ?? v.key} ${v.plain?.text ?? ''}`.trimEnd().toLowerCase())}">` +
|
|
371
388
|
`<p class="title"><button type="button" class="open" aria-haspopup="dialog">${escapeHtml(v.title)}</button></p>${plainHtml(v)}` +
|
|
372
389
|
`<p class="facts">${facts.join(' · ')}${caused}</p></li>`);
|
|
373
390
|
});
|
|
374
391
|
const n = `${r.refs.length} ${r.refs.length === 1 ? 'item' : 'items'}`;
|
|
375
|
-
|
|
392
|
+
// "Not in a release" is not a release and has never carried a sum (usage-tab-in-tokens/AC-3).
|
|
393
|
+
const cost = ` · ${costText(r.trueCostTokens, r.trueCostMicroUsd)}`;
|
|
376
394
|
const head = r.release === null
|
|
377
395
|
? `Not in a release <span class="count">· ${n}</span>`
|
|
378
396
|
: `${escapeHtml(r.release.version)} <span class="count">· ${escapeHtml(r.release.date)} · ${n}${cost}</span>`;
|
|
@@ -385,6 +403,60 @@ function shippedSection(view, byRef) {
|
|
|
385
403
|
'</section>',
|
|
386
404
|
].join('\n');
|
|
387
405
|
}
|
|
406
|
+
/** The four bars of a Usage row, in order, with the word each is labelled by (usage-tab-in-tokens/AC-5). */
|
|
407
|
+
const USAGE_TYPES = [
|
|
408
|
+
['input', 'Input', 'u-input'],
|
|
409
|
+
['output', 'Output', 'u-output'],
|
|
410
|
+
['cacheRead', 'Cache read', 'u-cache-read'],
|
|
411
|
+
['cacheWrite', 'Cache write', 'u-cache-write'],
|
|
412
|
+
];
|
|
413
|
+
/** Where the bars start and how long the longest one is, in SVG units. */
|
|
414
|
+
const BAR_X = 96;
|
|
415
|
+
const BAR_SPAN = 300;
|
|
416
|
+
/**
|
|
417
|
+
* A bar's length: each type against its own largest value, so a cache read of 97% cannot
|
|
418
|
+
* shrink the other three to nothing, and never under 2 units unless the value is 0
|
|
419
|
+
* (usage-tab-in-tokens/AC-4, AC-9).
|
|
420
|
+
*/
|
|
421
|
+
export function barWidth(value, max) {
|
|
422
|
+
return value === 0 || max === 0 ? 0 : Math.max(2, Math.round((value / max) * BAR_SPAN));
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* One SVG per row, labels and values inside it, so `role="img"` and its label give one reading
|
|
426
|
+
* instead of a label, an image and a value read three times. Presentation attributes and
|
|
427
|
+
* classes only: an inline `style` would need its own CSP hash.
|
|
428
|
+
*/
|
|
429
|
+
function usageBars(v, split, max) {
|
|
430
|
+
const label = USAGE_TYPES.map(([k, word]) => `${word.toLowerCase()} ${fmtTokens(split[k])}`).join(', ');
|
|
431
|
+
const rows = USAGE_TYPES.map(([k, word, cls], n) => {
|
|
432
|
+
const y = n * 16;
|
|
433
|
+
const w = barWidth(split[k], max[k]);
|
|
434
|
+
return (`<text class="ulabel" x="0" y="${y + 11}">${word}</text>` +
|
|
435
|
+
`<rect class="${cls}" x="${BAR_X}" y="${y + 2}" width="${w}" height="10"/>` +
|
|
436
|
+
`<text class="uval" x="${BAR_X + w + 8}" y="${y + 11}">${fmtTokens(split[k])}</text>`);
|
|
437
|
+
});
|
|
438
|
+
return `<svg class="ubars" viewBox="0 0 440 64" width="440" height="64" role="img" aria-label="${escapeHtml(`${v.title}: ${label}`)}">${rows.join('')}</svg>`;
|
|
439
|
+
}
|
|
440
|
+
/** Every done item, most tokens first, one bar per token type (usage-tab-in-tokens/AC-4..AC-7). */
|
|
441
|
+
function usageSection(view, byRef) {
|
|
442
|
+
const { refs, max } = usageRows(view);
|
|
443
|
+
const rows = refs.map((ref) => {
|
|
444
|
+
const v = byRef.get(ref);
|
|
445
|
+
const split = v.tokenSplit !== null && splitTotal(v.tokenSplit) > 0 ? v.tokenSplit : null;
|
|
446
|
+
const total = split === null ? '' : ` <span class="utotal">${fmtTokens(splitTotal(split))} tok</span>`;
|
|
447
|
+
return (`<li class="urow" id="use-${ref}" data-ref="${ref}" data-search="${escapeHtml(`${v.title} ${v.id ?? v.key} ${v.plain?.text ?? ''}`.trimEnd().toLowerCase())}">` +
|
|
448
|
+
`<p class="title"><button type="button" class="open" aria-haspopup="dialog">${escapeHtml(v.title)}</button>${total}</p>` +
|
|
449
|
+
`${split === null ? '<p class="nodata">no data</p>' : usageBars(v, split, max)}</li>`);
|
|
450
|
+
});
|
|
451
|
+
return [
|
|
452
|
+
'<section class="view" id="view-usage" role="tabpanel" aria-labelledby="tab-usage" hidden>',
|
|
453
|
+
'<h2 class="sr">Usage</h2>',
|
|
454
|
+
rows.length === 0
|
|
455
|
+
? '<p class="empty">Nothing shipped yet.</p>'
|
|
456
|
+
: `<p class="legend">Tokens each shipped item used, by type. Each bar is scaled to the largest value of its own type on this tab.</p>\n<ol class="urows">${rows.join('')}</ol>`,
|
|
457
|
+
'</section>',
|
|
458
|
+
].join('\n');
|
|
459
|
+
}
|
|
388
460
|
/** One milestone, or Unassigned: its exit test and its groups with counts (roadmap-milestones/AC-14, AC-15). */
|
|
389
461
|
function milestoneSection(section, byRef) {
|
|
390
462
|
const head = section.status === null
|
|
@@ -508,8 +580,8 @@ export function renderView(view) {
|
|
|
508
580
|
const msCount = ms ? view.milestones.sections.reduce((n, s) => n + s.count, view.milestones.unassigned.count) : 0;
|
|
509
581
|
const boardSel = ms ? 'aria-selected="false" tabindex="-1"' : 'aria-selected="true"';
|
|
510
582
|
const keys = ms
|
|
511
|
-
? '<kbd>1</kbd> Milestones · <kbd>2</kbd> Board · <kbd>3</kbd> Dependencies · <kbd>4</kbd> Shipped'
|
|
512
|
-
: '<kbd>1</kbd> Board · <kbd>2</kbd> Dependencies · <kbd>3</kbd> Shipped';
|
|
583
|
+
? '<kbd>1</kbd> Milestones · <kbd>2</kbd> Board · <kbd>3</kbd> Dependencies · <kbd>4</kbd> Shipped · <kbd>5</kbd> Usage'
|
|
584
|
+
: '<kbd>1</kbd> Board · <kbd>2</kbd> Dependencies · <kbd>3</kbd> Shipped · <kbd>4</kbd> Usage';
|
|
513
585
|
return [
|
|
514
586
|
'<!doctype html>',
|
|
515
587
|
'<html lang="en">',
|
|
@@ -536,6 +608,7 @@ export function renderView(view) {
|
|
|
536
608
|
`<button type="button" role="tab" id="tab-board" data-tab="board" aria-controls="view-board" ${boardSel}>Board <span class="n" id="n-board">${view.items.length}</span></button>`,
|
|
537
609
|
`<button type="button" role="tab" id="tab-deps" data-tab="deps" aria-controls="view-deps" aria-selected="false" tabindex="-1">Dependencies <span class="n" id="n-deps">${view.deps.length}</span></button>`,
|
|
538
610
|
`<button type="button" role="tab" id="tab-shipped" data-tab="shipped" aria-controls="view-shipped" aria-selected="false" tabindex="-1">Shipped <span class="n" id="n-shipped">${view.columns.done.length}</span></button>`,
|
|
611
|
+
`<button type="button" role="tab" id="tab-usage" data-tab="usage" aria-controls="view-usage" aria-selected="false" tabindex="-1">Usage <span class="n" id="n-usage">${view.columns.done.length}</span></button>`,
|
|
539
612
|
'</div>',
|
|
540
613
|
'<main>',
|
|
541
614
|
...(ms ? [milestonesTab(view, byRef)] : []),
|
|
@@ -548,6 +621,7 @@ export function renderView(view) {
|
|
|
548
621
|
'</section>',
|
|
549
622
|
depsSection(view, byRef),
|
|
550
623
|
shippedSection(view, byRef),
|
|
624
|
+
usageSection(view, byRef),
|
|
551
625
|
'</main>',
|
|
552
626
|
`<p class="keys">Keys: <kbd>/</kbd> search · <kbd>j</kbd> <kbd>k</kbd> next and previous item · ${keys} · <kbd>Esc</kbd> close the panel or clear the search</p>`,
|
|
553
627
|
'<aside id="panel" class="panel" role="dialog" aria-modal="false" aria-labelledby="panel-title" hidden>',
|
|
@@ -557,7 +631,7 @@ export function renderView(view) {
|
|
|
557
631
|
'</aside>',
|
|
558
632
|
...view.items.map((v) => detail(view, byRef, v)),
|
|
559
633
|
...view.missing.map((m) => missingDetail(view, byRef, m)),
|
|
560
|
-
'<footer><p>
|
|
634
|
+
'<footer><p>Figures are tokens from <code>aidlc metrics</code>; the dollar figure is an API price, which a subscription does not charge. A release is the first <code>v*</code> tag after the item's merge.</p></footer>',
|
|
561
635
|
`<script>${VIEW_SCRIPT}</script>`,
|
|
562
636
|
'</body>',
|
|
563
637
|
'</html>',
|