Conversation
|
@Innders if you could help me with this one, you'd have it much faster than me: The idea is to have a button here: That would:
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a "bundle per project" feature that allows projects to have their own custom bundles for addon management. The implementation includes frontend UI for creating project bundles, assigning them to projects, and displaying them in the settings interface.
- Converts several JavaScript files to TypeScript for better type safety
- Adds project bundle creation and assignment functionality
- Implements new UI components for managing project-specific bundles
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/addonSettings.js | Adds support for project bundle parameters in addon settings API |
| src/pages/SettingsPage/Bundles/types.ts | Defines TypeScript types for addon and bundle structures |
| src/pages/SettingsPage/Bundles/NewBundle.tsx | Converts to TypeScript and adds project bundle creation |
| src/pages/SettingsPage/Bundles/BundleForm.tsx | Creates new TypeScript component for bundle form with project switch |
| src/containers/AddonSettings/BundlesSelector.tsx | New component for selecting bundles with project bundle support |
| src/components/PerProjectBundleConfig/* | New components for project bundle configuration dialog |
| shared/src/api/queries/project/updateProject.ts | Updates API queries for project bundle management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| isEqual(formData.addonDevelopment, (previousFormData as any)?.addonDevelopment) && | ||
| formData.name === (previousFormData as any)?.name |
There was a problem hiding this comment.
Using 'as any' type assertion bypasses type safety. Since previousFormData is already typed as LocalBundleFormData | null, you should handle the null case explicitly rather than using 'as any'.
| isEqual(formData.addonDevelopment, (previousFormData as any)?.addonDevelopment) && | |
| formData.name === (previousFormData as any)?.name | |
| isEqual(formData.addonDevelopment, previousFormData?.addonDevelopment) && | |
| formData.name === previousFormData?.name |
| {Shortcuts && ( | ||
| <Shortcuts shortcuts={shortcuts as any} deps={[addons, selectedAddons] as any} /> | ||
| )} |
There was a problem hiding this comment.
The condition 'Shortcuts &&' suggests Shortcuts might be undefined, but it's used as a JSX component. If Shortcuts is an optional import, this should be handled properly or the component should be imported correctly.
| {Shortcuts && ( | |
| <Shortcuts shortcuts={shortcuts as any} deps={[addons, selectedAddons] as any} /> | |
| )} | |
| <Shortcuts shortcuts={shortcuts as any} deps={[addons, selectedAddons] as any} /> |
| let { data: { bundles = [] } = {} } = useListBundlesQuery({ archived: true }) as any | ||
| const currentProductionAddons = useMemo( | ||
| () => (bundles as any[]).find((b: any) => b.isProduction)?.addons || {}, |
There was a problem hiding this comment.
Using 'as any' type assertion removes type safety. The query should be properly typed to avoid potential runtime errors.
| let { data: { bundles = [] } = {} } = useListBundlesQuery({ archived: true }) as any | |
| const currentProductionAddons = useMemo( | |
| () => (bundles as any[]).find((b: any) => b.isProduction)?.addons || {}, | |
| const { data: { bundles = [] } = {} } = useListBundlesQuery({ archived: true }) as { | |
| data?: { bundles?: Bundle[] } | |
| } | |
| const currentProductionAddons = useMemo( | |
| () => (bundles as Bundle[]).find((b: Bundle) => b.isProduction)?.addons || {}, |
iLLiCiTiT
left a comment
There was a problem hiding this comment.
Except those 2 UX changes it looks good. But merging should wait for release of AYON launcher.
|
AYON launcher 1.4.0 released, we can merge this. |





This is a prototype of bundles-per-project frontend. It covers just the basics needed for the backend development ( ynput/ayon-backend#521 )
Concepts
Project bundle
Project bundle is a special type of bundle, that can only contain addons that explicitly allow per-project override (
allowProjectOverrideboolean flag in/api/addons).When creating a bundle. formData is also populated with addon versions from the current production, so compatibility check works, but it is not possible to change versions of these "inherited" addons. When the bundle is saved, backend removes inherited addons and stores only the overrides in the database
Project bundle setting
Assigning a project bundle to a project is done by
[POST] /projects/{projectName}/bundles, that accepts json payload with fieldsproductionandstaging(you may set different project bunldes for each variant). When set tonull, project bundle override is removed and project will use the studio production (or staging) bundle.Settings
[GET] /api/settingsrequest returns a list of addons that combines studio and project bundle, when project name argument is specified. AddonList component in the addon setting container can display inherited addons differently.Steps
Design
Creating project bundles
New "project bundle" switch for setting a bundle as a project bundle.

Settings bundle selector redesign
Set project bundle