Skip to content

Commit 743d0a0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/checkout-dirty-worktree-error-handling
# Conflicts: # apps/web/src/components/BranchToolbarBranchSelector.tsx
2 parents 53bcb7c + 57d7746 commit 743d0a0

28 files changed

Lines changed: 1145 additions & 2698 deletions

apps/desktop/src/backendReadiness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface WaitForHttpReadyOptions {
66
readonly signal?: AbortSignal;
77
}
88

9-
const DEFAULT_TIMEOUT_MS = 10_000;
9+
const DEFAULT_TIMEOUT_MS = 30_000;
1010
const DEFAULT_INTERVAL_MS = 100;
1111
const DEFAULT_REQUEST_TIMEOUT_MS = 1_000;
1212

apps/desktop/src/main.ts

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as Path from "node:path";
77
import {
88
app,
99
BrowserWindow,
10+
type BrowserWindowConstructorOptions,
1011
clipboard,
1112
dialog,
1213
ipcMain,
@@ -118,6 +119,15 @@ const DESKTOP_UPDATE_CHANNEL = "latest";
118119
const DESKTOP_UPDATE_ALLOW_PRERELEASE = false;
119120
const DESKTOP_LOOPBACK_HOST = "127.0.0.1";
120121
const DESKTOP_REQUIRED_PORT_PROBE_HOSTS = ["0.0.0.0", "::"] as const;
122+
const TITLEBAR_HEIGHT = 40;
123+
const TITLEBAR_COLOR = "#01000000"; // #00000000 does not work correctly on Linux
124+
const TITLEBAR_LIGHT_SYMBOL_COLOR = "#1f2937";
125+
const TITLEBAR_DARK_SYMBOL_COLOR = "#f8fafc";
126+
127+
type WindowTitleBarOptions = Pick<
128+
BrowserWindowConstructorOptions,
129+
"titleBarOverlay" | "titleBarStyle" | "trafficLightPosition"
130+
>;
121131

122132
type DesktopUpdateErrorContext = DesktopUpdateState["errorContext"];
123133
type LinuxDesktopNamedApp = Electron.App & {
@@ -1649,6 +1659,46 @@ function getInitialWindowBackgroundColor(): string {
16491659
return nativeTheme.shouldUseDarkColors ? "#0a0a0a" : "#ffffff";
16501660
}
16511661

1662+
function getWindowTitleBarOptions(): WindowTitleBarOptions {
1663+
if (process.platform === "darwin") {
1664+
return {
1665+
titleBarStyle: "hiddenInset",
1666+
trafficLightPosition: { x: 16, y: 18 },
1667+
};
1668+
}
1669+
1670+
return {
1671+
titleBarStyle: "hidden",
1672+
titleBarOverlay: {
1673+
color: TITLEBAR_COLOR,
1674+
height: TITLEBAR_HEIGHT,
1675+
symbolColor: nativeTheme.shouldUseDarkColors
1676+
? TITLEBAR_DARK_SYMBOL_COLOR
1677+
: TITLEBAR_LIGHT_SYMBOL_COLOR,
1678+
},
1679+
};
1680+
}
1681+
1682+
function syncWindowAppearance(window: BrowserWindow): void {
1683+
if (window.isDestroyed()) {
1684+
return;
1685+
}
1686+
1687+
window.setBackgroundColor(getInitialWindowBackgroundColor());
1688+
const { titleBarOverlay } = getWindowTitleBarOptions();
1689+
if (typeof titleBarOverlay === "object") {
1690+
window.setTitleBarOverlay(titleBarOverlay);
1691+
}
1692+
}
1693+
1694+
function syncAllWindowAppearance(): void {
1695+
for (const window of BrowserWindow.getAllWindows()) {
1696+
syncWindowAppearance(window);
1697+
}
1698+
}
1699+
1700+
nativeTheme.on("updated", syncAllWindowAppearance);
1701+
16521702
function createWindow(): BrowserWindow {
16531703
const window = new BrowserWindow({
16541704
width: 1100,
@@ -1660,8 +1710,7 @@ function createWindow(): BrowserWindow {
16601710
backgroundColor: getInitialWindowBackgroundColor(),
16611711
...getIconOption(),
16621712
title: APP_DISPLAY_NAME,
1663-
titleBarStyle: "hiddenInset",
1664-
trafficLightPosition: { x: 16, y: 18 },
1713+
...getWindowTitleBarOptions(),
16651714
webPreferences: {
16661715
preload: Path.join(__dirname, "preload.js"),
16671716
contextIsolation: true,

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@dnd-kit/utilities": "^3.2.2",
2222
"@effect/atom-react": "catalog:",
2323
"@formkit/auto-animate": "^0.9.0",
24+
"@legendapp/list": "3.0.0-beta.44",
2425
"@lexical/react": "^0.41.0",
2526
"@pierre/diffs": "^1.1.0-beta.16",
2627
"@t3tools/client-runtime": "workspace:*",
@@ -29,7 +30,6 @@
2930
"@tanstack/react-pacer": "^0.19.4",
3031
"@tanstack/react-query": "^5.90.0",
3132
"@tanstack/react-router": "^1.160.2",
32-
"@tanstack/react-virtual": "^3.13.18",
3333
"@xterm/addon-fit": "^0.11.0",
3434
"@xterm/xterm": "^6.0.0",
3535
"class-variance-authority": "^0.7.1",

apps/web/src/chat-scroll.test.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

apps/web/src/chat-scroll.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)