Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

fix(web): keep desktop voice windows in the page without the dark title bar

muterC841a871309dd
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.md
index 3841b116..b6bcc167 100644
--- a/apps/web/AGENTS.md
+++ b/apps/web/AGENTS.md
@@ -69,7 +69,10 @@ build:assets` to check the initial JS budget.
switch, the new mode opens in the page and can be floated from there.
During Live, the Meeting entry offers to start a new Meeting even while an
earlier one is saving. Both in-page voice windows retain a visible, draggable
- title bar. Picture-in-picture keeps the browser title bar.
+ title bar: dark in browsers, the window's own surface colour in the desktop
+ app. Picture-in-picture keeps the browser title bar. The desktop app cannot
+ open picture-in-picture, so there voice windows stay in the page, offer no
+ float button, and on macOS stay out of the window drag strip.
- The compact primary rail reveals labels on hover and keyboard focus without
moving link hit areas or neighbouring links. A stationary pointer at an edge
must not trigger repeated hover enter/leave; sidebar expansion and Chat list
diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css
index a4df4684..49acb700 100644
--- a/apps/web/src/app/globals.css
+++ b/apps/web/src/app/globals.css
@@ -5568,3 +5568,18 @@ button.question-choice:focus-visible {
font-size: 12px;
font-weight: 500;
}
+/* The desktop app cannot float voice windows into picture-in-picture, so they
+ always stay in the page; there the bar takes the window's own surface
+ instead of a browser-style dark frame. */
+:root[data-desktop-shell] .voice-window-title {
+ background-color: var(--app-canvas);
+ color: var(--app-ink);
+ box-shadow: var(--town-shadow-outline);
+ clip-path: inset(-1px -1px 0 -1px);
+}
+/* Voice windows can be dragged up under the macOS window drag strip; they
+ keep their own drag and controls there instead of moving the app window. */
+:root[data-desktop-chrome="inset"]
+ :is(.voice-mode-window, .recording-window-frame) {
+ -webkit-app-region: no-drag;
+}
diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-mode-mini-window.tsx b/apps/web/src/features/rooms/chat/voice-mode/voice-mode-mini-window.tsx
index 08535045..2562eaa2 100644
--- a/apps/web/src/features/rooms/chat/voice-mode/voice-mode-mini-window.tsx
+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-mode-mini-window.tsx
@@ -241,7 +241,7 @@ function MiniWindow({
className={
pip
? "flex h-dvh w-full flex-col overflow-hidden bg-app-canvas"
- : "app-floating-enter fixed z-[90] flex flex-col overflow-hidden rounded-xl bg-app-canvas shadow-xl transition-[width,max-height] duration-200 ease-out motion-reduce:transition-none"
+ : "voice-mode-window app-floating-enter fixed z-[90] flex flex-col overflow-hidden rounded-xl bg-app-canvas shadow-xl transition-[width,max-height] duration-200 ease-out motion-reduce:transition-none"
}
data-pip={pip ? true : undefined}
data-size={size}
diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-pip.test.ts b/apps/web/src/features/rooms/chat/voice-mode/voice-pip.test.ts
index 9012b82a..95fd772a 100644
--- a/apps/web/src/features/rooms/chat/voice-mode/voice-pip.test.ts
+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-pip.test.ts
@@ -7,6 +7,7 @@ import {
openVoicePip,
resetVoicePipForTest,
returnedToOpener,
+ voicePipSupported,
} from "./voice-pip";
/** A stand-in for the browser's picture-in-picture window. */
@@ -50,6 +51,19 @@ describe("Voice Mode picture-in-picture window", () => {
await expect(openVoicePip("voice-mode")).resolves.toBeUndefined();
});
+ it("stays in the page inside the desktop app", async () => {
+ const fake = installFakeVoicePip();
+ const desktop = window as { lingerDesktop?: unknown };
+ desktop.lingerDesktop = {};
+ try {
+ expect(voicePipSupported()).toBe(false);
+ await expect(openVoicePip("voice-mode")).resolves.toBeUndefined();
+ expect(fake.requestWindow).not.toHaveBeenCalled();
+ } finally {
+ delete desktop.lingerDesktop;
+ }
+ });
+
it("carries the page's styles and theme, including later ones", async () => {
const early = document.createElement("style");
early.dataset.testStyle = "";
diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-pip.ts b/apps/web/src/features/rooms/chat/voice-mode/voice-pip.ts
index adfb4964..cd3c0a78 100644
--- a/apps/web/src/features/rooms/chat/voice-mode/voice-pip.ts
+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-pip.ts
@@ -1,5 +1,7 @@
import { useSyncExternalStore } from "react";
+import { isDesktopShell } from "@/app/desktop-shell";
+
/** Chrome and Edge 116+ only; TypeScript's DOM library does not declare it yet. */
interface DocumentPictureInPicture {
requestWindow(options?: { height?: number; width?: number }): Promise<Window>;
@@ -27,6 +29,9 @@ function noteShown() {
}
function api(): DocumentPictureInPicture | undefined {
+ // Electron exposes the API but cannot open its window, so voice windows in
+ // the desktop app stay in the page and offer no float button.
+ if (isDesktopShell()) return undefined;
return (
window as Window & { documentPictureInPicture?: DocumentPictureInPicture }
).documentPictureInPicture;