mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
refactor(cctv): isolate calibration handles and stop idle poll frames
Move native gizmo entities and input into an owned renderer. Restore the captured camera-input flag, handle cancellation and duplicate presses, and reject foreign handle identities. Preserve native geometry and picking. Avoid no-op sync-chip mutations and let unchanged CCTV polls complete without publishing scene changes. Keep health/UI polling and real geometry, auto-hop and media updates. Extend browser idle samples across two polls. Validated full Node24 unit/allocation, boundaries, scoped format, production, panel and QA builds; native legacy parity, real media/GPU picks on dev and preview, engine contracts and production shell. Retain failed evidence.
This commit is contained in:
1 parent
a72cfc4098
commit
311e178d0c
14 files changed
+649
-197
No files matched your search
@@ -47,6 +47,30 @@ function fixture(t) {
|
||||
return { controls, requests };
|
||||
}
|
||||
|
||||
test('settled CCTV sync chip does not mutate occluder attributes on polling', (t) => {
|
||||
const { controls } = fixture(t);
|
||||
const chip = element();
|
||||
const remove = chip.classList.remove;
|
||||
let mutations = 0;
|
||||
chip.classList.remove = (...values) => {
|
||||
mutations++;
|
||||
remove(...values);
|
||||
};
|
||||
controls._cctvSyncChip = chip;
|
||||
controls._cctvSyncLabel = element();
|
||||
controls._cctvSyncProgress = element();
|
||||
const settled = { active: false, total: 25, loaded: 25 };
|
||||
controls._updateCctvSyncChip(settled, true);
|
||||
controls._updateCctvSyncChip(settled, true);
|
||||
assert.equal(mutations, 0, 'unchanged class writes wake world-overlay');
|
||||
chip.classList.add('visible');
|
||||
controls._updateCctvSyncChip(settled, false);
|
||||
assert.equal(chip.classList.contains('visible'), false);
|
||||
assert.equal(mutations, 1, 'a real visibility transition must still apply');
|
||||
controls._updateCctvSyncChip(settled, false);
|
||||
assert.equal(mutations, 1);
|
||||
});
|
||||
|
||||
test('a late image completion cannot replace a newer camera preview', (t) => {
|
||||
const { controls, requests } = fixture(t);
|
||||
controls._queueCctvFrame('first.jpg', 'a', true);
|
||||
|
||||
@@ -274,6 +274,7 @@ export function _updateCctvSyncChip(loading, enabled) {
|
||||
|
||||
if (!this._cctvChipHideTimer) {
|
||||
this._cctvChipWasBusy = false;
|
||||
this._cctvSyncChip.classList.remove('visible');
|
||||
if (this._cctvSyncChip.classList.contains('visible'))
|
||||
this._cctvSyncChip.classList.remove('visible');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user