From 72ec300667450abedd818a211ce73a7744953276 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Sun, 13 Sep 2026 20:58:13 +0000 Subject: [PATCH 1/2] fix: keep contextual actions visible without hover --- CHANGELOG.md | 1 + app/globals.css | 43 +++++++----------------------- components/FileExplorer.tsx | 23 ++++++---------- components/GitChangesPanel.tsx | 12 +++------ components/MessageView.test.mjs | 7 +++++ components/MessageView.tsx | 20 ++------------ components/SessionSidebar-rows.tsx | 32 ++++------------------ 7 files changed, 35 insertions(+), 103 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0acdd1e5..32e752cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to **omp-web** (`@kahme247/ompweb`) are documented in this f ### Fixes & Improvements +- Keep sent-message copy, edit, and fork actions visible without hover or a reveal tap. Also keep file mention/download, Git open-file actions, and sidebar menus visible alongside their metadata; wrap message actions on narrow screens. - Expand complete tool inputs inline, including multiline code and edit patches, while keeping command previews compact and output visibility unchanged. - Keep composer controls on one line, with equally sized Send, Stop, and Queue buttons and model names truncating before short effort labels. - Align the + button and primary action with matching composer insets. diff --git a/app/globals.css b/app/globals.css index 6a5fb1ab4..9dbbdecba 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1518,67 +1518,42 @@ pre, code { } .session-item-trailing { + width: 68px; + gap: 2px; height: 24px; } .session-item-metadata { - width: 100%; + width: auto; } .session-item-time { width: 42px; } -.session-item-actions { - position: absolute; - opacity: 0; - pointer-events: none; -} .session-item-menu-button { width: 24px; height: 24px; } -[data-actions-visible="true"] .session-item-metadata { - opacity: 0; - visibility: hidden; - pointer-events: none; -} -[data-actions-visible="true"] .session-item-actions { - opacity: 1; - pointer-events: auto; -} - .sidebar-project-actions { - visibility: hidden; -} -.sidebar-project-actions[data-actions-visible="true"] { - visibility: visible; + /* Match the session status column after reserving timestamp + menu space. */ + width: 46px; + display: flex; + justify-content: flex-end; } /* Touch rows keep the compact timestamp immediately beside a full-size menu target. */ @media (hover: none), (pointer: coarse) { .sidebar-project-actions { - visibility: visible; + width: 56px; } .session-item-row { min-height: 44px; } .session-item-trailing { - --session-trailing-width: auto; + width: 78px; height: 44px; - gap: 2px; - } - .session-item-row .session-item-metadata { - width: auto; - opacity: 1; - visibility: visible; - pointer-events: auto; } .session-item-time { width: 32px; } - .session-item-row .session-item-actions { - position: static; - opacity: 1; - pointer-events: auto; - } .session-item-menu-button { width: 44px; height: 44px; diff --git a/components/FileExplorer.tsx b/components/FileExplorer.tsx index 11af5763f..00fcb6890 100644 --- a/components/FileExplorer.tsx +++ b/components/FileExplorer.tsx @@ -324,7 +324,6 @@ const ExplorerRow = memo(function ExplorerRow({ ? (node.name + " (folder" + (open ? ", expanded" : ", collapsed") + ")") : (secondaryLabel ? (node.name + " (file, " + secondaryLabel + ")") : (node.name + " (file)"))} style={{ - position: "relative", display: "flex", alignItems: "center", gap: 4, @@ -403,7 +402,7 @@ const ExplorerRow = memo(function ExplorerRow({ style={{ width: 6, height: 6, flexShrink: 0, borderRadius: "50%", background: "var(--accent)" }} /> )} - {!hovered && !node.isDir && gitStatus && ( + {!node.isDir && gitStatus && ( )} - {!hovered && containsGitChanges && ( + {containsGitChanges && ( - {isHovered && ( - )} ); })} diff --git a/components/MessageView.test.mjs b/components/MessageView.test.mjs index c8b93c1bc..9fd560272 100644 --- a/components/MessageView.test.mjs +++ b/components/MessageView.test.mjs @@ -13,6 +13,13 @@ const { MessageView, SafeMarkdownBody, TaskResultPanel, isInterruptedMessage } = const { CodeBlock } = await jiti.import("./MermaidBlock.tsx"); const { Collapsible } = await jiti.import("./ui/primitives.tsx"); +test("sent messages without timestamps or branch metadata still offer copy", () => { + const html = renderToStaticMarkup(React.createElement(MessageView, { + message: { role: "user", content: "Keep this message copyable." }, + })); + assert.match(html, /]*aria-label="Copy message"/); +}); + test("expanded grouped tool inputs follow streaming arguments without toggling output", async () => { const previousActEnvironment = globalThis.IS_REACT_ACT_ENVIRONMENT; globalThis.IS_REACT_ACT_ENVIRONMENT = true; diff --git a/components/MessageView.tsx b/components/MessageView.tsx index d09450402..16f0f810d 100644 --- a/components/MessageView.tsx +++ b/components/MessageView.tsx @@ -303,8 +303,6 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o onEditContent?: (content: string) => void; }) { const { t, locale } = useI18n(); - const [hovered, setHovered] = useState(false); - const [actionsActive, setActionsActive] = useState(false); const { copied, copy: copyContent } = useCopyFeedback(); const content = @@ -327,8 +325,6 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o return (
setHovered(true)} - onMouseLeave={() => setHovered(false)} >
setActionsActive(true)} - onBlurCapture={() => setActionsActive(false)} >
- )}
); diff --git a/components/SessionSidebar-rows.tsx b/components/SessionSidebar-rows.tsx index f9fae3c56..338023b65 100644 --- a/components/SessionSidebar-rows.tsx +++ b/components/SessionSidebar-rows.tsx @@ -29,19 +29,11 @@ import { /** * Right-edge status column shared by project headers and session rows. * - * Desktop session rows lay out `[status slot][gap][meta]` right-aligned at - * `rowRight - 8`, project headers `[activity slot][gap][actions][gap][toggle]` - * at `rowRight - 6`. Reserving the same total width in both (`8 + 46 + 2 + 6` - * vs `6 + 2 + 24 + 2 + 22 + 6`) centres every indicator — running ring, unread - * dot, project activity dot — on `rowRight - 62`, so it never moves. - * - * The session row's indicator must live outside the meta layer: that layer - * fades out when the hover/focus action button takes over, and a dot rendered - * inside the actions layer would jump right by the width difference. + * Keep the session indicator outside the timestamp and action controls so it + * stays visible while the menu is open. */ const SIDEBAR_STATUS_SLOT = 12; const SIDEBAR_STATUS_GAP = 2; -const SIDEBAR_TRAILING_META_WIDTH = 46; interface ProjectRowProps { project: ManagedProject; @@ -113,7 +105,6 @@ function ProjectRow({ }: ProjectRowProps) { const { t } = useI18n(); const [hovered, setHovered] = useState(false); - const [focusWithin, setFocusWithin] = useState(false); const [showAllSessions, setShowAllSessions] = useState(false); const [actionMenuOpen, setActionMenuOpen] = useState(false); const [confirmRemove, setConfirmRemove] = useState(false); @@ -145,7 +136,6 @@ function ProjectRow({ const visibleRoots = hiddenCount > 0 && !showAllSessions ? tree.slice(0, MAX_PROJECT_SESSIONS) : tree; - const showActions = hovered || focusWithin || actionMenuOpen; return (
@@ -173,10 +163,6 @@ function ProjectRow({ onDragEnd={() => onDragPathChange(null)} onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)} - onFocus={() => setFocusWithin(true)} - onBlur={(e) => { - if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setFocusWithin(false); - }} onKeyDown={(event) => { if (event.key === "Escape" && actionMenuOpen) { event.stopPropagation(); @@ -350,7 +336,6 @@ function ProjectRow({ )}
(null); const title = session.name || session.firstMessage.slice(0, 50) || session.id.slice(0, 12); const relativeTime = formatRelativeTime(session.modified, locale, relativeTimeNow); - const showActions = hovered || focusWithin || actionMenuOpen; const rowBackground = isSelected ? "color-mix(in srgb, var(--bg-selected) 70%, transparent)" : hovered ? "var(--bg-hover)" : "transparent"; @@ -974,14 +957,9 @@ const SessionItem = memo(function SessionItem({ <>
setHovered(true)} onMouseLeave={() => setHovered(false)} - onFocus={() => setFocusWithin(true)} - onBlur={(event) => { - if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setFocusWithin(false); - }} onKeyDown={(event) => { if ((confirmDelete || actionMenuOpen) && event.key === "Escape") { event.stopPropagation(); @@ -1037,11 +1015,11 @@ const SessionItem = memo(function SessionItem({ {isRunning ? : } )} -
-
+
+
{relativeTime && {relativeTime}}
-
+
From ee6b4ad01ce20c9878e36d7442e1d3c6f5bffb32 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Sun, 13 Sep 2026 21:11:47 +0000 Subject: [PATCH 2/2] fix: reserve action space in narrow file rows --- components/FileExplorer.tsx | 5 ++--- components/GitChangesPanel.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/FileExplorer.tsx b/components/FileExplorer.tsx index 00fcb6890..d9411da75 100644 --- a/components/FileExplorer.tsx +++ b/components/FileExplorer.tsx @@ -367,9 +367,8 @@ const ExplorerRow = memo(function ExplorerRow({ overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", - // The name is the answer the user is looking for, so the directory - // gives up width first. - flex: secondaryLabel ? "0 0 auto" : 1, + // Prefer the name, but let it shrink to keep row actions reachable. + flex: secondaryLabel ? "0 1 auto" : 1, maxWidth: secondaryLabel ? "72%" : undefined, }} title={node.fullPath} diff --git a/components/GitChangesPanel.tsx b/components/GitChangesPanel.tsx index 7199cc15b..788fc5f14 100644 --- a/components/GitChangesPanel.tsx +++ b/components/GitChangesPanel.tsx @@ -295,7 +295,7 @@ export function GitChangesPanel({ cwd, refreshKey, onOpenFile, onAtMention, onRe overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", - flex: directory ? "0 0 auto" : 1, + flex: directory ? "0 1 auto" : 1, maxWidth: directory ? "60%" : undefined, }} title={file.filePath}