From d49b63142d6d81b79391f78ad4e3101eb506ed56 Mon Sep 17 00:00:00 2001 From: Luke Parker <10430890+Hona@users.noreply.github.com> Date: Wed, 4 Nov 2026 12:30:09 +1000 Subject: [PATCH] perf(app): stop restyling the whole side panel on every frame of a resize drag --- packages/app/src/runtime/plugin/side-region.tsx | 8 +++++++- packages/app/src/session/screen.tsx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/app/src/runtime/plugin/side-region.tsx b/packages/app/src/runtime/plugin/side-region.tsx index 72147e552d3..f64de7fa5f7 100644 --- a/packages/app/src/runtime/plugin/side-region.tsx +++ b/packages/app/src/runtime/plugin/side-region.tsx @@ -53,6 +53,12 @@ export function SideRegion(props: { sidebar: PanelSidebar present?: boolean size: Sizing + /** + * The width the contents keep, the side region's open width, which a close keeps as the far end of its travel. Set + * on the content box alone: an inherited custom property on an ancestor restyled every element in the region, the + * review's diffs included, on every frame of a resize drag. + */ + contentWidth: Accessor drag: PaneDrag }) { const layout = useLayout() @@ -122,7 +128,7 @@ export function SideRegion(props: {
@@ -544,6 +543,7 @@ function SessionScreenContent(props: { sidebar={sidebar} present={sideMotion.present()} size={screen.size} + contentWidth={screen.side.contentWidth} drag={drag} />