Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(ui): solo window mode via ?view= and ?solo=1

rubenluetke10-beepbc87a33bd8dc
diff --git a/jarvis/ui/web/frontend/src/App.tsx b/jarvis/ui/web/frontend/src/App.tsx
index 17335d8715..0314ea8b50 100644
--- a/jarvis/ui/web/frontend/src/App.tsx
+++ b/jarvis/ui/web/frontend/src/App.tsx
@@ -140,12 +140,49 @@ export default function App() {
*/
const activeSection = useEventStore((s) => s.activeSection);
const navRevealed = useEventStore((s) => s.navRevealed);
+ const solo = useEventStore((s) => s.solo);
+ const detachedViews = useEventStore((s) => s.detachedViews);
const codingSurface = CODING_SECTIONS.has(activeSection);
const railHidden = codingSurface && !navRevealed;
+ /*
+ * The realtime broker must exist exactly ONCE across all windows: it
+ * registers WebRTC offers for the native voice session, and two live brokers
+ * publish competing offers. Ownership follows the voice surface — a detached
+ * Voice window brings its own broker (the desktop shell injects the broker
+ * token only there), and the main window stands down while that window
+ * exists. Every other solo window never mounts one.
+ */
+ const brokerMounted = solo
+ ? activeSection === "chats"
+ : !detachedViews.includes("chats");
+
+ /*
+ * A detached solo window is one section in its own desktop window: the
+ * section IS the window, so the app chrome around it — nav, top bar,
+ * onboarding, dock — has no job here and is omitted rather than hidden.
+ * What stays is what any surface needs to function: toasts (many components
+ * report through them) and the right-click edit menu (the desktop WebView
+ * has no native context menu, so this is the only mouse-driven paste).
+ */
+ if (solo) {
+ return (
+ <div className="relative flex h-screen w-screen overflow-hidden bg-background text-foreground">
+ {brokerMounted && <SubscriptionRealtimeTransportBroker />}
+ <main className="relative z-10 flex min-w-0 flex-1 flex-col">
+ <div className="min-h-0 flex-1">
+ <MainView />
+ </div>
+ </main>
+ <ToastLayer />
+ <EditContextMenu />
+ </div>
+ );
+ }
+
return (
<div className="relative flex h-screen w-screen overflow-hidden bg-background text-foreground">
- <SubscriptionRealtimeTransportBroker />
+ {brokerMounted && <SubscriptionRealtimeTransportBroker />}
{!codingSurface && (
<>
<div className="pointer-events-none fixed inset-0 jarvis-grid opacity-40" aria-hidden />
diff --git a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts b/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts
index 69b9026faa..bf3c59fc38 100644
--- a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts
@@ -329,7 +329,10 @@ export function useWebSocket(): void {
if (env.event_name === "NavigateSidebar") {
const p = env.payload as { section?: string };
- if (isSectionId(p.section)) {
+ // A detached solo window is pinned to its one section; the spoken
+ // "go to settings" targets the main window, and following it here
+ // would blank the very view the user split off to keep.
+ if (isSectionId(p.section) && !useEventStore.getState().solo) {
setActiveSection(p.section);
pushToast(
"info",
diff --git a/jarvis/ui/web/frontend/src/store/events.ts b/jarvis/ui/web/frontend/src/store/events.ts
index ee25b3eac8..7fcbc1b5f1 100644
--- a/jarvis/ui/web/frontend/src/store/events.ts
+++ b/jarvis/ui/web/frontend/src/store/events.ts
@@ -129,7 +129,24 @@ export function isSectionId(value: unknown): value is SectionId {
}
export function initialSectionFromSearch(search: string): SectionId {
- return new URLSearchParams(search).has("doc") ? "docs" : "chats";
+ const params = new URLSearchParams(search);
+ // ?view= is the general deep-link (drives detached solo windows); an invalid
+ // value falls through to the older ?doc shortcut, then the default.
+ const view = params.get("view");
+ if (isSectionId(view)) return view;
+ return params.has("doc") ? "docs" : "chats";
+}
+
+/**
+ * Is this document a detached solo window (`?solo=1`)?
+ *
+ * A solo window renders exactly one section chrome-less (no sidebar, no top
+ * bar) inside its own desktop window. The flag lives in the URL rather than in
+ * transient state so it survives the preload-recovery full reload after a
+ * frontend rebuild.
+ */
+export function soloWindowFromSearch(search: string): boolean {
+ return new URLSearchParams(search).get("solo") === "1";
}
export const SECTION_LABELS: Record<SectionId, string> = {
@@ -302,6 +319,22 @@ interface EventStore {
* flips it lives inside the coding surface, several lazy boundaries down.
*/
navRevealed: boolean;
+ /**
+ * True when this document is a detached solo window (`?solo=1`): it renders
+ * exactly one section with no app chrome and must ignore cross-window
+ * broadcasts that would switch its section (voice navigation targets the
+ * main window, not a window pinned to one view).
+ */
+ solo: boolean;
+ /**
+ * Sections currently living in their own detached desktop window, mirrored
+ * into EVERY connected window via the DetachedViewOpened/Closed WS events
+ * (plus a GET /api/window/detached resync on mount). Drives the single-
+ * IDE-instance rule: while a coding view is detached, the main window
+ * unmounts its sticky Agentic IDE and shows a placeholder instead — a second
+ * mounted instance would steal every pane's output stream.
+ */
+ detachedViews: SectionId[];
transcription: string;
transcriptionFinal: boolean;
toasts: Toast[];
@@ -372,6 +405,7 @@ interface EventStore {
clearEvents: () => void;
setActiveSection: (s: SectionId) => void;
setNavRevealed: (revealed: boolean) => void;
+ setDetachedViews: (views: SectionId[]) => void;
setTranscription: (text: string, isFinal: boolean) => void;
pushToast: (
kind: Toast["kind"],
@@ -444,6 +478,10 @@ export const useEventStore = create<EventStore>((set, get) => ({
typeof window === "undefined" ? "" : window.location.search,
),
navRevealed: false,
+ solo: soloWindowFromSearch(
+ typeof window === "undefined" ? "" : window.location.search,
+ ),
+ detachedViews: [],
transcription: "",
transcriptionFinal: true,
toasts: [],
@@ -483,6 +521,7 @@ export const useEventStore = create<EventStore>((set, get) => ({
// without it EVERY time rather than only the first time.
setActiveSection: (s) => set({ activeSection: s, navRevealed: false }),
setNavRevealed: (revealed) => set({ navRevealed: revealed }),
+ setDetachedViews: (views) => set({ detachedViews: views }),
setTranscription: (text, isFinal) =>
set({ transcription: text, transcriptionFinal: isFinal }),