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:
Bohdan Triapitsyn
2026-07-21 21:11:13 +03:00
parent 85400459e9
commit a0caec0984
11 changed files with 377 additions and 70 deletions
+4 -2
View File
@@ -833,10 +833,11 @@ function App({ apis }: AppProps) {
if (bootView.screen === 'chooser') {
return (
<ErrorBoundary>
<div className="h-full text-foreground bg-transparent">
<div className="h-full text-foreground bg-background">
<React.Suspense fallback={<div className="h-full" />}>
<OnboardingScreen
mode="first-launch"
localAvailable={bootView.localAvailable !== false}
onCliAvailable={handleDesktopBootDismiss}
onChooseRemote={() => {
// Switch to remote tab - handled internally by OnboardingScreen
@@ -854,13 +855,14 @@ function App({ apis }: AppProps) {
return (
<ErrorBoundary>
<div className="h-full text-foreground bg-transparent">
<div className="h-full text-foreground bg-background">
<React.Suspense fallback={<div className="h-full" />}>
<OnboardingScreen
mode="recovery"
recoveryVariant={recoveryVariant}
recoveryHostUrl={hostUrl}
recoveryHostLabel={undefined}
localAvailable={bootView.localAvailable !== false}
onCliAvailable={handleDesktopBootDismiss}
/>
</React.Suspense>