Skip to content

Commit aeeb05e

Browse files
authored
feat(app): back button in subagent sessions (#10439)
1 parent 847a7ca commit aeeb05e

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

packages/app/src/pages/session.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,9 +1537,9 @@ export default function Page() {
15371537
}}
15381538
onClick={autoScroll.handleInteraction}
15391539
class="relative min-w-0 w-full h-full overflow-y-auto session-scroller"
1540-
style={{ "--session-title-height": info()?.title ? "40px" : "0px" }}
1540+
style={{ "--session-title-height": (info()?.title || info()?.parentID) ? "40px" : "0px" }}
15411541
>
1542-
<Show when={info()?.title}>
1542+
<Show when={info()?.title || info()?.parentID}>
15431543
<div
15441544
classList={{
15451545
"sticky top-0 z-30 bg-background-stronger": true,
@@ -1548,8 +1548,21 @@ export default function Page() {
15481548
"md:max-w-200 md:mx-auto": !showTabs(),
15491549
}}
15501550
>
1551-
<div class="h-10 flex items-center">
1552-
<h1 class="text-16-medium text-text-strong truncate">{info()?.title}</h1>
1551+
<div class="h-10 flex items-center gap-1">
1552+
<Show when={info()?.parentID}>
1553+
<IconButton
1554+
tabIndex={-1}
1555+
icon="arrow-left"
1556+
variant="ghost"
1557+
onClick={() => {
1558+
navigate(`/${params.dir}/session/${info()?.parentID}`)
1559+
}}
1560+
aria-label={language.t("common.goBack")}
1561+
/>
1562+
</Show>
1563+
<Show when={info()?.title}>
1564+
<h1 class="text-16-medium text-text-strong truncate">{info()?.title}</h1>
1565+
</Show>
15531566
</div>
15541567
</div>
15551568
</Show>

0 commit comments

Comments
 (0)