Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
43 changes: 9 additions & 34 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
28 changes: 10 additions & 18 deletions components/FileExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -368,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}
Expand Down Expand Up @@ -403,7 +401,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 && (
<span
title={t(GIT_STATUS_LABEL_KEYS[gitStatus.status])}
aria-label={t(GIT_STATUS_LABEL_KEYS[gitStatus.status])}
Expand All @@ -420,7 +418,7 @@ const ExplorerRow = memo(function ExplorerRow({
{gitStatus.code}
</span>
)}
{!hovered && containsGitChanges && (
{containsGitChanges && (
<span
title={t("fileExplorer.containsChangedFiles")}
aria-label={t("fileExplorer.containsChangedFiles")}
Expand All @@ -436,7 +434,7 @@ const ExplorerRow = memo(function ExplorerRow({
{loading && (
<Loader2 size={10} strokeWidth={2} color="var(--text-dim)" style={{ animation: "spin 0.8s linear infinite", flexShrink: 0 }} aria-hidden="true" />
)}
{onAtMention && hovered && (
{onAtMention && (
<Tooltip content={mentionLabel}>
<button
onClick={(e) => {
Expand All @@ -445,16 +443,13 @@ const ExplorerRow = memo(function ExplorerRow({
}}
aria-label={mentionLabel}
style={{
position: "absolute",
right: !node.isDir ? 28 : 4,
top: "50%",
transform: "translateY(-50%)",
flexShrink: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
padding: "0 8px",
height: 20,
minWidth: 24, height: 24,
background: "var(--bg-panel)",
border: "1px solid var(--border)",
borderRadius: "var(--radius-control)",
Expand All @@ -471,24 +466,21 @@ const ExplorerRow = memo(function ExplorerRow({
</button>
</Tooltip>
)}
{hovered && !node.isDir && (
{!node.isDir && (
<Tooltip content={downloadLabel}>
<a
href={`/api/files/${encodeFilePathForApi(node.fullPath)}?type=download`}
download
onClick={(e) => e.stopPropagation()}
aria-label={downloadLabel}
style={{
position: "absolute",
right: 4,
top: "50%",
transform: "translateY(-50%)",
flexShrink: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
padding: "0 5px",
height: 20,
minWidth: 24, height: 24,
background: "var(--bg-panel)",
border: "1px solid var(--border)",
borderRadius: "var(--radius-control)",
Expand Down
14 changes: 4 additions & 10 deletions components/GitChangesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export function GitChangesPanel({ cwd, refreshKey, onOpenFile, onAtMention, onRe
onMouseEnter={() => setHoveredPath(file.filePath)}
onMouseLeave={() => setHoveredPath((prev) => (prev === file.filePath ? null : prev))}
style={{
position: "relative",
display: "flex",
alignItems: "center",
gap: 6,
Expand All @@ -296,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}
Expand Down Expand Up @@ -336,7 +335,6 @@ export function GitChangesPanel({ cwd, refreshKey, onOpenFile, onAtMention, onRe
>
{file.code}
</span>
{isHovered && (
<button
type="button"
onClick={(e) => {
Expand All @@ -346,15 +344,12 @@ export function GitChangesPanel({ cwd, refreshKey, onOpenFile, onAtMention, onRe
title={t("gitChanges.openFile")}
aria-label={t("gitChanges.openFile")}
style={{
position: "absolute",
right: 4,
top: "50%",
transform: "translateY(-50%)",
flexShrink: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
width: 22,
height: 20,
width: 24,
height: 24,
background: "var(--bg-panel)",
border: "1px solid var(--border)",
borderRadius: "var(--radius-control)",
Expand All @@ -364,7 +359,6 @@ export function GitChangesPanel({ cwd, refreshKey, onOpenFile, onAtMention, onRe
>
<ExternalLink size={11} strokeWidth={2.2} aria-hidden="true" />
</button>
)}
</div>
);
})}
Expand Down
7 changes: 7 additions & 0 deletions components/MessageView.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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, /<button[^>]*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;
Expand Down
20 changes: 2 additions & 18 deletions components/MessageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -327,8 +325,6 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o
return (
<div
style={{ marginBottom: 18, display: "flex", flexDirection: "column", alignItems: "flex-end", paddingRight: 6 }}
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
>
<div style={{ display: "flex", flexDirection: "column", alignItems: "flex-end", maxWidth: "85%", minWidth: 0 }}>
<div
Expand Down Expand Up @@ -373,20 +369,14 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o

{/* Bottom row: action buttons + timestamp — inside the bubble's column,
spanning its width, so the timestamp aligns with its right edge. */}
{(time || canFork || canNavigate) && (
<div style={{
display: "flex", alignItems: "center", justifyContent: "flex-end",
display: "flex", flexWrap: "wrap", alignItems: "center", justifyContent: "flex-end",
gap: 6, marginTop: 3, width: "100%",
}}>
<div
style={{
display: "flex", gap: 3,
opacity: hovered || actionsActive ? 1 : 0,
pointerEvents: hovered || actionsActive ? "auto" : "none",
transition: "opacity var(--dur-fast) var(--ease-out-warm)",
}}
onFocusCapture={() => setActionsActive(true)}
onBlurCapture={() => setActionsActive(false)}
>
<Tooltip content={t("messageView.copyMessage")}>
<button
Expand Down Expand Up @@ -414,13 +404,8 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o
{(canFork || canNavigate) && (
<div
style={{
display: "flex", gap: 3,
opacity: (hovered || actionsActive || forking) ? 1 : 0,
pointerEvents: (hovered || actionsActive || forking) ? "auto" : "none",
transition: "opacity var(--dur-fast) var(--ease-out-warm)",
display: "flex", flexWrap: "wrap", justifyContent: "flex-end", gap: 3,
}}
onFocusCapture={() => setActionsActive(true)}
onBlurCapture={() => setActionsActive(false)}
>
{canNavigate && (
<Tooltip content={t("messageView.editFromHereTitle")}>
Expand Down Expand Up @@ -475,7 +460,6 @@ function UserMessageView({ message, cwd, onOpenFile, entryId, onFork, forking, o
)}
{time && <span style={{ fontSize: 10, color: "var(--text-dim)" }}>{time}</span>}
</div>
)}
</div>
</div>
);
Expand Down
Loading
Loading