feat: hover preview popover on dashboard tiles

Desktop only (guarded by ontouchstart check). On mouseenter of a
session tile, shows a floating popover with the full tmux snapshot
(all lines, not the cropped 20-line preview). Positioned right of
tile if space, else left. 100ms delay prevents flicker on brush-over.
Data from _currentSessions (already in memory, zero API calls).

Also calls hidePreview() in openSession() so the popover is cleaned
up when switching to fullscreen view.
This commit is contained in:
Brian Krabach
2026-03-29 14:42:30 -07:00
parent 4b4b914858
commit 6144f39955
4 changed files with 137 additions and 0 deletions
+29
View File
@@ -959,6 +959,35 @@ body {
display: block;
}
/* ============================================================
Hover preview popover (desktop dashboard)
============================================================ */
.preview-popover {
position: fixed;
z-index: 500;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 6px;
padding: 10px 12px;
min-width: 480px;
max-width: 640px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
pointer-events: none; /* don't interfere with mouse leaving tile */
}
.preview-popover pre {
margin: 0;
font-family: var(--font-mono);
font-size: 11px;
line-height: 1.4;
color: var(--text-muted);
white-space: pre;
overflow-x: hidden;
}
/* ============================================================
Responsive overlay sidebar at <960px
============================================================ */