Improve application asset management (#22564)

App manifests could point the logo and screenshots at either external
URLs or public folder paths, and that was handled inconsistently across
install, sync and the marketplace.

This makes assets always bundled files:

- Manifests now use `logo` and `galleryImages` (a `string[]` of public
folder paths) instead of `logoUrl` and `screenshots`. The old fields
still work but are deprecated. Gallery order comes from the array index.
Normalization (deprecated-field migration, and warning about + ignoring
external URLs) happens in `defineApplication`, so the warnings surface
at define time.
- Logo is stored as a File record (`logoFileId`).
- The registration gallery is configured via a `settings` jsonb column
on `applicationRegistration` (`{ galleryImages: string[] }`) — populated
from the manifest, read by the marketplace detail (falling back to the
legacy `screenshots` column, then the manifest). No dedicated gallery
table.
- The marketplace detail DTO and front now use `galleryImages`.

Verified against a local Postgres: the fast instance commands run with
no pending-migration diff, the schema is correct, and the server boots.
Typecheck, lint, codegen and the application unit tests pass.

Not included yet: rehosting assets into storage for npm catalog and
tarball registrations, versioned cache busting on the serving route, and
a backfill for existing installs.

<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22564?utm_source=github"
rel="nofollow noreferrer noopener" target="_blank">``&lt;img alt="Review
in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"&gt;``</a>
This commit is contained in:
martmull
2026-07-10 11:18:52 +02:00
committed by GitHub
parent 4cce9b1544
commit 23cae2040a
38 changed files with 594 additions and 75 deletions
@@ -10,7 +10,7 @@ Your app works. The last step is to describe it for the marketplace and publish.
The [application config](/developers/extend/apps/config/application) carries the
identity that shows up in the marketplace: author, category, logo, and support
links. Put a logo in `public/` and reference it with `logoUrl`.
links. Put a logo in `public/` and reference it with `logo`.
```ts filename="src/application-config.ts"
import { defineApplication } from 'twenty-sdk/define';
@@ -20,7 +20,7 @@ export default defineApplication({
displayName: 'Document Generator',
description:
'Create reusable document templates and generate personalized documents from your CRM records.',
logoUrl: 'public/document-generator.svg',
logo: 'public/document-generator.svg',
author: 'Twenty',
category: 'Productivity',
websiteUrl: 'https://docs.twenty.com/developers/extend/apps',
@@ -44,13 +44,13 @@ Also add the `twenty-app` keyword to `package.json` so the app is discoverable:
## Add gallery screenshots
A marketplace listing sells itself with screenshots. Drop a few PNGs in
`public/gallery/` and reference them with `screenshots` — they render as a gallery
on the listing page.
`public/gallery/` and reference them with `galleryImages` — they render as a
gallery on the listing page, in array order.
```ts filename="src/application-config.ts"
export default defineApplication({
// ...identity from above
screenshots: [
galleryImages: [
'public/gallery/01-generated-document.png',
'public/gallery/02-command-menu.png',
'public/gallery/03-template-editor.png',