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
2020 ? `com.t3tools.t3code.dev.${devBundleIdSuffix || "local"}`
2121 : "com.t3tools.t3code";
2222const APP_PROTOCOL_SCHEMES = isDevelopment ? ["t3code-dev"] : ["t3code"];
23const LAUNCHER_VERSION = 19;
23const LAUNCHER_VERSION = 20;
2424const developmentMacIconPngPath = NodePath.join(
2525 repoRoot,
2626 "assets",
......@@ -280,6 +280,8 @@ function patchMainBundleInfoPlist(appBundlePath, iconPath, executableName) {
280280 for (const [key, value] of Object.entries(resolveMacBundleInfoPlistStrings(executableName))) {
281281 setPlistString(infoPlistPath, key, value);
282282 }
283 // macOS 26 offers Messages/Mail codes in every text field unless opted out.
284 setPlistJson(infoPlistPath, "NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac", true);
283285 setPlistJson(infoPlistPath, "CFBundleURLTypes", [
284286 {
285287 CFBundleURLName: APP_BUNDLE_ID,
scripts/build-desktop-artifact.test.ts+1
......@@ -726,6 +726,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
726726 ]);
727727 // macOS lists a default browser only when it also opens web pages as documents.
728728 const macInfo = (mac.mac as { extendInfo: Record<string, unknown> }).extendInfo;
729 assert.strictEqual(macInfo.NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac, true);
729730 assert.deepStrictEqual(macInfo.CFBundleDocumentTypes, [
730731 {
731732 CFBundleTypeName: "Web page",
scripts/build-desktop-artifact.ts+2
......@@ -2821,6 +2821,8 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
28212821 icon: "icon.icns",
28222822 category: "public.app-category.developer-tools",
28232823 extendInfo: {
2824 // macOS 26 offers Messages/Mail codes in every text field unless opted out.
2825 NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac: true,
28242826 NSLocalNetworkUsageDescription:
28252827 "T3 Code connects to devices on your local network for remote environments and commands run by terminals and coding agents.",
28262828 NSScreenCaptureUsageDescription: