Skip to content

Commit e408b01

Browse files
authored
Merge pull request #35 from tarik02/sync-upstream-main-20260618
sync upstream main
2 parents 6be75a1 + b438937 commit e408b01

7 files changed

Lines changed: 411 additions & 375 deletions

File tree

apps/desktop/src/electron/ElectronMenu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export const layer = Layer.effect(
9999
width: 12,
100100
height: 12,
101101
});
102+
icon.setTemplateImage(true);
102103
destructiveMenuIconCache = icon.isEmpty() ? Option.none() : Option.some(icon);
103104
} catch {
104105
destructiveMenuIconCache = Option.none();

apps/mobile/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
"@noble/hashes": "catalog:",
5050
"@pierre/diffs": "catalog:",
5151
"@react-native-menu/menu": "^2.0.0",
52-
"@shikijs/core": "3.23.0",
53-
"@shikijs/engine-javascript": "3.23.0",
54-
"@shikijs/langs": "3.23.0",
55-
"@shikijs/themes": "3.23.0",
52+
"@shikijs/core": "4.2.0",
53+
"@shikijs/engine-javascript": "4.2.0",
54+
"@shikijs/langs": "4.2.0",
55+
"@shikijs/themes": "4.2.0",
5656
"@t3tools/client-runtime": "workspace:*",
5757
"@t3tools/contracts": "workspace:*",
5858
"@t3tools/mobile-markdown-text": "file:./modules/t3-markdown-text",
@@ -98,10 +98,10 @@
9898
"react-native-reanimated": "4.3.1",
9999
"react-native-safe-area-context": "~5.7.0",
100100
"react-native-screens": "4.25.2",
101-
"react-native-shiki-engine": "^0.3.9",
101+
"react-native-shiki-engine": "^0.3.12",
102102
"react-native-svg": "15.15.4",
103103
"react-native-worklets": "0.8.3",
104-
"shiki": "3.23.0",
104+
"shiki": "4.2.0",
105105
"tailwind-merge": "^3.5.0",
106106
"uniwind": "^1.6.2"
107107
},

apps/server/src/vcs/GitVcsDriverCore.test.ts

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
216216
}),
217217
);
218218

219-
it.effect("disables SSH askpass for background upstream status fetches", () =>
219+
it.effect("makes background upstream status fetches non-interactive", () =>
220220
Effect.gen(function* () {
221221
const cwd = yield* makeTmpDir();
222222
const tempDir = yield* makeTmpDir("git-vcs-driver-ssh-env-");
@@ -225,15 +225,26 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
225225
const pathService = yield* Path.Path;
226226
const sshLogPath = pathService.join(tempDir, "ssh-env.txt");
227227
const sshWrapperPath = pathService.join(tempDir, "ssh-wrapper.sh");
228-
const previousGitSsh = process.env.GIT_SSH;
229-
const previousAskpassRequire = process.env.SSH_ASKPASS_REQUIRE;
230-
const previousAskpassLog = process.env.T3_TEST_SSH_ASKPASS_LOG;
228+
const envKeys = [
229+
"GCM_INTERACTIVE",
230+
"GIT_ASKPASS",
231+
"GIT_SSH",
232+
"GIT_TERMINAL_PROMPT",
233+
"SSH_ASKPASS",
234+
"SSH_ASKPASS_REQUIRE",
235+
"T3_TEST_SSH_ASKPASS_LOG",
236+
] as const;
237+
const previousEnv = new Map(envKeys.map((key) => [key, process.env[key]]));
231238

232239
yield* fileSystem.writeFileString(
233240
sshWrapperPath,
234241
[
235242
"#!/bin/sh",
236-
'printf "%s\\n" "${SSH_ASKPASS_REQUIRE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"',
243+
'printf "GCM_INTERACTIVE=%s\\n" "${GCM_INTERACTIVE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"',
244+
'printf "GIT_ASKPASS=%s\\n" "${GIT_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
245+
'printf "GIT_TERMINAL_PROMPT=%s\\n" "${GIT_TERMINAL_PROMPT:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
246+
'printf "SSH_ASKPASS=%s\\n" "${SSH_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
247+
'printf "SSH_ASKPASS_REQUIRE=%s\\n" "${SSH_ASKPASS_REQUIRE:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
237248
"exit 1",
238249
"",
239250
].join("\n"),
@@ -245,29 +256,32 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
245256

246257
yield* Effect.gen(function* () {
247258
process.env.GIT_SSH = sshWrapperPath;
259+
process.env.GCM_INTERACTIVE = "always";
260+
process.env.GIT_ASKPASS = "git-askpass";
261+
process.env.GIT_TERMINAL_PROMPT = "1";
262+
process.env.SSH_ASKPASS = "ssh-askpass";
248263
process.env.SSH_ASKPASS_REQUIRE = "force";
249264
process.env.T3_TEST_SSH_ASKPASS_LOG = sshLogPath;
250265

251266
yield* (yield* GitVcsDriver.GitVcsDriver).statusDetails(cwd);
252267

253-
assert.equal((yield* fileSystem.readFileString(sshLogPath)).trim(), "never");
268+
assert.deepEqual((yield* fileSystem.readFileString(sshLogPath)).trim().split(/\r?\n/), [
269+
"GCM_INTERACTIVE=never",
270+
"GIT_ASKPASS=",
271+
"GIT_TERMINAL_PROMPT=0",
272+
"SSH_ASKPASS=",
273+
"SSH_ASKPASS_REQUIRE=never",
274+
]);
254275
}).pipe(
255276
Effect.ensuring(
256277
Effect.sync(() => {
257-
if (previousGitSsh === undefined) {
258-
delete process.env.GIT_SSH;
259-
} else {
260-
process.env.GIT_SSH = previousGitSsh;
261-
}
262-
if (previousAskpassRequire === undefined) {
263-
delete process.env.SSH_ASKPASS_REQUIRE;
264-
} else {
265-
process.env.SSH_ASKPASS_REQUIRE = previousAskpassRequire;
266-
}
267-
if (previousAskpassLog === undefined) {
268-
delete process.env.T3_TEST_SSH_ASKPASS_LOG;
269-
} else {
270-
process.env.T3_TEST_SSH_ASKPASS_LOG = previousAskpassLog;
278+
for (const key of envKeys) {
279+
const previous = previousEnv.get(key);
280+
if (previous === undefined) {
281+
delete process.env[key];
282+
} else {
283+
process.env[key] = previous;
284+
}
271285
}
272286
}),
273287
),

apps/server/src/vcs/GitVcsDriverCore.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ const STATUS_UPSTREAM_REFRESH_TIMEOUT = Duration.seconds(5);
5454
const STATUS_UPSTREAM_REFRESH_FAILURE_COOLDOWN = Duration.seconds(5);
5555
const STATUS_UPSTREAM_REFRESH_CACHE_CAPACITY = 2_048;
5656
const STATUS_UPSTREAM_REFRESH_ENV = Object.freeze({
57+
GCM_INTERACTIVE: "never",
58+
GIT_ASKPASS: "",
59+
GIT_TERMINAL_PROMPT: "0",
60+
SSH_ASKPASS: "",
5761
SSH_ASKPASS_REQUIRE: "never",
5862
} satisfies NodeJS.ProcessEnv);
5963
const DEFAULT_BASE_BRANCH_CANDIDATES = ["main", "master"] as const;

patches/@pierre%2Fdiffs@1.3.0-beta.4.patch renamed to patches/@pierre%2Fdiffs@1.3.0-beta.5.patch

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
diff --git a/dist/editor/editor.js b/dist/editor/editor.js
2-
index 4346c77a4e43a98c8524ea5186559fdee7433174..bb2a7ecd1d7f497916a5f220215d5191b095575b 100644
2+
index e8013fc6eb6f243a6c912facf3fc0319ac66a8d0..80c82df4cdeb828bd331f5ec2f443d216bedc304 100644
33
--- a/dist/editor/editor.js
44
+++ b/dist/editor/editor.js
5-
@@ -77,16 +77,13 @@ var Editor = class {
5+
@@ -77,15 +77,12 @@ var Editor = class {
66
this.#options = options;
77
}
88
edit(component) {
99
- const { useTokenTransformer, enableGutterUtility, enableLineSelection, expandUnchanged, diffStyle, lineHoverHighlight,...rest } = component.options;
10-
- if (useTokenTransformer !== true || enableGutterUtility === true || enableLineSelection === true || expandUnchanged !== true && Object.hasOwn(component, "fileDiff") || diffStyle === "unified" || lineHoverHighlight !== "disabled") {
1110
+ const { useTokenTransformer, expandUnchanged, diffStyle,...rest } = component.options;
12-
+ if (useTokenTransformer !== true || expandUnchanged !== true && Object.hasOwn(component, "fileDiff") || diffStyle === "unified") {
11+
const isDiff = component.type === "file-diff";
12+
- if (useTokenTransformer !== true || enableGutterUtility === true || enableLineSelection === true || lineHoverHighlight !== "disabled" || expandUnchanged !== true && isDiff || diffStyle === "unified" && isDiff) {
13+
+ if (useTokenTransformer !== true || expandUnchanged !== true && isDiff || diffStyle === "unified" && isDiff) {
1314
component.setOptions({
1415
...rest,
1516
useTokenTransformer: true,
1617
- enableGutterUtility: false,
1718
- enableLineSelection: false,
19+
- lineHoverHighlight: "disabled",
1820
expandUnchanged: true,
19-
- diffStyle: "split",
20-
- lineHoverHighlight: "disabled"
21-
+ diffStyle: "split"
21+
diffStyle: "split"
2222
});
23-
component.rerender();
24-
}
25-
@@ -481,6 +478,7 @@ var Editor = class {
23+
@@ -511,6 +508,7 @@ var Editor = class {
2624
return lineNumber - 1;
2725
};
2826
this.#editorEventDisposes.push(addEventListener(gutterEl, "pointerdown", (e) => {
@@ -47,7 +45,7 @@ index cb8e2026fb5d7a19f489c0a2402efbcb7dff3322..510fad6364d4a2214c7dd65fe2b114f1
4745
return merged;
4846
}
4947
diff --git a/package.json b/package.json
50-
index cff9c6b2a955e7568f44279a5b706da164c4f142..3d1f25f8bd1be682549677718d9ed8433872c854 100644
48+
index d1558633de87044b7aa96cff09443db11f163cec..c0b16f0a0bec6fba2026f24f38b2c0a8fa06af7c 100644
5149
--- a/package.json
5250
+++ b/package.json
5351
@@ -55,6 +55,18 @@

0 commit comments

Comments
 (0)