Skip to content

notify extension dev server of app assets updates#7227

Open
isaacroldan wants to merge 2 commits into04-08-extract_custom_watch_paths_to_specificationsfrom
04-09-notify_extension_dev_server_of_app_assets_updates
Open

notify extension dev server of app assets updates#7227
isaacroldan wants to merge 2 commits into04-08-extract_custom_watch_paths_to_specificationsfrom
04-09-notify_extension_dev_server_of_app_assets_updates

Conversation

@isaacroldan
Copy link
Copy Markdown
Contributor

@isaacroldan isaacroldan commented Apr 9, 2026

WHY are these changes introduced?

Adds support for serving app-level assets (such as admin static files) through the development server to enable proper asset handling during local development.

WHAT is this pull request doing?

  • Adds appAssetsConfig interface to extension specifications to define asset configuration
  • Implements appAssetsConfig for admin extensions to handle static_root configuration
  • Creates new HTTP middleware to serve app assets at /extensions/assets/:assetKey/ endpoints
  • Adds asset metadata to the extensions payload including URLs and timestamps
  • Updates file watcher to monitor all real extensions instead of just non-config extensions
  • Changes manifest generation to overwrite existing manifest.json files instead of throwing errors
  • Includes asset timestamp updates when extension events occur
  • Adds workaround to always include admin extension in dev session manifests

How to test your changes?

  1. Create an app with an admin extension that has static_root configured
  2. Add static assets to the configured directory
  3. Run shopify app dev
  4. Verify assets are accessible at the generated asset URLs
  5. Modify assets and confirm timestamps update properly
  6. Test that manifest.json generation works when files already exist

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing, so I've added a changelog entry with pnpm changeset add

Copy link
Copy Markdown
Contributor Author

isaacroldan commented Apr 9, 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.

@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from 2670bff to 7fd0331 Compare April 9, 2026 10:25
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch 2 times, most recently from 1e0e9ea to 7efd3f7 Compare April 9, 2026 13:12
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch 2 times, most recently from 73363b9 to 8e75a20 Compare April 9, 2026 13:24
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 7efd3f7 to 85f5b0f Compare April 9, 2026 13:24
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from 8e75a20 to 52ef686 Compare April 9, 2026 13:26
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 85f5b0f to 4c6daca Compare April 9, 2026 13:26
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from 52ef686 to 9cd7adc Compare April 9, 2026 13:29
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 4c6daca to 1ba2dd9 Compare April 9, 2026 13:29
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from 9cd7adc to dc2a701 Compare April 9, 2026 13:35
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 1ba2dd9 to 5dfacdb Compare April 9, 2026 13:35
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from dc2a701 to c6ca3d1 Compare April 9, 2026 13:38
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 82d0865 to 8c27933 Compare April 9, 2026 14:13
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch 2 times, most recently from 665154d to a1b4321 Compare April 9, 2026 14:19
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from 8c27933 to fc760cc Compare April 9, 2026 14:19
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from a1b4321 to fa4c046 Compare April 9, 2026 14:28
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch 2 times, most recently from 3383e69 to d1271b9 Compare April 9, 2026 14:32
@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch 5 times, most recently from b655072 to 3dc00e6 Compare April 9, 2026 16:04
@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/ui.d.ts
 import { Logger, LogLevel } from '../../public/node/output.js';
-import React from 'react';
 import { Key, RenderOptions } from 'ink';
 import { EventEmitter } from 'events';
-/**
- * Signal that the current Ink tree is done. Must be called within an
- * InkLifecycleRoot — throws if the provider is missing so lifecycle
- * bugs surface immediately instead of silently hanging.
- */
-export declare function useComplete(): (error?: Error) => void;
-/**
- * Root wrapper for Ink trees. Owns the single `exit()` call site — children
- * signal completion via `useComplete()`, which sets state here. The `useEffect`
- * fires post-render, guaranteeing all batched state updates have been flushed
- * before the tree is torn down.
- */
-export declare function InkLifecycleRoot({ children }: {
-    children: React.ReactNode;
-}): React.JSX.Element;
 interface RenderOnceOptions {
     logLevel?: LogLevel;
     logger?: Logger;
     renderOptions?: RenderOptions;
 }
 export declare function renderOnce(element: JSX.Element, { logLevel, renderOptions }: RenderOnceOptions): string | undefined;
-export declare function render(element: JSX.Element, options?: RenderOptions): Promise<void>;
+export declare function render(element: JSX.Element, options?: RenderOptions): Promise<unknown>;
 export declare class Stdout extends EventEmitter {
     columns: number;
     rows: number;
     readonly frames: string[];
     private _lastFrame?;
     constructor(options: {
         columns?: number;
         rows?: number;
     });
     write: (frame: string) => void;
     lastFrame: () => string | undefined;
 }
 export declare function handleCtrlC(input: string, key: Key, exit?: () => void): void;
 export {};
packages/cli-kit/dist/public/node/ui.d.ts
@@ -34,7 +34,7 @@ export interface RenderConcurrentOptions extends PartialBy<ConcurrentOutputProps
  * 00:00:00 │ frontend │ third frontend message
  *
  */
-export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<void>;
+export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<unknown>;
 export type AlertCustomSection = CustomSection;
 export type RenderAlertOptions = Omit<AlertOptions, 'type'>;
 /**

@isaacroldan isaacroldan force-pushed the 04-09-notify_extension_dev_server_of_app_assets_updates branch from 535fde3 to 5399272 Compare April 10, 2026 15:40
@isaacroldan isaacroldan force-pushed the 04-08-extract_custom_watch_paths_to_specifications branch from d1271b9 to 06b34f4 Compare April 10, 2026 15:40
@isaacroldan isaacroldan marked this pull request as ready for review April 10, 2026 15:42
@isaacroldan isaacroldan requested a review from a team as a code owner April 10, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant