Commit Graph

72068 Commits

Author SHA1 Message Date
Patrik Oldsberg cc0693ec40 api-ref: move opaque helper to frontend-internal
Share the internal ApiRef opaque helper through frontend-internal and fail fast when ApiRef-shaped values have an unsupported opaque version.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 11:05:00 +01:00
Patrik Oldsberg aba94d2b27 Merge pull request #33385 from drodil/auth_mem_leaks
fix(auth): memory leaks
2026-03-17 11:03:20 +01:00
Patrik Oldsberg 7f05f5759b Use --name flag in example command template
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:59:07 +01:00
Patrik Oldsberg 54f30c6c91 docs: simplify visibilityPermission docs to match type constraints
Since visibilityPermission is typed as BasicPermission and authorize()
returns DefinitivePolicyDecision (ALLOW/DENY only), remove misleading
references to CONDITIONAL decisions which can never occur.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:55:51 +01:00
Patrik Oldsberg edf2b77581 cli-module-new: add template for CLI module packages
Add a new `cli-module` template to the Backstage CLI that scaffolds
CLI module packages. This includes adding the `cli-module` role to the
template system, with proper naming conventions and prompts.

The generated package includes:
- A bin entry point for standalone execution
- An index.ts with createCliModule setup
- An example command using cleye
- Standard package.json with cli-module role

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:54:26 +01:00
Patrik Oldsberg abc12cd8e1 fix: address review feedback for actions CLI module
Fix argument parsing bugs in the execute command where actionId at index 0
was incorrectly skipped when --instance was absent, and flag values matching
the actionId string were erroneously removed. Add --help support to the
execute command for CLI report generation. Add missing bin script and
cli-report.md for cli-module-actions. Add resolveAuth tests. Bump
backend-defaults changeset to minor for the security-relevant auth change.
Replace cross-fetch with native fetch in cli-module-auth to avoid punycode
deprecation warnings during CLI report generation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:54:11 +01:00
Jonathan Roebuck bf41231deb Merge pull request #33387 from backstage/fix/table-complete-mode-loading
Fix Table complete mode loading state for data prop variant
2026-03-17 09:50:48 +00:00
Patrik Oldsberg 90c3a9d1c0 api-ref: preserve const ids in builder types
Use a const type parameter for createApiRef().with(...) so literal API ref ids stay narrow instead of widening to string.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:46:42 +01:00
Patrik Oldsberg 4690f20880 api-ref: use opaque metadata for owner lookup
Read ApiRef plugin ownership through the internal opaque type helper and gracefully fall back to legacy ID inference for unsupported ref shapes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 10:30:59 +01:00
Hellgren Heikki 634ededdc9 fix(auth): memory leaks
alb-provider: JWT verification block was wrapped in generic error
that turned 401 to 500 causing clients to retry the login

cimd: cimd clients are not registered in oidc_clients table
so inserting offline sessions for them violates the foreign key
constraint. dropping the fk.

offline: return access token even when refresh token issuing fails.
if the refresh token issue fails for some reason, it will return
500 which will then cause client to retry even it can get valid
access token without refresh token.

closes #33329
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-03-17 10:52:40 +02:00
Patrik Oldsberg 7bc798c069 Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 09:51:36 +01:00
Patrik Oldsberg 980faba560 Merge branch 'master' into blam/actions-permissions
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-17 09:50:34 +01:00
Patrik Oldsberg ccc6b25f87 api-ref: keep plugin ownership metadata internal
Hide plugin ownership metadata from the public ApiRef type while preserving internal ownership resolution for the builder-based API ref flow.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 76b89c7437 api-ref: infer builder ids and plugin ownership
Preserve literal API ref ids in the builder form while keeping the deprecated constructor compatible, and rely on explicit ownership metadata instead of the old core id fallback.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 7a960a0d75 Regenerate API reports
Update the frontend plugin API report after removing explicit ApiRef constant annotations from the frontend API ref declarations.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg cb8a487bde frontend-plugin-api: rely on ApiRef inference
Remove explicit ApiRef constant annotations from frontend API ref declarations and rely on the createApiRef type argument for inference instead.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg e8d410d915 Regenerate API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 29b87812ba Regenerate API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg 476df5ffd5 Fix changeset frontmatter formatting
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg d911b72811 frontend-plugin-api: add explicit ApiRef plugin ownership
Add the new frontend ApiRef builder form while preserving compatibility with existing refs, and let frontend apps resolve API ownership through an explicit pluginId when provided.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
Patrik Oldsberg cc459f73a8 frontend-plugin-api: convert ApiRef to an opaque type
Convert the ApiRef type in the new frontend system to an opaque type
with a $$type discriminator, matching the pattern used by route refs
and extension data refs. Add a builder-pattern creation overload
(createApiRef<T>().with({ id })) alongside the existing direct-config
form. Create OpaqueApiRef in frontend-internal for internal type
validation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 09:35:02 +01:00
James Brooks 05594087b9 Add virtualized prop to Table component (#33246)
Adding a new virtualized prop to the Table component to better support rendering large numbers of rows
2026-03-17 08:31:43 +00:00
Jonathan Roebuck d06dd51393 Fix effect firing default getData for data prop variant
The effect was calling the default getData = () => [] even when the
consumer used the data prop, immediately clearing the loading state.
Now detects whether getData was explicitly provided and only runs the
async loading logic for that case. Also clears isLoading when data
transitions from undefined to defined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2026-03-17 08:16:50 +00:00
John Collier 1b42218ca3 feat(scaffolder): implement a get scaffolder task log action (#33185)
* feat(scaffolder): create get scaffolder task log action

Adds a new action to allow retrieving logs from scaffolder tasks, by way of the scaffolderService.getLogs function

Signed-off-by: John Collier <jcollier@redhat.com>

* Fix typo after rename

Signed-off-by: John Collier <jcollier@redhat.com>

* Add to list of known actions

Signed-off-by: John Collier <jcollier@redhat.com>

---------

Signed-off-by: John Collier <jcollier@redhat.com>
2026-03-17 08:48:59 +01:00
Ben Lambert dee4283ccf feat: add pluginId to actions, server name/description config, dot separator for namespaced tools (#33344)
Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-17 08:47:51 +01:00
Charles de Dreuille 5096efc276 Merge pull request #33378 from backstage/fix/table-complete-mode-loading
Fix Table loading skeleton not showing for complete mode with getData
2026-03-17 07:18:44 +00:00
Charles de Dreuille 57726bf1c2 Merge pull request #33363 from shivamtiwari3/fix/table-replace-removed-bui-bg-tint-tokens
Fix: replace removed --bui-bg-tint tokens in Table component (fixes #33292)
2026-03-17 07:16:14 +00:00
Patrik Oldsberg be30fe0e03 Merge pull request #33193 from backstage/rugvip/nfs-icon-sizing
frontend-app-api: align icon sizing in nfs
2026-03-17 00:53:11 +01:00
Patrik Oldsberg 54ac62178e Merge pull request #33382 from backstage/rugvip/fix-app-config-setup
app: move app-specific config into root app-config.yaml
2026-03-16 22:09:38 +01:00
Patrik Oldsberg 55b18a3c2e Merge pull request #33113 from backstage/rugvip/docs-frontend-plugin-installation
docs: default frontend plugin docs to the new frontend system
2026-03-16 22:08:47 +01:00
benjdlambert 42960f1db7 feat: add actions CLI module for distributed actions registry
Adds @backstage/cli-module-actions with commands for listing and executing
actions from the distributed actions registry. Exports auth helpers from
cli-module-auth for cross-module reuse. Relaxes the actions registry auth
check to allow direct user invocations from the CLI.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-16 22:04:16 +01:00
Patrik Oldsberg 4581c003f9 Apply suggestions from code review
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-16 21:57:43 +01:00
Patrik Oldsberg 3b67b7ce6d Move app-specific config from packages/app into root app-config.yaml
The example app (packages/app) had a separate app-config.yaml that was
loaded via --config flags in the start script. This moves the NFS
configuration (routes, pluginOverrides, extensions) into the root
app-config.yaml and removes the --config flags so the app uses the
default config resolution.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:52:13 +01:00
Patrik Oldsberg db69a54419 Restore the App Visualizer nav item.
Add the App Visualizer navigation item back to the plugin extension list and include the regenerated API report for the restored public surface.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg 80fed0e8f0 Preserve CSS sizing for translated system icons.
Keep the original icon element as the rendered root so legacy MUI-backed icons can still be styled through CSS like other Backstage UI icons.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg c0ab3763e5 Fix tsc errors and add missing changeset
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg 3f36ce1257 Clarify icon sizing rules for NFS icons
Document the IconElement sizing contract, ensure deprecated icon component registrations inherit size correctly, and add changesets for the affected icon migration packages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 21:39:40 +01:00
Patrik Oldsberg ed8d9ce67c further NFS icon migration and alignment
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-16 21:39:40 +01:00
Patrik Oldsberg 22f101e208 Merge pull request #33368 from backstage/rugvip/add-frontend-dev-utils
frontend-dev-utils: add helper for plugin dev apps
2026-03-16 21:32:15 +01:00
Patrik Oldsberg 0a63d36c65 Merge pull request #33379 from backstage/rugvip/document-table-cell-requirement
ui: document table cell wrapper requirement
2026-03-16 21:18:41 +01:00
Patrik Oldsberg 0ebde15eef Add changeset for table cell documentation
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 20:39:11 +01:00
Patrik Oldsberg 1f25382e56 Move table cell requirement docs to docs-ui
Move the cell wrapper requirement documentation from the package
README to the docs-ui table component page where it belongs.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 20:27:02 +01:00
Patrik Oldsberg 872dc1025e ui: document table cell wrapper requirement
Added TSDoc comments to ColumnConfig.cell, RowRenderFn, CellProps,
CellTextProps, and CellProfileProps making it explicit that cell render
functions must return a cell component (Cell, CellText, or CellProfile)
as the top-level element. Also added a Table Cell Requirement section
to the package README with correct and incorrect usage examples.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 20:16:25 +01:00
Patrik Oldsberg 1decc6f994 Split legacy homepage getting started docs
Move the old frontend system homepage guide to its own companion page and add a banner to the main homepage guide that directs legacy users to the split-out documentation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 20:04:16 +01:00
Patrik Oldsberg 90a02779fa Address remaining docs review feedback
Clarify the remaining old frontend system sections, tighten the scaffolder follow-up wording, and rename the docs sidebar entry to match the frontend system terminology used elsewhere.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 19:45:41 +01:00
Patrik Oldsberg 3f2788e1ef Merge pull request #33125 from davidfestal/add-bundle-command
feat(cli): add `backstage-cli package bundle` command for plugin dynamic loading
2026-03-16 19:26:01 +01:00
Patrik Oldsberg 1c00e25901 Preserve app loading fallback in createDevApp.
Only suspend the lazy BUI CSS import so the app root keeps its built-in loading UI, and lock that behavior down in the mocked render test.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 19:09:55 +01:00
Jonathan Roebuck 9314ff5162 Fix Table loading skeleton not showing for complete mode with getData
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2026-03-16 18:06:19 +00:00
Patrik Oldsberg 846fb1ea57 Fix TS2454 in createDevApp test
Use definite assignment assertions for variables assigned inside
jest.isolateModules callbacks.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 19:03:58 +01:00
Johan Persson 42f8c9b2b8 feat(ui): centralize routing in BUIProvider (#33267)
* feat(ui): centralize routing in BUIProvider

BUIProvider now auto-detects React Router context and provides
client-side navigation for all BUI components. Retired
InternalLinkProvider and added BUIRouterProvider as a public
export for integration use.

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

* feat(plugin-app): move BUIProvider inside app router

Moved BUIProvider from wrapping AppRouter to being a child inside
it, so it detects the React Router context and provides client-side
routing for all BUI components.

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

* feat(core-app-api): add BUIRouterProvider to legacy app router

Added BUIRouterProvider inside the legacy AppRouter to provide
React Aria routing for all BUI components.

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

* docs(ui): update BUIProvider documentation for routing

Updated installation docs to cover BUIProvider's routing role
and the requirement to render it inside a React Router context.

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

* refactor(ui): move BUIProvider from analytics to provider directory

BUIProvider now handles both analytics and routing, so it no longer
belongs in the analytics directory.

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

* fix(ui): add BUIProvider to storybook stories with MemoryRouter

Added BUIProvider inside MemoryRouter in all stories that use
routing, so client-side navigation works in Storybook.

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

* fix(plugin-app): move BUIProvider inside RouterComponent

Moved BUIProvider to wrap all content inside RouterComponent
so that extraElements (like dialogs) also get BUI context.

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

* refactor: replace BUIRouterProvider with BUIProvider in legacy app

Use BUIProvider directly inside the legacy AppRouter instead of a
separate BUIRouterProvider export. Removes BUIRouterProvider from
the public API of @backstage/ui.

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

* refactor(ui): inline routing logic into BUIProvider

Removed the routing/ directory and inlined the RouterProvider
setup directly into BUIProvider since it's the only consumer.

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

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-16 18:56:24 +01:00