summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiyang Zhu <[email protected]>2026-01-24 16:53:15 -0500
committerGitHub <[email protected]>2026-01-24 15:53:15 -0600
commitaeeb05e4a05957db32c549766e29c48bdbb412f4 (patch)
tree38bb94cebf9d0a5b025899fce430e867c0493d2c
parent847a7ca00971f505464d9df65d692920babf67fe (diff)
downloadopencode-aeeb05e4a05957db32c549766e29c48bdbb412f4.tar.gz
opencode-aeeb05e4a05957db32c549766e29c48bdbb412f4.zip
feat(app): back button in subagent sessions (#10439)
-rw-r--r--packages/app/src/pages/session.tsx21
1 files changed, 17 insertions, 4 deletions
diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx
index 130384257..0b6153b24 100644
--- a/packages/app/src/pages/session.tsx
+++ b/packages/app/src/pages/session.tsx
@@ -1537,9 +1537,9 @@ export default function Page() {
}}
onClick={autoScroll.handleInteraction}
class="relative min-w-0 w-full h-full overflow-y-auto session-scroller"
- style={{ "--session-title-height": info()?.title ? "40px" : "0px" }}
+ style={{ "--session-title-height": (info()?.title || info()?.parentID) ? "40px" : "0px" }}
>
- <Show when={info()?.title}>
+ <Show when={info()?.title || info()?.parentID}>
<div
classList={{
"sticky top-0 z-30 bg-background-stronger": true,
@@ -1548,8 +1548,21 @@ export default function Page() {
"md:max-w-200 md:mx-auto": !showTabs(),
}}
>
- <div class="h-10 flex items-center">
- <h1 class="text-16-medium text-text-strong truncate">{info()?.title}</h1>
+ <div class="h-10 flex items-center gap-1">
+ <Show when={info()?.parentID}>
+ <IconButton
+ tabIndex={-1}
+ icon="arrow-left"
+ variant="ghost"
+ onClick={() => {
+ navigate(`/${params.dir}/session/${info()?.parentID}`)
+ }}
+ aria-label={language.t("common.goBack")}
+ />
+ </Show>
+ <Show when={info()?.title}>
+ <h1 class="text-16-medium text-text-strong truncate">{info()?.title}</h1>
+ </Show>
</div>
</div>
</Show>