visualproof 0.4.3 → 0.4.4
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/assets/latex/visualproof.sty +19 -9
- package/dist/mcp/visualproof-mcp.mjs +7 -3
- package/dist/server/access.js +34 -0
- package/dist/server/agent.js +5 -4
- package/dist/server/agentlibrary.js +1 -1
- package/dist/server/agentviews.js +1 -1
- package/dist/server/artcmd.js +1 -1
- package/dist/server/askfollow.js +1 -4
- package/dist/server/events.js +20 -5
- package/dist/server/export.js +17 -4
- package/dist/server/fetchurl.js +30 -13
- package/dist/server/history.js +3 -1
- package/dist/server/identity.js +25 -1
- package/dist/server/library.js +10 -3
- package/dist/server/live.js +32 -5
- package/dist/server/lostfound.js +3 -2
- package/dist/server/main.js +113 -28
- package/dist/server/poppler.js +48 -10
- package/dist/server/renames.js +10 -5
- package/dist/server/review.js +10 -0
- package/dist/server/reviewapi.js +1 -1
- package/dist/server/status.js +29 -8
- package/dist/server/talk.js +7 -2
- package/dist/server/views.js +21 -7
- package/dist/shared/collab.js +14 -8
- package/dist/shared/doc/latex.js +5 -3
- package/dist/shared/doc/outline.js +6 -3
- package/dist/shared/library.js +11 -6
- package/dist/shared/review.js +7 -5
- package/dist/shared/search.js +7 -3
- package/dist/shared/views.js +8 -1
- package/dist/web/bundle/app.js +1646 -717
- package/dist/web/bundle/edges.js +42 -15
- package/dist/web/index.html +2 -2
- package/dist/web/src/artwork.js +25 -4
- package/dist/web/src/axiomring.js +42 -0
- package/dist/web/src/bundles.js +52 -16
- package/dist/web/src/canvas.js +62 -20
- package/dist/web/src/past.js +28 -0
- package/dist/web/src/selection.js +47 -4
- package/dist/web/src/status.js +4 -2
- package/dist/web/style.css +79 -10
- package/docs/agent-api/following.md +1 -1
- package/docs/agent-api/library.md +1 -1
- package/docs/agent-api/requests.md +3 -1
- package/docs/agent-api/views.md +1 -1
- package/package.json +1 -1
package/dist/web/bundle/edges.js
CHANGED
|
@@ -20,8 +20,15 @@ function units(S, k, minPx) {
|
|
|
20
20
|
return out;
|
|
21
21
|
}
|
|
22
22
|
function aggregate(g, unit, sites, keep) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
let size = 1024;
|
|
24
|
+
let slot = new Int32Array(size).fill(-1);
|
|
25
|
+
let A = new Int32Array(256), B = new Int32Array(256), w = new Int32Array(256);
|
|
26
|
+
let n = 0;
|
|
27
|
+
const at = (a, b) => {
|
|
28
|
+
let h = Math.imul(a, 2654435761) ^ Math.imul(b, 2246822519);
|
|
29
|
+
h = Math.imul(h ^ h >>> 16, 2146121005);
|
|
30
|
+
return (h ^ h >>> 15) & size - 1;
|
|
31
|
+
};
|
|
25
32
|
for (let u = 0; u < g.n; u++) {
|
|
26
33
|
if (!keep(u)) continue;
|
|
27
34
|
const a = unit[u];
|
|
@@ -31,21 +38,41 @@ function aggregate(g, unit, sites, keep) {
|
|
|
31
38
|
if (!keep(v)) continue;
|
|
32
39
|
const b = unit[v];
|
|
33
40
|
if (a === b) continue;
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
let h = at(a, b);
|
|
42
|
+
for (; ; ) {
|
|
43
|
+
const k = slot[h];
|
|
44
|
+
if (k < 0) break;
|
|
45
|
+
if (A[k] === a && B[k] === b) break;
|
|
46
|
+
h = h + 1 & size - 1;
|
|
47
|
+
}
|
|
48
|
+
if (slot[h] >= 0) {
|
|
49
|
+
w[slot[h]]++;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (n === A.length) {
|
|
53
|
+
const grow = (x) => {
|
|
54
|
+
const y = new Int32Array(2 * x.length);
|
|
55
|
+
y.set(x);
|
|
56
|
+
return y;
|
|
57
|
+
};
|
|
58
|
+
[A, B, w] = [grow(A), grow(B), grow(w)];
|
|
59
|
+
}
|
|
60
|
+
A[n] = a;
|
|
61
|
+
B[n] = b;
|
|
62
|
+
w[n] = 1;
|
|
63
|
+
slot[h] = n++;
|
|
64
|
+
if (2 * n > size) {
|
|
65
|
+
size *= 2;
|
|
66
|
+
slot = new Int32Array(size).fill(-1);
|
|
67
|
+
for (let k = 0; k < n; k++) {
|
|
68
|
+
let j = at(A[k], B[k]);
|
|
69
|
+
while (slot[j] >= 0) j = j + 1 & size - 1;
|
|
70
|
+
slot[j] = k;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
36
73
|
}
|
|
37
74
|
}
|
|
38
|
-
|
|
39
|
-
const out = { n, a: new Int32Array(n), b: new Int32Array(n), w: new Int32Array(n) };
|
|
40
|
-
let k = 0;
|
|
41
|
-
for (const [key, w] of counts) {
|
|
42
|
-
const a = Math.floor(key / W);
|
|
43
|
-
out.a[k] = a;
|
|
44
|
-
out.b[k] = key - a * W;
|
|
45
|
-
out.w[k] = w;
|
|
46
|
-
k++;
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
75
|
+
return { n, a: A.slice(0, n), b: B.slice(0, n), w: w.slice(0, n) };
|
|
49
76
|
}
|
|
50
77
|
function topK(idx, score, cap) {
|
|
51
78
|
const n = idx.length;
|
package/dist/web/index.html
CHANGED
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
<div id="tm-list" class="glass" role="dialog" aria-label="What changed since" hidden></div>
|
|
135
135
|
<div id="tm-kept" class="glass" hidden></div>
|
|
136
136
|
<div id="trust-pop" class="glass" role="dialog" aria-label="Trust without review" hidden></div>
|
|
137
|
-
<div id="hint" class="hint" hidden></div>
|
|
137
|
+
<div id="hint" class="hint" role="status" aria-live="polite" hidden></div>
|
|
138
138
|
<div id="mode-tip" class="mode-tip glass" role="tooltip" hidden></div>
|
|
139
139
|
<!-- the review strip, wherever the review has a focus: one line of progress -->
|
|
140
140
|
<div id="lensbar" class="glass" hidden>
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
<!-- what is trusted without review: the review's, the same on every board -->
|
|
186
186
|
<div id="trust-list" class="glass side-pop" role="dialog" aria-label="Trusted without review" hidden></div>
|
|
187
187
|
|
|
188
|
-
<aside id="panel" class="glass"></aside>
|
|
188
|
+
<aside id="panel" class="glass" aria-label="The panel"></aside>
|
|
189
189
|
<aside id="activity" class="glass" aria-label="Activity"></aside>
|
|
190
190
|
<!-- what was said of declarations the graph no longer has, and the migrations: in Activity's place,
|
|
191
191
|
opened from the build-status popover (web/src/lostfound.ts) -->
|
package/dist/web/src/artwork.js
CHANGED
|
@@ -221,9 +221,10 @@ export function wrapText(text, width, measure) {
|
|
|
221
221
|
}
|
|
222
222
|
/** The notes as the board shows them, written with `ctx` in the screen's pixels — over the board in a
|
|
223
223
|
* PNG, recorded into an SVG: the leader to a declaration and its diamond, the leader to an open card,
|
|
224
|
-
* the mark (its icon, its dot over it as far as it has turned into one) and the card with its text
|
|
225
|
-
* `glyph` draws an icon's glyph, which is SVG: a PNG has it as a picture,
|
|
226
|
-
|
|
224
|
+
* the mark (its icon, its dot over it as far as it has turned into one) and the card with its text
|
|
225
|
+
* and the files it carries. `glyph` draws an icon's glyph, which is SVG: a PNG has it as a picture,
|
|
226
|
+
* an SVG as it is; `image` a file's drawing, a data URL: a PNG decodes it, an SVG holds it. */
|
|
227
|
+
export function drawNotes(ctx, notes, font, glyph, image = () => { }) {
|
|
227
228
|
for (const n of notes) {
|
|
228
229
|
ctx.save();
|
|
229
230
|
if (n.decl) {
|
|
@@ -305,7 +306,7 @@ export function drawNotes(ctx, notes, font, glyph) {
|
|
|
305
306
|
ctx.textBaseline = "alphabetic";
|
|
306
307
|
ctx.font = `12.5px ${font}`;
|
|
307
308
|
ctx.fillStyle = c.textColour;
|
|
308
|
-
const lh = 12.5 * 1.45, bottom = c.y + c.h - 6 - (c.by ? 20 : 0);
|
|
309
|
+
const lh = 12.5 * 1.45, bottom = Math.min(c.y + c.h - 6 - (c.by ? 20 : 0), c.textBottom ?? Infinity);
|
|
309
310
|
let y = c.y + 7 + 12.8;
|
|
310
311
|
for (const line of wrapText(c.text, c.w - 22, (t) => ctx.measureText(t).width)) {
|
|
311
312
|
if (y > bottom + 1)
|
|
@@ -313,6 +314,26 @@ export function drawNotes(ctx, notes, font, glyph) {
|
|
|
313
314
|
ctx.fillText(line, c.x + 12, y);
|
|
314
315
|
y += lh;
|
|
315
316
|
}
|
|
317
|
+
// the files it carries, under its text: each its box, its drawing, its words
|
|
318
|
+
for (const f of c.files ?? []) {
|
|
319
|
+
ctx.fillStyle = f.bg;
|
|
320
|
+
roundRect(ctx, f.x, f.y, f.w, f.h, 6);
|
|
321
|
+
ctx.fill();
|
|
322
|
+
ctx.strokeStyle = c.edge;
|
|
323
|
+
ctx.lineWidth = 1;
|
|
324
|
+
ctx.stroke();
|
|
325
|
+
if (f.image)
|
|
326
|
+
image(f.image.src, f.image.x, f.image.y, f.image.w, f.image.h);
|
|
327
|
+
for (const w of f.words) {
|
|
328
|
+
ctx.font = `${w.weight} ${w.px}px ${font}`;
|
|
329
|
+
ctx.fillStyle = w.colour;
|
|
330
|
+
// as many lines as its box holds, each on the middle of its line
|
|
331
|
+
const most = Math.max(1, Math.round(w.h / w.line));
|
|
332
|
+
wrapText(w.text, w.w + 0.5, (t) => ctx.measureText(t).width)
|
|
333
|
+
.slice(0, most)
|
|
334
|
+
.forEach((line, k) => ctx.fillText(line, w.x, w.y + k * w.line + (w.line + w.px * 0.7) / 2));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
316
337
|
if (c.by) {
|
|
317
338
|
ctx.font = `11px ${font}`;
|
|
318
339
|
ctx.fillStyle = c.byColour;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// An axiom is a ring (CanvasSpec, "Colour schemes and the legend", the owner's decision of
|
|
2
|
+
// 2026-10-18): every axiom on the board — the project's, or outside it — is drawn with a ring of its
|
|
3
|
+
// own colour around its point, a gap apart, in both schemes and every artwork style, so that it is
|
|
4
|
+
// told by its shape where its colour is not told apart (the Kind palette's axiom red and structure
|
|
5
|
+
// green are one colour to a deuteranope). The legend's swatch, the panel's, a card's, the search's
|
|
6
|
+
// and the hover's dots are ringed the same way (style.css, `.dot.axiom`).
|
|
7
|
+
//
|
|
8
|
+
// Its colour is the point's: it says nothing the point does not, and stays apart from the marks the
|
|
9
|
+
// board draws round points, which are the accent's (the selection, the pointer), the readers' own
|
|
10
|
+
// colours (others' selections), gold (a target's star, a key's diamond), the labels' grey (a pin)
|
|
11
|
+
// and a past build's amber and teal. Those stand outside it, a gap further out, and an axiom's name
|
|
12
|
+
// is written beyond it.
|
|
13
|
+
/** The gap between a point's edge and its ring, and the ring's width, in px: wide enough to see at
|
|
14
|
+
* the smallest point (1.3 px), narrow enough not to read as a mark of its own. */
|
|
15
|
+
export const AXIOM_GAP = 1.5;
|
|
16
|
+
export const AXIOM_W = 1.5;
|
|
17
|
+
/** the ring's middle past the point's edge: the renderer's ring offset (gl/renderer.ts, `circle`) */
|
|
18
|
+
export const AXIOM_AT = AXIOM_GAP + AXIOM_W / 2;
|
|
19
|
+
/** how far the ring reaches past the point's edge */
|
|
20
|
+
export const AXIOM_OUT = AXIOM_GAP + AXIOM_W;
|
|
21
|
+
/** a lit point's radius, in points (web/src/canvas.ts, `point`) */
|
|
22
|
+
export const LIT = 1.4;
|
|
23
|
+
/** Whether a declaration of `kind` is drawn ringed: an axiom, of the project or outside it. */
|
|
24
|
+
export function ringed(kind) {
|
|
25
|
+
return kind === "axiom";
|
|
26
|
+
}
|
|
27
|
+
/** How much further out the marks round a point of `kind` go (the pointer's ring, a pin's, a past
|
|
28
|
+
* build's), in px: outside its axiom's ring. */
|
|
29
|
+
export function outside(kind) {
|
|
30
|
+
return ringed(kind) ? AXIOM_OUT : 0;
|
|
31
|
+
}
|
|
32
|
+
/** The radius of the selection's ring and of the others' round a point of `kind` whose radius is
|
|
33
|
+
* `dotR` px, lit as a pick is: clear of its axiom's ring by 2.5 px at every zoom. */
|
|
34
|
+
export function pickRadius(dotR, kind) {
|
|
35
|
+
const base = Math.max(7, dotR + 4);
|
|
36
|
+
return ringed(kind) ? Math.max(base, LIT * dotR + AXIOM_OUT + 2.5) : base;
|
|
37
|
+
}
|
|
38
|
+
/** A declaration's dot on the page (style.css, `.dot`): its colour's class — the outside world's
|
|
39
|
+
* for one outside the project — and, an axiom, its ring. */
|
|
40
|
+
export function kindDot(kind, ext) {
|
|
41
|
+
return `k-${ext ? "external" : kind}${ringed(kind) ? " axiom" : ""}`;
|
|
42
|
+
}
|
package/dist/web/src/bundles.js
CHANGED
|
@@ -29,10 +29,22 @@ export function units(S, k, minPx) {
|
|
|
29
29
|
}
|
|
30
30
|
return out;
|
|
31
31
|
}
|
|
32
|
-
/** Edges between units, counted. `keep` filters nodes (hidden externals, say).
|
|
32
|
+
/** Edges between units, counted. `keep` filters nodes (hidden externals, say). The pairs come in
|
|
33
|
+
* the order each is first met (by the node that uses, then its edges), counted in a hash table of
|
|
34
|
+
* typed arrays: a Map keyed by a · 2^22 + b, numbers past the small integers, took a second and a
|
|
35
|
+
* half a zoom step on NavierStokesAndEuler's 5 million edges, and the overview's edges lagged that
|
|
36
|
+
* long behind a zoom (CanvasSpec, "Edges"). */
|
|
33
37
|
export function aggregate(g, unit, sites, keep) {
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
let size = 1024;
|
|
39
|
+
let slot = new Int32Array(size).fill(-1);
|
|
40
|
+
let A = new Int32Array(256), B = new Int32Array(256), w = new Int32Array(256);
|
|
41
|
+
let n = 0;
|
|
42
|
+
// the pair's slot: its two ids mixed, every bit of them reaching the low ones the slot is read from
|
|
43
|
+
const at = (a, b) => {
|
|
44
|
+
let h = Math.imul(a, 0x9e3779b1) ^ Math.imul(b, 0x85ebca77);
|
|
45
|
+
h = Math.imul(h ^ (h >>> 16), 0x7feb352d);
|
|
46
|
+
return (h ^ (h >>> 15)) & (size - 1);
|
|
47
|
+
};
|
|
36
48
|
for (let u = 0; u < g.n; u++) {
|
|
37
49
|
if (!keep(u))
|
|
38
50
|
continue;
|
|
@@ -46,21 +58,45 @@ export function aggregate(g, unit, sites, keep) {
|
|
|
46
58
|
const b = unit[v];
|
|
47
59
|
if (a === b)
|
|
48
60
|
continue;
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
let h = at(a, b);
|
|
62
|
+
for (;;) {
|
|
63
|
+
const k = slot[h];
|
|
64
|
+
if (k < 0)
|
|
65
|
+
break;
|
|
66
|
+
if (A[k] === a && B[k] === b)
|
|
67
|
+
break;
|
|
68
|
+
h = (h + 1) & (size - 1);
|
|
69
|
+
}
|
|
70
|
+
if (slot[h] >= 0) {
|
|
71
|
+
w[slot[h]]++;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (n === A.length) {
|
|
75
|
+
const grow = (x) => {
|
|
76
|
+
const y = new Int32Array(2 * x.length);
|
|
77
|
+
y.set(x);
|
|
78
|
+
return y;
|
|
79
|
+
};
|
|
80
|
+
[A, B, w] = [grow(A), grow(B), grow(w)];
|
|
81
|
+
}
|
|
82
|
+
A[n] = a;
|
|
83
|
+
B[n] = b;
|
|
84
|
+
w[n] = 1;
|
|
85
|
+
slot[h] = n++;
|
|
86
|
+
// at most half full: grown, and every pair put again
|
|
87
|
+
if (2 * n > size) {
|
|
88
|
+
size *= 2;
|
|
89
|
+
slot = new Int32Array(size).fill(-1);
|
|
90
|
+
for (let k = 0; k < n; k++) {
|
|
91
|
+
let j = at(A[k], B[k]);
|
|
92
|
+
while (slot[j] >= 0)
|
|
93
|
+
j = (j + 1) & (size - 1);
|
|
94
|
+
slot[j] = k;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
51
97
|
}
|
|
52
98
|
}
|
|
53
|
-
|
|
54
|
-
const out = { n, a: new Int32Array(n), b: new Int32Array(n), w: new Int32Array(n) };
|
|
55
|
-
let k = 0;
|
|
56
|
-
for (const [key, w] of counts) {
|
|
57
|
-
const a = Math.floor(key / W);
|
|
58
|
-
out.a[k] = a;
|
|
59
|
-
out.b[k] = key - a * W;
|
|
60
|
-
out.w[k] = w;
|
|
61
|
-
k++;
|
|
62
|
-
}
|
|
63
|
-
return out;
|
|
99
|
+
return { n, a: A.slice(0, n), b: B.slice(0, n), w: w.slice(0, n) };
|
|
64
100
|
}
|
|
65
101
|
/** Indices of the `cap` highest scores among `idx` (all of them if there are fewer), in no
|
|
66
102
|
* particular order. Linear time: a selection, not a sort. */
|
package/dist/web/src/canvas.js
CHANGED
|
@@ -22,6 +22,7 @@ import { dragKeyHeld, dragMoves, menuClick } from "./drag.js";
|
|
|
22
22
|
import { Motion } from "./motion.js";
|
|
23
23
|
import { ST_APPROVED, ST_BUILDING, ST_COMMENTED, ST_FAILED, ST_SORRY, ST_TRUSTED, ST_UNREVIEWED, STATUSES } from "./status.js";
|
|
24
24
|
import { LEAF_R, Scene } from "./scene.js";
|
|
25
|
+
import { AXIOM_AT, AXIOM_OUT, AXIOM_W, kindDot, LIT, outside, pickRadius, ringed } from "./axiomring.js";
|
|
25
26
|
import { markWords, PAST_CHANGED, PAST_GHOST, PAST_RENAMED } from "./past.js";
|
|
26
27
|
import { clearOfBoxes } from "./visitors.js";
|
|
27
28
|
import { openFor, placeVisits, planOn, visitChain, visitWorld } from "./visits.js";
|
|
@@ -1417,6 +1418,11 @@ export class GraphCanvas {
|
|
|
1417
1418
|
this.cam = { ...cam };
|
|
1418
1419
|
this.request();
|
|
1419
1420
|
}
|
|
1421
|
+
/** The camera where it is gliding to, at once (reduced motion: GuideSpec decision 4). */
|
|
1422
|
+
arrive() {
|
|
1423
|
+
if (this.camGoal)
|
|
1424
|
+
this.jumpTo(this.camGoal);
|
|
1425
|
+
}
|
|
1420
1426
|
/** Zoom by `f` around the middle of the unobstructed area (the zoom buttons, + and -). */
|
|
1421
1427
|
zoomBy(f) {
|
|
1422
1428
|
const cx = this.insets.left + (this.w - this.insets.left - this.insets.right) / 2;
|
|
@@ -2076,8 +2082,13 @@ export class GraphCanvas {
|
|
|
2076
2082
|
continue;
|
|
2077
2083
|
if (style === "stars") {
|
|
2078
2084
|
const x = this.px[i], y = this.py[i];
|
|
2085
|
+
// an axiom is a ring here too (web/src/axiomring.ts), round its star
|
|
2086
|
+
const ring = ringed(this.g.nodes[i].kind);
|
|
2079
2087
|
if (this.g.isExt(i)) {
|
|
2080
|
-
|
|
2088
|
+
const faint = [0.72, 0.77, 0.88, 0.4 * dim];
|
|
2089
|
+
circle(dots, x, y, 0.6, UNIT_DOT, faint);
|
|
2090
|
+
if (ring)
|
|
2091
|
+
circle(dots, x, y, 0.6, UNIT_DOT, [0, 0, 0, 0], faint, AXIOM_W, 0, AXIOM_AT);
|
|
2081
2092
|
continue;
|
|
2082
2093
|
}
|
|
2083
2094
|
const c = this.colorOf(i);
|
|
@@ -2085,6 +2096,8 @@ export class GraphCanvas {
|
|
|
2085
2096
|
const k = 0.65 + 1.15 * (Math.log1p(this.g.inStart[i + 1] - this.g.inStart[i]) / Math.log1p(most));
|
|
2086
2097
|
circle(glow, x, y, k * 3.4, UNIT_DOT, fade(star, 0.2), null, 0, FLAG_GLOW);
|
|
2087
2098
|
circle(dots, x, y, k, UNIT_DOT, star);
|
|
2099
|
+
if (ring)
|
|
2100
|
+
circle(dots, x, y, k, UNIT_DOT, [0, 0, 0, 0], star, AXIOM_W, 0, AXIOM_AT);
|
|
2088
2101
|
continue;
|
|
2089
2102
|
}
|
|
2090
2103
|
if (style === "cells") {
|
|
@@ -2096,10 +2109,11 @@ export class GraphCanvas {
|
|
|
2096
2109
|
if (style === "stars")
|
|
2097
2110
|
this.constellations(figures, act);
|
|
2098
2111
|
// a pinned point carries a thin ring: where it is was chosen by hand. Nothing else rings a
|
|
2099
|
-
// point but a past graph's marks; status is the Status
|
|
2112
|
+
// point but a past graph's marks and an axiom's own ring, inside them; status is the Status
|
|
2113
|
+
// scheme's (decided 2026-10-08)
|
|
2100
2114
|
for (let i = 0; i < this.g.n; i++) {
|
|
2101
2115
|
if (this.visibleNode(i) && S.isPinned(i))
|
|
2102
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], th.pin, 1, 0, 2.5);
|
|
2116
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], th.pin, 1, 0, 2.5 + outside(this.g.nodes[i].kind));
|
|
2103
2117
|
}
|
|
2104
2118
|
// on a past graph, what changed since and what was renamed since have a ring of their own
|
|
2105
2119
|
const M = this.pastMarks;
|
|
@@ -2108,11 +2122,12 @@ export class GraphCanvas {
|
|
|
2108
2122
|
if (!(M[i] & (PAST_CHANGED | PAST_RENAMED)) || !this.visibleNode(i))
|
|
2109
2123
|
continue;
|
|
2110
2124
|
const faded = act && !act[i] ? 0.45 : 1;
|
|
2125
|
+
const out = outside(this.g.nodes[i].kind);
|
|
2111
2126
|
if (M[i] & PAST_CHANGED)
|
|
2112
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmChanged, faded), 1.6, 0, 2.2);
|
|
2127
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmChanged, faded), 1.6, 0, 2.2 + out);
|
|
2113
2128
|
// a rename is the lighter news: its ring is thinner and fainter than a change's
|
|
2114
2129
|
if (M[i] & PAST_RENAMED)
|
|
2115
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmRenamed, 0.7 * faded), 1.1, 0, M[i] & PAST_CHANGED ? 4.4 : 2.2);
|
|
2130
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmRenamed, 0.7 * faded), 1.1, 0, (M[i] & PAST_CHANGED ? 4.4 : 2.2) + out);
|
|
2116
2131
|
}
|
|
2117
2132
|
}
|
|
2118
2133
|
/** Of a cluster, its top-level namespace's hue among the cells' (CELL_HUES, by their size); the
|
|
@@ -2206,20 +2221,32 @@ export class GraphCanvas {
|
|
|
2206
2221
|
// own colour. Lit, it is drawn lit as any point is, its mark a ring around it: a faint point read
|
|
2207
2222
|
// as one left out of the selection
|
|
2208
2223
|
const m = this.pastMarks?.[i] ?? 0;
|
|
2224
|
+
// an axiom is a ring (the owner's decision of 2026-10-18: web/src/axiomring.ts): round its point
|
|
2225
|
+
// a gap apart, in the point's colour, lit or not, outside the project too; a past mark outside it
|
|
2226
|
+
const kind = this.g.nodes[i].kind;
|
|
2227
|
+
const ring = ringed(kind);
|
|
2209
2228
|
if (lit) {
|
|
2210
|
-
|
|
2229
|
+
// the lit point's halo of the canvas's colour is the ring's gap
|
|
2230
|
+
circle(L, x, y, LIT, UNIT_DOT, c, this.theme.bg, 1.5, 0, 0.75);
|
|
2231
|
+
if (ring)
|
|
2232
|
+
circle(L, x, y, LIT, UNIT_DOT, [0, 0, 0, 0], c, AXIOM_W, 0, AXIOM_AT);
|
|
2211
2233
|
if (m & PAST_GHOST)
|
|
2212
|
-
circle(L, x, y,
|
|
2234
|
+
circle(L, x, y, LIT, UNIT_DOT, [0, 0, 0, 0], this.theme.tmGone, 1.3, 0, 2.6 + outside(kind));
|
|
2213
2235
|
return;
|
|
2214
2236
|
}
|
|
2215
2237
|
if (m & PAST_GHOST) {
|
|
2216
2238
|
circle(L, x, y, 1, UNIT_DOT, a(0.28 * alpha), fade(this.theme.tmGone, alpha), 1.5, 0, -0.4);
|
|
2239
|
+
if (ring)
|
|
2240
|
+
circle(L, x, y, 1, UNIT_DOT, [0, 0, 0, 0], a(0.5 * alpha), AXIOM_W, 0, AXIOM_AT);
|
|
2217
2241
|
return;
|
|
2218
2242
|
}
|
|
2219
2243
|
if (this.g.isExt(i))
|
|
2220
2244
|
circle(L, x, y, 0.8, UNIT_DOT, [0, 0, 0, 0], a(alpha), 1.3, 0, -0.6);
|
|
2221
2245
|
else
|
|
2222
2246
|
circle(L, x, y, 1, UNIT_DOT, a(alpha));
|
|
2247
|
+
// round a point of one, so that the ring of one outside the project stands where a dot's would
|
|
2248
|
+
if (ring)
|
|
2249
|
+
circle(L, x, y, 1, UNIT_DOT, [0, 0, 0, 0], a(alpha), AXIOM_W, 0, AXIOM_AT);
|
|
2223
2250
|
}
|
|
2224
2251
|
draw() {
|
|
2225
2252
|
if (!this.scene)
|
|
@@ -2521,7 +2548,7 @@ export class GraphCanvas {
|
|
|
2521
2548
|
circle(C, S.cwx[t.c], S.cwy[t.c], S.drawnR[t.c], UNIT_WORLD, [a[0], a[1], a[2], shut ? 0 : 0.05], [a[0], a[1], a[2], 0.9], 2, 0, shut ? 3 : 0, 6);
|
|
2522
2549
|
}
|
|
2523
2550
|
else if (this.visibleNode(t.i)) {
|
|
2524
|
-
circle(P, this.px[t.i], this.py[t.i], 1, UNIT_DOT, [0, 0, 0, 0], [a[0], a[1], a[2], 0.95], 2, 0, 3.5);
|
|
2551
|
+
circle(P, this.px[t.i], this.py[t.i], 1, UNIT_DOT, [0, 0, 0, 0], [a[0], a[1], a[2], 0.95], 2, 0, 3.5 + outside(this.g.nodes[t.i].kind));
|
|
2525
2552
|
}
|
|
2526
2553
|
}
|
|
2527
2554
|
/** Text: cluster labels, labels of folded clusters, names up close. */
|
|
@@ -2596,14 +2623,17 @@ export class GraphCanvas {
|
|
|
2596
2623
|
// hidden, its room kept
|
|
2597
2624
|
const nameAt = (i, text, w, force = false) => {
|
|
2598
2625
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
2599
|
-
|
|
2626
|
+
// an axiom's name stands clear of its ring (web/src/axiomring.ts), its halo too, lit or not
|
|
2627
|
+
const kind = this.g.nodes[i].kind;
|
|
2628
|
+
const off = ringed(kind) ? outside(kind) + 1 + (this.active?.[i] ? (LIT - 1) * dotR : 0) : 0;
|
|
2629
|
+
const x0 = sx + dotR + 2 + off, y0 = sy - 7, x1 = x0 + w + 2, y1 = sy + 5;
|
|
2600
2630
|
if (!force && !free(x0, y0, x1, y1))
|
|
2601
2631
|
return false;
|
|
2602
2632
|
take(x0, y0, x1, y1);
|
|
2603
2633
|
const id = art ? artNameId("decl", this.g.nodes[i].name) : "";
|
|
2604
2634
|
if (hidden(id))
|
|
2605
2635
|
return false;
|
|
2606
|
-
write(text, sx + dotR + 3, sy + 3.5, id);
|
|
2636
|
+
write(text, sx + dotR + 3 + off, sy + 3.5, id);
|
|
2607
2637
|
return true;
|
|
2608
2638
|
};
|
|
2609
2639
|
const shown = (i) => {
|
|
@@ -2977,8 +3007,10 @@ export class GraphCanvas {
|
|
|
2977
3007
|
continue;
|
|
2978
3008
|
if (this.visibleNode(i)) {
|
|
2979
3009
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
3010
|
+
// an axiom's: outside its ring (web/src/axiomring.ts)
|
|
3011
|
+
const out = outside(this.g.nodes[i].kind) * 0.71;
|
|
2980
3012
|
if (onScreen(sx, sy, 12))
|
|
2981
|
-
diamond(sx - dotR - R * 0.4, sy - dotR - R * 0.3, R);
|
|
3013
|
+
diamond(sx - dotR - out - R * 0.4, sy - dotR - out - R * 0.3, R);
|
|
2982
3014
|
continue;
|
|
2983
3015
|
}
|
|
2984
3016
|
const c = S.nodeRep[i];
|
|
@@ -3030,7 +3062,7 @@ export class GraphCanvas {
|
|
|
3030
3062
|
if (this.visibleNode(i)) {
|
|
3031
3063
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
3032
3064
|
if (onScreen(sx, sy, 30))
|
|
3033
|
-
mark(sx, sy,
|
|
3065
|
+
mark(sx, sy, pickRadius(dotR, this.g.nodes[i].kind), m);
|
|
3034
3066
|
continue;
|
|
3035
3067
|
}
|
|
3036
3068
|
const c = S.nodeRep[i];
|
|
@@ -3174,8 +3206,16 @@ export class GraphCanvas {
|
|
|
3174
3206
|
const c = this.scheme === "status" ? th.status[v.status] ?? th.status[ST_UNREVIEWED] : v.kind === "external" ? th.ext : th.kind[v.kind] ?? th.ext;
|
|
3175
3207
|
ctx.fillStyle = css(th.bg);
|
|
3176
3208
|
ctx.beginPath();
|
|
3177
|
-
ctx.arc(x, y, R + 3, 0, 2 * Math.PI);
|
|
3209
|
+
ctx.arc(x, y, R + 3 + (v.axiom ? AXIOM_OUT : 0), 0, 2 * Math.PI);
|
|
3178
3210
|
ctx.fill();
|
|
3211
|
+
// an axiom's ring (web/src/axiomring.ts), solid in its colour outside the visitor's dashed one
|
|
3212
|
+
if (v.axiom) {
|
|
3213
|
+
ctx.lineWidth = AXIOM_W;
|
|
3214
|
+
ctx.strokeStyle = css(c, 0.9);
|
|
3215
|
+
ctx.beginPath();
|
|
3216
|
+
ctx.arc(x, y, R + 1.75 + AXIOM_AT, 0, 2 * Math.PI);
|
|
3217
|
+
ctx.stroke();
|
|
3218
|
+
}
|
|
3179
3219
|
ctx.fillStyle = css(c, 0.9);
|
|
3180
3220
|
ctx.beginPath();
|
|
3181
3221
|
ctx.arc(x, y, R - 1.5, 0, 2 * Math.PI);
|
|
@@ -3278,7 +3318,7 @@ export class GraphCanvas {
|
|
|
3278
3318
|
return null;
|
|
3279
3319
|
if (this.visibleNode(i)) {
|
|
3280
3320
|
const [x, y] = this.toScreen(this.px[i], this.py[i]);
|
|
3281
|
-
return [x, y, dotR + 4, -1 - i];
|
|
3321
|
+
return [x, y, dotR + 4 + outside(this.g.nodes[i].kind), -1 - i];
|
|
3282
3322
|
}
|
|
3283
3323
|
const c = S.nodeRep[i];
|
|
3284
3324
|
if (c < 0 || !this.clusterVisible(c))
|
|
@@ -3357,7 +3397,8 @@ export class GraphCanvas {
|
|
|
3357
3397
|
drawSelection(dotR) {
|
|
3358
3398
|
const S = this.scene;
|
|
3359
3399
|
const k = this.cam.k;
|
|
3360
|
-
|
|
3400
|
+
/** round a point, clear of an axiom's ring */
|
|
3401
|
+
const pointR = (i) => pickRadius(dotR, this.g.nodes[i].kind);
|
|
3361
3402
|
/** a folded cluster's ring: round its card while it has one, else round its body */
|
|
3362
3403
|
const body = (c) => {
|
|
3363
3404
|
const b = this.clusterBoxes.get(c);
|
|
@@ -3375,7 +3416,7 @@ export class GraphCanvas {
|
|
|
3375
3416
|
if (W.vrep[t.k] >= 0)
|
|
3376
3417
|
return this.clusterVisible(W.vrep[t.k]) ? body(W.vrep[t.k]) : null;
|
|
3377
3418
|
const [x, y] = this.toScreen(W.vx[t.k], W.vy[t.k]);
|
|
3378
|
-
return { x, y, r: this.visitorR() + 5 };
|
|
3419
|
+
return { x, y, r: this.visitorR() + 5 + (this.visitors[t.k]?.axiom ? AXIOM_OUT : 0) };
|
|
3379
3420
|
}
|
|
3380
3421
|
if (t.kind === "node") {
|
|
3381
3422
|
if (t.i < 0 || t.i >= this.g.n)
|
|
@@ -3383,7 +3424,7 @@ export class GraphCanvas {
|
|
|
3383
3424
|
if (!this.visibleNode(t.i))
|
|
3384
3425
|
return S.nodeRep[t.i] < 0 ? null : body(S.nodeRep[t.i]);
|
|
3385
3426
|
const [x, y] = this.toScreen(this.px[t.i], this.py[t.i]);
|
|
3386
|
-
return { x, y, r: pointR };
|
|
3427
|
+
return { x, y, r: pointR(t.i) };
|
|
3387
3428
|
}
|
|
3388
3429
|
if (t.c < 0 || t.c >= S.nc || !this.clusterVisible(t.c))
|
|
3389
3430
|
return null;
|
|
@@ -3551,10 +3592,10 @@ export class GraphCanvas {
|
|
|
3551
3592
|
this.leaders = [];
|
|
3552
3593
|
this.clusterBoxes.clear();
|
|
3553
3594
|
// the selection has no card, but nothing covers its rings either (drawSelection)
|
|
3554
|
-
const lr = Math.max(7, dotR + 4) + 4;
|
|
3555
3595
|
for (const i of chosen) {
|
|
3556
3596
|
if (!this.visibleNode(i))
|
|
3557
3597
|
continue;
|
|
3598
|
+
const lr = pickRadius(dotR, this.g.nodes[i].kind) + 4;
|
|
3558
3599
|
const [lx, ly] = this.toScreen(this.px[i], this.py[i]);
|
|
3559
3600
|
grid.add(lx - lr, ly - lr, lx + lr, ly + lr);
|
|
3560
3601
|
}
|
|
@@ -3564,8 +3605,9 @@ export class GraphCanvas {
|
|
|
3564
3605
|
if (r.width && r.height)
|
|
3565
3606
|
grid.add(r.left - box0.left, r.top - box0.top, r.right - box0.left, r.bottom - box0.top);
|
|
3566
3607
|
// the lit points themselves
|
|
3567
|
-
const pr = Math.max(3, dotR) + 2;
|
|
3568
3608
|
for (const i of activeDots) {
|
|
3609
|
+
// an axiom's ring with it
|
|
3610
|
+
const pr = Math.max(3, dotR) + 2 + outside(this.g.nodes[i].kind);
|
|
3569
3611
|
const [x, y] = this.toScreen(this.px[i], this.py[i]);
|
|
3570
3612
|
grid.add(x - pr, y - pr, x + pr, y + pr);
|
|
3571
3613
|
}
|
|
@@ -3636,7 +3678,7 @@ export class GraphCanvas {
|
|
|
3636
3678
|
// its dot has its point's colour, in the scheme in force (style.css, .card.s-*); nothing else on
|
|
3637
3679
|
// a card tells of its status
|
|
3638
3680
|
const st = this.scheme === "status" ? ` ss s-${STATUSES[this.statusCode[i] ?? ST_UNREVIEWED]}` : "";
|
|
3639
|
-
el.className = `card
|
|
3681
|
+
el.className = `card ${kindDot(v.kind, g.isExt(i))}${st}${this.targetList.includes(i) ? " target" : this.keyList.includes(i) ? " key" : ""}`;
|
|
3640
3682
|
el.dataset.node = String(i);
|
|
3641
3683
|
// on a past graph, its marks against now: a renamed one's name now among them
|
|
3642
3684
|
const marks = this.pastMarks?.[i] ?? 0;
|
package/dist/web/src/past.js
CHANGED
|
@@ -173,6 +173,20 @@ export function latestOf(snaps) {
|
|
|
173
173
|
best = s;
|
|
174
174
|
return best;
|
|
175
175
|
}
|
|
176
|
+
/** Where a reader in the Time Machine goes once the server has read a new build (the owner's decision
|
|
177
|
+
* of 2026-10-18, HistorySpec decision 18): one at the latest build goes on to the new latest, so
|
|
178
|
+
* that a new build is never left behind as a past one; one at a build they chose stays there, and so
|
|
179
|
+
* does one on a view kept at the build they are at (it stays kept), and one following someone,
|
|
180
|
+
* whose build presence brings. `at` is the build aimed at, `before` and `now` the latest builds
|
|
181
|
+
* before and after the list was read again, `kept` the build the view on show is kept at. The build
|
|
182
|
+
* to go to, or null to stay. */
|
|
183
|
+
export function onNewBuild(at, before, now, o) {
|
|
184
|
+
if (at === null || now === null || before === now || at !== before)
|
|
185
|
+
return null;
|
|
186
|
+
if (o.following || o.kept === at)
|
|
187
|
+
return null;
|
|
188
|
+
return now;
|
|
189
|
+
}
|
|
176
190
|
// ------------------------------------------------------------------------------------ the graph
|
|
177
191
|
/** The memory a past board is laid out from where it has none of its own (shared/layout.ts,
|
|
178
192
|
* stabilize): the layout of the board of now, so that what both have stays where it is; a
|
|
@@ -209,6 +223,20 @@ export function markWords(marks, now) {
|
|
|
209
223
|
out.push("changed since");
|
|
210
224
|
return out;
|
|
211
225
|
}
|
|
226
|
+
/** What the bar says of a build that could not read some of the project's files (its snapshot's
|
|
227
|
+
* `missing`: a failed file, what imports one): what they held is on none of its boards and counts as
|
|
228
|
+
* no change against now (HistorySpec decision 6), so that it is not taken for gone. Null for a build
|
|
229
|
+
* that read them all. */
|
|
230
|
+
export function unreadWords(missing) {
|
|
231
|
+
const n = missing.length;
|
|
232
|
+
if (!n)
|
|
233
|
+
return null;
|
|
234
|
+
const which = missing.slice(0, 8).join(", ") + (n > 8 ? `, and ${n - 8} more` : "");
|
|
235
|
+
return {
|
|
236
|
+
label: `${n} file${n === 1 ? "" : "s"} unread`,
|
|
237
|
+
tip: `${n === 1 ? "A file" : `${n} files`} could not be read at this build (a failed file, or what imports one): ${which}. What ${n === 1 ? "it" : "they"} held is on none of its boards, and is not counted as changed.`,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
212
240
|
/** The marks of the declarations of a board (`toFull`: board → past graph), in the board's
|
|
213
241
|
* numbering, and the names now of those renamed. */
|
|
214
242
|
export function boardMarks(p, n, toFull) {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// it says in words, reading picks back from a query (an address, a reader followed, an agent), what
|
|
18
18
|
// a click or a shift-click does to the list, and how key 2 steps through Rests on. main.ts keeps the
|
|
19
19
|
// list and the thing the panel tells of; web/src/selbar.ts shows the list.
|
|
20
|
+
import { renameInQuery } from "../../shared/moves.js";
|
|
20
21
|
import { describe, keysQuery, parseQuery, printQuery, readKeys } from "../../shared/query.js";
|
|
21
22
|
/** Every tool, as the address and presence name them (web/src/state.ts). */
|
|
22
23
|
export const TOOLS = ["plain", "deps", "tcb", "keys", "refs", "apps"];
|
|
@@ -117,19 +118,25 @@ function short(name) {
|
|
|
117
118
|
const tail = parts[parts.length - 1];
|
|
118
119
|
return /^\d+$/.test(tail) || tail.length <= 2 ? parts.slice(-2).join(".") : tail;
|
|
119
120
|
}
|
|
120
|
-
/** A pick in a few words, as its chip says it: "Minimal", "TCB of not_fermat_42", "ns Fermat42".
|
|
121
|
-
|
|
121
|
+
/** A pick in a few words, as its chip says it: "Minimal", "TCB of not_fermat_42", "ns Fermat42".
|
|
122
|
+
* With `names` (shared/titles.ts, the graph on show's), a name is said as a view's title says it:
|
|
123
|
+
* with the parents that tell it apart from the project's others of its kind ("what
|
|
124
|
+
* Dim24.MainTheorem uses" beside Dim8's; ViewSpec decision 25). */
|
|
125
|
+
export function pickWords(p, names) {
|
|
122
126
|
const r = p.root;
|
|
123
127
|
let what;
|
|
124
128
|
if (!r)
|
|
125
129
|
return describe(p.q);
|
|
126
130
|
if ("decl" in r)
|
|
127
|
-
what = short(r.decl);
|
|
131
|
+
what = names?.decl(r.decl) ?? short(r.decl);
|
|
128
132
|
else if (r.cluster === EXT)
|
|
129
133
|
what = "the outside world";
|
|
130
134
|
else {
|
|
131
135
|
const ext = r.cluster.startsWith(EXT + ".");
|
|
132
|
-
|
|
136
|
+
const by = r.by === "module" ? "file" : "ns";
|
|
137
|
+
// the outside world's namespaces and folders are not the project's: said by their last part
|
|
138
|
+
const told = ext || !names ? short(ext ? r.cluster.slice(EXT.length + 1) : r.cluster) : names[by](r.cluster);
|
|
139
|
+
what = `${by} ${told}${ext ? " (outside)" : ""}`;
|
|
133
140
|
}
|
|
134
141
|
if (p.tool === "keys")
|
|
135
142
|
return `keys ${what} rests on`;
|
|
@@ -204,6 +211,42 @@ export function retool(picks, shown, tool, keys = () => null) {
|
|
|
204
211
|
const next = withTool(last, tool, keys);
|
|
205
212
|
return next ? { picks: [next], shown: shownOf(next) } : { picks, shown };
|
|
206
213
|
}
|
|
214
|
+
/** The selection once a build renamed what it is on (HistorySpec decision 10; the manual's "Live": a
|
|
215
|
+
* new graph keeps the selection): a declaration picked, or told of in the panel, that the graph no
|
|
216
|
+
* longer has, and that the renames in force lead on to one it has, is that one. `renamed` maps each
|
|
217
|
+
* name to the one before it (ReviewData.renamed, shared/moves.ts); `has` says what the graph has.
|
|
218
|
+
* The same array and object where nothing it names was renamed. */
|
|
219
|
+
export function followRenames(picks, shown, renamed, has) {
|
|
220
|
+
if (!renamed)
|
|
221
|
+
return { picks, shown };
|
|
222
|
+
const ahead = new Map();
|
|
223
|
+
for (const [to, from] of Object.entries(renamed))
|
|
224
|
+
ahead.set(from, to);
|
|
225
|
+
/** its name now, where it is gone and a rename leads on to one the graph has; else null */
|
|
226
|
+
const now = (name) => {
|
|
227
|
+
if (has(name))
|
|
228
|
+
return null;
|
|
229
|
+
let n = name;
|
|
230
|
+
// a chain is as long as the renames of one declaration; a loop (a log edited by hand) is cut short
|
|
231
|
+
for (let k = 0; k < 1000 && ahead.has(n); k++) {
|
|
232
|
+
n = ahead.get(n);
|
|
233
|
+
if (has(n))
|
|
234
|
+
return n;
|
|
235
|
+
}
|
|
236
|
+
return null;
|
|
237
|
+
};
|
|
238
|
+
let changed = false;
|
|
239
|
+
const next = picks.map((p) => {
|
|
240
|
+
const from = p.root && "decl" in p.root ? p.root.decl : null;
|
|
241
|
+
const to = from === null ? null : now(from);
|
|
242
|
+
if (to === null)
|
|
243
|
+
return p;
|
|
244
|
+
changed = true;
|
|
245
|
+
return { ...p, root: { decl: to }, q: renameInQuery(p.q, from, to) };
|
|
246
|
+
});
|
|
247
|
+
const to = shown && "decl" in shown ? now(shown.decl) : null;
|
|
248
|
+
return { picks: changed ? next : picks, shown: to === null ? shown : { decl: to } };
|
|
249
|
+
}
|
|
207
250
|
/** The edges a selection draws (canvas.ts, MODE_SITES): a TCB's statement and body edges when every
|
|
208
251
|
* pick is a TCB, else every edge between what is lit. (While the tool is Keys the canvas draws the
|
|
209
252
|
* key graph's edges instead: shared/keys.ts, litKeyEdges.) */
|
package/dist/web/src/status.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
// review at all (not yet reviewed, trusted). A file being compiled shows so while it lasts. What
|
|
6
6
|
// agents advise is not among the states: advice is never counted, and the panel shows it apart
|
|
7
7
|
// (AgentSpec decision 2).
|
|
8
|
-
import { statusOf
|
|
8
|
+
import { statusOf } from "../../shared/review.js";
|
|
9
|
+
import { needsReview } from "../../shared/reviewqueue.js";
|
|
9
10
|
/** The states, most urgent first; a declaration's code is its index here. The legend lists them in
|
|
10
11
|
* this order, and the CSS colours are `--status-<state>`. */
|
|
11
12
|
export const STATUSES = ["failed", "building", "sorry", "commented", "stale", "approved", "unreviewed", "trusted"];
|
|
@@ -53,7 +54,8 @@ export function statusState(d, g, i, file, sorryAx) {
|
|
|
53
54
|
return ST_STALE;
|
|
54
55
|
if (s === "approved")
|
|
55
56
|
return ST_APPROVED;
|
|
56
|
-
|
|
57
|
+
// a non-standard axiom needs review whatever trusts it (ReviewSpec decision 3)
|
|
58
|
+
return needsReview(g, d, i) ? ST_UNREVIEWED : ST_TRUSTED;
|
|
57
59
|
}
|
|
58
60
|
/** Every declaration of `g`'s state, as codes (indices into STATUSES). `files` holds the build
|
|
59
61
|
* status of the project's files, by module; empty in a snapshot or before the first report. */
|