notify extension dev server of app assets updates#7227
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2670bff to
7fd0331
Compare
1e0e9ea to
7efd3f7
Compare
73363b9 to
8e75a20
Compare
7efd3f7 to
85f5b0f
Compare
8e75a20 to
52ef686
Compare
85f5b0f to
4c6daca
Compare
52ef686 to
9cd7adc
Compare
4c6daca to
1ba2dd9
Compare
9cd7adc to
dc2a701
Compare
1ba2dd9 to
5dfacdb
Compare
dc2a701 to
c6ca3d1
Compare
82d0865 to
8c27933
Compare
665154d to
a1b4321
Compare
8c27933 to
fc760cc
Compare
a1b4321 to
fa4c046
Compare
3383e69 to
d1271b9
Compare
b655072 to
3dc00e6
Compare
535fde3 to
5399272
Compare
d1271b9 to
06b34f4
Compare
5399272 to
42083ba
Compare
42083ba to
c77befd
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the local UI extensions development server to support serving app-level assets (notably admin static_root) and to propagate related metadata (URLs + timestamps) through the extensions payload so clients can fetch and refresh those assets during development.
Changes:
- Adds
app.allowed_domainsandapp.assetsmetadata into the extensions payload and shared type definitions. - Introduces an HTTP middleware + route (
/extensions/assets/:assetKey/...) for serving app assets from configured directories. - Expands dev file watching and build/include-assets behavior (watch
realExtensions; overwrite generatedmanifest.json; admin spec updates).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-extensions-server-kit/src/types.ts | Extends App payload types with allowed_domains and assets. |
| packages/app/src/cli/services/dev/processes/setup-dev-processes.ts | Passes realExtensions into previewable extension process setup. |
| packages/app/src/cli/services/dev/processes/dev-session/dev-session.ts | Workaround to always include admin in update manifests. |
| packages/app/src/cli/services/dev/extension/server/middlewares.ts | Adds middleware to serve app assets by key/path. |
| packages/app/src/cli/services/dev/extension/server.ts | Registers the new app-assets route when asset directories exist. |
| packages/app/src/cli/services/dev/extension/payload/store.ts | Adds admin-derived app config/assets to payload and tracks asset directories/timestamps. |
| packages/app/src/cli/services/dev/extension/payload/store.test.ts | Adjusts store option mocks for new constructor usage. |
| packages/app/src/cli/services/dev/extension/payload/models.ts | Updates payload interface with new app fields. |
| packages/app/src/cli/services/dev/extension.ts | Triggers admin config/timestamp updates on extension events; refactors server setup call. |
| packages/app/src/cli/services/dev/extension.test.ts | Updates mocks/assertions for new payload store methods. |
| packages/app/src/cli/services/dev/app-events/file-watcher.ts | Watches realExtensions files (including config extensions). |
| packages/app/src/cli/services/build/steps/include-assets/generate-manifest.ts | Changes manifest generation to overwrite existing manifest.json. |
| packages/app/src/cli/services/build/steps/include-assets-step.test.ts | Updates tests to expect manifest overwrite behavior. |
| packages/app/src/cli/models/extensions/specifications/admin.ts | Adds allowed_domains to schema; exports AdminConfigType; watches static_root files. |
| packages/app/src/cli/models/extensions/specification.ts | No functional change (formatting). |
| packages/app/src/cli/models/extensions/extension-instance.ts | Uses isAppConfigExtension when deciding default dev-session watch behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9dd6439 to
8cb333a
Compare
8cb333a to
06b860d
Compare
| url: string | ||
| mobileUrl: string | ||
| title: string | ||
| allowed_domains?: string[] |
There was a problem hiding this comment.
Can we make this allowedDomains so it's consistent with the other fields which are camel cased?
| this.emitUpdate([extension.devUUID]) | ||
| } | ||
|
|
||
| updateAdminConfigFromExtensionEvents(extensionEvents: ExtensionEvent[]) { |
There was a problem hiding this comment.
Should we considering passing the extension type as an array of types parameter in case there are in the future other app configs that need extension event?
There was a problem hiding this comment.
This a very specific and special case and I don't expect something similar to happen again.
UI Extensions are already handled in a generic way, if at any point appears other extension with custom behavoiur we can see how to generalize it.
06b860d to
810b2e3
Compare
…Config Co-authored-by: Claude Code <claude-code@anthropic.com>
810b2e3 to
b93e0fe
Compare
Co-authored-by: Claude Code <claude-code@anthropic.com>
Co-authored-by: Claude Code <claude-code@anthropic.com>

WHY are these changes introduced?
During local development, the extension dev server needs to serve app-level assets (e.g., admin static_root files) and expose app configuration like allowed_domains so the dev console and host can
properly load and refresh them.
WHAT is this pull request doing?
How to test your changes?