Restore chat timeline minimap behavior

- Expand composer and toolbar to the shared 3xl width
- Reduce the minimap gutter and show it only on fine pointers
- Keep minimap focus from sticking after selection
This commit is contained in:
Julius Marminge committed 2026-06-29 12:32:28 -07:00
1 parent 7f42657387
commit 77e7b36fb4
7 files changed
+12 -8

No files matched your search

+1 -1
View File
@@ -239,7 +239,7 @@ export const BranchToolbar = memo(function BranchToolbar({
if (!hasActiveThread || !activeProject) return null;
return (
<div className="mx-auto flex w-full max-w-208 items-center gap-2 px-2.5 pb-3 pt-1 sm:px-3">
<div className="mx-auto flex w-full max-w-3xl items-center gap-2 px-2.5 pb-3 pt-1 sm:px-3">
{isMobile ? (
<MobileRunContextSelector
envLocked={envLocked}
+1 -1
View File
@@ -5133,7 +5133,7 @@ function ChatViewContent(props: ChatViewProps) {
aria-hidden="true"
className="chat-composer-horizontal-inset pointer-events-none absolute inset-x-0 top-1.5 bottom-0 z-0 sm:top-2"
>
<div className="relative mx-auto h-full w-full max-w-208 overflow-clip rounded-t-[20px]">
<div className="relative mx-auto h-full w-full max-w-3xl overflow-clip rounded-t-[20px]">
<div className="chat-composer-shared-blur absolute -inset-8" />
</div>
</div>
@@ -2044,7 +2044,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
<form
ref={composerFormRef}
onSubmit={submitComposer}
className="mx-auto w-full min-w-0 max-w-208"
className="mx-auto w-full min-w-0 max-w-3xl"
data-chat-composer-form="true"
>
<div
@@ -82,7 +82,7 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro
};
return (
<div className={cn("group/banner-stack mx-auto mb-2 max-w-208", className)}>
<div className={cn("group/banner-stack mx-auto mb-2 max-w-3xl", className)}>
<div
className={cn(
"relative",
@@ -14,7 +14,7 @@ export const TIMELINE_MINIMAP_ITEM_SPACING = 8;
export const TIMELINE_MINIMAP_MIN_ITEMS = 2;
export const TIMELINE_MINIMAP_MAX_HEIGHT_CSS = "calc(100vh - 18rem)";
export const TIMELINE_CONTENT_MAX_WIDTH = 768;
export const TIMELINE_MINIMAP_PERSISTENT_GUTTER = 72;
export const TIMELINE_MINIMAP_PERSISTENT_GUTTER = 48;
export interface TimelineEndState {
readonly isAtEnd?: boolean;
@@ -252,8 +252,8 @@ describe("MessagesTimeline", () => {
}),
).toBe(100);
expect(resolveTimelineMinimapHasPersistentGutter(832)).toBe(false);
expect(resolveTimelineMinimapHasPersistentGutter(911)).toBe(false);
expect(resolveTimelineMinimapHasPersistentGutter(912)).toBe(true);
expect(resolveTimelineMinimapHasPersistentGutter(863)).toBe(false);
expect(resolveTimelineMinimapHasPersistentGutter(864)).toBe(true);
});
it("anchors a sent attachment message using its measured height", async () => {
@@ -671,7 +671,7 @@ function TimelineMinimap({
return (
<div
className={cn(
"group/minimap pointer-events-auto absolute top-0 left-0 z-40 hidden w-18 md:block",
"group/minimap pointer-events-auto absolute top-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
hasPersistentGutter
? "opacity-100"
: "opacity-0 transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100",
@@ -691,6 +691,7 @@ function TimelineMinimap({
if (nextItem) {
onSelect(nextItem);
}
event.currentTarget.blur();
}}
onFocus={() => setActiveIndex((current) => current ?? 0)}
onKeyDown={(event) => {
@@ -715,6 +716,9 @@ function TimelineMinimap({
}}
onMouseLeave={() => setActiveIndex(null)}
onMouseMove={updateActiveIndexFromPointer}
onMouseDown={(event) => {
event.preventDefault();
}}
style={{ height: resolveTimelineMinimapHeightStyle(items.length) }}
type="button"
>