v1.59.0-beta.10: unify device visuals and wall refinements
Validate / hacs (push) Failing after 6s
Validate / hassfest (push) Failing after 6s
Validate / frontend (push) Successful in 3m19s
Validate / smoke (push) Failing after 1m12s
Validate / backend (push) Failing after 7m45s

This commit is contained in:
Matysh
2026-08-05 23:38:01 +03:00
parent 4868cc0786
commit d2bec266ed
50 changed files with 2749 additions and 1462 deletions
+20
View File
@@ -141,6 +141,26 @@ describe('open-spans', () => {
assert.ok(Math.max(sg[1], sg[3]) <= 4 + 1e-6, JSON.stringify(sg));
});
it('adjacent virtual pieces of the same room pair collapse to one span', () => {
const rooms = [
{ id: 'a', poly: [[0, 0], [5, 0], [5, 4], [0, 4]] },
{ id: 'b', poly: [[5, 0], [10, 0], [10, 4], [5, 4]] },
];
const spans = [
spanToEntry([5, 0], [5, 2], 1),
spanToEntry([5, 4], [5, 2], 1),
];
const clipped = clipOpenSpansToShared(spans, rooms, 1, eps);
assert.equal(clipped.length, 1);
const sg = entryToSeg(clipped[0], 1);
assert.deepEqual(
[Math.min(sg[1], sg[3]), Math.max(sg[1], sg[3])],
[0, 4],
);
assert.equal(resolveOpenCuts(rooms, spans, 1, eps).length, 1,
'legacy fragmented storage must render as one selectable span too');
});
it('clipOpenSpansToShared keeps both room-pair pieces after Split', () => {
const rooms = [
{ id: 'left_top', poly: [[0, 0], [5, 0], [5, 2], [0, 2]] },