From fab80c9af21fb7977317771e47e79f8cc4101fb6 Mon Sep 17 00:00:00 2001 From: finalerock44 Date: Mon, 2 Nov 2026 12:20:29 +0000 Subject: [PATCH] fix(cloud): show notices before rejecting an unsupported iOS device or version The iOS device/version check ran before the DB-driven notices were rendered, while the Android check ran after them (both date from the initial commit). So a run that pinned a removed iOS device or version was rejected without the notice that explains the removal: on 2 Nov 2026 the removed-ios-17-2026-11-02 and removed-ios-devices-2026-11-02 notices never showed in the CLI, only the bare "not supported" error. The iOS check now runs right after the notices, next to the Android one. Nothing between the two reads the validation result, and the notice context uses the raw flags, so only the output order changes. Checked against dev: --ios-device iphone-15 and --ios-device iphone-14 --ios-version 17 now print their removed notice, then the same error. The MCP tool (dcd_run_cloud_test) renders no notices, so it is unchanged. --- src/commands/cloud.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/commands/cloud.ts b/src/commands/cloud.ts index 969c633..f9a8261 100644 --- a/src/commands/cloud.ts +++ b/src/commands/cloud.ts @@ -490,11 +490,6 @@ export const cloudCommand = defineCommand({ throw new CliError('You must provide a flow file'); } - deviceValidationService.validateiOSDevice(iOSVersion, iOSDevice, compatibilityData, { - debug, - logger: (m: string) => out(m), - }); - // Render DB-driven notices (deprecation/warn/info/marketing) the API // returned with the compatibility data. Replaces the previously hardcoded // iOS-16 deprecation warning — that is now a seeded notice gated on the @@ -529,6 +524,13 @@ export const cloudCommand = defineCommand({ learnMoreUrl: n.learnMoreUrl, })); + // Validated after the notices, so a notice aimed at a removed device or + // OS version (e.g. removed-ios-17-2026-11-02) is shown before the + // rejection it explains. + deviceValidationService.validateiOSDevice(iOSVersion, iOSDevice, compatibilityData, { + debug, + logger: (m: string) => out(m), + }); deviceValidationService.validateAndroidDevice( androidApiLevel, androidDevice,