Skip to content

Support assets for admin links app intents#7132

Draft
vividviolet wants to merge 1 commit into03-31-support_intents_for_ui_extensionsfrom
03-31-support_assets_for_admin_links_app_intents
Draft

Support assets for admin links app intents#7132
vividviolet wants to merge 1 commit into03-31-support_intents_for_ui_extensionsfrom
03-31-support_assets_for_admin_links_app_intents

Conversation

@vividviolet
Copy link
Copy Markdown
Member

@vividviolet vividviolet commented Mar 31, 2026

WHY are these changes introduced?

Enables assets uploading for admin_link to support intents

Related to https://github.com/shop/issues-admin-extensibility/issues/2205

WHAT is this pull request doing?

  • Adds a new admin_link extension specification with localization support
  • Implements asset inclusion for targeting configuration including tools, instructions, and intent schemas
  • Configures copy-based build mode for admin link extensions
  • Adds comprehensive test coverage for the new specification including configuration parsing, deploy config generation, and localization handling

How to test your changes?

  1. Create a new extension with type admin_link
  2. Verify the extension loads correctly with the new specification
  3. Test that localization features work as expected
  4. Confirm that asset inclusion works for targeting configuration fields

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Copy Markdown
Member Author

vividviolet commented Mar 31, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/conf-store.d.ts
@@ -24,7 +24,6 @@ export interface ConfSchema {
     devSessionStore?: string;
     currentDevSessionId?: string;
     cache?: Cache;
-    autoUpgradeEnabled?: boolean;
 }
 /**
  * Get session.
@@ -126,18 +125,6 @@ interface RunWithRateLimitOptions {
  * @returns true, or undefined if the task was not run.
  */
 export declare function runWithRateLimit(options: RunWithRateLimitOptions, config?: LocalStorage<ConfSchema>): Promise<boolean>;
-/**
- * Get auto-upgrade preference.
- *
- * @returns Whether auto-upgrade is enabled, or undefined if never set.
- */
-export declare function getAutoUpgradeEnabled(config?: LocalStorage<ConfSchema>): boolean | undefined;
-/**
- * Set auto-upgrade preference.
- *
- * @param enabled - Whether auto-upgrade should be enabled.
- */
-export declare function setAutoUpgradeEnabled(enabled: boolean, config?: LocalStorage<ConfSchema>): void;
 export declare function getConfigStoreForPartnerStatus(): LocalStorage<Record<string, {
     status: true;
     checkedAt: string;
packages/cli-kit/dist/private/node/constants.d.ts
@@ -33,7 +33,6 @@ export declare const environmentVariables: {
     neverUsePartnersApi: string;
     skipNetworkLevelRetry: string;
     maxRequestTimeForNetworkCalls: string;
-    disableImportScanning: string;
 };
 export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
 export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/public/node/fs.d.ts
@@ -1,6 +1,6 @@
 import { OverloadParameters } from '../../private/common/ts/overloaded-parameters.js';
 import { RandomNameFamily } from '../common/string.js';
-import { findUp as internalFindUp, findUpSync as internalFindUpSync } from 'find-up';
+import { findUp as internalFindUp } from 'find-up';
 import { ReadStream, WriteStream } from 'fs';
 import type { Pattern, Options as GlobOptions } from 'fast-glob';
 /**
@@ -335,14 +335,6 @@ export declare function defaultEOL(): EOL;
  * @returns The first path found that matches or  if none could be found.
  */
 export declare function findPathUp(matcher: OverloadParameters<typeof internalFindUp>[0], options: OverloadParameters<typeof internalFindUp>[1]): ReturnType<typeof internalFindUp>;
-/**
- * Find a file by walking parent directories.
- *
- * @param matcher - A pattern or an array of patterns to match a file name.
- * @param options - Options for the search.
- * @returns The first path found that matches or  if none could be found.
- */
-export declare function findPathUpSync(matcher: OverloadParameters<typeof internalFindUp>[0], options: OverloadParameters<typeof internalFindUp>[1]): ReturnType<typeof internalFindUpSync>;
 export interface MatchGlobOptions {
     matchBase: boolean;
     noglobstar: boolean;
packages/cli-kit/dist/public/node/import-extractor.d.ts
@@ -1,12 +1,6 @@
-/**
- * Clears all import-scanning caches (direct imports, recursive results, and filesystem stats).
- * Should be called when watched files change so that rescanning picks up updated imports.
- */
-export declare function clearImportPathsCache(): void;
 /**
  * Extracts import paths from a source file.
  * Supports JavaScript, TypeScript, and Rust files.
- * Results are cached per file path to avoid redundant I/O.
  *
  * @param filePath - Path to the file to analyze.
  * @returns Array of absolute paths to imported files.
@@ -23,17 +17,6 @@ export declare function extractImportPaths(filePath: string): string[];
  * @throws If an unexpected error occurs while processing files (not including ENOENT file not found errors).
  */
 export declare function extractImportPathsRecursively(filePath: string, visited?: Set<string>): string[];
-/**
- * Returns diagnostic information about the import scanning caches.
- * Useful for debugging performance issues with --verbose.
- *
- * @returns Cache size stats for directImports, fileExists, and isDir.
- */
-export declare function getImportScanningCacheStats(): {
-    directImports: number;
-    fileExists: number;
-    isDir: number;
-};
 /**
  * Extracts import paths from a JavaScript content.
  *
packages/cli-kit/dist/public/node/is-global.d.ts
@@ -26,14 +26,6 @@ export declare function installGlobalCLIPrompt(): Promise<InstallGlobalCLIPrompt
  * Infers the package manager used by the global CLI.
  *
  * @param argv - The arguments passed to the process.
- * @param env - The environment variables of the process.
  * @returns The package manager used by the global CLI.
  */
-export declare function inferPackageManagerForGlobalCLI(argv?: string[], env?: NodeJS.ProcessEnv): PackageManager;
-/**
- * Returns the project directory for the given path.
- *
- * @param directory - The path to search upward from.
- * @returns The project root directory, or undefined if not found.
- */
-export declare function getProjectDir(directory: string): string | undefined;
\ No newline at end of file
+export declare function inferPackageManagerForGlobalCLI(argv?: string[]): PackageManager;
\ No newline at end of file
packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -25,7 +25,7 @@ export type DependencyType = 'dev' | 'prod' | 'peer';
 /**
  * A union that represents the package managers available.
  */
-export declare const packageManager: readonly ["yarn", "npm", "pnpm", "bun", "homebrew", "unknown"];
+export declare const packageManager: readonly ["yarn", "npm", "pnpm", "bun", "unknown"];
 export type PackageManager = (typeof packageManager)[number];
 /**
  * Returns an abort error that's thrown when the package manager can't be determined.
packages/cli-kit/dist/public/node/upgrade.d.ts
@@ -4,38 +4,11 @@
  *
  * @returns A string with the command to run.
  */
-export declare function cliInstallCommand(): string | undefined;
-/**
- * Runs the CLI upgrade using the appropriate package manager.
- * Determines the install command and executes it.
- *
- * @throws AbortError if the package manager or command cannot be determined.
- */
-export declare function runCLIUpgrade(): Promise<void>;
-/**
- * Returns the version to auto-upgrade to, or undefined if auto-upgrade should be skipped.
- * Auto-upgrade is disabled by default and must be enabled via .
- * Also skips for CI, pre-release versions, or when no newer version is available.
- *
- * @returns The version string to upgrade to, or undefined if no upgrade should happen.
- */
-export declare function versionToAutoUpgrade(): string | undefined;
-/**
- * Shows a daily upgrade-available warning for users who have not enabled auto-upgrade.
- * Skipped in CI and for pre-release versions. When auto-upgrade is enabled this is a no-op
- * because the postrun hook will handle the upgrade directly.
- */
-export declare function warnIfUpgradeAvailable(): Promise<void>;
+export declare function cliInstallCommand(): string;
 /**
  * Generates a message to remind the user to update the CLI.
  *
  * @param version - The version to update to.
  * @returns The message to remind the user to update the CLI.
  */
-export declare function getOutputUpdateCLIReminder(version: string): string;
-/**
- * Prompts the user to enable or disable automatic upgrades, then persists their choice.
- *
- * @returns Whether the user chose to enable auto-upgrade.
- */
-export declare function promptAutoUpgrade(): Promise<boolean>;
\ No newline at end of file
+export declare function getOutputUpdateCLIReminder(version: string): string;
\ No newline at end of file
packages/cli-kit/dist/public/node/version.d.ts
@@ -18,13 +18,4 @@ export declare function globalCLIVersion(): Promise<string | undefined>;
  * @param version - The version to check.
  * @returns True if the version is a pre-release version.
  */
-export declare function isPreReleaseVersion(version: string): boolean;
-/**
- * Checks if there is a major version change between two versions.
- * Pre-release versions (0.0.0-*) are treated as not having a major version change.
- *
- * @param currentVersion - The current version.
- * @param newerVersion - The newer version to compare against.
- * @returns True if there is a major version change.
- */
-export declare function isMajorVersionChange(currentVersion: string, newerVersion: string): boolean;
\ No newline at end of file
+export declare function isPreReleaseVersion(version: string): boolean;
\ No newline at end of file
packages/cli-kit/dist/private/node/api/graphql.d.ts
@@ -1,14 +1,4 @@
 import { Variables } from 'graphql-request';
 export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: Record<string, string>): void;
 export declare function sanitizeVariables(variables: Variables): string;
-/**
- * Extracts human-readable error messages from a GraphQL errors array.
- *
- * Some APIs (e.g. App Management) return structured errors nested inside
- * . When those are present, we extract
- * them so the CLI displays a clean message instead of a raw JSON dump.
- * Falls back to each error's top-level  field, and ultimately to
- * the full JSON representation if no messages can be extracted.
- */
-export declare function extractGraphQLErrorMessages(errors: any[] | undefined): string | undefined;
 export declare function errorHandler(api: string): (error: unknown, requestId?: string) => unknown;
\ No newline at end of file
packages/cli-kit/dist/public/node/hooks/postrun.d.ts
@@ -5,11 +5,4 @@ import { Hook } from '@oclif/core';
  * @returns Whether post run hook has completed.
  */
 export declare function postRunHookHasCompleted(): boolean;
-export declare const hook: Hook.Postrun;
-/**
- * Auto-upgrades the CLI after a command completes, if a newer version is available.
- * The entire flow is rate-limited to once per day unless forced via SHOPIFY_CLI_FORCE_AUTO_UPGRADE.
- *
- * @returns Resolves when the upgrade attempt (or fallback warning) is complete.
- */
-export declare function autoUpgradeIfNeeded(): Promise<void>;
\ No newline at end of file
+export declare const hook: Hook.Postrun;
\ No newline at end of file
packages/cli-kit/dist/public/node/hooks/prerun.d.ts
@@ -11,7 +11,6 @@ export declare function parseCommandContent(cmdInfo: {
     pluginAlias?: string;
 }): CommandContent;
 /**
- * Triggers a background check for a newer CLI version (non-blocking).
- * The result is cached and consumed by the postrun hook for auto-upgrade.
+ * Warns the user if there is a new version of the CLI available
  */
-export declare function checkForNewVersionInBackground(): void;
\ No newline at end of file
+export declare function warnOnAvailableUpgrade(): Promise<void>;
\ No newline at end of file

@isaacroldan isaacroldan changed the base branch from add_manifest_to_include_files_step to graphite-base/7132 March 31, 2026 14:00
@github-actions
Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.43% 15224/18468
🟡 Branches 74.89% 7522/10044
🟢 Functions 81.51% 3821/4688
🟢 Lines 82.84% 14381/17361

Test suite run success

4003 tests passing in 1529 suites.

Report generated by 🧪jest coverage report action from 8285bfa

@vividviolet vividviolet force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from 8285bfa to b6f06e9 Compare March 31, 2026 17:06
@vividviolet vividviolet changed the base branch from graphite-base/7132 to 03-31-support_intents_for_ui_extensions March 31, 2026 17:06
@isaacroldan isaacroldan changed the base branch from 03-31-support_intents_for_ui_extensions to graphite-base/7132 April 1, 2026 08:52
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from b6f06e9 to c9ad45a Compare April 1, 2026 08:53
@isaacroldan isaacroldan changed the base branch from graphite-base/7132 to add_manifest_to_include_files_step April 1, 2026 08:53
@isaacroldan isaacroldan force-pushed the add_manifest_to_include_files_step branch from 96d95ba to d8b0d4a Compare April 1, 2026 08:53
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from c9ad45a to 5c93642 Compare April 1, 2026 08:53
@isaacroldan isaacroldan changed the base branch from add_manifest_to_include_files_step to graphite-base/7132 April 1, 2026 08:54
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from 5c93642 to 43ebe94 Compare April 1, 2026 08:54
@isaacroldan isaacroldan changed the base branch from graphite-base/7132 to 03-31-support_intents_for_ui_extensions April 1, 2026 08:54
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from 43ebe94 to f5b0e94 Compare April 1, 2026 09:06
@isaacroldan isaacroldan force-pushed the 03-31-support_intents_for_ui_extensions branch from 6e09feb to 5c1ddf1 Compare April 1, 2026 09:06
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from f5b0e94 to 7dc8946 Compare April 1, 2026 09:26
@isaacroldan isaacroldan force-pushed the 03-31-support_intents_for_ui_extensions branch from 5c1ddf1 to 06dee38 Compare April 1, 2026 09:26
@isaacroldan isaacroldan force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from 7dc8946 to ce6f08e Compare April 1, 2026 10:11
@isaacroldan isaacroldan force-pushed the 03-31-support_intents_for_ui_extensions branch from 06dee38 to 40bf3e5 Compare April 1, 2026 10:11
@vividviolet vividviolet force-pushed the 03-31-support_assets_for_admin_links_app_intents branch from ce6f08e to 35abde3 Compare April 1, 2026 20:27
@vividviolet vividviolet force-pushed the 03-31-support_intents_for_ui_extensions branch from 40bf3e5 to 8ce58c4 Compare April 1, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant