839 Commits

Author SHA1 Message Date
benjdlambert 219cc05885 fix(create-app): remove disabled nav-item config that breaks custom sidebar
The nav-item extensions were disabled in the template config to prevent
duplicate rendering, but the custom sidebar already handles this via
nav.take(). After #33788 added filtering of disabled nav items from page
discovery, disabling them causes nav.take('page:catalog') to return
nothing, breaking the sidebar navigation.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 09:08:02 +02:00
Fredrik Adelöw d61a91846e fix(create-app): pin jest and @jest/environment-jsdom-abstract to ~30.2.0
30.4.0 introduced synchronous require(ESM) that requires Node v24.9+,
breaking tests on Node 22. 30.3.0 pulls in @sinonjs/fake-timers@^15
which conflicts with @types/sinon@^17 (used by aws-sdk-client-mock).
30.2.0 avoids both issues cleanly.

Resets lockfile to a clean base-install from master constraints.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 15:04:51 +02:00
Fredrik Adelöw e7020fa352 fix(create-app): pin @jest/environment-jsdom-abstract to ~30.3.0 alongside jest
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 14:46:37 +02:00
Fredrik Adelöw 9198a7f03e fix(create-app): pin jest to ~30.3.0 to avoid Node 24.9+ requirement
Jest 30.4.0 introduced synchronous require(ESM) support that requires
Node v24.9+. With ^30.2.0 in the templates, a fresh yarn install in
e2e test apps resolves to 30.4.x and breaks on Node 22.

Pin to ~30.3.0 (30.3.x patches only), which includes the 30.3.0 fix
that explicitly disables the require_module feature flag, while staying
below the 30.4.0 runtime requirement.

Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-11 14:46:36 +02:00
Patrik Oldsberg 6541cbfc58 Remove stray package.json from create-app templates
These empty `{}` files were accidentally committed during the template
directory rename and override the properly templated package.json
generated from package.json.hbs, causing E2E tests to fail.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 7fc1a406d2 Increase E2E timeouts for default-app template
The new frontend system app takes longer to compile and render on
Windows CI runners. Switch from port-based to URL-based server
readiness detection and increase expect timeout to 30s to avoid
flaky failures on slow runners.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 02a0f0dfa0 Use exact match for sidebar link assertions in E2E template test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 25418372e0 create-app: rename template directories
Rename `next-app` to `default-app` and `default-app` to `legacy-app`
to better reflect their roles.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:51:27 +02:00
Andre Wanlin 72a493a56a create-app - Added the mcp-actions-backend plugin
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Minor corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Default to false

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added tip

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

More feedback changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Reorder auth

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-09 08:33:59 -05:00
Patrik Oldsberg daaaa72ebb e2e: use exact name matching for sidebar link assertions
New plugin nav items like "Catalog Graph" cause Playwright's
substring-based getByRole name matching to find multiple elements
when searching for "Catalog". Switch to exact: true.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-25 22:53:03 +01:00
Patrik Oldsberg a49d871524 Merge pull request #33451 from backstage/rugvip/create-app-fixes
create-app: improve next template sidebar, nav wiring, and examples
2026-03-20 14:56:44 +01:00
Patrik Oldsberg 54b88a8607 create-app: remove redundant extension config
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:59 +01:00
Patrik Oldsberg 288a997236 create-app: move down app visualizer sidebar item
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:58 +01:00
Patrik Oldsberg ae4963eacb create-app: remove unnecessary core-compat-api usage
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:58 +01:00
Patrik Oldsberg 016098080a create-app: add example techdocs page
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-20 12:29:56 +01:00
Patrik Oldsberg 66c56c192e create-app: use nav system for settings sidebar item
Replace the hardcoded SidebarSettings component with nav.take('page:user-settings') in the create-app template sidebar, so that the user-settings nav item is rendered via the nav system.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-20 09:05:37 +01:00
Johan Persson d66a3ec9ab feat(frontend-plugin-api): add titleRouteRef to PageBlueprint
Add `titleRouteRef` to `PageLayoutProps` so the plugin header title
links back to the plugin root. `PageBlueprint` resolves it from
`plugin.routes.root` with fallback to `params.routeRef`.

- PageLayout swap resolves the title link via a conditional child
  component that calls `useRouteRef` only when a route ref exists
- Header actions get stable React keys via `cloneElement`

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-20 09:05:23 +01:00
Patrik Oldsberg 4cf9f3a965 create-app: remove unnecessary @backstage/cli-module-new dependency
Removed the direct @backstage/cli-module-new devDependency from the
next-app template since it is already included transitively through
@backstage/cli-defaults.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-18 11:02:34 +01:00
Patrik Oldsberg 8dda73d806 create-app: fix duplicate search item in next-app
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 20:13:06 +01:00
Patrik Oldsberg 4568618cf1 create-app: fix next-app e2e sign-in assertion
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:18:02 +01:00
Patrik Oldsberg 7cd15e7c90 create-app: fix next-app template formatting
Align the next-app template output with the scaffolded app Prettier config so the default app E2E checks pass.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 16:17:18 +01:00
Patrik Oldsberg 08d9770715 cli: Rename frontend plugin templates and add auto-detection
Renamed the CLI templates for frontend plugins:
- new-frontend-plugin → frontend-plugin
- new-frontend-plugin-module → frontend-plugin-module
- frontend-plugin (legacy) → legacy-frontend-plugin

Added auto-detection logic that checks packages/app/package.json to
determine which frontend system the app uses. When using default
templates, only the appropriate frontend plugin template is shown:
- Apps with @backstage/frontend-defaults see the new system templates
- Apps with @backstage/app-defaults see the legacy template

Both templates display as "frontend-plugin" to users, so existing
workflows are preserved while automatically using the correct template.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 16:17:17 +01:00
Johan Persson c548a0ff86 refactor(catalog,api-docs): migrate entity table cards to BUI (#33260)
* feat(catalog-react): add EntityDataTable and EntityRelationCard components

Add EntityDataTable (BUI Table wrapper for entity data) and
EntityRelationCard (card shell + data fetching + table) as shared
building blocks for entity relation table cards. Includes BUI column
factories, column presets for common entity types, and a new
translation key for the empty state help link.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog): migrate 8 entity table cards to EntityRelationCard

Rewrite HasComponentsCard, HasResourcesCard, HasSubcomponentsCard,
HasSubdomainsCard, HasSystemsCard, DependsOnComponentsCard,
DependsOnResourcesCard, and DependencyOfComponentsCard as thin
wrappers around EntityRelationCard from catalog-react. Remove variant
and tableOptions props.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(api-docs): migrate 5 entity table cards to EntityRelationCard

Rewrite ConsumedApisCard, ProvidedApisCard, HasApisCard,
ConsumingComponentsCard, and ProvidingComponentsCard to use
EntityRelationCard from catalog-react. Add BUI column presets for
API-specific columns alongside existing MUI presets. Remove variant
and tableOptions props.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* chore: add API reports and changesets for entity table card migration

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react,api-docs): refine entity card migration

Use BUI Alert for error states and BUI Link for empty state help
links in EntityRelationCard instead of core-components. Replace MUI
ToggleButton with BUI ButtonIcon for the API definition column.
Add trailing periods to empty state translation messages. Fix tests
asserting on removed external link icon SVG.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* feat(catalog-react): add column sorting to EntityDataTable

Introduce EntityColumnConfig extending ColumnConfig with an optional
sortValue getter. EntityDataTable now uses useTable with a sortFn
that reads sortValue from each column, restoring the per-column
sorting that the old core-components Table provided by default. All
built-in column factories set isSortable and sortValue.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(api-docs): use dynamic entity kind in empty state messages

Restore entity.kind interpolation in ConsumedApisCard, ProvidedApisCard,
and HasApisCard empty state translations instead of hardcoded strings.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react): use data length for useTable pageSize

Replace pageSize: Infinity with tableData.length to avoid potential
edge cases in pagination math.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(catalog-react): avoid this binding in column factories

Use columnFactories.createEntityRelationColumn instead of
this.createEntityRelationColumn so the methods work when
destructured.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* chore: update alpha API reports

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(create-app): remove variant prop from migrated entity cards in template

The create-app template EntityPage still passed variant="gridItem"
to cards that no longer accept it.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* test(catalog-react): add tests for EntityDataTable and EntityRelationCard

Cover rendering with data, empty state, error state, and column
sorting for EntityDataTable. Cover title rendering, empty state
with help link, related entity display, and error state for
EntityRelationCard.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog,api-docs): add backwards compatibility for legacy props

Support both old (variant, columns, tableOptions) and new (columnConfig)
props via a discriminated union type. When legacy props are detected the
old MUI-based implementation is used; otherwise the new BUI-based
EntityRelationCard renders. This avoids immediate breaking changes and
provides a migration path. Changesets downgraded from major/minor to
minor/patch accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* refactor(catalog-react,catalog,api-docs): address review feedback

Remove BaseProps types and use inline union in component signatures.
Move EntityDataTable, EntityRelationCard, and related types to alpha
exports. Group column presets and help links into entityColumnPresets
object. Update all consumers and API reports.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 14:33:45 +00:00
Patrik Oldsberg ea90ab0590 Move yarn new templates from @backstage/cli to @backstage/cli-module-new
The built-in templates used by `yarn new` are moved from `packages/cli/templates/`
to `packages/cli-module-new/templates/`, colocating them with the code that
consumes them.

A backwards compatibility rewrite in the template resolution ensures that
existing `@backstage/cli/templates/*` references in root `package.json`
configurations continue to work by transparently resolving them to
`@backstage/cli-module-new/templates/*`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:10:24 +01:00
Patrik Oldsberg 4d081452b1 Address review feedback from freben
- Use cli-defaults instead of listing individual CLI modules in
  create-app template and root package.json
- Move nodeTransform config files from cli-module-build to cli-node
  to avoid cross-module direct imports
- Rename cli-module-create-github-app to cli-module-github
- Start createCliModule init chain with Promise.resolve()
- Deduplicate exitWithError in runCliModule.ts
- Extract shared isCommandNodeHidden to @internal/cli
- Add explanatory comment for fromArray deduplication field
- Restore error for cli role packages missing bin in runCliExtraction

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 12:55:22 +01:00
Patrik Oldsberg 7781ae5911 Add @backstage/cli-defaults package
Introduces a new `@backstage/cli-defaults` package that re-exports all
standard CLI modules as a single array, simplifying dependency management
for consumers. The CLI's `CliInitializer` is updated to support array
exports alongside single module exports. The create-app template,
changesets, and CLI fallback are updated to use `@backstage/cli-defaults`
instead of listing 11 individual modules.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 15:01:35 +01:00
Patrik Oldsberg d806b0cc9f Add automatic discovery of CLI modules from project dependencies
The CLI now scans the project root's dependencies and devDependencies
for packages with the cli-module role, loading them automatically.
Falls back to the built-in set with a deprecation warning when no
modules are found. Updated create-app templates and the monorepo root
to include all CLI modules as explicit devDependencies.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:43 +01:00
Johan Persson d14b6e07f1 feat(org,catalog-graph)!: migrate MembersListCard, OwnershipCard, and CatalogGraphCard to BUI (#33177)
* feat(org): migrate MembersListCard to BUI EntityInfoCard

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* feat(org)!: migrate OwnershipCard to BUI EntityInfoCard

Replaced MUI InfoCard with BUI EntityInfoCard in OwnershipCard.
Removed the `variant` and `maxScrollHeight` props since card sizing
and scrolling are now handled by the BUI layout. Wrapped body content
in a flex column div to keep the relations toggle pinned while the
grid scrolls. Updated app-legacy and create-app templates to remove
the dropped `variant` prop.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* feat(catalog-graph)!: migrate CatalogGraphCard to BUI EntityInfoCard

Replace MUI InfoCard with BUI EntityInfoCard in CatalogGraphCard.
The `variant` prop is removed — card sizing is now handled by the
BUI layout system. The deep link is replaced with a footer Link.

Remove `variant="gridItem"` from all EntityCatalogGraphCard usages
in app-legacy and create-app templates.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* feat(catalog-react): export useEntityRoute hook

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* fix(cli): update translation extraction test for renamed org keys

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-06 16:19:31 +01:00
Johan Persson 20cb5117e1 fix: remove variant prop from create-app template for migrated cards
The E2E tests scaffold a new app from the create-app template,
which still passed variant="gridItem" to EntityAboutCard,
EntityUserProfileCard, and EntityGroupProfileCard after the prop
was removed.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-03 12:17:35 +01:00
Gabriel Dugny ebd4630702 chore: replace legacy package.json workspaces.packages by workspaces
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2026-02-22 16:50:54 +01:00
Patrik Oldsberg 5920062fcc app-react: API cleanup and component utility for nav items
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:34 +01:00
Patrik Oldsberg 98fe69ae6a app: migrate to new navItems API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-17 11:55:33 +01:00
Andre Wanlin 3c4cfaee3d Changes based on copilot feedback
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-11 19:44:03 -06:00
Andre Wanlin 40f27209ed Create App Updates
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-11 19:12:28 -06:00
Patrik Oldsberg c38b74df5f frontend-plugin-api: complete deprecation of app blueprints
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-23 11:41:16 +01:00
Andre Wanlin f1fe6fe90d Updated to use Node 24 and Debian Trixie
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-01-05 12:25:52 -06:00
Johan Persson 5f88e246e3 chore(create-app): add jest 30 dependencies to template
Add jest and its environment dependencies as devDependencies to the
create-app template, so new Backstage apps are set up with Jest 30
support out of the box.

For Jest 30, apps need @jest/environment-jsdom-abstract and jsdom
instead of jest-environment-jsdom.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:01 +01:00
Fredrik Adelöw 2bae83ab2e Version Policy Update - Node 22 to 24
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-12-08 10:53:38 +01:00
Patrik Oldsberg 9f939a6a4c create-app: add app visualizer in next template
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-04 00:13:53 +01:00
Patrik Oldsberg fc7cbfced9 cli: add template for catalog provider
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-10-20 19:58:19 +02:00
Fredrik Adelöw 7dcedff2fb bump create-app sqlite version
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-10-08 10:21:49 +02:00
Fredrik Adelöw f58e7f1d0d Merge pull request #31002 from mathieu-benoit/patch-3
feat: Update backend/Dockerfile - `node:20` --> `node:22`
2025-09-12 23:28:29 +02:00
secustor 02dbe8eaae fix(packages/create-app): add missing cli dependency
Signed-off-by: secustor <sebastian@poxhofer.at>
2025-09-01 23:43:30 +02:00
Mathieu Benoit 7cfea1aac8 feat: Update backend/Dockerfile - node:20 --> node:22
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
2025-08-27 16:19:32 -04:00
Mathieu Benoit bf02e9649e feat: Update backend/Dockerfile - node:20 --> node:22
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
2025-08-27 16:14:49 -04:00
benjdlambert 9699971f39 chore: just use config for next app
Signed-off-by: benjdlambert <ben@blam.sh>
2025-08-20 10:54:36 +02:00
Camila Belo b2d9fc1939 fix: redirect from home to catalog
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2025-08-20 09:55:15 +02:00
Andre Wanlin db58953a4f Prettier changes
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-08-15 08:09:00 -05:00
Andre Wanlin e33fce15df create-app - Added Notifications and Signals to be installed by default
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-08-15 07:42:45 -05:00
Patrik Oldsberg 274ef53e13 create-app: update e2e test config to run app and backend separately
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-08-11 14:28:39 +02:00