diff options
| author | adamelmore <[email protected]> | 2026-01-27 20:24:23 -0600 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2026-01-27 20:24:27 -0600 |
| commit | d9741866c52472469c8858b83f44ad9c5a5f4925 (patch) | |
| tree | b9d168939286d44ae382880fa6601ff03a9a1b82 /packages/app/src/context/layout.tsx | |
| parent | 898118bafbf8a12c0ef9d6673d36305472991906 (diff) | |
| download | opencode-d9741866c52472469c8858b83f44ad9c5a5f4925.tar.gz opencode-d9741866c52472469c8858b83f44ad9c5a5f4925.zip | |
fix(app): reintroduce review tab
Diffstat (limited to 'packages/app/src/context/layout.tsx')
| -rw-r--r-- | packages/app/src/context/layout.tsx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/app/src/context/layout.tsx b/packages/app/src/context/layout.tsx index d30fd11cf..2ea5f0435 100644 --- a/packages/app/src/context/layout.tsx +++ b/packages/app/src/context/layout.tsx @@ -624,11 +624,10 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext( const tabs = createMemo(() => store.sessionTabs[key()] ?? { all: [] }) return { tabs, - active: createMemo(() => (tabs().active === "review" ? undefined : tabs().active)), + active: createMemo(() => tabs().active), all: createMemo(() => tabs().all.filter((tab) => tab !== "review")), setActive(tab: string | undefined) { const session = key() - if (tab === "review") return if (!store.sessionTabs[session]) { setStore("sessionTabs", session, { all: [], active: tab }) } else { @@ -645,10 +644,18 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext( } }, async open(tab: string) { - if (tab === "review") return const session = key() const current = store.sessionTabs[session] ?? { all: [] } + if (tab === "review") { + if (!store.sessionTabs[session]) { + setStore("sessionTabs", session, { all: current.all, active: tab }) + return + } + setStore("sessionTabs", session, "active", tab) + return + } + if (tab === "context") { const all = [tab, ...current.all.filter((x) => x !== tab)] if (!store.sessionTabs[session]) { |
