feat: expand companion platform, device controls, and memoir workflows
ci / verify (push) Canceled after 0s

Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
This commit is contained in:
Codex Local
2026-10-08 10:06:44 +08:00
parent 98fb2965d0
commit bf1233d5df
861 changed files with 94614 additions and 3209 deletions
+25
View File
@@ -0,0 +1,25 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { privacyRequestsWithDetail } from '../src/pages/privacy-detail.ts';
const summary = { id: 'synthetic-request', version: 2, updated_at: '2026-10-05T00:00:00Z', subtasks: [] };
const detail = { ...summary, subtasks: [{ id: 'synthetic-subtask', status: 'FAILED' }] };
test('list polling does not erase loaded subtasks for the same revision', () => {
assert.equal(privacyRequestsWithDetail([summary], detail)[0].subtasks.length, 1);
assert.equal(summary.subtasks.length, 0);
});
test('a newer list revision invalidates old detail evidence', () => {
assert.equal(privacyRequestsWithDetail([{ ...summary, version: 3 }], detail)[0].subtasks.length, 0);
assert.equal(privacyRequestsWithDetail([{ ...summary, updated_at: '2026-10-05T00:01:00Z' }], detail)[0].subtasks.length, 0);
});
test('a successfully fetched request is visible even when list loading failed', () => {
assert.deepEqual(privacyRequestsWithDetail([], detail), [detail]);
});
test('subtask failure projected without a parent revision invalidates the old status', () => {
const failed = { ...summary, status: 'PARTIAL_FAILED' };
assert.equal(privacyRequestsWithDetail([failed], { ...detail, status: 'EXECUTING' })[0], failed);
});
test('a more recent detail read can disclose a failure missing from the older list', () => {
const failed = { ...detail, status: 'PARTIAL_FAILED' };
assert.equal(privacyRequestsWithDetail([{ ...summary, status: 'EXECUTING' }], failed, true)[0], failed);
});