Reserve space for inline thread details panel
- Move the inline thread panel to an absolute overlay - Add shared inset styling so the timeline and composer avoid overlap - Rename composer glass styling to the shared floating surface class
This commit is contained in:
1 parent
c8aea5db0b
commit
97736c47a5
5 files changed
+814
-409
No files matched your search
@@ -1656,6 +1656,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
threadPanelPresentation,
|
||||
),
|
||||
);
|
||||
const inlineThreadPanelOpen = threadPanelOpen && threadPanelPresentation === "inline";
|
||||
|
||||
useEffect(() => {
|
||||
if (!activeThreadRef) return;
|
||||
@@ -6486,7 +6487,10 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
}}
|
||||
/>
|
||||
{/* Main content area with optional plan sidebar */}
|
||||
<div className="flex min-h-0 min-w-0 flex-1">
|
||||
<div
|
||||
className="relative flex min-h-0 min-w-0 flex-1"
|
||||
data-thread-details-inline-reserved={inlineThreadPanelOpen ? "true" : undefined}
|
||||
>
|
||||
{/* Chat column */}
|
||||
<div className="relative flex min-h-0 min-w-0 flex-1 flex-col">
|
||||
{/* Provider status overlays the timeline without changing its content height. */}
|
||||
@@ -6540,7 +6544,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
{/* scroll to end pill — shown when user has scrolled away from the live edge */}
|
||||
{showScrollToBottom && (
|
||||
<div
|
||||
className="pointer-events-none absolute left-1/2 z-30 flex -translate-x-1/2 justify-center py-1.5"
|
||||
className="chat-scroll-to-bottom pointer-events-none absolute z-30 flex justify-center py-1.5"
|
||||
style={{ bottom: composerOverlayHeight + 4 }}
|
||||
>
|
||||
<button
|
||||
@@ -6720,7 +6724,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
) : null}
|
||||
</div>
|
||||
{/* end chat column */}
|
||||
{threadPanelOpen && threadPanelPresentation === "inline" ? (
|
||||
{inlineThreadPanelOpen ? (
|
||||
<ThreadDetailsPanel mode="inline" {...threadDetailsPanelProps} />
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -2692,9 +2692,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
ref={composerSurfaceRef}
|
||||
data-chat-composer-mobile-collapsed={isComposerCollapsedMobile ? "true" : "false"}
|
||||
className={cn(
|
||||
"rounded-[20px] transition-[background-color] duration-200",
|
||||
isDragOverComposer ? "bg-accent/45 ring-1 ring-primary/70" : null,
|
||||
projectSelectionRequired ? "opacity-75" : null,
|
||||
"floating-glass-surface rounded-[20px] border transition-colors duration-200 has-focus-visible:border-ring/45",
|
||||
isDragOverComposer ? "border-primary/70 bg-accent/45" : "border-border",
|
||||
environmentUnavailable ? "opacity-75" : null,
|
||||
composerProviderState.composerSurfaceClassName,
|
||||
)}
|
||||
onFocusCapture={(event) => {
|
||||
|
||||
@@ -630,7 +630,7 @@ export const MessagesTimeline = memo(function MessagesTimeline({
|
||||
maintainScrollAtEndThreshold={0.1}
|
||||
maintainVisibleContentPosition
|
||||
onScroll={handleScroll}
|
||||
className="scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain px-3 sm:px-5"
|
||||
className="messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain"
|
||||
ListHeaderComponent={listHeader}
|
||||
ListFooterComponent={TIMELINE_LIST_FOOTER}
|
||||
/>
|
||||
|
||||
@@ -131,7 +131,12 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
|
||||
|
||||
const card = (
|
||||
<div
|
||||
className="overflow-hidden rounded-[18px] border border-border/75 bg-card/95 shadow-[0_8px_28px_rgba(0,0,0,0.045)] dark:shadow-[0_12px_30px_rgba(0,0,0,0.18)]"
|
||||
className={cn(
|
||||
"floating-glass-surface overflow-x-hidden rounded-[20px] border border-border/75",
|
||||
props.mode === "inline"
|
||||
? "max-h-full overflow-y-auto overscroll-contain [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
||||
: "overflow-y-hidden",
|
||||
)}
|
||||
data-thread-details-card
|
||||
>
|
||||
<section aria-labelledby="thread-details-project-heading">
|
||||
@@ -285,7 +290,7 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
|
||||
return (
|
||||
<aside
|
||||
aria-label="Thread details"
|
||||
className="w-[clamp(18rem,24vw,21rem)] shrink-0 overflow-y-auto bg-background p-3 pl-0"
|
||||
className="absolute inset-y-0 right-[var(--app-scrollbar-width)] z-20 w-[var(--thread-details-panel-width)] p-3"
|
||||
data-thread-details-panel="inline"
|
||||
>
|
||||
{card}
|
||||
|
||||
+796
-400
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user