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

feat: timeline UI improvements

Louis Beaumont757b4c461b94
diff --git a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
index 620106dec..c2b047152 100644
--- a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
@@ -18,6 +18,24 @@ interface CurrentFrameTimelineProps {
onFrameUnavailable?: () => void;
onFrameLoadError?: () => void;
onUrlsDetected?: (urls: DetectedUrl[]) => void;
+ /** all unique device_ids seen in this session (e.g. ["monitor_1", "monitor_4"]) */
+ allDeviceIds?: string[];
+}
+
+/**
+ * Parse a device_id like "monitor_4" → "4" or "louis-macbook/monitor_1" → "macbook · 1"
+ */
+function formatDeviceLabel(deviceId: string): string {
+ // cloud sync format: "hostname/monitor_N"
+ if (deviceId.includes("/")) {
+ const [host, monitor] = deviceId.split("/");
+ const shortHost = host.replace(/^[^-]*-/, ""); // "louis-macbook" → "macbook"
+ const num = monitor.replace(/\D/g, "");
+ return `${shortHost} · ${num}`;
+ }
+ // local format: "monitor_N"
+ const num = deviceId.replace(/\D/g, "");
+ return num || deviceId;
}
export const SkeletonLoader: FC = () => {
@@ -53,6 +71,7 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({
onFrameUnavailable,
onFrameLoadError,
onUrlsDetected,
+ allDeviceIds,
}) => {
const [isLoading, setIsLoading] = useState(true);
const [hasError, setHasError] = useState(false);
@@ -95,6 +114,13 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({
const offsetIndex = device?.offset_index ?? 0;
const fpsFromServer = device?.fps ?? 0.5;
+ // monitor pill — only show when session has multiple monitors
+ const deviceId = device?.device_id;
+ const showMonitorPill = Boolean(
+ deviceId && allDeviceIds && allDeviceIds.length > 1
+ );
+ const monitorLabel = deviceId ? formatDeviceLabel(deviceId) : "";
+
// Track skipped frames for analytics
useEffect(() => {
if (frameId && lastFrameIdRef.current && frameId !== lastFrameIdRef.current) {
@@ -494,6 +520,13 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({
/>
)}
+ {/* monitor indicator pill */}
+ {showMonitorPill && !isLoading && !hasError && (
+ <div className="absolute top-2 right-2 z-20 px-1.5 py-0.5 text-[10px] font-mono bg-black/60 text-white/70 rounded-sm select-none pointer-events-none">
+ {monitorLabel}
+ </div>
+ )}
+
{/* OCR text overlay */}
{!isLoading && !hasError && !ocrLoading && naturalDimensions && renderedImageInfo && textPositions.length > 0 && (
<div className="absolute overflow-hidden" style={{ zIndex: 2, top: 0, left: 0, right: 0, bottom: 0 }}>
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
index 799178b03..a6f9f0eff 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
@@ -143,6 +143,17 @@ export default function Timeline() {
const isAtLiveEdge = currentIndex === 0;
const prevFramesLengthRef = useRef(frames.length);
+ // collect unique device ids across all frames (for monitor pill)
+ const allDeviceIds = useMemo(() => {
+ const ids = new Set<string>();
+ for (const frame of frames) {
+ for (const d of frame.devices) {
+ if (d.device_id) ids.add(d.device_id);
+ }
+ }
+ return [...ids];
+ }, [frames]);
+
// When new frames arrive and user is NOT at live edge, adjust index to stay on same frame
useEffect(() => {
if (newFramesCount > 0 && !isAtLiveEdge && frames.length > prevFramesLengthRef.current) {
@@ -1054,6 +1065,7 @@ export default function Timeline() {
{currentFrame ? (
<CurrentFrameTimeline
currentFrame={currentFrame}
+ allDeviceIds={allDeviceIds}
onNavigate={(direction) => {
const newIndex = direction === "next"
? Math.min(currentIndex + 1, frames.length - 1)