diff --git a/AGENTS.md b/AGENTS.md index c4f0f455..bd803054 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -611,15 +611,16 @@ Location: `/sessions/-- button > svg, .composer-thinking-glyph[data-level] + .composer-thinking-label { @@ -5101,3 +5113,54 @@ html[data-touch-targets="accessible"] :is(.extension-choice, .extension-field) { .session-search-match:hover:not(:disabled) { background: var(--bg-hover); } + +/* Desktop workbench frame: the sidebar, the chat and the docked right panel are rounded cards + on a darker frame. Phones keep the full-bleed layout (the sidebar is a drawer there), and the + compact right panel is an overlay dialog, never a card. */ +.app-frame > .sidebar-container { border-right: 1px solid var(--border); } +.right-panel-container { border-left: 1px solid var(--border); } +@media (max-width: 640px) { + .app-frame > .sidebar-container { border-right: none; } +} +@media (min-width: 641px) { + .app-frame { + background: var(--bg-frame, var(--bg-panel)) !important; + padding: 6px; + } + /* The gap and border change with the width, not before it (resizing stays instant). */ + .app-frame > .sidebar-container:not(.sidebar-resizing), + .app-frame > .right-panel-container:not(.right-panel-resizing) { + transition-property: width, min-width, margin; + } + /* The card's two borders come out of the sidebar's width: its content is that much narrower. */ + .app-frame > .sidebar-container > * { + width: calc(var(--sidebar-width, 260px) - 2px); + min-width: calc(var(--sidebar-width, 260px) - 2px); + } + .app-frame > .sidebar-container, + .app-frame > main, + .app-frame > .right-panel-container:not([role="dialog"]) { + border: 1px solid var(--border); + border-radius: var(--radius-card); + overflow: hidden; + } + .app-frame > main { background: var(--bg); } + .app-frame > .sidebar-container.sidebar-open { margin-right: 6px; } + .app-frame > .right-panel-container.right-panel-open:not([role="dialog"]) { margin-left: 6px; } + .app-frame > .sidebar-container.sidebar-closed, + .app-frame > .right-panel-container.right-panel-closed { border-width: 0; } +} +@media (min-width: 641px) and (max-width: 959px) { + /* The overlay file panel starts below the top bar, which the frame's inset and the chat card's border push down. */ + .app-frame > .right-panel-container.right-panel-open { + top: calc(var(--shell-topbar-height) + 7px); + right: 6px; + bottom: 6px; + } +} +@media (max-width: 640px) and (pointer: coarse) and (hover: none) { + html:not([data-touch-targets="compact"]):not([data-touch-targets="accessible"]) .composer-primary-action.composer-send-icon { + width: 40px; + min-width: 40px; + } +} diff --git a/app/index.html b/app/index.html index 397afa1c..0fd2ad97 100644 --- a/app/index.html +++ b/app/index.html @@ -12,8 +12,8 @@ - - + + diff --git a/components/AppShell.tsx b/components/AppShell.tsx index fa48cba9..71bcb778 100644 --- a/components/AppShell.tsx +++ b/components/AppShell.tsx @@ -2135,7 +2135,7 @@ export function AppShell({ appName }: { appName: string }) { `} {t("appShell.skipToContent")} -
+
{/* Left sidebar: hidden on full-page Settings */} {!settingsTab && ( <> @@ -2151,7 +2151,6 @@ export function AppShell({ appName }: { appName: string }) { inert={mobileSidebarReady && (!sidebarOpen || rightPanelIsModal) ? true : undefined} style={{ background: "var(--bg-panel)", - borderRight: isMobile ? "none" : "1px solid var(--border)", display: "flex", flexDirection: "column", flexShrink: 0, diff --git a/components/ChatInput.tsx b/components/ChatInput.tsx index 6185a93e..436a3a6f 100644 --- a/components/ChatInput.tsx +++ b/components/ChatInput.tsx @@ -2,7 +2,7 @@ import React, { useRef, useState, useCallback, useEffect, useLayoutEffect, useImperativeHandle, forwardRef, memo, KeyboardEvent } from "react"; import { createPortal } from "react-dom"; -import { ChevronDown, ClipboardPaste, CornerDownRight, ListChecks, Loader2, Maximize2, Mic, Paperclip, Plus, RotateCw, Shrink, Terminal, Wrench, X } from "lucide-react"; +import { ArrowUp, ChevronDown, ClipboardPaste, CornerDownRight, ListChecks, Loader2, Maximize2, Mic, Paperclip, Plus, RotateCw, Shrink, Terminal, Wrench, X } from "lucide-react"; import { getSubmitDuringRunBehavior } from "@/lib/composer-prefs"; import type { BuiltinSlashCommandResult, CompactResultInfo, PromptSendOptions, PromptSubmissionResult, QueuedMessages, SlashCommandInfo } from "@/hooks/useAgentSession"; import type { ActiveGoal, ActivePlan } from "@/lib/web-mode-state"; @@ -3660,7 +3660,8 @@ export const ChatInput = memo(forwardRef(function ChatIn ) : ( )}
diff --git a/components/MessageView.tsx b/components/MessageView.tsx index 7d63bc86..dbaf2b24 100644 --- a/components/MessageView.tsx +++ b/components/MessageView.tsx @@ -98,7 +98,8 @@ const USER_BUBBLE_MAX_HEIGHT = 300; // A text-only user message collapses to a single-line preview by default (the // existing "Show full input" toggle expands it). Messages with images keep the // taller cap so their thumbnails stay visible while collapsed. -const USER_BUBBLE_COLLAPSED_HEIGHT = "calc(var(--chat-user-font-size) * var(--chat-line-height) + 16px)"; +// One line plus the 8px top and bottom padding and the 1px top and bottom border (border-box sizing). +const USER_BUBBLE_COLLAPSED_HEIGHT = "calc(var(--chat-user-font-size) * var(--chat-line-height) + 18px)"; function formatMessageSize(chars: number): string { return chars >= 1_000_000 ? `${(chars / 1_000_000).toFixed(1)} MB` : `${Math.round(chars / 1_000)} KB`; @@ -411,7 +412,7 @@ function UserMessageView({ message, cwd, onOpenFile, sessionId, entryId, onFork,
-
+
-
+
- {isSelected && ( -