Skip to content

Commit bc92973

Browse files
fix(desktop): declare Calendar access for hosted commands (#21592)
Co-authored-by: maria-rcks <[email protected]>
1 parent a61cdb5 commit bc92973

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

‎scripts/build-desktop-artifact.test.ts‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,33 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
547547
),
548548
);
549549

550+
it.effect("declares Calendar access for hosted commands in macOS builds", () =>
551+
Effect.gen(function* () {
552+
for (const version of ["0.1.0", "0.1.1-nightly.20261019.1"]) {
553+
for (const signed of [false, true]) {
554+
const config = yield* createBuildConfig(
555+
"mac",
556+
"dmg",
557+
version,
558+
signed,
559+
false,
560+
undefined,
561+
undefined,
562+
);
563+
const mac = config.mac as { extendInfo: Record<string, unknown> };
564+
for (const key of [
565+
"NSCalendarsUsageDescription",
566+
"NSCalendarsFullAccessUsageDescription",
567+
"NSCalendarsWriteOnlyAccessUsageDescription",
568+
]) {
569+
assert.isString(mac.extendInfo[key], `${version}, signed=${signed}: ${key}`);
570+
assert.isNotEmpty(mac.extendInfo[key]);
571+
}
572+
}
573+
}
574+
}),
575+
);
576+
550577
// pnpm writes "set this to true or false" placeholders into allowBuilds when a
551578
// tarball changes. pnpm ignores them, but the release build decode rejects them.
552579
it.effect("decodes the repo allowBuilds and every file: tarball it names exists", () =>

‎scripts/build-desktop-artifact.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,12 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
28372837
NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac: true,
28382838
NSLocalNetworkUsageDescription:
28392839
"T3 Code connects to devices on your local network for remote environments and commands run by terminals and coding agents.",
2840+
NSCalendarsUsageDescription:
2841+
"Commands you run in T3 Code may need access to your calendars.",
2842+
NSCalendarsFullAccessUsageDescription:
2843+
"Commands you run in T3 Code may need to read and write your calendar events.",
2844+
NSCalendarsWriteOnlyAccessUsageDescription:
2845+
"Commands you run in T3 Code may need to add events to your calendars.",
28402846
NSScreenCaptureUsageDescription:
28412847
"T3 Code captures the active window when you use the window capture shortcut.",
28422848
NSCameraUsageDescription:

0 commit comments

Comments
 (0)