diff --git a/apps/review-desktop/code-oss/src/vs/review/browser/workbench.ts b/apps/review-desktop/code-oss/src/vs/review/browser/workbench.ts index f16813b83..d28428ebe 100644 --- a/apps/review-desktop/code-oss/src/vs/review/browser/workbench.ts +++ b/apps/review-desktop/code-oss/src/vs/review/browser/workbench.ts @@ -1207,6 +1207,21 @@ export class ReviewWorkbench extends Disposable implements IAgentWorkbenchLayout tabStrip.style.setProperty('--review-explorer-width', `${explorerWidth}px`); } + /** How far Windows and Linux window controls overlap each part. Written only on change; see `publishReviewChromeInset`. */ + private publishWindowControlsEnd(): void { + const titlebarPart = this.getPart(Parts.TITLEBAR_PART); + const controlsLeft = this._mainContainerDimension.width - (titlebarPart instanceof MainReviewTitlebarPart ? titlebarPart.chromeInsets.right : 0); + for (const part of [this._editorPartContainer, this.getContainer(mainWindow, Parts.REVIEW_ASK_PART)]) { + if (!part) { + continue; + } + const end = `${Math.max(0, Math.round(part.getBoundingClientRect().right - controlsLeft))}px`; + if (part.style.getPropertyValue('--review-window-controls-end') !== end) { + part.style.setProperty('--review-window-controls-end', end); + } + } + } + private updateReviewChromeInset(): void { this.reviewChromeDragListeners.clear(); this.mainContainer.classList.remove('review-tab-dragging'); @@ -1219,6 +1234,7 @@ export class ReviewWorkbench extends Disposable implements IAgentWorkbenchLayout this.reviewChromeTabStrips.length = 0; const editorPartContainer = this._editorPartContainer; + this.publishWindowControlsEnd(); if (!editorPartContainer) { return; } diff --git a/packages/review/app/src/diagram-styles.ts b/packages/review/app/src/diagram-styles.ts index 14002eb54..ed7ed18aa 100644 --- a/packages/review/app/src/diagram-styles.ts +++ b/packages/review/app/src/diagram-styles.ts @@ -35,9 +35,9 @@ export const diagramStyles = stylex.create({ alignItems: "center", gap: space.s10, minWidth: 0, - minHeight: "36px", + minHeight: "var(--review-fullscreen-header-height, 36px)", paddingBlock: 0, - paddingRight: space.s12, + paddingRight: `calc(${space.s12} + var(--review-fullscreen-end-inset, 0px))`, paddingLeft: "calc(14px + var(--review-fullscreen-inset, 0px))", borderBottomWidth: "1px", borderBottomStyle: "solid", diff --git a/packages/review/app/src/diagram-tour.tsx b/packages/review/app/src/diagram-tour.tsx index adfca6b8d..5a1774541 100644 --- a/packages/review/app/src/diagram-tour.tsx +++ b/packages/review/app/src/diagram-tour.tsx @@ -87,6 +87,7 @@ export function DiagramTourOverlay({ styles.stage, flow && styles.flowStage, shellStyles.clearsWindowControls, + styles.stageEnd, )} > {children} @@ -100,7 +101,12 @@ export function DiagramTourOverlay({ )} {...paneResize.separatorProps} /> -
+