perf(app): unmount closed review panel (#27221)

This commit is contained in:
Luke Parker
2026-05-13 12:09:34 +10:00
committed by GitHub
parent 0879f5e22d
commit 0f8517208b
2 changed files with 7 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ export interface SessionReviewTabProps {
focusedComment?: { file: string; id: string } | null
onFocusedCommentChange?: (focus: { file: string; id: string } | null) => void
focusedFile?: string
onScrollRef?: (el: HTMLDivElement) => void
onScrollRef?: (el: HTMLDivElement | undefined) => void
commentMentions?: {
items: (query: string) => string[] | Promise<string[]>
}
@@ -126,6 +126,7 @@ export function SessionReviewTab(props: SessionReviewTabProps) {
onCleanup(() => {
if (restoreFrame !== undefined) cancelAnimationFrame(restoreFrame)
props.onScrollRef?.(undefined)
})
return (

View File

@@ -221,7 +221,8 @@ export function SessionSidePanel(props: {
}}
style={{ width: panelWidth() }}
>
<div class="size-full flex border-l border-border-weaker-base">
<Show when={open()}>
<div class="size-full flex border-l border-border-weaker-base">
<div
aria-hidden={!reviewOpen()}
inert={!reviewOpen()}
@@ -313,7 +314,7 @@ export function SessionSidePanel(props: {
<Show when={reviewTab() && props.canReview()}>
<Tabs.Content value="review" class="flex flex-col h-full overflow-hidden contain-strict">
<Show when={activeTab() === "review"}>{props.reviewPanel()}</Show>
<Show when={reviewOpen() && activeTab() === "review"}>{props.reviewPanel()}</Show>
</Tabs.Content>
</Show>
@@ -453,7 +454,8 @@ export function SessionSidePanel(props: {
</Show>
</div>
</Show>
</div>
</div>
</Show>
</aside>
</Show>
)