Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: keep star session controls beside the overlay (#7468)

Louis Beaumontafd790809aa5
diff --git a/apps/screenpipe-app-tauri/app/layout.tsx b/apps/screenpipe-app-tauri/app/layout.tsx
index 1bbb94bd3..6258b4988 100644
--- a/apps/screenpipe-app-tauri/app/layout.tsx
+++ b/apps/screenpipe-app-tauri/app/layout.tsx
@@ -93,7 +93,7 @@ export default function RootLayout({
}) {
const pathname = usePathname();
const isOverlay =
- pathname === "/shortcut-reminder" || pathname === "/notification-inbox";
+ pathname === "/shortcut-reminder" || pathname === "/notification-inbox" || pathname === "/starred-sessions";
const isTimelineOverlay = pathname === "/overlay";
// Transparent-body windows: floating search bar + the overlay inbox card.
const isSearch = pathname === "/search" || pathname === "/notification-inbox";
diff --git a/apps/screenpipe-app-tauri/app/providers.tsx b/apps/screenpipe-app-tauri/app/providers.tsx
index 78eef9286..8861ab3af 100644
--- a/apps/screenpipe-app-tauri/app/providers.tsx
+++ b/apps/screenpipe-app-tauri/app/providers.tsx
@@ -78,7 +78,7 @@ export const Providers = forwardRef<
// sign-in can never complete and the user is locked out for good.
const pathname = usePathname();
const isOverlay =
- pathname === "/shortcut-reminder" || pathname === "/notification-inbox";
+ pathname === "/shortcut-reminder" || pathname === "/notification-inbox" || pathname === "/starred-sessions";
useEffect(() => {
setMounted(true);
}, []);
diff --git a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.test.tsx b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.test.tsx
index 63e76271e..7c4e18037 100644
--- a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.test.tsx
+++ b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.test.tsx
@@ -23,6 +23,8 @@ const mocks = vi.hoisted(() => ({
hideShortcutReminder: vi.fn(),
snoozeShortcutReminderForHour: vi.fn(),
showWindow: vi.fn(),
+ toggleStarredSessions: vi.fn().mockResolvedValue({ status: "ok", data: null }),
+ platform: { isMac: true, isWindows: false, isLoading: false },
setSize: vi.fn(),
setPosition: vi.fn(),
setShortcutOverlayAnchor: vi.fn(),
@@ -102,7 +104,7 @@ vi.mock("posthog-js", () => ({
}));
vi.mock("@/lib/hooks/use-platform", () => ({
- usePlatform: () => ({ isMac: true, isWindows: false, isLoading: false }),
+ usePlatform: () => mocks.platform,
}));
vi.mock("@/lib/hooks/use-settings", () => ({
@@ -122,6 +124,7 @@ vi.mock("@/lib/utils/tauri", () => ({
hideShortcutReminder: mocks.hideShortcutReminder,
snoozeShortcutReminderForHour: mocks.snoozeShortcutReminderForHour,
showWindow: mocks.showWindow,
+ toggleStarredSessions: mocks.toggleStarredSessions,
setShortcutOverlayAnchor: mocks.setShortcutOverlayAnchor,
},
}));
@@ -476,6 +479,38 @@ describe("recording health hover detail", () => {
).toBeVisible();
});
+ it.each([
+ [undefined, "Control+Super+B"],
+ [{}, "Control+Super+B"],
+ [{ starSessionShortcut: "" }, "Control+Super+B"],
+ [{ starSessionShortcut: "Alt+Shift+J" }, "Alt+Shift+J"],
+ ])("shows the star shortcut from settings %j on hover and focus", async (settings, shortcut) => {
+ mocks.getRecordingHealthState.mockResolvedValue("normal");
+ mocks.storeGet.mockResolvedValue(settings);
+ render(<ShortcutReminderPage />);
+ fireEvent.mouseEnter(await screen.findByTestId("shortcut-reminder-root"));
+ const star = screen.getByRole("button", { name: "Starred work sessions" });
+ fireEvent.mouseEnter(star);
+ expect(await screen.findByText(formatShortcut(shortcut, "macos"), { exact: false })).toBeVisible();
+ fireEvent.mouseEnter(screen.getByTitle("Open timeline"));
+ fireEvent.focus(star);
+ expect(await screen.findByText(formatShortcut(shortcut, "macos"), { exact: false })).toBeVisible();
+ });
+
+ it("hides the disabled star shortcut while keeping its action label", async () => {
+ mocks.getRecordingHealthState.mockResolvedValue("normal");
+ mocks.storeGet.mockResolvedValue({
+ starSessionShortcut: "Alt+Shift+J",
+ disabledShortcuts: ["starSessionShortcut"],
+ });
+ render(<ShortcutReminderPage />);
+ fireEvent.mouseEnter(await screen.findByTestId("shortcut-reminder-root"));
+ fireEvent.mouseEnter(screen.getByRole("button", { name: "Starred work sessions" }));
+ expect(await screen.findByText("star work session")).toBeVisible();
+ expect(screen.queryByText(formatShortcut("Alt+Shift+J", "macos"), { exact: false })).toBeNull();
+ expect(screen.queryByText(formatShortcut("Control+Super+B", "macos"), { exact: false })).toBeNull();
+ });
+
it("leaves no black bar under the dock when no control is hovered", async () => {
mocks.getRecordingHealthState.mockResolvedValue("normal");
mocks.storeGet.mockResolvedValue({});
@@ -860,7 +895,7 @@ describe("starred sessions during a live meeting", () => {
render(<ShortcutReminderPage />);
fireEvent.mouseEnter(await screen.findByTestId("shortcut-reminder-root"));
fireEvent.click(await screen.findByRole("button",{name:"Starred work sessions"}));
- expect(await screen.findByRole("button",{name:"15 min"})).toBeVisible();
+ await waitFor(() => expect(mocks.toggleStarredSessions).toHaveBeenCalled());
expect(mocks.stopMeeting).not.toHaveBeenCalled();
cleanup();
Object.assign(mocks.meetingOverlayState, {active:false,activeMeetingId:null,stoppableMeetingId:null});
@@ -868,14 +903,37 @@ describe("starred sessions during a live meeting", () => {
});
-describe("starred overlay sizing", () => {
- it.each([["small",1],["medium",1.5],["large",2]] as const)("scales the session panel at %s size", async (size,scale) => {
+describe("cross-platform star controls", () => {
+ it.each(["windows", "linux"])("opens the shared dialog on %s without growing the toolbar", async (platform) => {
+ mocks.platform.isMac = false;
+ mocks.platform.isWindows = platform === "windows";
mocks.getRecordingHealthState.mockResolvedValue("normal");
- mocks.storeGet.mockResolvedValue({shortcutOverlaySize:size});
+ mocks.storeGet.mockResolvedValue(undefined);
+ mocks.toggleStarredSessions.mockClear();
+ mocks.showWindow.mockClear();
render(<ShortcutReminderPage />);
fireEvent.mouseEnter(await screen.findByTestId("shortcut-reminder-root"));
- fireEvent.click(await screen.findByRole("button",{name:"Starred work sessions"}));
- const panel = await screen.findByRole("region",{name:"Starred work sessions"});
- expect(panel.parentElement?.style.zoom).toBe(String(scale));
+ const star = await screen.findByRole("button", { name: "Starred work sessions" });
+ fireEvent.mouseEnter(star);
+ const binding = platform === "windows" ? "Alt+Shift+B" : "Control+Super+B";
+ expect(await screen.findByText(formatShortcut(binding, platform as "windows" | "linux"), { exact: false })).toBeVisible();
+ fireEvent.click(star);
+ await waitFor(() => expect(mocks.toggleStarredSessions).toHaveBeenCalledTimes(1));
+ expect(mocks.showWindow).not.toHaveBeenCalled();
+ expect(screen.queryByRole("button", { name: "15 min" })).toBeNull();
+ expect(star).toHaveAttribute("aria-haspopup", "dialog");
+ cleanup();
+ mocks.platform.isMac = true;
+ mocks.platform.isWindows = false;
+ });
+
+ it("shows an actionable error when the window cannot open", async () => {
+ mocks.getRecordingHealthState.mockResolvedValue("normal");
+ mocks.toggleStarredSessions.mockResolvedValueOnce({ status: "error", error: "unavailable" });
+ render(<ShortcutReminderPage />);
+ fireEvent.mouseEnter(await screen.findByTestId("shortcut-reminder-root"));
+ fireEvent.click(await screen.findByRole("button", { name: "Starred work sessions" }));
+ expect(await screen.findByRole("alert")).toHaveTextContent("Could not open session controls");
+ cleanup();
});
});
diff --git a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
index 9d20c3c4a..3105d0b8f 100644
--- a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
+++ b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
@@ -27,7 +27,6 @@ import {
X,
} from "lucide-react";
import { useStarredSessions } from "@/components/starred-sessions/use-starred-sessions";
-import { StarredSessionPanel } from "@/components/starred-sessions/starred-session-panel";
import { useOverlayData } from "./use-overlay-data";
import { useMeetingOverlay } from "./use-meeting-overlay";
import { AudioEqualizer } from "./audio-equalizer";
@@ -51,6 +50,7 @@ type ReminderSettings = {
showChatShortcut?: string;
showScreenpipeShortcut?: string;
searchShortcut?: string;
+ starSessionShortcut?: string;
};
type RecordingHealthState =
@@ -69,11 +69,11 @@ const DEFAULT_SHORTCUTS = {
overlay: { mac: "Super+Ctrl+S", other: "Alt+S" },
chat: { mac: "Control+Super+L", other: "Alt+L" },
search: { mac: "Control+Super+K", other: "Alt+K" },
+ star: { mac: "Control+Super+B", other: "Alt+Shift+B" },
} as const;
const COLLAPSED_SIZE = { width: 22, height: 16 };
const EXPANDED_SIZE = { width: 192, height: 62 };
-const STARRED_SESSION_SIZE = { width: 280, height: 350 };
const SETTINGS_MENU_SIZE = { width: 164, height: 96 };
const INCIDENT_SIZE = { width: 160, height: 40 };
const MEETING_SIZE = { width: 280, height: 80 };
@@ -98,6 +98,7 @@ export default function ShortcutReminderPage() {
const [overlayShortcut, setOverlayShortcut] = useState<string | null>(null);
const [chatShortcut, setChatShortcut] = useState<string | null>(null);
const [searchShortcut, setSearchShortcut] = useState<string | null>(null);
+ const [starShortcut, setStarShortcut] = useState<string | null>(null);
const overlayData = useOverlayData();
const meetingOverlay = useMeetingOverlay();
// Hover and pin are stored as the meeting they belong to, not as bare flags.
@@ -107,7 +108,7 @@ export default function ShortcutReminderPage() {
const [hoverMeetingId, setHoverMeetingId] = useState<number | null>(null);
const [pinnedMeetingId, setPinnedMeetingId] = useState<number | null>(null);
const [expanded, setExpanded] = useState(false);
- const [starPanelOpen, setStarPanelOpen] = useState(false);
+ const [starError, setStarError] = useState(false);
const starredSessions = useStarredSessions();
const [settingsOpen, setSettingsOpen] = useState(false);
const [hoveredControl, setHoveredControl] = useState<string | null>(null);
@@ -170,6 +171,19 @@ export default function ShortcutReminderPage() {
),
);
+ setStarShortcut(
+ formatForReminder(
+ settings.starSessionShortcut,
+ "starSessionShortcut",
+ {
+ mac: DEFAULT_SHORTCUTS.star.mac,
+ other: platformRef.current === "windows"
+ ? DEFAULT_SHORTCUTS.star.other
+ : DEFAULT_SHORTCUTS.star.mac,
+ },
+ ),
+ );
+
if (settings.shortcutOverlaySize) {
const s = settings.shortcutOverlaySize;
setOverlayScale(s === "large" ? 2 : s === "medium" ? 1.5 : 1);
@@ -217,6 +231,10 @@ export default function ShortcutReminderPage() {
setOverlayShortcut(prev => prev ?? fallback(DEFAULT_SHORTCUTS.overlay));
setChatShortcut(prev => prev ?? fallback(DEFAULT_SHORTCUTS.chat));
setSearchShortcut(prev => prev ?? fallback(DEFAULT_SHORTCUTS.search));
+ setStarShortcut(prev => prev ?? formatShortcut(
+ shortcutPlatform === "windows" ? DEFAULT_SHORTCUTS.star.other : DEFAULT_SHORTCUTS.star.mac,
+ shortcutPlatform,
+ ));
});
// Also listen for store changes via plugin (for live updates when user changes shortcuts).
@@ -246,7 +264,6 @@ export default function ShortcutReminderPage() {
// Listen for explicit shortcut-reminder-update event (from Rust side)
const unlistenShortcut = listen<string>("shortcut-reminder-update", () => {
setExpanded(false);
- setStarPanelOpen(false);
setHoveredControl(null);
setHoverMeetingId(null);
setPinnedMeetingId(null);
@@ -368,7 +385,6 @@ export default function ShortcutReminderPage() {
// the press becomes a drag and land collapsed, like `beginPillDrag`.
onDragStart: useCallback(() => {
setExpanded(false);
- setStarPanelOpen(false);
setHoveredControl(null);
setHoverMeetingId(null);
setPinnedMeetingId(null);
@@ -381,8 +397,6 @@ export default function ShortcutReminderPage() {
if (drag.isDragging) return;
if (healthState !== "normal") {
resizeOverlay(INCIDENT_SIZE);
- } else if (starPanelOpen) {
- resizeOverlay(STARRED_SESSION_SIZE);
} else if (meetingOverlay.active && meetingCardOpen) {
resizeOverlay(MEETING_SIZE);
} else if (settingsOpen) {
@@ -400,9 +414,19 @@ export default function ShortcutReminderPage() {
meetingOverlay.active,
resizeOverlay,
settingsOpen,
- starPanelOpen,
]);
+ const openStarPanel = useCallback(async () => {
+ setSettingsOpen(false);
+ setStarError(false);
+ try {
+ const result = await commands.toggleStarredSessions();
+ if (result.status === "error") setStarError(true);
+ } catch {
+ setStarError(true);
+ }
+ }, []);
+
const handleRestartRecording = useCallback(async (e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
@@ -661,7 +685,7 @@ export default function ShortcutReminderPage() {
);
}
- if (meetingOverlay.active && meetingCardOpen && !starPanelOpen) {
+ if (meetingOverlay.active && meetingCardOpen) {
return (
<div
data-testid="shortcut-reminder-meeting-preview"
@@ -691,7 +715,7 @@ export default function ShortcutReminderPage() {
aria-label={ui("Starred work sessions")}
title={ui("Starred work sessions")}
onPointerDown={(event) => event.stopPropagation()}
- onClick={() => { setStarPanelOpen(true); setExpanded(true); }}
+ onClick={() => void openStarPanel()}
className="ml-auto flex items-center justify-center px-1.5 h-full text-white/70 hover:text-white hover:bg-white/10"
style={{ WebkitAppRegion: "no-drag" } as React.CSSProperties}
>
@@ -750,7 +774,7 @@ export default function ShortcutReminderPage() {
}
const disclosure = hoveredControl === "star"
- ? ["star work session", null]
+ ? ["star work session", starShortcut]
: hoveredControl === "search"
? ["search", searchShortcut]
: hoveredControl === "brand"
@@ -771,7 +795,7 @@ export default function ShortcutReminderPage() {
posthog.capture("shortcut_reminder_timeline_clicked");
});
- if (!expanded && !starPanelOpen) {
+ if (!expanded) {
return (
<div
data-testid="shortcut-reminder-root"
@@ -849,11 +873,8 @@ export default function ShortcutReminderPage() {
// The side anchors ride the vertical middle with room either way, so
// they keep the dock on top like the top anchor does.
flexDirection: dockAbove ? "column" : "column-reverse",
- height: starPanelOpen ? "100vh" : undefined,
- overflow: starPanelOpen ? "hidden" : undefined,
}}
onMouseLeave={() => {
- if (starPanelOpen) return;
setExpanded(false);
setSettingsOpen(false);
setHoveredControl(null);
@@ -902,13 +923,13 @@ export default function ShortcutReminderPage() {
<button
title={ui("Starred work sessions")}
aria-label={ui("Starred work sessions")}
- aria-expanded={starPanelOpen}
+ aria-haspopup="dialog"
className={dockButtonClass}
style={dockButtonStyle}
onMouseEnter={() => setHoveredControl("star")}
onFocus={() => setHoveredControl("star")}
onPointerDown={(e) => e.stopPropagation()}
- onClick={() => { setStarPanelOpen(!starPanelOpen); setSettingsOpen(false); }}
+ onClick={() => void openStarPanel()}
>
<Star className={starredSessions.active ? "fill-white" : ""} style={{ width: `${12 * overlayScale}px`, height: `${12 * overlayScale}px` }} />
</button>
@@ -962,12 +983,8 @@ export default function ShortcutReminderPage() {
</button>
</div>
- {starPanelOpen ? (
- <div className="flex min-h-0 flex-1 w-full flex-col rounded-lg bg-black" style={{ marginTop: dockAbove ? 4 * overlayScale : 0, marginBottom: dockAbove ? 0 : 4 * overlayScale }}>
- <div className="min-h-0 flex-1 overflow-auto"><div style={{ zoom: overlayScale }}><StarredSessionPanel state={starredSessions} /></div></div>
- <button className="w-full shrink-0 rounded-b-lg bg-black/95 py-1 text-xs text-white/60 hover:text-white" style={{ zoom: overlayScale }} onClick={() => setStarPanelOpen(false)} aria-label="Close session controls">Close</button>
- </div>
- ) : settingsOpen ? (
+ {starError && <p role="alert" className="bg-black px-2 text-xs text-white">Could not open session controls. Try again.</p>}
+ {settingsOpen ? (
<div
role="menu"
aria-label={ui("Shortcut reminder options")}
diff --git a/apps/screenpipe-app-tauri/app/starred-sessions/page.test.tsx b/apps/screenpipe-app-tauri/app/starred-sessions/page.test.tsx
new file mode 100644
index 000000000..e1857655f
--- /dev/null
+++ b/apps/screenpipe-app-tauri/app/starred-sessions/page.test.tsx
@@ -0,0 +1,83 @@
+// screenpipe — AI that knows everything you've seen, said, or heard
+// https://screenpipe.com
+import {
+ act,
+ cleanup,
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+} from "@testing-library/react";
+import { afterEach, beforeEach, expect, it, vi } from "vitest";
+import Page from "./page";
+
+const mocks = vi.hoisted(() => ({
+ hide: vi.fn(),
+ fetch: vi.fn(),
+ visibility: null as null | ((e: { payload: boolean }) => void),
+}));
+vi.mock("@/lib/utils/tauri", () => ({
+ commands: { hideStarredSessions: mocks.hide },
+}));
+vi.mock("@/lib/api", () => ({ localFetch: mocks.fetch }));
+vi.mock("@/lib/hooks/use-tauri-event", () => ({
+ useTauriEvent: (_: string, callback: typeof mocks.visibility) => {
+ mocks.visibility = callback;
+ },
+}));
+vi.mock("@/lib/chat-utils", () => ({ showChatWithPrefill: vi.fn() }));
+vi.mock("@tauri-apps/plugin-opener", () => ({ revealItemInDir: vi.fn() }));
+beforeEach(() => {
+ vi.clearAllMocks();
+ mocks.hide.mockResolvedValue({ status: "ok", data: null });
+ mocks.fetch.mockResolvedValue({ ok: true, json: async () => ({ data: [] }) });
+});
+afterEach(cleanup);
+
+it("opens just the duration picker and dismisses with Escape", async () => {
+ render(<Page />);
+ expect(
+ await screen.findByRole("dialog", { name: "Starred work sessions" }),
+ ).toBeVisible();
+ await waitFor(() =>
+ expect(screen.getByRole("button", { name: "15 min" })).toBeEnabled(),
+ );
+ fireEvent.keyDown(window, { key: "Escape" });
+ await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());
+ expect(mocks.hide).toHaveBeenCalledTimes(1);
+});
+it("unmounts controls while hidden and reloads on reopening", async () => {
+ render(<Page />);
+ await waitFor(() => expect(mocks.fetch).toHaveBeenCalledTimes(1));
+ act(() => mocks.visibility!({ payload: false }));
+ expect(screen.queryByRole("dialog")).toBeNull();
+ act(() => mocks.visibility!({ payload: true }));
+ await waitFor(() => expect(mocks.fetch).toHaveBeenCalledTimes(2));
+ expect(screen.getByRole("button", { name: "5 min" })).toBeVisible();
+});
+it("keeps storage errors and retry visible inside the picker", async () => {
+ mocks.fetch.mockResolvedValue({
+ ok: false,
+ json: async () => ({ error: "could not access starred sessions" }),
+ });
+ render(<Page />);
+ expect(await screen.findByRole("alert")).toHaveTextContent(
+ "could not access starred sessions",
+ );
+ expect(screen.getByRole("button", { name: "15 min" })).toBeDisabled();
+ mocks.fetch.mockResolvedValue({ ok: true, json: async () => ({ data: [] }) });
+ fireEvent.click(screen.getByRole("button", { name: "Retry save" }));
+ await waitFor(() =>
+ expect(screen.getByRole("button", { name: "15 min" })).toBeEnabled(),
+ );
+});
+it("does not dismiss when an editor consumes Escape", () => {
+ render(<Page />);
+ const event = new KeyboardEvent("keydown", {
+ key: "Escape",
+ cancelable: true,
+ });
+ event.preventDefault();
+ window.dispatchEvent(event);
+ expect(mocks.hide).not.toHaveBeenCalled();
+});
diff --git a/apps/screenpipe-app-tauri/app/starred-sessions/page.tsx b/apps/screenpipe-app-tauri/app/starred-sessions/page.tsx
new file mode 100644
index 000000000..8fe1f3420
--- /dev/null
+++ b/apps/screenpipe-app-tauri/app/starred-sessions/page.tsx
@@ -0,0 +1,65 @@
+// screenpipe — AI that knows everything you've seen, said, or heard
+// https://screenpipe.com
+"use client";
+
+import { useCallback, useEffect, useState } from "react";
+import { X } from "lucide-react";
+import { commands } from "@/lib/utils/tauri";
+import { useTauriEvent } from "@/lib/hooks/use-tauri-event";
+import { StarredSessionPanel } from "@/components/starred-sessions/starred-session-panel";
+import { useStarredSessions } from "@/components/starred-sessions/use-starred-sessions";
+
+function SessionControls() {
+ return <StarredSessionPanel state={useStarredSessions()} inDialog />;
+}
+
+export default function StarredSessionsPage() {
+ const [visible, setVisible] = useState(true);
+ const [closeError, setCloseError] = useState(false);
+ useTauriEvent<boolean>("starred-sessions-visibility", (event) =>
+ setVisible(event.payload),
+ );
+ const hide = useCallback(async () => {
+ setCloseError(false);
+ try {
+ const result = await commands.hideStarredSessions();
+ if (result.status === "ok") setVisible(false);
+ else setCloseError(true);
+ } catch {
+ setCloseError(true);
+ }
+ }, []);
+ useEffect(() => {
+ const onKeyDown = (event: KeyboardEvent) => {
+ // Escape inside an inline time editor belongs to that editor first.
+ if (event.key === "Escape" && !event.defaultPrevented) void hide();
+ };
+ window.addEventListener("keydown", onKeyDown);
+ return () => window.removeEventListener("keydown", onKeyDown);
+ }, [hide]);
+ if (!visible) return null;
+ return (
+ <div className="h-screen w-screen bg-transparent p-1">
+ <section
+ role="dialog"
+ aria-label="Starred work sessions"
+ className="relative max-h-full overflow-y-auto rounded-lg border border-white/20 bg-black text-white"
+ >
+ <button
+ autoFocus
+ aria-label="Close session controls"
+ className="absolute right-3 top-3 z-10 rounded text-white/60 hover:text-white focus-visible:outline focus-visible:outline-1"
+ onClick={() => void hide()}
+ >
+ <X className="h-4 w-4" />
+ </button>
+ <SessionControls />
+ {closeError && (
+ <p role="alert" className="px-3 pb-3 text-xs">
+ Could not close the panel. Try again.
+ </p>
+ )}
+ </section>
+ </div>
+ );
+}
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
index 9595cf84e..ed709fd89 100644
--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md
+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
@@ -10,9 +10,9 @@ and layer declared in the manifest, weighted by confidence and criticality.
- Manifest: `e2e/coverage-map.json`
- Specs directory: `e2e/specs`
-- Mapped specs: 142
-- Declared test blocks: 411
-- Weighted coverage points: 331.5
+- Mapped specs: 143
+- Declared test blocks: 412
+- Weighted coverage points: 332.0
Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.
Criticality weights: high=1.0, medium=0.7, low=0.4.
@@ -23,9 +23,9 @@ can execute more runtime cases than this number shows.
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 108 | 348 | 291.1 | 15 | 123 | 85% |
-| macos | 138 | 373 | 301.3 | 17 | 133 | 88% |
-| linux | 96 | 306 | 260.5 | 14 | 120 | 80% |
+| windows | 109 | 349 | 291.6 | 15 | 124 | 85% |
+| macos | 139 | 374 | 301.8 | 17 | 133 | 88% |
+| linux | 97 | 307 | 261.0 | 14 | 121 | 80% |
## Runtime Results
@@ -43,16 +43,16 @@ pass/fail/skip counts.
| capture-ocr | 2 specs / 16 tests / 6.4 pts | 10 specs / 14 tests / 6.2 pts | 1 specs / 3 tests / 1.2 pts |
| chat-ai | 37 specs / 87 tests / 71.3 pts | 51 specs / 116 tests / 90.8 pts | 35 specs / 86 tests / 70.8 pts |
| entitlement | - | 1 specs / 1 tests / 1.0 pts | - |
-| local-api | 29 specs / 121 tests / 102.0 pts | 40 specs / 119 tests / 101.9 pts | 24 specs / 89 tests / 80.2 pts |
+| local-api | 30 specs / 122 tests / 102.5 pts | 41 specs / 120 tests / 102.4 pts | 25 specs / 90 tests / 80.7 pts |
| notifications | 4 specs / 26 tests / 17.3 pts | 3 specs / 5 tests / 3.4 pts | 2 specs / 4 tests / 3.1 pts |
| onboarding | 9 specs / 39 tests / 34.8 pts | 11 specs / 43 tests / 38.2 pts | 9 specs / 39 tests / 34.8 pts |
| os-integration | 8 specs / 37 tests / 31.9 pts | 17 specs / 36 tests / 23.8 pts | 3 specs / 20 tests / 15.8 pts |
| performance | 3 specs / 45 tests / 45.0 pts | 5 specs / 36 tests / 31.8 pts | 2 specs / 30 tests / 30.0 pts |
| pipes | 6 specs / 20 tests / 20.0 pts | 8 specs / 26 tests / 26.0 pts | 6 specs / 20 tests / 20.0 pts |
-| real-ui-e2e | 80 specs / 241 tests / 204.9 pts | 98 specs / 260 tests / 220.3 pts | 74 specs / 217 tests / 190.9 pts |
+| real-ui-e2e | 81 specs / 242 tests / 205.3 pts | 99 specs / 261 tests / 220.8 pts | 75 specs / 218 tests / 191.4 pts |
| settings | 15 specs / 42 tests / 39.0 pts | 17 specs / 36 tests / 31.7 pts | 14 specs / 33 tests / 30.0 pts |
| storage-privacy | 10 specs / 44 tests / 35.3 pts | 10 specs / 29 tests / 28.1 pts | 7 specs / 22 tests / 21.1 pts |
-| tauri-command | 24 specs / 69 tests / 55.9 pts | 36 specs / 92 tests / 74.3 pts | 23 specs / 70 tests / 56.8 pts |
+| tauri-command | 25 specs / 70 tests / 56.4 pts | 37 specs / 93 tests / 74.8 pts | 24 specs / 71 tests / 57.3 pts |
| window-lifecycle | 22 specs / 71 tests / 59.5 pts | 23 specs / 55 tests / 40.9 pts | 16 specs / 44 tests / 34.4 pts |
## Critical Feature Matrix
@@ -227,6 +227,7 @@ pass/fail/skip counts.
| settings-sections.spec.ts | windows, macos, linux | settings, real-ui-e2e, storage-privacy | settings-recording, screen-share-privacy, settings-ai, settings-privacy-api-auth, settings-permissions, storage-retention, low-disk-recording-guard, audio-device-health | high | strong | real-user-flow | 14 | Separate Screen and Audio & meetings destinations, persisted screen-share privacy toggle with native-status readback, AI preset/preferences split and toggle flows, low-disk capture stop with persistent notification, storage, privacy, macOS-only permissions recovery hub (asserted absent on Windows/Linux), and rapid switching crash guard. |
| speaker-rename-scope.spec.ts | windows, macos, linux | local-api | meeting-notes, speaker-rename-scope | high | strong | real-user-flow | 3 | Seeds one unnamed voice across three chunks through the public API, renames a single line with scope=auto, and verifies the whole voice is relabelled while a correction on a named speaker stays on its line. Also asserts the orphaned-speaker repair migration is recorded applied after a real app boot and leaves no row pointing at a deleted speaker. |
| spotlight-exclusion.spec.ts | macos | storage-privacy, os-integration | spotlight-exclusion | high | strong | mixed | 2 | Requires the launched app's exact E2E data directory to appear in Spotlight Search Privacy, then force-imports paired excluded/control canaries and proves only the control becomes searchable. |
+| starred-session-popover.spec.ts | macos, windows, linux | real-ui-e2e, local-api, tauri-command | shortcut-overlay | medium | partial | real-user-flow | 1 | Opens the floating star panel through the web toolbar when present or the shared native command, saves a 15-minute session against the isolated backend, and checks Escape, close, reopen, and that Home stays hidden. Runs without app activation; actual Space/focus transitions still need desktop acceptance. |
| timeline-daily-summary.spec.ts | windows, macos, linux | real-ui-e2e | timeline, settings-ai | medium | strong | real-user-flow | 1 | Opens a cached Pi-generated daily summary in Timeline, checks its bounded scrolling layout, captures a screenshot, and closes it. |
| timeline.spec.ts | windows, macos, linux | real-ui-e2e, capture-ocr | timeline, capture-ocr | high | conditional | real-user-flow | 3 | Timeline shell always runs; seeded frame assertion skips under no-recording. |
| tray-recording-status.spec.ts | windows | os-integration, tauri-command | tray-recording-status | high | strong | command | 1 | Drives Starting to Recording and reads back the status item from the successfully installed native tray menu. |
diff --git a/apps/screenpipe-app-tauri/e2e/coverage-map.json b/apps/screenpipe-app-tauri/e2e/coverage-map.json
index 0a591d986..7c0d8548a 100644
--- a/apps/screenpipe-app-tauri/e2e/coverage-map.json
+++ b/apps/screenpipe-app-tauri/e2e/coverage-map.json
@@ -3291,6 +3291,26 @@
"confidence": "strong",
"ux": "mixed",
"notes": "Headless owned browser for background pipes (#4248): with the sidebar never opened, a background eval and navigate-and-scrape over the local API lazily create a hidden offscreen child webview, return a real JS result (6*7 -> 42; document.readyState), and stay invisible; is_ready reflects real serviceability; the same singleton is then adopted into the sidebar panel (page state survives, no second webview). Search-driven and runs last because attaching the child to home tears down home's WebDriver handle."
+ },
+ {
+ "spec": "starred-session-popover.spec.ts",
+ "platforms": [
+ "macos",
+ "windows",
+ "linux"
+ ],
+ "layers": [
+ "real-ui-e2e",
+ "local-api",
+ "tauri-command"
+ ],
+ "features": [
+ "shortcut-overlay"
+ ],
+ "criticality": "medium",
+ "confidence": "partial",
+ "ux": "real-user-flow",
+ "notes": "Opens the floating star panel through the web toolbar when present or the shared native command, saves a 15-minute session against the isolated backend, and checks Escape, close, reopen, and that Home stays hidden. Runs without app activation; actual Space/focus transitions still need desktop acceptance."
}
]
}
diff --git a/apps/screenpipe-app-tauri/e2e/specs/starred-session-popover.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/starred-session-popover.spec.ts
new file mode 100644
index 000000000..f48edc4cd
--- /dev/null
+++ b/apps/screenpipe-app-tauri/e2e/specs/starred-session-popover.spec.ts
@@ -0,0 +1,113 @@
+// screenpipe — AI that knows everything you've seen, said, or heard
+// https://screenpipe.com
+
+import { authHeaders, getLocalApiConfig } from "../helpers/api-utils.js";
+import { invokeOrThrow, waitForWindowHandle } from "../helpers/tauri.js";
+import { t, waitForAppReady } from "../helpers/test-utils.js";
+
+const visible = (label: string) =>
+ invokeOrThrow<boolean>("plugin:window|is_visible", { label });
+
+describe("starred session popover", function () {
+ this.timeout(t(150_000));
+
+ it("saves in floating controls, dismisses and reopens without showing Home", async () => {
+ await waitForAppReady();
+ // Use the existing test-only account seam, with production refresh disabled.
+ await browser.execute(() => {
+ localStorage.setItem("screenpipe_e2e_account_fixture_active", "1");
+ localStorage.setItem(
+ "screenpipe_e2e_account_user",
+ JSON.stringify({
+ id: "e2e-star",
+ email: "[email protected]",
+ token: "e2e-fake-token-star",
+ subscription_plan: "free",
+ __e2eSkipAccountRefresh: true,
+ }),
+ );
+ window.dispatchEvent(new Event("screenpipe-e2e-seed-account-user"));
+ });
+ await browser.pause(t(500));
+ await invokeOrThrow("set_cloud_token", { token: "e2e-fake-token-star" });
+ await invokeOrThrow("spawn_screenpipe", { overrideArgs: null });
+ const config = await getLocalApiConfig();
+ await browser.waitUntil(
+ async () => {
+ try {
+ return (
+ await fetch(
+ `http://127.0.0.1:${config.port}/starred-sessions?limit=100`,
+ {
+ headers: authHeaders(config.key),
+ },
+ )
+ ).ok;
+ } catch {
+ return false;
+ }
+ },
+ {
+ timeout: t(45_000),
+ interval: 500,
+ timeoutMsg: "starred session storage did not become ready",
+ },
+ );
+ await invokeOrThrow("show_shortcut_reminder", { shortcut: "Cmd+Ctrl+S" });
+ if ((await browser.getWindowHandles()).includes("shortcut-reminder")) {
+ await browser.switchToWindow("shortcut-reminder");
+ await $('[data-testid="shortcut-reminder-root"]').moveTo();
+ await $('[aria-label="Starred work sessions"]').click();
+ } else {
+ await invokeOrThrow("toggle_starred_sessions");
+ }
+ await waitForWindowHandle("starred-sessions", t(20_000));
+ await browser.switchToWindow("starred-sessions");
+ // Keep the retained picker as the IPC context while closing Home in this
+ // isolated fixture. Reopening must not recreate or reveal Home.
+ if ((await browser.getWindowHandles()).includes("home")) {
+ await invokeOrThrow("plugin:window|destroy", { label: "home" });
+ }
+ await invokeOrThrow("hide_starred_sessions");
+ await invokeOrThrow("toggle_starred_sessions");
+ // The visibility event remounts controls. Do not retain a WebDriver
+ // element across that remount while waiting for the backend.
+ await browser.waitUntil(async () => browser.execute(() =>
+ Array.from(document.querySelectorAll("button")).some(button =>
+ button.textContent?.trim() === "15 min" && !button.disabled)),
+ { timeout: t(30_000) });
+ expect(await visible("starred-sessions")).toBe(true);
+ expect(await browser.getWindowHandles()).not.toContain("home");
+ await browser.pause(t(250)); // Let WebKit finish compositing the snapshot.
+ await browser.saveScreenshot("e2e/results/starred-session-popover.png");
+ await $("button=15 min").click();
+ await $("button=End session").waitForDisplayed({ timeout: t(15_000) });
+ const closeBounds = await $(
+ '[aria-label="Close session controls"]',
+ ).getLocation();
+ expect(closeBounds.y).toBeGreaterThanOrEqual(0);
+ const response = await fetch(
+ `http://127.0.0.1:${config.port}/starred-sessions?limit=100`,
+ { headers: authHeaders(config.key) },
+ );
+ expect(response.ok).toBe(true);
+ const payload = (await response.json()) as {
+ data: Array<{ start: string; end: string }>;
+ };
+ expect(payload.data).toHaveLength(1);
+ expect(
+ Date.parse(payload.data[0].end) - Date.parse(payload.data[0].start),
+ ).toBe(15 * 60_000);
+ await browser.keys("Escape");
+ await browser.waitUntil(async () => !(await visible("starred-sessions")), {
+ timeout: t(5000),
+ });
+ await invokeOrThrow("toggle_starred_sessions");
+ await $("button=End session").waitForDisplayed({ timeout: t(15_000) });
+ await $('[aria-label="Close session controls"]').click();
+ await browser.waitUntil(async () => !(await visible("starred-sessions")), {
+ timeout: t(5000),
+ });
+ await invokeOrThrow("hide_shortcut_reminder");
+ });
+});
diff --git a/apps/screenpipe-app-tauri/e2e/wdio.conf.ts b/apps/screenpipe-app-tauri/e2e/wdio.conf.ts
index 1cb8f77f9..56e9f3bd8 100644
--- a/apps/screenpipe-app-tauri/e2e/wdio.conf.ts
+++ b/apps/screenpipe-app-tauri/e2e/wdio.conf.ts
@@ -43,6 +43,7 @@ const windowsCiSpecs = [
'history-swipe-navigation.spec.ts',
'search/search-bugs-4645.spec.ts',
'settings-sections.spec.ts',
+ 'starred-session-popover.spec.ts',
'windows-system-integration.spec.ts',
'windows-user-journey.spec.ts',
].map((spec) => resolve(__dirname, 'specs', spec));
diff --git a/apps/screenpipe-app-tauri/lib/utils/tauri.ts b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
index b715d908c..94d38f521 100644
--- a/apps/screenpipe-app-tauri/lib/utils/tauri.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
@@ -938,6 +938,14 @@ async hideShortcutReminder() : Promise<Result<null, string>> {
else return { status: "error", error: e as any };
}
},
+async hideStarredSessions() : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("hide_starred_sessions") };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
async icsCalendarGetEntries() : Promise<Result<IcsCalendarEntry[], string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("ics_calendar_get_entries") };
@@ -3023,6 +3031,14 @@ async testOpenaiCompatibleTranscription(endpoint: string, apiKey: string | null,
else return { status: "error", error: e as any };
}
},
+async toggleStarredSessions() : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("toggle_starred_sessions") };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
/**
* Tauri command: start voice training. Spawns a background task that polls
* until audio is transcribed, then assigns the speaker. Returns immediately.
@@ -3665,7 +3681,7 @@ availableActions?: string[]; lifecycleNote: string;
*/
revision?: string | null; updatedAtMs: number | null }
/**
- * Screen history detail, independent of image quality and audio capture.
+ * Scroll checkpoint frequency, independent of text extraction, image quality and audio.
*/
export type RecordingDetail = "auto" | "low_impact" | "balanced" | "more_detail"
/**
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
index b37728df4..7d297481a 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -8,6 +8,7 @@
mod native_actions;
// Public so the generated command registry can name the handler by full path.
pub(crate) mod overlay_anchor;
+pub(crate) mod starred_sessions;
use crate::{
analytics::{AnalyticsManager, Attribution},
@@ -72,6 +73,21 @@ mod tests {
should_resume_snoozed_overlay, EnterpriseFileConfig, RecoveredEnterpriseDeviceConfig,
};
+ #[test]
+ fn shortcut_reminder_star_hint_tracks_registered_settings() {
+ let mut settings = crate::store::SettingsStore::default();
+ let default_shortcut = settings.star_session_shortcut.clone();
+ assert_eq!(super::shortcut_reminder_payload(&settings)["star"], default_shortcut);
+ settings.star_session_shortcut.clear();
+ assert_eq!(super::shortcut_reminder_payload(&settings)["star"], default_shortcut);
+ settings.star_session_shortcut = "Alt+Shift+J".into();
+ assert_eq!(super::shortcut_reminder_payload(&settings)["star"], "Alt+Shift+J");
+ settings.disabled_shortcuts.push("starSessionShortcut".into());
+ assert_eq!(super::shortcut_reminder_payload(&settings)["star"], "");
+ settings.star_session_shortcut.clear();
+ assert_eq!(super::shortcut_reminder_payload(&settings)["star"], "");
+ }
+
/// `get_local_api_config` must never await the server mutex.
///
/// `ServerCore::start()` holds that mutex across database migration, the
@@ -3339,6 +3355,21 @@ fn shortcut_reminder_payload(
&settings.disabled_shortcuts,
)),
);
+ // Older stores omit this key, while the global shortcut still registers
+ // the platform default. Disabled shortcuts must keep an empty hint.
+ let star_shortcut = if settings.star_session_shortcut.is_empty() {
+ crate::store::SettingsStore::default().star_session_shortcut
+ } else {
+ settings.star_session_shortcut.clone()
+ };
+ map.insert(
+ "star".to_string(),
+ serde_json::Value::String(shortcut_reminder_label(
+ &star_shortcut,
+ "starSessionShortcut",
+ &settings.disabled_shortcuts,
+ )),
+ );
map.insert(
"shortcutOverlaySize".to_string(),
serde_json::Value::String(settings.shortcut_overlay_size.clone()),
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands/native_actions.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands/native_actions.rs
index d76e9d394..bf469a2f7 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/commands/native_actions.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands/native_actions.rs
@@ -1443,10 +1443,9 @@ fn native_shortcut_action_callback_inner(action_ptr: *const std::os::raw::c_char
match action.as_str() {
"open_starred_sessions" => {
let _ = app_clone.run_on_main_thread(move || {
- let _ = (ShowRewindWindow::Home {
- page: Some("timeline&starred=1".into()),
- })
- .show(&app_for_show);
+ if let Err(error) = super::starred_sessions::toggle(&app_for_show) {
+ warn!("failed to open starred session controls: {error}");
+ }
});
}
"open_timeline" => {
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands/starred_sessions.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands/starred_sessions.rs
new file mode 100644
index 000000000..e7d2e125d
--- /dev/null
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands/starred_sessions.rs
@@ -0,0 +1,322 @@
+// screenpipe — AI that knows everything you've seen, said, or heard
+// https://screenpipe.com
+
+use crate::window::GatedWindowPlacement;
+use tauri::{Emitter, Manager};
+
+const LABEL: &str = "starred-sessions";
+const WIDTH: f64 = 360.0;
+const HEIGHT: f64 = 420.0;
+
+/// Place below the trigger, or above it at the bottom edge, in one coordinate space.
+fn attached_origin(anchor: (f64, f64, f64, f64), screen: (f64, f64, f64, f64)) -> (f64, f64) {
+ let (x, y, w, h) = anchor;
+ let (sx, sy, sw, sh) = screen;
+ let left = (x + w / 2.0 - WIDTH / 2.0).clamp(sx, (sx + sw - WIDTH).max(sx));
+ let below = y + h + 6.0;
+ let top = if below + HEIGHT <= sy + sh {
+ below
+ } else {
+ y - HEIGHT - 6.0
+ };
+ (left, top.clamp(sy, (sy + sh - HEIGHT).max(sy)))
+}
+
+#[cfg(target_os = "macos")]
+fn position(app: &tauri::AppHandle, window: &tauri::WebviewWindow) -> Result<(), String> {
+ use objc::{msg_send, sel, sel_impl};
+ use tauri_nspanel::cocoa::{
+ appkit::{NSEvent, NSScreen},
+ base::{id, nil},
+ foundation::{NSArray, NSPoint, NSRect},
+ };
+ // Keep AppKit points throughout, including displays above/left of the primary.
+ unsafe {
+ let anchor = crate::native_shortcut_reminder::get_frame();
+ let mouse = NSEvent::mouseLocation(nil);
+ let point = anchor
+ .map(|(x, y, w, h)| NSPoint::new(x + w / 2.0, y + h / 2.0))
+ .unwrap_or(mouse);
+ let screens = NSScreen::screens(nil);
+ for i in 0..NSArray::count(screens) {
+ let screen: id = NSArray::objectAtIndex(screens, i);
+ let frame = NSScreen::frame(screen);
+ if point.x < frame.origin.x
+ || point.x >= frame.origin.x + frame.size.width
+ || point.y < frame.origin.y
+ || point.y >= frame.origin.y + frame.size.height
+ {
+ continue;
+ }
+ let visible = NSScreen::visibleFrame(screen);
+ // Flip y for the shared top-down placement calculation, then back.
+ let (x, y, w, h) = anchor.unwrap_or((
+ visible.origin.x + visible.size.width / 2.0 - 11.0,
+ visible.origin.y + visible.size.height - 28.0,
+ 22.0,
+ 16.0,
+ ));
+ let (left, top) = attached_origin(
+ (x, -y - h, w, h),
+ (
+ visible.origin.x,
+ -visible.origin.y - visible.size.height,
+ visible.size.width,
+ visible.size.height,
+ ),
+ );
+ let native = window.ns_window().map_err(|e| e.to_string())? as id;
+ let _: () = msg_send![native, setFrameOrigin: NSPoint::new(left,-top-HEIGHT)];
+ return Ok(());
+ }
+ }
+ let _ = app;
+ Err("No display available for session controls".into())
+}
+
+/// Native Windows rectangles and Tauri monitor origins are physical pixels.
+/// Convert the whole coordinate space together so negative origins and mixed
+/// display scales do not move the picker onto the primary display.
+#[cfg(any(not(target_os = "macos"), test))]
+fn physical_origin(
+ anchor: (f64, f64, f64, f64),
+ work_area: (f64, f64, f64, f64),
+ scale: f64,
+) -> (i32, i32) {
+ let logical = |(x, y, w, h)| (x / scale, y / scale, w / scale, h / scale);
+ let (x, y) = attached_origin(logical(anchor), logical(work_area));
+ ((x * scale).round() as i32, (y * scale).round() as i32)
+}
+
+#[cfg(not(target_os = "macos"))]
+fn position(app: &tauri::AppHandle, window: &tauri::WebviewWindow) -> Result<(), String> {
+ let overlay = app
+ .get_webview_window("shortcut-reminder")
+ .filter(|w| w.is_visible().unwrap_or(false));
+ let web_anchor = overlay
+ .as_ref()
+ .and_then(|w| Some((w.outer_position().ok()?, w.outer_size().ok()?)))
+ .map(|(p, s)| (p.x as f64, p.y as f64, s.width as f64, s.height as f64));
+ #[cfg(target_os = "windows")]
+ let anchor = crate::native_shortcut_reminder::is_reminder_visible()
+ .then(crate::native_shortcut_reminder::get_frame)
+ .flatten()
+ .or(web_anchor);
+ #[cfg(not(target_os = "windows"))]
+ let anchor = web_anchor;
+
+ let monitor = anchor
+ .and_then(|(x, y, w, h)| {
+ app.monitor_from_point(x + w / 2.0, y + h / 2.0)
+ .ok()
+ .flatten()
+ })
+ .or_else(|| {
+ app.cursor_position()
+ .ok()
+ .and_then(|p| app.monitor_from_point(p.x, p.y).ok().flatten())
+ })
+ .or_else(|| app.primary_monitor().ok().flatten())
+ .ok_or("No display available")?;
+ let scale = monitor.scale_factor();
+ let work = monitor.work_area();
+ let screen = (
+ work.position.x as f64,
+ work.position.y as f64,
+ work.size.width as f64,
+ work.size.height as f64,
+ );
+ let anchor = anchor.unwrap_or((screen.0 + screen.2 / 2.0, screen.1, 0.0, 12.0 * scale));
+ let (x, y) = physical_origin(anchor, screen, scale);
+ window
+ .set_position(tauri::PhysicalPosition::new(x, y))
+ .map_err(|e| e.to_string())?;
+ // Moving to another display can change DPI. Resolve logical dimensions
+ // only after moving, including when reusing a window on a different display.
+ window
+ .set_size(tauri::LogicalSize::new(WIDTH, HEIGHT))
+ .map_err(|e| e.to_string())
+}
+
+pub(crate) fn hide(app: &tauri::AppHandle) -> Result<(), String> {
+ if let Some(window) = app.get_webview_window(LABEL) {
+ #[cfg(target_os = "macos")]
+ {
+ use tauri_nspanel::ManagerExt;
+ if let Ok(panel) = app.get_webview_panel(LABEL) {
+ panel.order_out(None);
+ }
+ }
+ window.hide().map_err(|e| e.to_string())?;
+ let _ = window.emit("starred-sessions-visibility", false);
+ }
+ Ok(())
+}
+
+/// Called on the main thread by both the global shortcut and overlay star button.
+pub(crate) fn toggle(app: &tauri::AppHandle) -> Result<(), String> {
+ if let Some(window) = app.get_webview_window(LABEL) {
+ if window.is_visible().unwrap_or(false) {
+ return hide(app);
+ }
+ }
+ let window = match app.get_webview_window(LABEL) {
+ Some(window) => window,
+ None => {
+ let window = tauri::WebviewWindowBuilder::new(
+ app,
+ LABEL,
+ tauri::WebviewUrl::App("starred-sessions".into()),
+ )
+ .title("Starred work sessions")
+ .inner_size(WIDTH, HEIGHT)
+ .decorations(false)
+ .transparent(true)
+ .shadow(false)
+ .resizable(false)
+ .skip_taskbar(true)
+ .always_on_top_gated(true)
+ .visible_on_all_workspaces_gated(true)
+ .focused_gated(false)
+ .visible(false)
+ .build()
+ .map(crate::window::finalize_webview_window)
+ .map_err(|e| e.to_string())?;
+ let handle = app.clone();
+ window.on_window_event(move |event| {
+ if matches!(event, tauri::WindowEvent::Focused(false)) {
+ let _ = hide(&handle);
+ }
+ });
+ window
+ }
+ };
+ // Wayland compositors may refuse absolute placement. The controls must
+ // still open; the compositor chooses their position in that case.
+ #[cfg(target_os = "linux")]
+ if let Err(error) = position(app, &window) {
+ tracing::warn!("starred session placement unavailable: {error}");
+ }
+ #[cfg(not(target_os = "linux"))]
+ position(app, &window)?;
+ #[cfg(target_os = "macos")]
+ {
+ use crate::window::GatedPanelPlacement;
+ use objc::{msg_send, sel, sel_impl};
+ use tauri_nspanel::{
+ cocoa::appkit::NSWindowCollectionBehavior as Behavior, ManagerExt, WebviewWindowExt,
+ };
+ let panel = match app.get_webview_panel(LABEL) {
+ Ok(panel) => panel,
+ Err(_) => window.to_panel().map_err(|e| e.to_string())?,
+ };
+ panel.set_style_mask(128); // NSNonactivatingPanelMask: no app/Space activation.
+ panel.set_level_gated(1002);
+ panel.set_hides_on_deactivate(false);
+ panel.set_collection_behaviour_gated(
+ Behavior::NSWindowCollectionBehaviorCanJoinAllSpaces
+ | Behavior::NSWindowCollectionBehaviorFullScreenAuxiliary
+ | Behavior::NSWindowCollectionBehaviorIgnoresCycle,
+ );
+ let sharing: u64 = if crate::window::native_overlay_is_capturable(app) {
+ 1
+ } else {
+ 0
+ };
+ unsafe {
+ let _: () = msg_send![&*panel,setSharingType: sharing];
+ }
+ window.show().map_err(|e| e.to_string())?;
+ panel.order_front_regardless();
+ crate::window::make_panel_key_if_allowed(&panel);
+ unsafe {
+ crate::window::make_webview_first_responder(&panel);
+ }
+ }
+ #[cfg(not(target_os = "macos"))]
+ {
+ window.show().map_err(|e| e.to_string())?;
+ crate::window::focus_window(&window);
+ }
+ let _ = window.emit("starred-sessions-visibility", true);
+ Ok(())
+}
+
+#[tauri::command]
+#[specta::specta]
+pub async fn toggle_starred_sessions(app_handle: tauri::AppHandle) -> Result<(), String> {
+ let (send, recv) = tokio::sync::oneshot::channel();
+ let app = app_handle.clone();
+ app_handle
+ .run_on_main_thread(move || {
+ let _ = send.send(toggle(&app));
+ })
+ .map_err(|e| e.to_string())?;
+ recv.await.map_err(|e| e.to_string())?
+}
+
+#[tauri::command]
+#[specta::specta]
+pub async fn hide_starred_sessions(app_handle: tauri::AppHandle) -> Result<(), String> {
+ let (send, recv) = tokio::sync::oneshot::channel();
+ let app = app_handle.clone();
+ app_handle
+ .run_on_main_thread(move || {
+ let _ = send.send(hide(&app));
+ })
+ .map_err(|e| e.to_string())?;
+ recv.await.map_err(|e| e.to_string())?
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ #[test]
+ fn starred_panel_hugs_trigger_and_stays_on_its_display() {
+ assert_eq!(
+ attached_origin((700.0, 12.0, 22.0, 16.0), (0.0, 0.0, 1440.0, 900.0)),
+ (531.0, 34.0)
+ );
+ assert_eq!(
+ attached_origin((1400.0, 850.0, 22.0, 16.0), (0.0, 0.0, 1440.0, 900.0)),
+ (1080.0, 424.0)
+ );
+ assert_eq!(
+ attached_origin(
+ (-1440.0, -880.0, 22.0, 16.0),
+ (-1440.0, -900.0, 1440.0, 900.0)
+ ),
+ (-1440.0, -858.0)
+ );
+ }
+ #[test]
+ fn starred_panel_uses_physical_work_area_at_mixed_dpi() {
+ // A 150% display to the left, with a taskbar reserving its bottom 60px.
+ assert_eq!(
+ physical_origin(
+ (-1500.0, 1500.0, 300.0, 30.0),
+ (-2560.0, 0.0, 2560.0, 1540.0),
+ 1.5
+ ),
+ (-1620, 861),
+ );
+ // A 200% display above the primary, with reserved space on the left.
+ assert_eq!(
+ physical_origin(
+ (0.0, -1550.0, 44.0, 32.0),
+ (80.0, -1600.0, 2480.0, 1600.0),
+ 2.0
+ ),
+ (80, -1506),
+ );
+ // Right edge at 125%: the entire 450px picker stays inside the work area.
+ assert_eq!(
+ physical_origin(
+ (3730.0, 20.0, 28.0, 20.0),
+ (1920.0, 0.0, 1840.0, 1000.0),
+ 1.25
+ ),
+ (3310, 48),
+ );
+ }
+}
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/native_overlay_win.rs b/apps/screenpipe-app-tauri/src-tauri/src/native_overlay_win.rs
index a30e0a8f8..c1ec470ac 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/native_overlay_win.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/native_overlay_win.rs
@@ -119,6 +119,7 @@ pub fn show(json: Option<&str>) -> bool {
let ok = mutate(|s| {
s.shortcut_overlay = str_at("overlay");
s.shortcut_chat = str_at("chat");
+ s.shortcut_star = str_at("star");
s.shortcut_search = str_at("search");
s.shortcut_timeline = str_at("overlay");
s.size = match str_at("shortcutOverlaySize").as_str() {
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/shortcuts.rs b/apps/screenpipe-app-tauri/src-tauri/src/shortcuts.rs
index 7d7d0a997..346f27528 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/shortcuts.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/shortcuts.rs
@@ -482,11 +482,7 @@ async fn apply_shortcuts(app: &AppHandle, config: &ShortcutConfig) -> Result<(),
track_shortcut_used(app, "star_session");
let handle = app.clone();
let _ = app.run_on_main_thread(move || {
- if let Err(e) = (ShowRewindWindow::Home {
- page: Some("timeline&starred=1".into()),
- })
- .show(&handle)
- {
+ if let Err(e) = crate::commands::starred_sessions::toggle(&handle) {
error!("failed to open starred sessions: {e}");
}
});
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window/capture_protection.rs b/apps/screenpipe-app-tauri/src-tauri/src/window/capture_protection.rs
index be1b6c8da..6f10bce82 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/window/capture_protection.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/window/capture_protection.rs
@@ -6,7 +6,7 @@ use crate::store::SettingsStore;
use serde::Serialize;
use tauri::{AppHandle, Manager, WebviewWindow};
-const OVERLAY_WINDOW_LABELS: [&str; 4] = ["main", "main-window", "chat", "shortcut-reminder"];
+const OVERLAY_WINDOW_LABELS: [&str; 5] = ["main", "main-window", "chat", "shortcut-reminder", "starred-sessions"];
#[derive(Debug, Clone, Serialize, specta::Type)]
#[serde(rename_all = "camelCase")]
@@ -182,6 +182,8 @@ mod tests {
settings.hide_overlay_in_screen_recording = true;
assert!(should_protect_window(&settings, "main-window", false));
assert!(should_protect_window(&settings, "chat", false));
+ assert!(should_protect_window(&settings, "starred-sessions", false));
+ assert!(!should_protect_window(&settings, "starred-sessions", true));
assert!(!should_protect_window(&settings, "permission-recovery", false));
}
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder.swift b/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder.swift
index 50e644d2a..19eb1ed36 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder.swift
@@ -822,11 +822,12 @@ func disclosureContent(
overlayShortcut: String,
chatShortcut: String,
searchShortcut: String,
+ starShortcut: String,
metrics: OverlayMetrics
) -> (String, String?)? {
switch control {
case "brand": return ("screenpipe", uiText("right-click"))
- case "star": return (uiText("star work session"), "")
+ case "star": return (uiText("star work session"), starShortcut)
case "timeline": return (uiText("timeline"), overlayShortcut)
case "chat": return (uiText("ask chat"), chatShortcut)
case "search": return (uiText("search"), searchShortcut)
@@ -1186,28 +1187,9 @@ struct ShortcutReminderView: View {
DockIconButton(icon: "bubble.left.fill", active: metrics.hoveredControl == "chat", scale: scale) {
onAction("open_chat")
}
- Menu {
- ForEach([5, 15, 30, 60], id: \.self) { minutes in
- Button("Star for \(minutes) min") { onAction("star_session:\(minutes):normal") }
- }
- Menu("Star with HD") {
- ForEach([5, 15, 30, 60], id: \.self) { minutes in
- Button("\(minutes) min") { onAction("star_session:\(minutes):hd") }
- }
- }
- Divider()
- Button("End starred session") { onAction("star_session:0:normal") }
- Button("Edit saved sessions…") { onAction("open_starred_sessions") }
- } label: {
- Image(systemName: "star")
- .font(.system(size: s(12)))
- .foregroundColor(.white)
- .frame(maxWidth: .infinity, maxHeight: .infinity)
+ DockIconButton(icon: "star", active: metrics.hoveredControl == "star", scale: scale) {
+ onAction("open_starred_sessions")
}
- .menuStyle(.borderlessButton)
- .menuIndicator(.hidden)
- .fixedSize(horizontal: false, vertical: false)
- .frame(maxWidth: .infinity, maxHeight: .infinity)
.accessibilityLabel("Star a work session")
DockIconButton(icon: "rectangle.split.1x2", active: metrics.hoveredControl == "timeline", scale: scale) {
onAction("open_timeline")
@@ -1603,6 +1585,7 @@ class ShortcutReminderController: NSObject, NSWindowDelegate {
private var overlayShortcut = "⌘⌃S"
private var chatShortcut = "⌘⌃L"
private var searchShortcut = "⌘⌃K"
+ private var starShortcut = "⌘⌃B"
private var metrics = OverlayMetrics()
private var wsTask: URLSessionWebSocketTask?
private var wsRetryTimer: Timer?
@@ -2163,6 +2146,7 @@ class ShortcutReminderController: NSObject, NSWindowDelegate {
if let s = dict["overlay"] { overlayShortcut = prettifyShortcut(s) }
if let s = dict["chat"] { chatShortcut = prettifyShortcut(s) }
if let s = dict["search"] { searchShortcut = prettifyShortcut(s) }
+ if let s = dict["star"] { starShortcut = prettifyShortcut(s) }
if let s = dict["shortcutOverlaySize"] { setOverlayScale(s) }
if let s = dict["shortcutOverlayAnchor"], let anchor = OverlayAnchor.fromStored(s) {
overlayAnchor = anchor
@@ -2316,6 +2300,7 @@ class ShortcutReminderController: NSObject, NSWindowDelegate {
overlayShortcut: overlayShortcut,
chatShortcut: chatShortcut,
searchShortcut: searchShortcut,
+ starShortcut: starShortcut,
metrics: metrics
) else {
disclosurePanel?.orderOut(nil)
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder_tests.swift b/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder_tests.swift
index a501b9c3a..f15889bd8 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder_tests.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/shortcut_reminder_tests.swift
@@ -520,7 +520,7 @@ private func testClampWithoutDisplaysIsIdentity() {
/// Selecting a UI locale must translate labels and leave shortcut tokens intact.
private func testLocalizedDisclosure() {
- let sources = ["right-click", "timeline", "ask chat", "search", "mic capture", "live", "idle", "settings"]
+ let sources = ["right-click", "star work session", "timeline", "ask chat", "search", "mic capture", "live", "idle", "settings"]
let translations = Dictionary(uniqueKeysWithValues: sources.map { source in
(SHA256.hash(data: Data(source.utf8)).prefix(8).map { String(format: "%02x", $0) }.joined(), "localized " + source)
})
@@ -528,12 +528,15 @@ private func testLocalizedDisclosure() {
String(data: payload, encoding: .utf8)!.withCString { UILocalization.shared.update($0) }
defer { "{\"locale\":\"en\",\"messages\":{}}".withCString { UILocalization.shared.update($0) } }
let metrics = OverlayMetrics()
- for (control, label) in [("timeline", "timeline"), ("chat", "ask chat"), ("search", "search"), ("settings", "settings")] {
- let content = disclosureContent(for: control, overlayShortcut: "⌥Space", chatShortcut: "⌥C", searchShortcut: "⌥S", metrics: metrics)
+ for (control, label) in [("star", "star work session"), ("timeline", "timeline"), ("chat", "ask chat"), ("search", "search"), ("settings", "settings")] {
+ let content = disclosureContent(for: control, overlayShortcut: "⌥Space", chatShortcut: "⌥C", searchShortcut: "⌥S", starShortcut: "⌥B", metrics: metrics)
expect(content?.0 == "localized " + label, "untranslated overlay control: \(control)")
+ if control == "star" { expect(content?.1 == "⌥B", "star shortcut was not preserved") }
if control == "timeline" { expect(content?.1 == "⌥Space", "shortcut was translated") }
}
- let brand = disclosureContent(for: "brand", overlayShortcut: "", chatShortcut: "", searchShortcut: "", metrics: metrics)
+ let disabledStar = disclosureContent(for: "star", overlayShortcut: "", chatShortcut: "", searchShortcut: "", starShortcut: "", metrics: metrics)
+ expect(disabledStar?.1 == "", "disabled star shortcut must not show a chord")
+ let brand = disclosureContent(for: "brand", overlayShortcut: "", chatShortcut: "", searchShortcut: "", starShortcut: "", metrics: metrics)
expect(brand?.0 == "screenpipe", "brand was translated")
expect(brand?.1 == "localized right-click", "right-click hint was not translated")
}
diff --git a/crates/screenpipe-overlay-win/src/actions.rs b/crates/screenpipe-overlay-win/src/actions.rs
index 4a528ed64..d0d1db799 100644
--- a/crates/screenpipe-overlay-win/src/actions.rs
+++ b/crates/screenpipe-overlay-win/src/actions.rs
@@ -29,6 +29,7 @@ pub fn action_for(state: &OverlayState, control: Control) -> Option<String> {
Control::Pill | Control::Brand | Control::Timeline => "open_timeline",
Control::Search => "open_search",
Control::Chat => "open_chat",
+ Control::Star => "open_starred_sessions",
Control::Settings => return None,
Control::RestartRecording => "restart_recording",
Control::DismissIncident => "dismiss_incident",
@@ -112,6 +113,10 @@ mod tests {
let s = OverlayState::default();
assert_eq!(action_for(&s, Control::Search).unwrap(), "open_search");
assert_eq!(action_for(&s, Control::Chat).unwrap(), "open_chat");
+ assert_eq!(
+ action_for(&s, Control::Star).unwrap(),
+ "open_starred_sessions"
+ );
assert_eq!(action_for(&s, Control::Timeline).unwrap(), "open_timeline");
assert_eq!(action_for(&s, Control::Pill).unwrap(), "open_timeline");
assert_eq!(action_for(&s, Control::Brand).unwrap(), "open_timeline");
diff --git a/crates/screenpipe-overlay-win/src/layout.rs b/crates/screenpipe-overlay-win/src/layout.rs
index d71de4b04..c37d31a83 100644
--- a/crates/screenpipe-overlay-win/src/layout.rs
+++ b/crates/screenpipe-overlay-win/src/layout.rs
@@ -52,7 +52,7 @@ pub const BASE_COLLAPSED_W: f32 = 22.0;
pub const BASE_COLLAPSED_H: f32 = 16.0;
pub const BASE_HEALTH_H: f32 = 18.0;
pub const BASE_CORNER: f32 = 4.0;
-pub const BASE_EXPANDED_W: f32 = 160.0;
+pub const BASE_EXPANDED_W: f32 = 192.0;
pub const BASE_DOCK_H: f32 = 30.0;
pub const BASE_DISCLOSURE_H: f32 = 26.0;
pub const BASE_GAP: f32 = 4.0;
@@ -317,16 +317,21 @@ enum Block {
Notification,
}
-/// Three icon buttons, the audio meter, and the rightmost brand control — the
+/// Four icon buttons, the audio meter, and the rightmost brand control — the
/// dock from `dockView` in shortcut_reminder.swift.
fn dock_cells(dock: Rect, s: f32) -> (Vec<(Control, Rect)>, Vec<Rect>) {
let divider_w = 1.0f32.max(s.round());
- let icon_controls = [Control::Search, Control::Chat, Control::Timeline];
+ let icon_controls = [
+ Control::Search,
+ Control::Chat,
+ Control::Star,
+ Control::Timeline,
+ ];
// Audio is a status cell, not a button, but it still highlights on hover.
let usable = dock.w - divider_w * 2.0;
- // Five cells: three icons, the meter, and brand. The meter gets the same
+ // Six cells: four icons, the meter, and brand. The meter gets the same
// share as an icon so the row reads as evenly spaced.
- let cell_w = usable / 5.0;
+ let cell_w = usable / 6.0;
let mut cells = Vec::new();
let mut dividers = Vec::new();
@@ -458,7 +463,8 @@ mod tests {
#[test]
fn every_dock_cell_is_clickable_and_they_tile_the_dock() {
let l = compute(&hovered());
- assert_eq!(l.dock_cells.len(), 5);
+ assert_eq!(l.dock_cells.len(), 6);
+ assert_eq!(l.dock_cells[2].0, Control::Star);
assert_eq!(
l.dock_cells.first().map(|(control, _)| *control),
Some(Control::Search)
diff --git a/crates/screenpipe-overlay-win/src/preview.rs b/crates/screenpipe-overlay-win/src/preview.rs
index 362fc2d9a..c74976dec 100644
--- a/crates/screenpipe-overlay-win/src/preview.rs
+++ b/crates/screenpipe-overlay-win/src/preview.rs
@@ -32,6 +32,7 @@ fn base() -> OverlayState {
shortcut_timeline: "Alt+S".into(),
shortcut_search: "Alt+K".into(),
shortcut_chat: "Alt+L".into(),
+ shortcut_star: "Alt+Shift+B".into(),
shortcut_overlay: "Alt+O".into(),
audio_active: true,
speech_ratio: 0.55,
diff --git a/crates/screenpipe-overlay-win/src/render.rs b/crates/screenpipe-overlay-win/src/render.rs
index e4c83c9c2..ed943ced5 100644
--- a/crates/screenpipe-overlay-win/src/render.rs
+++ b/crates/screenpipe-overlay-win/src/render.rs
@@ -64,6 +64,7 @@ const APP_ICON_PNG: &[u8] =
// Symbols the macOS pill uses.
const ICON_SEARCH: char = '\u{E721}';
const ICON_CHAT: char = '\u{E8BD}';
+const ICON_STAR: char = '\u{E734}';
const ICON_TIMELINE: char = '\u{E81C}';
const ICON_SETTINGS: char = '\u{E713}';
const ICON_REFRESH: char = '\u{E72C}';
@@ -457,6 +458,7 @@ impl Renderer {
}
Control::Search => self.icon(rt, ICON_SEARCH, 10.0 * s, *cell, white(alpha)),
Control::Chat => self.icon(rt, ICON_CHAT, 10.0 * s, *cell, white(alpha)),
+ Control::Star => self.icon(rt, ICON_STAR, 12.0 * s, *cell, white(alpha)),
Control::Timeline => self.icon(rt, ICON_TIMELINE, 10.0 * s, *cell, white(alpha)),
Control::Settings => self.icon(rt, ICON_SETTINGS, 10.0 * s, *cell, white(alpha)),
Control::Audio => self.draw_equalizer(rt, state, eq, *cell, s),
@@ -509,7 +511,7 @@ impl Renderer {
let pad = 8.0 * s;
let inner = Rect::new(r.x + pad, r.y, r.w - pad * 2.0, r.h);
// One centred line. Two columns of hint text collide the moment a
- // shortcut gains a modifier, and this row is only 160 DIP wide.
+ // shortcut gains a modifier, and this row is only 192 DIP wide.
self.mono_text(
rt,
&disclosure_hint(state),
diff --git a/crates/screenpipe-overlay-win/src/state.rs b/crates/screenpipe-overlay-win/src/state.rs
index 43348171d..fbff791c6 100644
--- a/crates/screenpipe-overlay-win/src/state.rs
+++ b/crates/screenpipe-overlay-win/src/state.rs
@@ -185,6 +185,7 @@ pub struct OverlayState {
pub shortcut_timeline: String,
pub shortcut_search: String,
pub shortcut_chat: String,
+ pub shortcut_star: String,
pub shortcut_overlay: String,
pub notification: Option<Notification>,
@@ -209,6 +210,7 @@ pub enum Control {
Brand,
Search,
Chat,
+ Star,
Timeline,
Audio,
Settings,
diff --git a/crates/screenpipe-overlay-win/src/text.rs b/crates/screenpipe-overlay-win/src/text.rs
index 9e6b33abb..67e5c2710 100644
--- a/crates/screenpipe-overlay-win/src/text.rs
+++ b/crates/screenpipe-overlay-win/src/text.rs
@@ -56,9 +56,9 @@ pub fn prettify_shortcut(raw: &str) -> String {
out.join("+")
}
-/// Longest hint the 160 DIP disclosure row can show at 8 DIP mono without
+/// Longest hint the 192 DIP disclosure row can show at 8 DIP mono without
/// clipping, with the row's horizontal padding taken off.
-pub const MAX_HINT_CHARS: usize = 30;
+pub const MAX_HINT_CHARS: usize = 36;
/// What the disclosure row says.
///
@@ -71,6 +71,7 @@ pub fn disclosure_hint(state: &OverlayState) -> String {
Some(Control::Brand) => "screenpipe · right-click".into(),
Some(Control::Search) => labelled("search", &state.shortcut_search),
Some(Control::Chat) => labelled("chat", &state.shortcut_chat),
+ Some(Control::Star) => labelled("star work session", &state.shortcut_star),
Some(Control::Timeline) => labelled("timeline", &state.shortcut_timeline),
Some(Control::Settings) => "overlay settings".into(),
Some(Control::Audio) => {
@@ -148,6 +149,7 @@ mod tests {
shortcut_timeline: "Alt+S".into(),
shortcut_search: "Alt+K".into(),
shortcut_chat: "Alt+L".into(),
+ shortcut_star: "Alt+Shift+B".into(),
shortcut_overlay: "Alt+O".into(),
hovering: true,
..Default::default()
@@ -164,6 +166,16 @@ mod tests {
assert_eq!(prettify_shortcut("+++"), "");
}
+ #[test]
+ fn star_hint_tracks_custom_and_disabled_bindings() {
+ let mut s = state();
+ s.hovered_control = Some(Control::Star);
+ s.shortcut_star = "Ctrl+Alt+J".into();
+ assert_eq!(disclosure_hint(&s), "star work session · Ctrl+Alt+J");
+ s.shortcut_star.clear();
+ assert_eq!(disclosure_hint(&s), "star work session");
+ }
+
#[test]
fn duplicate_modifiers_collapse() {
assert_eq!(prettify_shortcut("Ctrl+Control+K"), "Ctrl+K");
@@ -178,6 +190,7 @@ mod tests {
(Control::Timeline, "timeline · Alt+S"),
(Control::Search, "search · Alt+K"),
(Control::Chat, "chat · Alt+L"),
+ (Control::Star, "star work session · Alt+Shift+B"),
] {
s.hovered_control = Some(control);
assert_eq!(disclosure_hint(&s), expected);
@@ -209,7 +222,7 @@ mod tests {
s.hovered_control = Some(Control::Search);
let hint = disclosure_hint(&s);
assert!(hint.chars().count() <= MAX_HINT_CHARS, "{hint:?}");
- assert_eq!(hint, "search · ⊞+Ctrl+Alt+Shift+BRA…");
+ assert_eq!(hint, "search · ⊞+Ctrl+Alt+Shift+BRACKETLE…");
}
#[test]
diff --git a/docs/COVERAGE.md b/docs/COVERAGE.md
index c8050bc9a..85e5cff17 100644
--- a/docs/COVERAGE.md
+++ b/docs/COVERAGE.md
@@ -24,15 +24,15 @@ results and `cargo llvm-cov` data on top when judging release confidence.
### Tauri E2E
-- Mapped specs: 142
-- Declared test blocks: 411
-- Weighted coverage points: 331.5
+- Mapped specs: 143
+- Declared test blocks: 412
+- Weighted coverage points: 332.0
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 108 | 348 | 291.1 | 15 | 123 | 85% |
-| macos | 138 | 373 | 301.3 | 17 | 133 | 88% |
-| linux | 96 | 306 | 260.5 | 14 | 120 | 80% |
+| windows | 109 | 349 | 291.6 | 15 | 124 | 85% |
+| macos | 139 | 374 | 301.8 | 17 | 133 | 88% |
+| linux | 97 | 307 | 261.0 | 14 | 121 | 80% |
### Core Engine
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-panel-after.png b/docs/pr-assets/star-tooltip-shortcut/star-panel-after.png
new file mode 100644
index 000000000..df728c5d8
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-panel-after.png differ
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-panel-before-reported.png b/docs/pr-assets/star-tooltip-shortcut/star-panel-before-reported.png
new file mode 100644
index 000000000..d1c51afaf
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-panel-before-reported.png differ
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-tooltip-after.png b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-after.png
new file mode 100644
index 000000000..932d13e74
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-after.png differ
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-tooltip-before.png b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-before.png
new file mode 100644
index 000000000..9e5852471
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-before.png differ
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-tooltip-custom.png b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-custom.png
new file mode 100644
index 000000000..6d88d21e0
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-custom.png differ
diff --git a/docs/pr-assets/star-tooltip-shortcut/star-tooltip-disabled.png b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-disabled.png
new file mode 100644
index 000000000..9e5852471
Binary files /dev/null and b/docs/pr-assets/star-tooltip-shortcut/star-tooltip-disabled.png differ