chore: dev-stack switches, shared e2e harness, and desktop shell rules

- `LIVE_RELOAD=false npm run dev` keeps the renderer alive across a machine
  suspend; the reload client otherwise destroys the session under test.
- `dev-peer.sh` plus a separate userdata dir runs a second local peer.
- `tools/voice-probe.js` samples peer state and RTP counters from a live
  window, persisting to localStorage so a renderer reload cannot erase it.
- e2e helpers for voice pairs, peer-role election, and a TURN relay.
- Electron single-instance and dev-client-load decisions move into rules
  files with colocated specs.
This commit is contained in:
2026-08-14 03:19:29 +02:00
parent d71e3a98da
commit e49b3ec112
41 changed files with 35947 additions and 50 deletions
@@ -0,0 +1,44 @@
import {
describe,
expect,
it
} from 'vitest';
import { DEV_RELOAD_EXISTING_ARG, resolveSecondInstanceAction } from './second-instance.rules';
describe('resolveSecondInstanceAction', () => {
it('reloads the open window when a dev launch asks to reuse it', () => {
const action = resolveSecondInstanceAction({
argv: [
'electron',
'.',
DEV_RELOAD_EXISTING_ARG
],
devSingleInstanceExitCode: 23
});
expect(action).toBe('reload-existing');
});
it('never asks a packaged instance to reload, even with the dev argument', () => {
const action = resolveSecondInstanceAction({
argv: ['metoyou', DEV_RELOAD_EXISTING_ARG],
devSingleInstanceExitCode: null
});
expect(action).toBe('focus');
});
it('focuses the open window for an ordinary second launch', () => {
const action = resolveSecondInstanceAction({
argv: [
'electron',
'.',
'toju://invite/abc'
],
devSingleInstanceExitCode: 23
});
expect(action).toBe('focus');
});
});