feat(desktop): support remote-only startup
Allow Desktop to skip its in-process OpenChamber server with OPENCHAMBER_SKIP_LOCAL_SERVER=1 while continuing to load the packaged UI shell. Carry local runtime availability through the boot contract so unavailable or unconfigured remotes enter a remote-only chooser instead of offering broken local recovery actions. The chooser can select saved instances, add a server by URL, or redeem an OpenChamber pairing link over direct or E2EE relay transports. Keep additional windows, Mini Chat, background startup, and unreachable-host recovery functional without a local origin. Render boot and recovery surfaces with the active theme background rather than exposing the native vibrancy backing. Document the environment variable and cover serverless boot routing plus malformed pairing imports with focused tests.
This commit is contained in:
@@ -31,6 +31,27 @@ describe('resolveDesktopBootView', () => {
|
||||
).toEqual({ screen: 'recovery', variant: 'remote-unreachable', hostId: 'remote-a', url: 'https://x.test' });
|
||||
});
|
||||
|
||||
test('preserves disabled local runtime capability for remote recovery', () => {
|
||||
expect(
|
||||
resolveDesktopBootView({
|
||||
isDesktopShell: true,
|
||||
bootOutcome: {
|
||||
target: 'remote',
|
||||
status: 'unreachable',
|
||||
hostId: 'remote-a',
|
||||
url: 'https://x.test',
|
||||
localAvailable: false,
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
screen: 'recovery',
|
||||
variant: 'remote-unreachable',
|
||||
hostId: 'remote-a',
|
||||
url: 'https://x.test',
|
||||
localAvailable: false,
|
||||
});
|
||||
});
|
||||
|
||||
test('returns main for local ok', () => {
|
||||
expect(
|
||||
resolveDesktopBootView({
|
||||
@@ -77,13 +98,22 @@ describe('resolveDesktopBootView', () => {
|
||||
).toEqual({ screen: 'recovery', variant: 'remote-incompatible', hostId: 'old-host', url: 'https://old.test' });
|
||||
});
|
||||
|
||||
test('returns recovery view for local unreachable', () => {
|
||||
test('returns chooser for local unreachable', () => {
|
||||
expect(
|
||||
resolveDesktopBootView({
|
||||
isDesktopShell: true,
|
||||
bootOutcome: { target: 'local', status: 'unreachable' },
|
||||
}),
|
||||
).toEqual({ screen: 'recovery', variant: 'local-unavailable' });
|
||||
).toEqual({ screen: 'chooser' });
|
||||
});
|
||||
|
||||
test('returns remote-only chooser when local runtime is disabled', () => {
|
||||
expect(
|
||||
resolveDesktopBootView({
|
||||
isDesktopShell: true,
|
||||
bootOutcome: { target: 'local', status: 'unreachable', localAvailable: false },
|
||||
}),
|
||||
).toEqual({ screen: 'chooser', localAvailable: false });
|
||||
});
|
||||
|
||||
test('returns recovery view for remote missing', () => {
|
||||
|
||||
Reference in New Issue
Block a user