skopix 2.0.62 → 2.0.63
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/cli/commands/dashboard.js +5 -0
- package/package.json +1 -1
- package/web/app/index.html +18 -0
|
@@ -1836,6 +1836,11 @@ export async function dashboardCommand(options) {
|
|
|
1836
1836
|
sendJSON(res, 200, { stopped: true });
|
|
1837
1837
|
return;
|
|
1838
1838
|
}
|
|
1839
|
+
if (pathname.match(/^\/api\/step-tester\/[^/]+\/status$/) && method === 'GET') {
|
|
1840
|
+
const testerId = pathname.split('/')[3];
|
|
1841
|
+
sendJSON(res, 200, { active: stepTesterSessions.has(testerId) });
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1839
1844
|
|
|
1840
1845
|
// ─── STEP LIBRARY ──────────────────────────────────────────────────
|
|
1841
1846
|
if (pathname === '/api/step-library' && method === 'GET') {
|
package/package.json
CHANGED
package/web/app/index.html
CHANGED
|
@@ -6422,9 +6422,27 @@ async function startBuilderPreview() {
|
|
|
6422
6422
|
const data = await res.json();
|
|
6423
6423
|
if (!res.ok) throw new Error(data.error || 'Failed');
|
|
6424
6424
|
previewState.testerId = data.testerId;
|
|
6425
|
+
btn.disabled = false;
|
|
6425
6426
|
btn.textContent = '⏸ Previewing';
|
|
6426
6427
|
btn.onclick = stopBuilderPreview;
|
|
6427
6428
|
showToast('Browser open — use the toolbar in the browser to run steps');
|
|
6429
|
+
|
|
6430
|
+
// Poll until session ends (browser closed via Stop button in browser)
|
|
6431
|
+
const poll = setInterval(async () => {
|
|
6432
|
+
if (!previewState.testerId) { clearInterval(poll); return; }
|
|
6433
|
+
try {
|
|
6434
|
+
const r = await fetch(API_BASE + '/api/step-tester/' + previewState.testerId + '/status');
|
|
6435
|
+
const d = await r.json();
|
|
6436
|
+
if (!d.active) {
|
|
6437
|
+
clearInterval(poll);
|
|
6438
|
+
previewState.testerId = null;
|
|
6439
|
+
btn.disabled = false;
|
|
6440
|
+
btn.textContent = 'Preview';
|
|
6441
|
+
btn.onclick = startBuilderPreview;
|
|
6442
|
+
}
|
|
6443
|
+
} catch { clearInterval(poll); }
|
|
6444
|
+
}, 1500);
|
|
6445
|
+
|
|
6428
6446
|
} catch (err) {
|
|
6429
6447
|
showToast('Error: ' + err.message);
|
|
6430
6448
|
btn.disabled = false;
|