authorgravatar for 71498452+StiensWout@users.noreply.github.comWout Stiens <71498452+StiensWout@users.noreply.github.com> 2026-10-13 21:02:49+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-13 14:02:49-05:00
log380bba368a9071828616b1b03bde1876cc0af4c8
treeea0c8503bd4d760d0d8ae122a8db3fea0569eca4
parent8ac4b97dae6bff7258fa5091a908116902fbd635
signature Signed by PGP key B5690EEEBB952194

fix(desktop): stop unsolicited Messages code autofill (#19118)


3 files changed, 6 insertions(+), 1 deletions(-)

apps/desktop/scripts/electron-launcher.mjs+3-1
...@@ -20,7 +20,7 @@ const APP_BUNDLE_ID = isDevelopment...@@ -20,7 +20,7 @@ const APP_BUNDLE_ID = isDevelopment
20 ? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}`20 ? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}`
21 : "com.t3tools.t3code";21 : "com.t3tools.t3code";
22const APP_PROTOCOL_SCHEMES = isDevelopment ? ["t3code-dev"] : ["t3code"];22const APP_PROTOCOL_SCHEMES = isDevelopment ? ["t3code-dev"] : ["t3code"];
23const LAUNCHER_VERSION = 19;23const LAUNCHER_VERSION = 20;
24const developmentMacIconPngPath = NodePath.join(24const developmentMacIconPngPath = NodePath.join(
25 repoRoot,25 repoRoot,
26 "assets",26 "assets",
...@@ -280,6 +280,8 @@ function patchMainBundleInfoPlist(appBundlePath, iconPath, executableName) {...@@ -280,6 +280,8 @@ function patchMainBundleInfoPlist(appBundlePath, iconPath, executableName) {
280 for (const [key, value] of Object.entries(resolveMacBundleInfoPlistStrings(executableName))) {280 for (const [key, value] of Object.entries(resolveMacBundleInfoPlistStrings(executableName))) {
281 setPlistString(infoPlistPath, key, value);281 setPlistString(infoPlistPath, key, value);
282 }282 }
283 // macOS 26 offers Messages/Mail codes in every text field unless opted out.
284 setPlistJson(infoPlistPath, "NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac", true);
283 setPlistJson(infoPlistPath, "CFBundleURLTypes", [285 setPlistJson(infoPlistPath, "CFBundleURLTypes", [
284 {286 {
285 CFBundleURLName: APP_BUNDLE_ID,287 CFBundleURLName: APP_BUNDLE_ID,
scripts/build-desktop-artifact.test.ts+1
...@@ -726,6 +726,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {...@@ -726,6 +726,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
726 ]);726 ]);
727 // macOS lists a default browser only when it also opens web pages as documents.727 // macOS lists a default browser only when it also opens web pages as documents.
728 const macInfo = (mac.mac as { extendInfo: Record<string, unknown> }).extendInfo;728 const macInfo = (mac.mac as { extendInfo: Record<string, unknown> }).extendInfo;
729 assert.strictEqual(macInfo.NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac, true);
729 assert.deepStrictEqual(macInfo.CFBundleDocumentTypes, [730 assert.deepStrictEqual(macInfo.CFBundleDocumentTypes, [
730 {731 {
731 CFBundleTypeName: "Web page",732 CFBundleTypeName: "Web page",
scripts/build-desktop-artifact.ts+2
...@@ -2821,6 +2821,8 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (...@@ -2821,6 +2821,8 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
2821 icon: "icon.icns",2821 icon: "icon.icns",
2822 category: "public.app-category.developer-tools",2822 category: "public.app-category.developer-tools",
2823 extendInfo: {2823 extendInfo: {
2824 // macOS 26 offers Messages/Mail codes in every text field unless opted out.
2825 NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac: true,
2824 NSLocalNetworkUsageDescription:2826 NSLocalNetworkUsageDescription:
2825 "T3 Code connects to devices on your local network for remote environments and commands run by terminals and coding agents.",2827 "T3 Code connects to devices on your local network for remote environments and commands run by terminals and coding agents.",
2826 NSScreenCaptureUsageDescription:2828 NSScreenCaptureUsageDescription: