Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/desktop/src/electron/ElectronMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const layer = Layer.effect(
width: 12,
height: 12,
});
icon.setTemplateImage(true);
destructiveMenuIconCache = icon.isEmpty() ? Option.none() : Option.some(icon);
} catch {
destructiveMenuIconCache = Option.none();
Expand Down
12 changes: 6 additions & 6 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"@noble/hashes": "catalog:",
"@pierre/diffs": "catalog:",
"@react-native-menu/menu": "^2.0.0",
"@shikijs/core": "3.23.0",
"@shikijs/engine-javascript": "3.23.0",
"@shikijs/langs": "3.23.0",
"@shikijs/themes": "3.23.0",
"@shikijs/core": "4.2.0",
"@shikijs/engine-javascript": "4.2.0",
"@shikijs/langs": "4.2.0",
"@shikijs/themes": "4.2.0",
"@t3tools/client-runtime": "workspace:*",
"@t3tools/contracts": "workspace:*",
"@t3tools/mobile-markdown-text": "file:./modules/t3-markdown-text",
Expand Down Expand Up @@ -98,10 +98,10 @@
"react-native-reanimated": "4.3.1",
"react-native-safe-area-context": "~5.7.0",
"react-native-screens": "4.25.2",
"react-native-shiki-engine": "^0.3.9",
"react-native-shiki-engine": "^0.3.12",
"react-native-svg": "15.15.4",
"react-native-worklets": "0.8.3",
"shiki": "3.23.0",
"shiki": "4.2.0",
"tailwind-merge": "^3.5.0",
"uniwind": "^1.6.2"
},
Expand Down
54 changes: 34 additions & 20 deletions apps/server/src/vcs/GitVcsDriverCore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
}),
);

it.effect("disables SSH askpass for background upstream status fetches", () =>
it.effect("makes background upstream status fetches non-interactive", () =>
Effect.gen(function* () {
const cwd = yield* makeTmpDir();
const tempDir = yield* makeTmpDir("git-vcs-driver-ssh-env-");
Expand All @@ -225,15 +225,26 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
const pathService = yield* Path.Path;
const sshLogPath = pathService.join(tempDir, "ssh-env.txt");
const sshWrapperPath = pathService.join(tempDir, "ssh-wrapper.sh");
const previousGitSsh = process.env.GIT_SSH;
const previousAskpassRequire = process.env.SSH_ASKPASS_REQUIRE;
const previousAskpassLog = process.env.T3_TEST_SSH_ASKPASS_LOG;
const envKeys = [
"GCM_INTERACTIVE",
"GIT_ASKPASS",
"GIT_SSH",
"GIT_TERMINAL_PROMPT",
"SSH_ASKPASS",
"SSH_ASKPASS_REQUIRE",
"T3_TEST_SSH_ASKPASS_LOG",
] as const;
const previousEnv = new Map(envKeys.map((key) => [key, process.env[key]]));

yield* fileSystem.writeFileString(
sshWrapperPath,
[
"#!/bin/sh",
'printf "%s\\n" "${SSH_ASKPASS_REQUIRE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"',
'printf "GCM_INTERACTIVE=%s\\n" "${GCM_INTERACTIVE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"',
'printf "GIT_ASKPASS=%s\\n" "${GIT_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
'printf "GIT_TERMINAL_PROMPT=%s\\n" "${GIT_TERMINAL_PROMPT:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
'printf "SSH_ASKPASS=%s\\n" "${SSH_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
'printf "SSH_ASKPASS_REQUIRE=%s\\n" "${SSH_ASKPASS_REQUIRE:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
"exit 1",
"",
].join("\n"),
Expand All @@ -245,29 +256,32 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {

yield* Effect.gen(function* () {
process.env.GIT_SSH = sshWrapperPath;
process.env.GCM_INTERACTIVE = "always";
process.env.GIT_ASKPASS = "git-askpass";
process.env.GIT_TERMINAL_PROMPT = "1";
process.env.SSH_ASKPASS = "ssh-askpass";
process.env.SSH_ASKPASS_REQUIRE = "force";
process.env.T3_TEST_SSH_ASKPASS_LOG = sshLogPath;

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

assert.equal((yield* fileSystem.readFileString(sshLogPath)).trim(), "never");
assert.deepEqual((yield* fileSystem.readFileString(sshLogPath)).trim().split(/\r?\n/), [
"GCM_INTERACTIVE=never",
"GIT_ASKPASS=",
"GIT_TERMINAL_PROMPT=0",
"SSH_ASKPASS=",
"SSH_ASKPASS_REQUIRE=never",
]);
}).pipe(
Effect.ensuring(
Effect.sync(() => {
if (previousGitSsh === undefined) {
delete process.env.GIT_SSH;
} else {
process.env.GIT_SSH = previousGitSsh;
}
if (previousAskpassRequire === undefined) {
delete process.env.SSH_ASKPASS_REQUIRE;
} else {
process.env.SSH_ASKPASS_REQUIRE = previousAskpassRequire;
}
if (previousAskpassLog === undefined) {
delete process.env.T3_TEST_SSH_ASKPASS_LOG;
} else {
process.env.T3_TEST_SSH_ASKPASS_LOG = previousAskpassLog;
for (const key of envKeys) {
const previous = previousEnv.get(key);
if (previous === undefined) {
delete process.env[key];
} else {
process.env[key] = previous;
}
}
}),
),
Expand Down
4 changes: 4 additions & 0 deletions apps/server/src/vcs/GitVcsDriverCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const STATUS_UPSTREAM_REFRESH_TIMEOUT = Duration.seconds(5);
const STATUS_UPSTREAM_REFRESH_FAILURE_COOLDOWN = Duration.seconds(5);
const STATUS_UPSTREAM_REFRESH_CACHE_CAPACITY = 2_048;
const STATUS_UPSTREAM_REFRESH_ENV = Object.freeze({
GCM_INTERACTIVE: "never",
GIT_ASKPASS: "",
GIT_TERMINAL_PROMPT: "0",
SSH_ASKPASS: "",
SSH_ASKPASS_REQUIRE: "never",
} satisfies NodeJS.ProcessEnv);
const DEFAULT_BASE_BRANCH_CANDIDATES = ["main", "master"] as const;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
diff --git a/dist/editor/editor.js b/dist/editor/editor.js
index 4346c77a4e43a98c8524ea5186559fdee7433174..bb2a7ecd1d7f497916a5f220215d5191b095575b 100644
index e8013fc6eb6f243a6c912facf3fc0319ac66a8d0..80c82df4cdeb828bd331f5ec2f443d216bedc304 100644
--- a/dist/editor/editor.js
+++ b/dist/editor/editor.js
@@ -77,16 +77,13 @@ var Editor = class {
@@ -77,15 +77,12 @@ var Editor = class {
this.#options = options;
}
edit(component) {
- const { useTokenTransformer, enableGutterUtility, enableLineSelection, expandUnchanged, diffStyle, lineHoverHighlight,...rest } = component.options;
- if (useTokenTransformer !== true || enableGutterUtility === true || enableLineSelection === true || expandUnchanged !== true && Object.hasOwn(component, "fileDiff") || diffStyle === "unified" || lineHoverHighlight !== "disabled") {
+ const { useTokenTransformer, expandUnchanged, diffStyle,...rest } = component.options;
+ if (useTokenTransformer !== true || expandUnchanged !== true && Object.hasOwn(component, "fileDiff") || diffStyle === "unified") {
const isDiff = component.type === "file-diff";
- if (useTokenTransformer !== true || enableGutterUtility === true || enableLineSelection === true || lineHoverHighlight !== "disabled" || expandUnchanged !== true && isDiff || diffStyle === "unified" && isDiff) {
+ if (useTokenTransformer !== true || expandUnchanged !== true && isDiff || diffStyle === "unified" && isDiff) {
component.setOptions({
...rest,
useTokenTransformer: true,
- enableGutterUtility: false,
- enableLineSelection: false,
- lineHoverHighlight: "disabled",
expandUnchanged: true,
- diffStyle: "split",
- lineHoverHighlight: "disabled"
+ diffStyle: "split"
diffStyle: "split"
});
component.rerender();
}
@@ -481,6 +478,7 @@ var Editor = class {
@@ -511,6 +508,7 @@ var Editor = class {
return lineNumber - 1;
};
this.#editorEventDisposes.push(addEventListener(gutterEl, "pointerdown", (e) => {
Expand All @@ -47,7 +45,7 @@ index cb8e2026fb5d7a19f489c0a2402efbcb7dff3322..510fad6364d4a2214c7dd65fe2b114f1
return merged;
}
diff --git a/package.json b/package.json
index cff9c6b2a955e7568f44279a5b706da164c4f142..3d1f25f8bd1be682549677718d9ed8433872c854 100644
index d1558633de87044b7aa96cff09443db11f163cec..c0b16f0a0bec6fba2026f24f38b2c0a8fa06af7c 100644
--- a/package.json
+++ b/package.json
@@ -55,6 +55,18 @@
Expand Down
Loading
Loading