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: timeline icon fallback and filter dot colors on Windows

Louis Beaumont05724f631e2d
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/app-context-popover.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/app-context-popover.tsx
index e6b3b7f95..fb1983d42 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline/app-context-popover.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/app-context-popover.tsx
@@ -213,14 +213,25 @@ export function AppContextPopover({
<div className="flex items-center justify-between px-3 py-2 border-b border-border">
<div className="flex items-center gap-2 min-w-0">
{allApps.map((name, i) => (
- // eslint-disable-next-line @next/next/no-img-element
- <img
+ <span
key={i}
- src={`http://localhost:11435/app-icon?name=${encodeURIComponent(name)}`}
- className="w-5 h-5 rounded flex-shrink-0 object-contain"
- alt={name}
- style={i > 0 ? { marginLeft: -6 } : undefined}
- />
+ className="relative w-5 h-5 rounded flex-shrink-0 overflow-hidden inline-flex items-center justify-center"
+ style={{
+ marginLeft: i > 0 ? -6 : undefined,
+ backgroundColor: `hsla(${[...name].reduce((h, c) => c.charCodeAt(0) + ((h << 5) - h), 0) % 360}, 40%, 55%, 0.3)`,
+ }}
+ >
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img
+ src={`http://localhost:11435/app-icon?name=${encodeURIComponent(name)}`}
+ className="w-full h-full rounded object-contain"
+ alt={name}
+ onError={(e) => { (e.target as HTMLImageElement).style.display = 'none'; }}
+ />
+ <span className="absolute inset-0 flex items-center justify-center text-[8px] font-bold text-white/90" style={{ zIndex: -1 }}>
+ {name.charAt(0).toUpperCase()}
+ </span>
+ </span>
))}
<span className="font-medium text-popover-foreground truncate">
{allApps.length > 1 ? allApps.join(" + ") : appName}
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
index 07e4c207f..a3f1d4839 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
@@ -173,13 +173,16 @@ function appNameToHue(name: string): number {
}
// Color for filter dots — identifiable but not loud
-function appNameToColor(name: string): string {
+function appNameToColor(name: string, alpha?: number): string {
+ if (alpha !== undefined) {
+ return `hsla(${appNameToHue(name)}, 40%, 55%, ${alpha})`;
+ }
return `hsl(${appNameToHue(name)}, 40%, 55%)`;
}
-// Color for timeline bars — muted tint, fits black/white aesthetic
+// Color for timeline bars — tinted enough to distinguish apps visually
function appNameToBarColor(name: string): string {
- return `hsl(${appNameToHue(name)}, 25%, 70%)`;
+ return `hsl(${appNameToHue(name)}, 35%, 65%)`;
}
export const TimelineSlider = ({
@@ -708,7 +711,7 @@ export const TimelineSlider = ({
backgroundColor: selectedAppName === name
? appNameToColor(name)
: selectedAppName === "all"
- ? appNameToColor(name) + "99"
+ ? appNameToColor(name, 0.6)
: "hsl(var(--foreground) / 0.15)",
}}
onMouseEnter={(e) => {
@@ -816,16 +819,17 @@ export const TimelineSlider = ({
<motion.div
key={`${appName}-${idx}`}
className="w-8 h-8 rounded flex-shrink-0 overflow-hidden flex items-center justify-center"
- style={{
+ style={{
zIndex: 10 - idx,
- position: 'relative'
+ position: 'relative',
+ backgroundColor: appNameToColor(appName, 0.3),
}}
variants={{
- collapsed: {
+ collapsed: {
marginTop: idx === 0 ? 0 : -10,
scale: 1
},
- expanded: {
+ expanded: {
marginTop: idx === 0 ? 0 : 4,
scale: 1.1
}
@@ -839,7 +843,17 @@ export const TimelineSlider = ({
alt={appName}
loading="lazy"
decoding="async"
+ onError={(e) => {
+ // Hide broken img, let fallback letter show
+ (e.target as HTMLImageElement).style.display = 'none';
+ }}
/>
+ <span
+ className="absolute inset-0 flex items-center justify-center text-[10px] font-bold text-white/90 pointer-events-none"
+ style={{ zIndex: -1 }}
+ >
+ {appName.charAt(0).toUpperCase()}
+ </span>
</motion.div>
))}
</motion.div>