Skip to content

Commit 5372c63

Browse files
authored
fix(app): clip rounded session panels (anomalyco#31462)
1 parent ab701d2 commit 5372c63

1 file changed

Lines changed: 65 additions & 61 deletions

File tree

packages/app/src/pages/session.tsx

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,80 +1745,84 @@ export default function Page() {
17451745

17461746
<div
17471747
classList={{
1748-
"@container relative shrink-0 flex flex-col min-h-0 h-full bg-background-stronger flex-1 md:flex-none": true,
1748+
"@container relative shrink-0 flex flex-col min-h-0 h-full flex-1 md:flex-none": true,
17491749
"duration-[240ms] ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[width] motion-reduce:transition-none":
17501750
!size.active() && !ui.reviewSnap,
17511751
"transition-[width]": !isV2NewSessionPage(),
1752-
"rounded-[10px] shadow-[var(--v2-elevation-raised)]": settings.general.newLayoutDesigns() && !!params.id,
17531752
}}
17541753
style={{
17551754
width: sessionPanelWidth(),
17561755
}}
17571756
>
17581757
<div
1759-
class="flex-1 min-h-0 overflow-hidden"
17601758
classList={{
1761-
"rounded-[10px]": settings.general.newLayoutDesigns(),
1759+
"flex-1 min-h-0 flex flex-col": true,
1760+
"bg-v2-background-bg-deep": isV2NewSessionPage(),
1761+
"bg-background-stronger": !isV2NewSessionPage(),
1762+
"rounded-[10px] overflow-hidden": settings.general.newLayoutDesigns(),
1763+
"shadow-[var(--v2-elevation-raised)]": settings.general.newLayoutDesigns() && !!params.id,
17621764
}}
17631765
>
1764-
<Switch>
1765-
<Match when={params.id && mobileChanges()}>
1766-
<div class="relative h-full overflow-hidden">
1767-
{reviewContent({
1768-
diffStyle: "unified",
1769-
classes: {
1770-
root: "pb-8",
1771-
header: "px-4",
1772-
container: "px-4",
1773-
},
1774-
loadingClass: "px-4 py-4 text-text-weak",
1775-
emptyClass: "h-full pb-64 -mt-4 flex flex-col items-center justify-center text-center gap-6",
1776-
})}
1777-
</div>
1778-
</Match>
1779-
<Match when={params.id}>
1780-
<Show when={messagesReady()}>
1781-
<MessageTimeline
1782-
actions={actions}
1783-
scroll={ui.scroll}
1784-
onResumeScroll={resumeScroll}
1785-
setScrollRef={setScrollRef}
1786-
onScheduleScrollState={scheduleScrollState}
1787-
onAutoScrollHandleScroll={autoScroll.handleScroll}
1788-
onMarkScrollGesture={markScrollGesture}
1789-
hasScrollGesture={hasScrollGesture}
1790-
onUserScroll={markUserScroll}
1791-
onHistoryScroll={historyLoader.onScrollerScroll}
1792-
onAutoScrollInteraction={autoScroll.handleInteraction}
1793-
shouldAnchorBottom={() =>
1794-
!location.hash && !store.messageId && !ui.pendingMessage && !autoScroll.userScrolled()
1795-
}
1796-
centered={centered()}
1797-
setContentRef={(el) => {
1798-
content = el
1799-
autoScroll.contentRef(el)
1800-
1801-
const root = scroller
1802-
if (root) scheduleScrollState(root)
1803-
}}
1804-
historyShift={historyLoader.shift()}
1805-
userMessages={historyLoader.userMessages()}
1806-
anchor={anchor}
1807-
setRevealMessage={(fn) => {
1808-
revealMessage = fn
1809-
}}
1810-
/>
1811-
</Show>
1812-
</Match>
1813-
<Match when={true}>
1814-
<Show when={newSessionDesign()} fallback={<NewSessionView worktree={newSessionWorktree()} />}>
1815-
<NewSessionDesignView>{composerRegion("inline")}</NewSessionDesignView>
1816-
</Show>
1817-
</Match>
1818-
</Switch>
1819-
</div>
1766+
<div class="flex-1 min-h-0 overflow-hidden">
1767+
<Switch>
1768+
<Match when={params.id && mobileChanges()}>
1769+
<div class="relative h-full overflow-hidden">
1770+
{reviewContent({
1771+
diffStyle: "unified",
1772+
classes: {
1773+
root: "pb-8",
1774+
header: "px-4",
1775+
container: "px-4",
1776+
},
1777+
loadingClass: "px-4 py-4 text-text-weak",
1778+
emptyClass: "h-full pb-64 -mt-4 flex flex-col items-center justify-center text-center gap-6",
1779+
})}
1780+
</div>
1781+
</Match>
1782+
<Match when={params.id}>
1783+
<Show when={messagesReady()}>
1784+
<MessageTimeline
1785+
actions={actions}
1786+
scroll={ui.scroll}
1787+
onResumeScroll={resumeScroll}
1788+
setScrollRef={setScrollRef}
1789+
onScheduleScrollState={scheduleScrollState}
1790+
onAutoScrollHandleScroll={autoScroll.handleScroll}
1791+
onMarkScrollGesture={markScrollGesture}
1792+
hasScrollGesture={hasScrollGesture}
1793+
onUserScroll={markUserScroll}
1794+
onHistoryScroll={historyLoader.onScrollerScroll}
1795+
onAutoScrollInteraction={autoScroll.handleInteraction}
1796+
shouldAnchorBottom={() =>
1797+
!location.hash && !store.messageId && !ui.pendingMessage && !autoScroll.userScrolled()
1798+
}
1799+
centered={centered()}
1800+
setContentRef={(el) => {
1801+
content = el
1802+
autoScroll.contentRef(el)
1803+
1804+
const root = scroller
1805+
if (root) scheduleScrollState(root)
1806+
}}
1807+
historyShift={historyLoader.shift()}
1808+
userMessages={historyLoader.userMessages()}
1809+
anchor={anchor}
1810+
setRevealMessage={(fn) => {
1811+
revealMessage = fn
1812+
}}
1813+
/>
1814+
</Show>
1815+
</Match>
1816+
<Match when={true}>
1817+
<Show when={newSessionDesign()} fallback={<NewSessionView worktree={newSessionWorktree()} />}>
1818+
<NewSessionDesignView>{composerRegion("inline")}</NewSessionDesignView>
1819+
</Show>
1820+
</Match>
1821+
</Switch>
1822+
</div>
18201823

1821-
<Show when={params.id || !newSessionDesign()}>{composerRegion("dock")}</Show>
1824+
<Show when={params.id || !newSessionDesign()}>{composerRegion("dock")}</Show>
1825+
</div>
18221826

18231827
<Show when={desktopReviewOpen()}>
18241828
<div onPointerDown={() => size.start()}>

0 commit comments

Comments
 (0)