mirror of
https://github.com/anomalyco/opencode.git
synced 2026-06-01 19:05:38 +00:00
perf(app): unmount closed review panel (#27221)
This commit is contained in:
@@ -32,7 +32,7 @@ export interface SessionReviewTabProps {
|
|||||||
focusedComment?: { file: string; id: string } | null
|
focusedComment?: { file: string; id: string } | null
|
||||||
onFocusedCommentChange?: (focus: { file: string; id: string } | null) => void
|
onFocusedCommentChange?: (focus: { file: string; id: string } | null) => void
|
||||||
focusedFile?: string
|
focusedFile?: string
|
||||||
onScrollRef?: (el: HTMLDivElement) => void
|
onScrollRef?: (el: HTMLDivElement | undefined) => void
|
||||||
commentMentions?: {
|
commentMentions?: {
|
||||||
items: (query: string) => string[] | Promise<string[]>
|
items: (query: string) => string[] | Promise<string[]>
|
||||||
}
|
}
|
||||||
@@ -126,6 +126,7 @@ export function SessionReviewTab(props: SessionReviewTabProps) {
|
|||||||
|
|
||||||
onCleanup(() => {
|
onCleanup(() => {
|
||||||
if (restoreFrame !== undefined) cancelAnimationFrame(restoreFrame)
|
if (restoreFrame !== undefined) cancelAnimationFrame(restoreFrame)
|
||||||
|
props.onScrollRef?.(undefined)
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -221,7 +221,8 @@ export function SessionSidePanel(props: {
|
|||||||
}}
|
}}
|
||||||
style={{ width: panelWidth() }}
|
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
|
<div
|
||||||
aria-hidden={!reviewOpen()}
|
aria-hidden={!reviewOpen()}
|
||||||
inert={!reviewOpen()}
|
inert={!reviewOpen()}
|
||||||
@@ -313,7 +314,7 @@ export function SessionSidePanel(props: {
|
|||||||
|
|
||||||
<Show when={reviewTab() && props.canReview()}>
|
<Show when={reviewTab() && props.canReview()}>
|
||||||
<Tabs.Content value="review" class="flex flex-col h-full overflow-hidden contain-strict">
|
<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>
|
</Tabs.Content>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
@@ -453,7 +454,8 @@ export function SessionSidePanel(props: {
|
|||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
</Show>
|
||||||
</aside>
|
</aside>
|
||||||
</Show>
|
</Show>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user