fix(app): stale keyed show errors
parent
a3d4ea0de1
commit
7665b8e30d
|
|
@ -611,7 +611,7 @@ export function MessageTimeline(props: {
|
||||||
</Show>
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
<Show when={sessionID()}>
|
<Show when={sessionID()} keyed>
|
||||||
{(id) => (
|
{(id) => (
|
||||||
<div class="shrink-0 flex items-center gap-3">
|
<div class="shrink-0 flex items-center gap-3">
|
||||||
<SessionContextUsage placement="bottom" />
|
<SessionContextUsage placement="bottom" />
|
||||||
|
|
@ -646,12 +646,12 @@ export function MessageTimeline(props: {
|
||||||
>
|
>
|
||||||
<DropdownMenu.ItemLabel>{language.t("common.rename")}</DropdownMenu.ItemLabel>
|
<DropdownMenu.ItemLabel>{language.t("common.rename")}</DropdownMenu.ItemLabel>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Item onSelect={() => void archiveSession(id())}>
|
<DropdownMenu.Item onSelect={() => void archiveSession(id)}>
|
||||||
<DropdownMenu.ItemLabel>{language.t("common.archive")}</DropdownMenu.ItemLabel>
|
<DropdownMenu.ItemLabel>{language.t("common.archive")}</DropdownMenu.ItemLabel>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Separator />
|
<DropdownMenu.Separator />
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
onSelect={() => dialog.show(() => <DialogDeleteSession sessionID={id()} />)}
|
onSelect={() => dialog.show(() => <DialogDeleteSession sessionID={id} />)}
|
||||||
>
|
>
|
||||||
<DropdownMenu.ItemLabel>{language.t("common.delete")}</DropdownMenu.ItemLabel>
|
<DropdownMenu.ItemLabel>{language.t("common.delete")}</DropdownMenu.ItemLabel>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,9 @@ export function SessionSidePanel(props: {
|
||||||
const path = createMemo(() => file.pathFromTab(tab))
|
const path = createMemo(() => file.pathFromTab(tab))
|
||||||
return (
|
return (
|
||||||
<div data-component="tabs-drag-preview">
|
<div data-component="tabs-drag-preview">
|
||||||
<Show when={path()}>{(p) => <FileVisual active path={p()} />}</Show>
|
<Show when={path()} keyed>
|
||||||
|
{(p) => <FileVisual active path={p} />}
|
||||||
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,8 @@ export function TerminalPanel() {
|
||||||
<SortableProvider ids={ids()}>
|
<SortableProvider ids={ids()}>
|
||||||
<For each={ids()}>
|
<For each={ids()}>
|
||||||
{(id) => (
|
{(id) => (
|
||||||
<Show when={byId().get(id)}>
|
<Show when={byId().get(id)} keyed>
|
||||||
{(pty) => <SortableTerminalTab terminal={pty()} onClose={close} />}
|
{(pty) => <SortableTerminalTab terminal={pty} onClose={close} />}
|
||||||
</Show>
|
</Show>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|
@ -217,10 +217,10 @@ export function TerminalPanel() {
|
||||||
<div class="flex-1 min-h-0 relative">
|
<div class="flex-1 min-h-0 relative">
|
||||||
<Show when={terminal.active()} keyed>
|
<Show when={terminal.active()} keyed>
|
||||||
{(id) => (
|
{(id) => (
|
||||||
<Show when={byId().get(id)}>
|
<Show when={byId().get(id)} keyed>
|
||||||
{(pty) => (
|
{(pty) => (
|
||||||
<div id={`terminal-wrapper-${id}`} class="absolute inset-0">
|
<div id={`terminal-wrapper-${id}`} class="absolute inset-0">
|
||||||
<Terminal pty={pty()} onCleanup={terminal.update} onConnectError={() => terminal.clone(id)} />
|
<Terminal pty={pty} onCleanup={terminal.update} onConnectError={() => terminal.clone(id)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Show>
|
</Show>
|
||||||
|
|
@ -229,14 +229,14 @@ export function TerminalPanel() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<DragOverlay>
|
<DragOverlay>
|
||||||
<Show when={store.activeDraggable}>
|
<Show when={store.activeDraggable} keyed>
|
||||||
{(draggedId) => (
|
{(draggedId) => (
|
||||||
<Show when={byId().get(draggedId())}>
|
<Show when={byId().get(draggedId)} keyed>
|
||||||
{(t) => (
|
{(t) => (
|
||||||
<div class="relative p-1 h-10 flex items-center bg-background-stronger text-14-regular">
|
<div class="relative p-1 h-10 flex items-center bg-background-stronger text-14-regular">
|
||||||
{terminalTabLabel({
|
{terminalTabLabel({
|
||||||
title: t().title,
|
title: t.title,
|
||||||
titleNumber: t().titleNumber,
|
titleNumber: t.titleNumber,
|
||||||
t: language.t as (key: string, vars?: Record<string, string | number | boolean>) => string,
|
t: language.t as (key: string, vars?: Record<string, string | number | boolean>) => string,
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue