@bypane/cli 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +188 -2
- package/dist/app-host.js +408 -0
- package/dist/app-protocol.js +1 -0
- package/dist/app-worker.js +556 -0
- package/dist/cli.js +810 -0
- package/dist/config.js +42 -0
- package/dist/demo.js +430 -0
- package/dist/expr.js +460 -0
- package/dist/ipc.js +201 -0
- package/dist/mcp.js +416 -0
- package/dist/multiplexer.js +281 -0
- package/dist/png.js +208 -0
- package/dist/primitives.js +669 -0
- package/dist/selection.js +170 -0
- package/dist/setup.js +329 -0
- package/dist/skill.js +219 -0
- package/dist/state.js +1147 -0
- package/dist/types.js +1 -0
- package/dist/ui-surface.js +744 -0
- package/dist/ui.js +1466 -0
- package/examples/spring-studio.ts +420 -0
- package/package.json +58 -4
- package/skills/bypane/SKILL.md +136 -0
package/dist/config.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
export const DEFAULT_CONFIG = {
|
|
5
|
+
autoDock: true,
|
|
6
|
+
splitDirection: "right",
|
|
7
|
+
splitRatio: 44,
|
|
8
|
+
};
|
|
9
|
+
export function configPath(overrideHome) {
|
|
10
|
+
const xdg = !overrideHome ? process.env.XDG_CONFIG_HOME : undefined;
|
|
11
|
+
const base = xdg || join(overrideHome || process.env.HOME || homedir(), ".config");
|
|
12
|
+
return join(base, "bypane", "config.json");
|
|
13
|
+
}
|
|
14
|
+
export function loadConfig(overrideHome) {
|
|
15
|
+
const path = configPath(overrideHome);
|
|
16
|
+
if (!existsSync(path))
|
|
17
|
+
return { ...DEFAULT_CONFIG };
|
|
18
|
+
try {
|
|
19
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
20
|
+
const dir = parsed.splitDirection;
|
|
21
|
+
const validDir = dir === "right" || dir === "left" || dir === "below" || dir === "above"
|
|
22
|
+
? dir
|
|
23
|
+
: DEFAULT_CONFIG.splitDirection;
|
|
24
|
+
const ratio = typeof parsed.splitRatio === "number" && parsed.splitRatio >= 20 && parsed.splitRatio <= 80
|
|
25
|
+
? Math.round(parsed.splitRatio)
|
|
26
|
+
: DEFAULT_CONFIG.splitRatio;
|
|
27
|
+
return {
|
|
28
|
+
autoDock: typeof parsed.autoDock === "boolean" ? parsed.autoDock : DEFAULT_CONFIG.autoDock,
|
|
29
|
+
splitDirection: validDir,
|
|
30
|
+
splitRatio: ratio,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return { ...DEFAULT_CONFIG };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function saveConfig(config, overrideHome) {
|
|
38
|
+
const path = configPath(overrideHome);
|
|
39
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
40
|
+
writeFileSync(path, `${JSON.stringify(config, null, 2)}\n`, "utf8");
|
|
41
|
+
return path;
|
|
42
|
+
}
|
package/dist/demo.js
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { deflateSync } from "node:zlib";
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
/** Generates a crisp synthetic PNG gradient + geometric card so the demo works anywhere offline. */
|
|
6
|
+
function crc32(buf) {
|
|
7
|
+
let c = 0xffffffff;
|
|
8
|
+
for (let i = 0; i < buf.length; i++) {
|
|
9
|
+
c ^= buf[i];
|
|
10
|
+
for (let k = 0; k < 8; k++) {
|
|
11
|
+
c = (c >>> 1) ^ (0xedb88320 & -(c & 1));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return (c ^ 0xffffffff) >>> 0;
|
|
15
|
+
}
|
|
16
|
+
function pngChunk(type, data) {
|
|
17
|
+
const out = new Uint8Array(12 + data.length);
|
|
18
|
+
const dv = new DataView(out.buffer);
|
|
19
|
+
dv.setUint32(0, data.length);
|
|
20
|
+
for (let i = 0; i < 4; i++)
|
|
21
|
+
out[4 + i] = type.charCodeAt(i);
|
|
22
|
+
out.set(data, 8);
|
|
23
|
+
dv.setUint32(8 + data.length, crc32(out.subarray(4, 8 + data.length)));
|
|
24
|
+
return out;
|
|
25
|
+
}
|
|
26
|
+
export function createDemoPng(width = 160, height = 96) {
|
|
27
|
+
const stride = width * 4;
|
|
28
|
+
const raw = new Uint8Array(height * (stride + 1));
|
|
29
|
+
for (let y = 0; y < height; y++) {
|
|
30
|
+
const rowStart = y * (stride + 1);
|
|
31
|
+
raw[rowStart] = 0;
|
|
32
|
+
for (let x = 0; x < width; x++) {
|
|
33
|
+
const i = rowStart + 1 + x * 4;
|
|
34
|
+
const nx = x / width;
|
|
35
|
+
const ny = y / height;
|
|
36
|
+
// Clean dark-slate backdrop with soft indigo/mint radial glow and crisp frame accents
|
|
37
|
+
const dx1 = nx - 0.32;
|
|
38
|
+
const dy1 = ny - 0.42;
|
|
39
|
+
const g1 = Math.exp(-(dx1 * dx1 + dy1 * dy1) * 9);
|
|
40
|
+
const dx2 = nx - 0.72;
|
|
41
|
+
const dy2 = ny - 0.62;
|
|
42
|
+
const g2 = Math.exp(-(dx2 * dx2 + dy2 * dy2) * 10);
|
|
43
|
+
let r = 18 + g1 * 90 + g2 * 35;
|
|
44
|
+
let g = 22 + g1 * 125 + g2 * 175;
|
|
45
|
+
let b = 34 + g1 * 215 + g2 * 120;
|
|
46
|
+
// Subtle geometric rings
|
|
47
|
+
const dist = Math.hypot((nx - 0.5) * (width / height), ny - 0.5);
|
|
48
|
+
if (Math.abs(dist - 0.28) < 0.015 || Math.abs(dist - 0.14) < 0.012) {
|
|
49
|
+
r = 225;
|
|
50
|
+
g = 236;
|
|
51
|
+
b = 255;
|
|
52
|
+
}
|
|
53
|
+
raw[i] = Math.min(255, Math.round(r));
|
|
54
|
+
raw[i + 1] = Math.min(255, Math.round(g));
|
|
55
|
+
raw[i + 2] = Math.min(255, Math.round(b));
|
|
56
|
+
raw[i + 3] = 255;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const ihdr = new Uint8Array(13);
|
|
60
|
+
const dv = new DataView(ihdr.buffer);
|
|
61
|
+
dv.setUint32(0, width);
|
|
62
|
+
dv.setUint32(4, height);
|
|
63
|
+
ihdr[8] = 8;
|
|
64
|
+
ihdr[9] = 6; // RGBA
|
|
65
|
+
const idat = deflateSync(raw);
|
|
66
|
+
const sig = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
|
|
67
|
+
const c1 = pngChunk("IHDR", ihdr);
|
|
68
|
+
const c2 = pngChunk("IDAT", idat);
|
|
69
|
+
const c3 = pngChunk("IEND", new Uint8Array(0));
|
|
70
|
+
const out = new Uint8Array(sig.length + c1.length + c2.length + c3.length);
|
|
71
|
+
let off = 0;
|
|
72
|
+
for (const part of [sig, c1, c2, c3]) {
|
|
73
|
+
out.set(part, off);
|
|
74
|
+
off += part.length;
|
|
75
|
+
}
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
export function loadDemoSurfaces(store) {
|
|
79
|
+
const demoPngPath = join(tmpdir(), `bypane-demo-${process.getuid?.() ?? 0}.png`);
|
|
80
|
+
try {
|
|
81
|
+
writeFileSync(demoPngPath, createDemoPng());
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Ignore if tmp write fails; image card will display fallback error gracefully.
|
|
85
|
+
}
|
|
86
|
+
store.present({
|
|
87
|
+
id: "demo-plan",
|
|
88
|
+
kind: "markdown",
|
|
89
|
+
title: "Release Plan",
|
|
90
|
+
focus: true,
|
|
91
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
92
|
+
content: [
|
|
93
|
+
"# bypane v0.1 Release Checklist",
|
|
94
|
+
"",
|
|
95
|
+
"Toggle tasks below with **Space** (or click) — agents read your checked state via `bypane_state`, or press **`s`** to push feedback straight back to your agent pane.",
|
|
96
|
+
"",
|
|
97
|
+
"- [x] Per-session Unix socket IPC & Rex/tmux auto-dock",
|
|
98
|
+
"- [x] MCP stdio server (`bypane mcp`) with human-only `ask` gates",
|
|
99
|
+
"- [ ] Review latency benchmark table on tab `3`",
|
|
100
|
+
"- [ ] Confirm rollout target on tab `5`",
|
|
101
|
+
"",
|
|
102
|
+
"## Why a companion pane?",
|
|
103
|
+
"",
|
|
104
|
+
"Chat stays conversational in your main pane while plans, QuickLook images/files, filterable tables, braille charts, and interactive approvals stay spatial and persistent here.",
|
|
105
|
+
].join("\n"),
|
|
106
|
+
});
|
|
107
|
+
store.present({
|
|
108
|
+
id: "demo-image",
|
|
109
|
+
kind: "image",
|
|
110
|
+
title: "preview.png",
|
|
111
|
+
path: demoPngPath,
|
|
112
|
+
caption: "Inline PNG rendered via Kitty/Ghostty graphics (half-block fallback elsewhere). Press 'o' to open on host.",
|
|
113
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
114
|
+
focus: false,
|
|
115
|
+
});
|
|
116
|
+
store.present({
|
|
117
|
+
id: "demo-table",
|
|
118
|
+
kind: "table",
|
|
119
|
+
title: "Benchmarks",
|
|
120
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
121
|
+
focus: false,
|
|
122
|
+
columns: [
|
|
123
|
+
{ key: "runtime", label: "Runtime", width: 18 },
|
|
124
|
+
{ key: "startup", label: "Startup", align: "right", width: 10 },
|
|
125
|
+
{ key: "memory", label: "Peak RAM", align: "right", width: 10 },
|
|
126
|
+
{ key: "binary", label: "Size", align: "right", width: 10 },
|
|
127
|
+
{ key: "notes", label: "Notes" },
|
|
128
|
+
],
|
|
129
|
+
rows: [
|
|
130
|
+
{ id: "scriptc", runtime: "bypane (scriptc)", startup: "1.8 ms", memory: "3.9 MB", binary: "1.9 MB", notes: "Native binary, zero runtime" },
|
|
131
|
+
{ id: "node24", runtime: "bypane (Node 24)", startup: "89 ms", memory: "96 MB", binary: "123 MB", notes: "Instant dev iteration" },
|
|
132
|
+
{ id: "ink", runtime: "Ink / React TUI", startup: "240 ms", memory: "148 MB", binary: "160 MB", notes: "Virtual DOM overhead" },
|
|
133
|
+
{ id: "electron", runtime: "Electron Sidecar", startup: "1450 ms", memory: "380 MB", binary: "210 MB", notes: "Heavy desktop shell" },
|
|
134
|
+
],
|
|
135
|
+
});
|
|
136
|
+
store.present({
|
|
137
|
+
id: "demo-chart",
|
|
138
|
+
kind: "chart",
|
|
139
|
+
title: "Frame Timing",
|
|
140
|
+
unit: "ms",
|
|
141
|
+
caption: "Render + cell-diff latency per frame (braille dots)",
|
|
142
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
143
|
+
focus: false,
|
|
144
|
+
series: [
|
|
145
|
+
{ name: "p50", color: "#5fd787", values: [0.18, 0.16, 0.15, 0.17, 0.14, 0.13, 0.14, 0.13, 0.12, 0.13, 0.13, 0.12] },
|
|
146
|
+
{ name: "p99", color: "#7aa2ff", values: [0.42, 0.39, 0.45, 0.36, 0.34, 0.31, 0.35, 0.29, 0.28, 0.30, 0.27, 0.26] },
|
|
147
|
+
],
|
|
148
|
+
});
|
|
149
|
+
store.present({
|
|
150
|
+
id: "demo-ask",
|
|
151
|
+
kind: "ask",
|
|
152
|
+
title: "Deploy Target",
|
|
153
|
+
mode: "select",
|
|
154
|
+
prompt: "Which distribution channel should we publish first?",
|
|
155
|
+
context: "Agents can pre-highlight an option, but **`allow` blocks agents from submitting**. Only your keypress or click resolves this gate.",
|
|
156
|
+
options: [
|
|
157
|
+
{ value: "npm", label: "npm + npx bypane (fastest JS onboarding)" },
|
|
158
|
+
{ value: "brew", label: "Homebrew tap + prebuilt scriptc binaries (~2 ms)" },
|
|
159
|
+
{ value: "both", label: "Both npm and GitHub Release native binaries" },
|
|
160
|
+
],
|
|
161
|
+
defaultValue: "both",
|
|
162
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
163
|
+
focus: false,
|
|
164
|
+
});
|
|
165
|
+
store.present({
|
|
166
|
+
id: "demo-tuner",
|
|
167
|
+
kind: "ui",
|
|
168
|
+
title: "Rollout Tuner",
|
|
169
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
170
|
+
focus: false,
|
|
171
|
+
state: {
|
|
172
|
+
replicas: 4,
|
|
173
|
+
canaryPct: 20,
|
|
174
|
+
region: "us-east",
|
|
175
|
+
autoRollback: true,
|
|
176
|
+
},
|
|
177
|
+
root: {
|
|
178
|
+
type: "col",
|
|
179
|
+
gap: 1,
|
|
180
|
+
children: [
|
|
181
|
+
{
|
|
182
|
+
type: "row",
|
|
183
|
+
gap: 1,
|
|
184
|
+
children: [
|
|
185
|
+
{
|
|
186
|
+
type: "box",
|
|
187
|
+
title: "Est. Cost",
|
|
188
|
+
child: {
|
|
189
|
+
type: "stat",
|
|
190
|
+
label: "{{replicas}} pods · {{region}}",
|
|
191
|
+
value: "${{replicas * 38}}/mo",
|
|
192
|
+
delta: "{{region == 'global' ? '+2x edge' : 'single region'}}",
|
|
193
|
+
tone: "{{replicas > 10 ? 'warn' : 'primary'}}",
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: "box",
|
|
198
|
+
title: "Projected p99",
|
|
199
|
+
child: {
|
|
200
|
+
type: "stat",
|
|
201
|
+
label: "at {{canaryPct}}% traffic",
|
|
202
|
+
value: "{{round(14 + 48 / sqrt(replicas))}} ms",
|
|
203
|
+
delta: "{{autoRollback ? 'guard ON' : 'guard OFF'}}",
|
|
204
|
+
tone: "{{replicas >= 4 ? 'success' : 'warn'}}",
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: "box",
|
|
209
|
+
title: "Blast Radius",
|
|
210
|
+
child: {
|
|
211
|
+
type: "meter",
|
|
212
|
+
label: "Canary exposure",
|
|
213
|
+
value: "{{canaryPct}}",
|
|
214
|
+
min: 0,
|
|
215
|
+
max: 100,
|
|
216
|
+
format: "{{percent}}%",
|
|
217
|
+
tone: "{{canaryPct > 50 ? 'warn' : 'success'}}",
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
type: "box",
|
|
224
|
+
title: "Controls (Tab to focus · ←/→ or drag sliders)",
|
|
225
|
+
children: [
|
|
226
|
+
{
|
|
227
|
+
type: "slider",
|
|
228
|
+
bind: "replicas",
|
|
229
|
+
label: "Replicas",
|
|
230
|
+
min: 1,
|
|
231
|
+
max: 16,
|
|
232
|
+
step: 1,
|
|
233
|
+
unit: "pods",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
type: "slider",
|
|
237
|
+
bind: "canaryPct",
|
|
238
|
+
label: "Canary traffic",
|
|
239
|
+
min: 5,
|
|
240
|
+
max: 100,
|
|
241
|
+
step: 5,
|
|
242
|
+
unit: "%",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
type: "segmented",
|
|
246
|
+
bind: "region",
|
|
247
|
+
label: "Region",
|
|
248
|
+
options: [
|
|
249
|
+
{ value: "us-east", label: "us-east" },
|
|
250
|
+
{ value: "eu-west", label: "eu-west" },
|
|
251
|
+
{ value: "global", label: "global" },
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: "toggle",
|
|
256
|
+
bind: "autoRollback",
|
|
257
|
+
label: "Auto-rollback on error spike",
|
|
258
|
+
description: "halts rollout if 5xx > 0.5%",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
type: "chart",
|
|
264
|
+
title: "Simulated p99 Latency Curve",
|
|
265
|
+
unit: "ms",
|
|
266
|
+
min: 0,
|
|
267
|
+
max: 80,
|
|
268
|
+
series: [
|
|
269
|
+
{
|
|
270
|
+
name: "p99",
|
|
271
|
+
color: "#7aa2ff",
|
|
272
|
+
values: {
|
|
273
|
+
points: 24,
|
|
274
|
+
expr: "round(14 + (48 / sqrt(replicas)) * (0.65 + 0.55 * t) + sin(t * 9) * 1.6, 1)",
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "p50",
|
|
279
|
+
color: "#5fd787",
|
|
280
|
+
values: {
|
|
281
|
+
points: 24,
|
|
282
|
+
expr: "round(6 + (16 / sqrt(replicas)) * (0.75 + 0.35 * t), 1)",
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
type: "row",
|
|
289
|
+
gap: 1,
|
|
290
|
+
children: [
|
|
291
|
+
{
|
|
292
|
+
type: "button",
|
|
293
|
+
action: "preset-safe",
|
|
294
|
+
label: "Safe Default",
|
|
295
|
+
set: { replicas: 4, canaryPct: 10, region: "us-east", autoRollback: true },
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: "button",
|
|
299
|
+
action: "preset-scale",
|
|
300
|
+
label: "High Scale",
|
|
301
|
+
set: { replicas: 12, canaryPct: 50, region: "global", autoRollback: true },
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
type: "button",
|
|
305
|
+
action: "apply",
|
|
306
|
+
label: "Apply Rollout",
|
|
307
|
+
variant: "primary",
|
|
308
|
+
submit: true,
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
store.present({
|
|
316
|
+
id: "demo-timeline",
|
|
317
|
+
kind: "ui",
|
|
318
|
+
title: "Release Timeline",
|
|
319
|
+
origin: { mux: "standalone", label: "demo-agent" },
|
|
320
|
+
focus: false,
|
|
321
|
+
state: {
|
|
322
|
+
stage: "canary",
|
|
323
|
+
},
|
|
324
|
+
root: {
|
|
325
|
+
type: "col",
|
|
326
|
+
gap: 1,
|
|
327
|
+
children: [
|
|
328
|
+
{
|
|
329
|
+
type: "box",
|
|
330
|
+
title: "Pipeline Waterfall (↑/↓ or click stage to inspect)",
|
|
331
|
+
child: {
|
|
332
|
+
type: "timeline",
|
|
333
|
+
bind: "stage",
|
|
334
|
+
mode: "gantt",
|
|
335
|
+
unit: "s",
|
|
336
|
+
min: 0,
|
|
337
|
+
max: 120,
|
|
338
|
+
items: [
|
|
339
|
+
{
|
|
340
|
+
id: "typecheck",
|
|
341
|
+
label: "Typecheck & Lint",
|
|
342
|
+
status: "done",
|
|
343
|
+
start: 0,
|
|
344
|
+
end: 14,
|
|
345
|
+
meta: "14s",
|
|
346
|
+
detail: "tsc --noEmit passed across 12 source files with 0 warnings.",
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "build",
|
|
350
|
+
label: "scriptc Native Build",
|
|
351
|
+
status: "done",
|
|
352
|
+
start: 14,
|
|
353
|
+
end: 36,
|
|
354
|
+
meta: "22s",
|
|
355
|
+
detail: "Compiled 1.9 MB native binary (darwin-arm64 + linux-x64).",
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: "tests",
|
|
359
|
+
label: "Headless TUI Suite",
|
|
360
|
+
status: "done",
|
|
361
|
+
start: 36,
|
|
362
|
+
end: 58,
|
|
363
|
+
meta: "22s",
|
|
364
|
+
detail: "All createTestApp, IPC socket, MCP, and gate tests green.",
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: "canary",
|
|
368
|
+
label: "Canary Rollout (20%)",
|
|
369
|
+
status: "active",
|
|
370
|
+
start: 58,
|
|
371
|
+
end: 94,
|
|
372
|
+
meta: "live",
|
|
373
|
+
detail: "Monitoring p99 latency (0.25 ms) and error rate (0.00%) across canary nodes.",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
id: "global",
|
|
377
|
+
label: "Global Promotion",
|
|
378
|
+
status: "pending",
|
|
379
|
+
start: 94,
|
|
380
|
+
end: 120,
|
|
381
|
+
meta: "queued",
|
|
382
|
+
detail: "Awaiting human approval or automated canary bake completion.",
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
type: "box",
|
|
389
|
+
title: "Selected Stage · {{stage_item.label}}",
|
|
390
|
+
children: [
|
|
391
|
+
{
|
|
392
|
+
type: "row",
|
|
393
|
+
gap: 2,
|
|
394
|
+
children: [
|
|
395
|
+
{
|
|
396
|
+
type: "stat",
|
|
397
|
+
label: "Status",
|
|
398
|
+
value: "{{upper(stage_item.status)}}",
|
|
399
|
+
tone: "{{stage_item.status == 'done' ? 'success' : stage_item.status == 'active' ? 'primary' : 'muted'}}",
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
type: "stat",
|
|
403
|
+
label: "Window",
|
|
404
|
+
value: "{{stage_item.start}}s → {{stage_item.end}}s",
|
|
405
|
+
delta: "{{stage_item.end - stage_item.start}}s span",
|
|
406
|
+
tone: "code",
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
type: "text",
|
|
412
|
+
content: "{{stage_item.detail}}",
|
|
413
|
+
tone: "default",
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
type: "meter",
|
|
419
|
+
label: "Overall release progress",
|
|
420
|
+
value: 72,
|
|
421
|
+
min: 0,
|
|
422
|
+
max: 100,
|
|
423
|
+
format: "{{percent}}% complete",
|
|
424
|
+
tone: "primary",
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
store.focus("demo-plan");
|
|
430
|
+
}
|