The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 21:30 UTC
fix(web): inset Windows desktop scrollbars from resize edge (#4097)
Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Yukun Shan committed
Jul 18, 2026 at 03:52 UTC
7b8d12618b3d857874a1cc709d11c5df087b6390
3 files changed
+37
-1
apps/web/src/index.css
+6
@@ -6,6 +6,7 @@
6
7
:root {
8
--app-scrollbar-width: 6px;
9
+ --desktop-window-right-resize-inset: 0px;
10
--workspace-topbar-height: 52px;
11
--workspace-controls-top: 0px;
12
--workspace-controls-left: calc(env(safe-area-inset-left) + 0.75rem);
@@ -375,6 +376,11 @@ body {
376
overflow-y: hidden;
377
overscroll-behavior-y: none;
378
padding-top: max(env(safe-area-inset-top), 0px);
379
+ padding-right: var(--desktop-window-right-resize-inset);
380
+}
381
+
382
+.electron-windows {
383
+ --desktop-window-right-resize-inset: 6px;
384
}
385
386
/* App-chrome grain. Baked into each surface's own background (behind
apps/web/src/lib/windowControlsOverlay.ts
+26
@@ -1,4 +1,8 @@
1
+import { isWindowsPlatform } from "./utils";
2
+
3
const WCO_CLASS_NAME = "wco";
4
+const ELECTRON_CLASS_NAME = "electron";
5
+const ELECTRON_WINDOWS_CLASS_NAME = "electron-windows";
6
7
interface WindowControlsOverlayLike {
8
readonly visible: boolean;
@@ -38,3 +42,25 @@ export function syncDocumentWindowControlsOverlayClass(): () => void {
42
overlay.removeEventListener("geometrychange", update);
43
};
44
}
45
+
46
+export function getElectronPlatformClassNames(
47
+ platform: string,
48
+):
49
+ | readonly [typeof ELECTRON_CLASS_NAME]
50
+ | readonly [typeof ELECTRON_CLASS_NAME, typeof ELECTRON_WINDOWS_CLASS_NAME] {
51
+ return isWindowsPlatform(platform)
52
+ ? [ELECTRON_CLASS_NAME, ELECTRON_WINDOWS_CLASS_NAME]
53
+ : [ELECTRON_CLASS_NAME];
54
+}
55
+
56
+export function syncDocumentElectronPlatformClasses(platform: string): () => void {
57
+ if (typeof document === "undefined") {
58
+ return () => {};
59
+ }
60
+
61
+ const classNames = getElectronPlatformClassNames(platform);
62
+ document.documentElement.classList.add(...classNames);
63
+ return () => {
64
+ document.documentElement.classList.remove(...classNames);
65
+ };
66
+}
apps/web/src/main.tsx
+5
-1
@@ -15,7 +15,10 @@ import { isElectron } from "./env";
15
import { ManagedRelayAuthProvider } from "./cloud/managedAuth";
16
import { hasCloudPublicConfig } from "./cloud/publicConfig";
17
import { getRouter } from "./router";
18
-import { syncDocumentWindowControlsOverlayClass } from "./lib/windowControlsOverlay";
18
+import {
19
+ syncDocumentElectronPlatformClasses,
20
+ syncDocumentWindowControlsOverlayClass,
21
+} from "./lib/windowControlsOverlay";
22
import { AppRoot } from "./AppRoot";
23
24
// Electron loads the app from a file-backed shell, so hash history avoids path resolution issues.
@@ -24,6 +27,7 @@ const history = isElectron ? createHashHistory() : createBrowserHistory();
27
const router = getRouter(history);
28
29
if (isElectron) {
30
+ syncDocumentElectronPlatformClasses(navigator.platform);
31
syncDocumentWindowControlsOverlayClass();
32
}
33