Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/tui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ function App() {
const config = useConfig()
const devtools = createMemo(() => config.data.debug?.devtools ?? app.channel === "local")
const route = useRoute()
// Keep the last session ID so a closing frame never reads a disposed <Show> accessor.
const routeSessionID = createMemo<string | undefined>((previous) =>
route.data.type === "session" ? route.data.sessionID : previous,
)
const dimensions = useTerminalDimensions()
const renderer = useRenderer()
const dialog = useDialog()
Expand Down Expand Up @@ -1447,7 +1451,7 @@ function App() {
<Show when={route.data.type === "session" ? route.data.sessionID : undefined}>
{(sessionID) => (
<SessionFrame
sessionID={sessionID()}
sessionID={routeSessionID() ?? sessionID()}
verticalTabsWidth={verticalTabsVisible() ? tabsResize.size() : 0}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/cli/tui/dialog-select.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ test("matches the search cursor to the highlighted row until text is typed under
() => {},
() => {},
undefined,
{ experimental: { "new-designs": true } },
{ theme: { name: "opencode" }, experimental: { "new-designs": true } },
)

try {
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/prompt-cursor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test("the prompt keeps a cursor style set on its textarea when the theme changes
// Other app tests can leave a home draft in the process-wide stash.
takeDraft(undefined)
await using setup = await createAppFixture({
config: { animations: false, keybinds: { "theme.switch_mode": "f6" } },
config: { theme: { name: "opencode" }, animations: false, keybinds: { "theme.switch_mode": "f6" } },
})
await setup.ready
await setup.waitForFrame((frame) => frame.includes("commands"))
Expand Down
Loading