fix: stop the breadcrumb sliding when switching sessions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-29 09:57:24 -07:00
co-authored by Claude Opus 5.5
parent 75b2b214a1
commit c5fee271f0
@@ -215,9 +215,7 @@
// which tracks the pointer. Easing that one leaves the band lying over the panel it is
// meant to stop beside — an empty strip across that panel's own header until it catches up.
let bandTransitionClass = $derived(
resizingSidebar && !sidebarSnapping
? ''
: 'transition-[left,padding-left] duration-200 ease-in-out'
resizingSidebar && !sidebarSnapping ? '' : 'transition-[padding-left] duration-200 ease-in-out'
)
// Set while a drag is live so it can be torn down if the layout unmounts
// mid-drag (otherwise the window listeners would leak).
@@ -1518,12 +1516,17 @@ outside this layout, and their shortcut must reopen the URL that is their creden
up into the gap and the workspace menu losing the trigger it hangs from.
In flow, the band spans the content beside the rail. With an inset, a page owns
the right edge from the top (a session's side panel): the band floats, stopping
where that column starts, and the page pads its own content to clear it. -->
where that column starts, and the page pads its own content to clear it.
The rail offset must be padding in both placements, never `left` in the floating one:
a switch between placements (sessions with and without a side panel) would then ease
the padding to or from zero and slide the whole breadcrumb across. -->
<div
class={classNames(floatBand ? 'absolute top-0 z-30' : 'shrink-0', bandTransitionClass)}
style:left={floatBand ? `${leftInset}rem` : undefined}
class={classNames(
floatBand ? 'absolute top-0 left-0 z-30' : 'shrink-0',
bandTransitionClass
)}
style:right={floatBand ? `${rightInset ?? 0}px` : undefined}
style:padding-left={floatBand ? undefined : `${leftInset}rem`}
style:padding-left="{leftInset}rem"
>
<PageHeaderBar navHidden={menuHidden} panelled={useDrawer} />
</div>