STATION and LIVE register with the panel chrome again; a failed model load is retried; LIVE stops with the briefing collapsed

Found by a review of the review fixes:
- PanelChrome finds collapsible panels once, at startup, and Context starts
  closed, so STATION and LIVE inside the Inspector view (mounted only while
  Context is open) were never registered: their +/- did nothing and their
  bodies stayed hidden. They sit beside Radio again, always in the page; a
  test mounts Context closed and finds their collapse buttons.
- A model whose load failed was never retried while the station stayed
  shown (the renderer retries only on an update, and a model not ready is
  not sent). It is now released 30 s after the failure and asked for again;
  a model still loading also counts as undrawn out of range.
- The Cockpit LIVE page counts as hidden while the briefing card is
  collapsed, so the player stops there too.
- Tests: the label-box gate through the real click handler (it fails on the
  code before the gate), and the STATION section republishing only when the
  pose age crosses a whole second.
- SECURITY.md: an oversized feed frame closes the socket; the unused import
  in issCommand.js goes.
This commit is contained in:
Denis Groshev committed 2026-11-17 17:27:59 +01:00
1 parent 7d0f9f677f
commit c8cc9c0b26
9 files changed
+116 -8

No files matched your search

+20 -1
View File
@@ -336,7 +336,14 @@ test('until the renderer has the model the dots stand at every distance, and sta
assert.equal(f.drawn(STATION).displayRange, undefined);
assert.equal(f.drawn(COMPANION).displayRange, undefined);
assert.equal(f.trackedDot().displayRange, undefined);
// A load that does finish hands them over.
// After the retry delay the model is released, and the next frame asks
// for it again: one transient failure does not cost the session.
f.model.spec.retryAfterMs = 0;
f.tick();
assert.equal(f.modelSet(), undefined, 'released after a failure');
f.tick();
assert.ok(f.modelItem(), 'asked for again');
// That load finishes: the dots are handed over.
f.readyModel();
f.tick();
assert.equal(f.modelItem().show, true);
@@ -344,6 +351,18 @@ test('until the renderer has the model the dots stand at every distance, and sta
assert.deepEqual(f.trackedDot().displayRange, FAR_RANGE);
});
test('a model still loading counts as undrawn out of range and is released', (t) => {
const f = fixture(t);
f.cameraAt(MAX_M * 1.4);
f.tick(); // asks for the model, which never answers
f.cameraAt(MAX_M * 5);
f.tick();
assert.ok(f.modelSet(), 'kept for a while');
f.model.spec.unloadAfterMs = 0;
f.tick();
assert.equal(f.modelSet(), undefined);
});
test('turning the layer off, or a while undrawn, releases the model; the next approach asks for it again', async (t) => {
const f = fixture(t);
await f.load();