@mindexec/cli 0.2.30 → 0.2.31
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/package.json
CHANGED
|
@@ -412,7 +412,7 @@ function wait(ms = 0) {
|
|
|
412
412
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
function buildMonitorNode(devices, hubStatus, latestTaskBatch = null, recentTaskBatches = []) {
|
|
415
|
+
function buildMonitorNode(devices, hubStatus, latestTaskBatch = null, recentTaskBatches = [], lastError = '') {
|
|
416
416
|
const connected = devices.filter(device => device.Connected).length;
|
|
417
417
|
const endpoint = hubStatus.agentEndpoint || '127.0.0.1:5197';
|
|
418
418
|
const pairToken = hubStatus.pairToken || 'render-smoke-token';
|
|
@@ -447,7 +447,7 @@ function buildMonitorNode(devices, hubStatus, latestTaskBatch = null, recentTask
|
|
|
447
447
|
RemoteFleetDevicesJson: JSON.stringify(devices),
|
|
448
448
|
RemoteFleetLatestTaskBatchJson: latestTaskBatch ? JSON.stringify(latestTaskBatch) : '',
|
|
449
449
|
RemoteFleetRecentTaskBatchesJson: JSON.stringify(recentTaskBatches),
|
|
450
|
-
RemoteFleetLastError: ''
|
|
450
|
+
RemoteFleetLastError: String(lastError || '')
|
|
451
451
|
}
|
|
452
452
|
};
|
|
453
453
|
}
|
|
@@ -703,6 +703,13 @@ try {
|
|
|
703
703
|
assert.equal(bodyView.querySelector('[data-remote-fleet-search="true"]'), null);
|
|
704
704
|
assert.equal(bodyView.querySelectorAll('select').length, 0);
|
|
705
705
|
assert.ok(bodyView.querySelector('[data-remote-fleet-device-grid="true"]'));
|
|
706
|
+
const statusFooter = bodyView.querySelector('[data-remote-fleet-status-rail="true"]');
|
|
707
|
+
assert.ok(statusFooter);
|
|
708
|
+
const bodyChildOrder = Array.from(bodyView.children).map(child =>
|
|
709
|
+
Object.keys(child.dataset || {}).join(',') || child.tagName).join('|');
|
|
710
|
+
assert.ok(bodyChildOrder.endsWith('remoteFleetStatusRail'), bodyChildOrder);
|
|
711
|
+
assert.ok(statusFooter.style.cssText.includes('flex-direction: row'));
|
|
712
|
+
assert.equal(statusFooter.querySelectorAll('[data-remote-fleet-status-item]').length, 4);
|
|
706
713
|
const initialDetailPanel = bodyView.querySelector('[data-remote-fleet-detail-panel="true"]');
|
|
707
714
|
assert.equal(initialDetailPanel?.dataset.deviceId, focusedDevice.DeviceId);
|
|
708
715
|
assert.equal(bodyView.querySelectorAll('[data-remote-fleet-action="pin-device"]').length, 1);
|
|
@@ -761,6 +768,10 @@ try {
|
|
|
761
768
|
assert.ok(stopHostCall);
|
|
762
769
|
assert.equal(stopHostCall.args[0], 'remote-fleet-render-smoke');
|
|
763
770
|
assert.equal(stopHostCall.args[1], false);
|
|
771
|
+
hub.setHostTarget({
|
|
772
|
+
nodeId: 'remote-fleet-render-smoke',
|
|
773
|
+
enabled: false
|
|
774
|
+
});
|
|
764
775
|
|
|
765
776
|
assert.ok(livePanel?.textContent.includes('RemoteFast 20 fps'), livePanel?.textContent || bodyView.textContent);
|
|
766
777
|
assert.equal(bodyView.querySelector('code'), null);
|
|
@@ -801,11 +812,26 @@ try {
|
|
|
801
812
|
document.body.appendChild(emptyShell);
|
|
802
813
|
manager.renderRemoteFleetMonitorForTest(emptyBody, buildMonitorNode([], hub.getStatus({ includeSecrets: true })));
|
|
803
814
|
assert.equal(emptyBody.querySelectorAll('[data-remote-fleet-empty-screen="true"]').length, 6);
|
|
815
|
+
assert.ok(Array.from(emptyBody.children).map(child =>
|
|
816
|
+
Object.keys(child.dataset || {}).join(',') || child.tagName).join('|').endsWith('remoteFleetStatusRail'));
|
|
804
817
|
assert.equal(emptyBody.textContent.includes('No devices connected yet.'), false);
|
|
805
818
|
assert.equal(emptyBody.textContent.includes('Select a screen'), false);
|
|
806
819
|
assert.equal(emptyBody.textContent.includes('No screen'), false);
|
|
807
820
|
assert.equal(emptyBody.textContent.includes('Endpoint 127.0.0.1'), false);
|
|
808
821
|
|
|
822
|
+
const { nodeShell: errorShell, bodyView: errorBody } = createRemoteFleetTemplateShell(document);
|
|
823
|
+
document.body.appendChild(errorShell);
|
|
824
|
+
manager.renderRemoteFleetMonitorForTest(errorBody, buildMonitorNode([], hub.getStatus({ includeSecrets: true }), null, [], 'RemoteHub is unavailable. Start LocalBridge and retry.'));
|
|
825
|
+
const errorFooter = errorBody.querySelector('[data-remote-fleet-status-rail="true"]');
|
|
826
|
+
const footerError = errorFooter?.querySelector('[data-remote-fleet-status-error="true"]');
|
|
827
|
+
assert.ok(errorFooter);
|
|
828
|
+
assert.ok(footerError);
|
|
829
|
+
assert.ok(Array.from(errorBody.children).map(child =>
|
|
830
|
+
Object.keys(child.dataset || {}).join(',') || child.tagName).join('|').endsWith('remoteFleetStatusRail'));
|
|
831
|
+
assert.equal(footerError.textContent.includes('RemoteHub is unavailable'), true);
|
|
832
|
+
assert.equal(Array.from(errorBody.children).some(child =>
|
|
833
|
+
child !== errorFooter && (child.textContent || '').includes('RemoteHub is unavailable')), false);
|
|
834
|
+
|
|
809
835
|
const deviceBody = document.createElement('div');
|
|
810
836
|
document.body.appendChild(deviceBody);
|
|
811
837
|
manager.renderRemoteFleetDeviceForTest(deviceBody, buildDeviceNode(focusedDevice, hub.getStatus()));
|
|
@@ -815,6 +841,12 @@ try {
|
|
|
815
841
|
assert.ok(deviceBody.textContent.includes('Task timed out waiting for the agent response.'));
|
|
816
842
|
assert.ok(deviceBody.textContent.includes(focusedDevice.DeviceId));
|
|
817
843
|
|
|
844
|
+
nodeShell.remove();
|
|
845
|
+
emptyShell.remove();
|
|
846
|
+
errorShell.remove();
|
|
847
|
+
deviceBody.remove();
|
|
848
|
+
await wait(2200);
|
|
849
|
+
|
|
818
850
|
console.log(`RemoteFleet render smoke OK (${SYNTHETIC_COUNT} synthetic devices, ${connectedCount} connected, ${aiCount} AI-ready)`);
|
|
819
851
|
} finally {
|
|
820
852
|
await hub.close();
|
|
@@ -12259,43 +12259,79 @@
|
|
|
12259
12259
|
return item;
|
|
12260
12260
|
}
|
|
12261
12261
|
|
|
12262
|
-
function createRemoteFleetStatusRail(items) {
|
|
12262
|
+
function createRemoteFleetStatusRail(items, errorMessage = '') {
|
|
12263
12263
|
const rail = document.createElement('aside');
|
|
12264
12264
|
rail.dataset.remoteFleetStatusRail = 'true';
|
|
12265
12265
|
rail.style.cssText = `
|
|
12266
12266
|
flex: 0 0 auto;
|
|
12267
|
-
align-self:
|
|
12267
|
+
align-self: stretch;
|
|
12268
12268
|
display: flex;
|
|
12269
|
-
flex-direction:
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12269
|
+
flex-direction: row;
|
|
12270
|
+
align-items: center;
|
|
12271
|
+
justify-content: flex-end;
|
|
12272
|
+
gap: 6px;
|
|
12273
|
+
width: 100%;
|
|
12274
|
+
min-width: 0;
|
|
12275
|
+
min-height: 28px;
|
|
12276
|
+
padding: 4px 6px;
|
|
12274
12277
|
border-radius: 7px;
|
|
12275
12278
|
border: 1px solid rgba(148, 163, 184, 0.22);
|
|
12276
12279
|
background: rgba(255, 255, 255, 0.70);
|
|
12277
12280
|
`;
|
|
12278
12281
|
|
|
12282
|
+
const normalizedError = String(errorMessage || '').trim();
|
|
12283
|
+
if (normalizedError) {
|
|
12284
|
+
const error = document.createElement('div');
|
|
12285
|
+
error.dataset.remoteFleetStatusError = 'true';
|
|
12286
|
+
error.textContent = normalizedError;
|
|
12287
|
+
error.title = normalizedError;
|
|
12288
|
+
error.style.cssText = `
|
|
12289
|
+
flex: 1 1 auto;
|
|
12290
|
+
min-width: 0;
|
|
12291
|
+
display: inline-flex;
|
|
12292
|
+
align-items: center;
|
|
12293
|
+
height: 22px;
|
|
12294
|
+
padding: 0 9px;
|
|
12295
|
+
border-radius: 999px;
|
|
12296
|
+
border: 1px solid rgba(148, 163, 184, 0.22);
|
|
12297
|
+
background: rgba(15, 23, 42, 0.05);
|
|
12298
|
+
color: #334155;
|
|
12299
|
+
font-size: 10px;
|
|
12300
|
+
font-weight: 850;
|
|
12301
|
+
line-height: 1;
|
|
12302
|
+
letter-spacing: 0;
|
|
12303
|
+
overflow: hidden;
|
|
12304
|
+
text-overflow: ellipsis;
|
|
12305
|
+
white-space: nowrap;
|
|
12306
|
+
`;
|
|
12307
|
+
rail.appendChild(error);
|
|
12308
|
+
}
|
|
12309
|
+
|
|
12279
12310
|
(items || []).forEach(item => {
|
|
12280
12311
|
const tone = String(item?.tone || 'default');
|
|
12281
12312
|
const row = document.createElement('div');
|
|
12282
12313
|
row.dataset.remoteFleetStatusItem = item?.key || '';
|
|
12283
12314
|
row.style.cssText = `
|
|
12284
|
-
|
|
12285
|
-
|
|
12315
|
+
flex: 0 0 auto;
|
|
12316
|
+
display: inline-flex;
|
|
12286
12317
|
align-items: center;
|
|
12287
|
-
gap:
|
|
12288
|
-
|
|
12318
|
+
gap: 4px;
|
|
12319
|
+
height: 22px;
|
|
12289
12320
|
min-width: 0;
|
|
12321
|
+
padding: 0 7px;
|
|
12322
|
+
border-radius: 999px;
|
|
12323
|
+
background: ${tone === 'online' ? 'rgba(16, 185, 129, 0.09)' : 'rgba(15, 23, 42, 0.04)'};
|
|
12324
|
+
border: 1px solid ${tone === 'online' ? 'rgba(16, 185, 129, 0.18)' : 'rgba(148, 163, 184, 0.18)'};
|
|
12290
12325
|
`;
|
|
12291
12326
|
|
|
12292
12327
|
const dot = document.createElement('span');
|
|
12293
12328
|
dot.style.cssText = `
|
|
12294
|
-
|
|
12295
|
-
|
|
12329
|
+
flex: 0 0 auto;
|
|
12330
|
+
width: 6px;
|
|
12331
|
+
height: 6px;
|
|
12296
12332
|
border-radius: 999px;
|
|
12297
12333
|
background: ${tone === 'online' ? '#10b981' : tone === 'warn' ? '#f59e0b' : '#94a3b8'};
|
|
12298
|
-
box-shadow: ${tone === 'online' ? '0 0 0
|
|
12334
|
+
box-shadow: ${tone === 'online' ? '0 0 0 2px rgba(16, 185, 129, 0.11)' : 'none'};
|
|
12299
12335
|
`;
|
|
12300
12336
|
|
|
12301
12337
|
const labelEl = document.createElement('span');
|
|
@@ -12321,7 +12357,7 @@
|
|
|
12321
12357
|
font-weight: 950;
|
|
12322
12358
|
line-height: 1;
|
|
12323
12359
|
letter-spacing: 0;
|
|
12324
|
-
max-width:
|
|
12360
|
+
max-width: 86px;
|
|
12325
12361
|
overflow: hidden;
|
|
12326
12362
|
text-overflow: ellipsis;
|
|
12327
12363
|
white-space: nowrap;
|
|
@@ -13463,7 +13499,7 @@
|
|
|
13463
13499
|
value: String(aiCapableCount),
|
|
13464
13500
|
tone: aiCapableCount > 0 ? 'online' : 'default'
|
|
13465
13501
|
}
|
|
13466
|
-
]);
|
|
13502
|
+
], lastError);
|
|
13467
13503
|
|
|
13468
13504
|
const filterRow = document.createElement('div');
|
|
13469
13505
|
filterRow.style.cssText = `
|
|
@@ -13945,23 +13981,6 @@
|
|
|
13945
13981
|
bodyView.appendChild(livePanel);
|
|
13946
13982
|
}
|
|
13947
13983
|
|
|
13948
|
-
if (lastError.trim()) {
|
|
13949
|
-
const errorEl = document.createElement('div');
|
|
13950
|
-
errorEl.textContent = lastError;
|
|
13951
|
-
errorEl.style.cssText = `
|
|
13952
|
-
flex: 0 0 auto;
|
|
13953
|
-
padding: 8px 10px;
|
|
13954
|
-
border-radius: 7px;
|
|
13955
|
-
background: rgba(248, 113, 113, 0.12);
|
|
13956
|
-
color: #991b1b;
|
|
13957
|
-
font-size: 12px;
|
|
13958
|
-
line-height: 1.35;
|
|
13959
|
-
font-weight: 700;
|
|
13960
|
-
overflow-wrap: break-word;
|
|
13961
|
-
`;
|
|
13962
|
-
bodyView.appendChild(errorEl);
|
|
13963
|
-
}
|
|
13964
|
-
|
|
13965
13984
|
const createDevicePreview = (device, mode = 'tile') => {
|
|
13966
13985
|
const name = getRemoteFleetDeviceName(device);
|
|
13967
13986
|
const connectedDevice = isRemoteFleetDeviceConnected(device);
|
package/wwwroot/index.html
CHANGED
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
const base = '_content/MindExecution.Shared/js/';
|
|
561
|
-
const scriptVersion = '20260613-remote-
|
|
561
|
+
const scriptVersion = '20260613-remote-status-footer-v498';
|
|
562
562
|
const scriptUrl = (script) => `${base}${script}?v=${scriptVersion}`;
|
|
563
563
|
console.log(`[Script Loader] Shared JS version: ${scriptVersion}`);
|
|
564
564
|
const criticalScripts = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
self.assetsManifest = {
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "bj3XSoYW",
|
|
3
3
|
"assets": [
|
|
4
4
|
{
|
|
5
5
|
"hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"url": "_content/MindExecution.Shared/js/mind-map-core.js.backup"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
"hash": "sha256-
|
|
89
|
+
"hash": "sha256-wA7GDKMviFGPIS+XIFaOKL57XgwYI5rm8uCzK3lbJ4Q=",
|
|
90
90
|
"url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
"url": "image-manifest.json"
|
|
835
835
|
},
|
|
836
836
|
{
|
|
837
|
-
"hash": "sha256-
|
|
837
|
+
"hash": "sha256-DnjQ0S/JwJSnNvxVlB8B3VSxBcrtCmulbGRdjQZqsLg=",
|
|
838
838
|
"url": "index.html"
|
|
839
839
|
},
|
|
840
840
|
{
|