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(overlay): stop double-scaling the shortcut reminder on medium/large

Louis Beaumonte154270af78e
diff --git a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
index ea89dd4fe..17e86c1de 100644
--- a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
+++ b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
@@ -179,6 +179,18 @@ export default function ShortcutReminderPage() {
}
}, []);
+ // Size tokens are scaled inline instead of via CSS `transform: scale()` so
+ // we avoid subpixel-rounding clipping at non-integer scales (e.g. 1.5×)
+ // and don't double-compensate the window — Rust already sizes the Tauri
+ // window to base * overlayScale in `commands.rs:show_shortcut_reminder`.
+ const fontPx = 9 * overlayScale;
+ const iconPx = 9 * overlayScale;
+ const padX = 4 * overlayScale;
+ const padY = 2 * overlayScale;
+ const gap = 2 * overlayScale;
+ const smIconPx = 10 * overlayScale;
+ const dotPx = Math.max(5 * overlayScale, 5);
+
return (
<div
className="w-full h-full flex items-center justify-center"
@@ -186,19 +198,16 @@ export default function ShortcutReminderPage() {
>
<div
onMouseDown={handleMouseDown}
- className="select-none"
- style={{
- cursor: "grab",
- transform: overlayScale !== 1 ? `scale(${overlayScale})` : undefined,
- transformOrigin: "center center",
- }}
+ className="select-none w-full h-full"
+ style={{ cursor: "grab" }}
>
<div
- className="border border-white/20"
+ className="w-full h-full border border-white/25"
style={{
- background: "rgba(0, 0, 0, 0.75)",
+ background: "rgba(0, 0, 0, 0.88)",
display: "grid",
gridTemplateColumns: "1fr 1px 1fr 1px 1fr",
+ gridTemplateRows: "1fr 1px 1fr",
}}
>
{/* Row 1: Shortcuts */}
@@ -209,19 +218,19 @@ export default function ShortcutReminderPage() {
posthog.capture("shortcut_reminder_timeline_clicked");
}}
onMouseDown={(e) => e.stopPropagation()}
- className="flex items-center justify-center gap-0.5 px-1 py-0.5 hover:bg-white/10 transition-colors cursor-pointer"
- style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
+ className="flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer min-w-0"
+ style={{ gap: `${gap}px`, padding: `${padY}px ${padX}px`, WebkitAppRegion: 'no-drag' } as React.CSSProperties}
title="Open timeline"
>
- <svg width="7" height="7" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/50 shrink-0">
+ <svg width={iconPx} height={iconPx} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/70 shrink-0">
<rect x="3" y="3" width="18" height="18" />
<line x1="3" y1="9" x2="21" y2="9" />
</svg>
- <span className="font-mono text-[8px] font-medium text-white/80 whitespace-nowrap">
+ <span className="font-mono font-medium text-white whitespace-nowrap truncate" style={{ fontSize: `${fontPx}px` }}>
{overlayShortcut ?? "..."}
</span>
</button>
- <div className="bg-white/20" />
+ <div className="bg-white/25" />
<button
onClick={(e) => {
e.stopPropagation();
@@ -229,18 +238,18 @@ export default function ShortcutReminderPage() {
posthog.capture("shortcut_reminder_chat_clicked");
}}
onMouseDown={(e) => e.stopPropagation()}
- className="flex items-center justify-center gap-0.5 px-1 py-0.5 hover:bg-white/10 transition-colors cursor-pointer"
- style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
+ className="flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer min-w-0"
+ style={{ gap: `${gap}px`, padding: `${padY}px ${padX}px`, WebkitAppRegion: 'no-drag' } as React.CSSProperties}
title="Open chat"
>
- <svg width="7" height="7" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/50 shrink-0">
+ <svg width={iconPx} height={iconPx} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/70 shrink-0">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />
</svg>
- <span className="font-mono text-[8px] font-medium text-white/80 whitespace-nowrap">
+ <span className="font-mono font-medium text-white whitespace-nowrap truncate" style={{ fontSize: `${fontPx}px` }}>
{chatShortcut ?? "..."}
</span>
</button>
- <div className="bg-white/20" />
+ <div className="bg-white/25" />
<button
onClick={(e) => {
e.stopPropagation();
@@ -248,50 +257,59 @@ export default function ShortcutReminderPage() {
posthog.capture("shortcut_reminder_search_clicked");
}}
onMouseDown={(e) => e.stopPropagation()}
- className="flex items-center justify-center gap-0.5 px-1 py-0.5 hover:bg-white/10 transition-colors cursor-pointer"
- style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
+ className="flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer min-w-0"
+ style={{ gap: `${gap}px`, padding: `${padY}px ${padX}px`, WebkitAppRegion: 'no-drag' } as React.CSSProperties}
title="Open search"
>
- <svg width="7" height="7" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/50 shrink-0">
+ <svg width={iconPx} height={iconPx} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-white/70 shrink-0">
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
- <span className="font-mono text-[8px] font-medium text-white/80 whitespace-nowrap">
+ <span className="font-mono font-medium text-white whitespace-nowrap truncate" style={{ fontSize: `${fontPx}px` }}>
{searchShortcut ?? "..."}
</span>
</button>
+ {/* Divider row */}
+ <div className="col-span-5 bg-white/15" />
+
{/* Row 2: Status + close */}
- <div className="px-1 py-0.5 min-w-0 overflow-hidden border-t border-white/10">
+ <div className="min-w-0 overflow-hidden flex items-center" style={{ padding: `${padY}px ${padX}px` }}>
<AudioEqualizer
active={overlayData.audioActive}
speechRatio={overlayData.speechRatio}
/>
</div>
- <div className="bg-white/10 border-t border-white/10" />
- <div className="px-1 py-0.5 min-w-0 overflow-hidden border-t border-white/10">
+ <div className="bg-white/15" />
+ <div className="min-w-0 overflow-hidden flex items-center" style={{ padding: `${padY}px ${padX}px` }}>
<ScreenMatrix
active={overlayData.screenActive}
captureFps={overlayData.captureFps}
ocrPulseTimestamp={overlayData.ocrPulseTimestamp}
/>
</div>
- <div className="bg-white/10 border-t border-white/10" />
- <div className="flex items-center justify-center gap-1 py-0.5 border-t border-white/10">
+ <div className="bg-white/15" />
+ <div className="flex items-center justify-center" style={{ gap: `${gap}px`, padding: `${padY}px ${padX}px` }}>
<button
onClick={(e) => {
e.stopPropagation();
meeting.toggle();
}}
disabled={meeting.loading}
- className="relative flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer p-0.5"
+ className="relative flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer"
title={meeting.active ? "stop meeting" : "start meeting"}
- style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
+ style={{ padding: `${padY}px`, WebkitAppRegion: 'no-drag' } as React.CSSProperties}
>
{meeting.active && (
- <span className="absolute -top-0.5 -right-0.5 h-1.5 w-1.5 rounded-full bg-white animate-pulse" />
+ <span
+ className="absolute rounded-full bg-white animate-pulse"
+ style={{ top: -1, right: -1, width: `${dotPx}px`, height: `${dotPx}px` }}
+ />
)}
- <Phone className={`h-2 w-2 ${meeting.active ? "text-white" : "text-white/40 hover:text-white"}`} />
+ <Phone
+ style={{ width: `${smIconPx}px`, height: `${smIconPx}px` }}
+ className={meeting.active ? "text-white" : "text-white/60 hover:text-white"}
+ />
</button>
<button
onClick={handleClose}
@@ -299,11 +317,14 @@ export default function ShortcutReminderPage() {
e.preventDefault();
e.stopPropagation();
}}
- className="flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer p-0.5"
+ className="flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer"
title="Hide shortcut reminder"
- style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
+ style={{ padding: `${padY}px`, WebkitAppRegion: 'no-drag' } as React.CSSProperties}
>
- <X className="h-2 w-2 text-white/40 hover:text-white" />
+ <X
+ style={{ width: `${smIconPx}px`, height: `${smIconPx}px` }}
+ className="text-white/60 hover:text-white"
+ />
</button>
</div>
</div>