Commit Graph

72101 Commits

Author SHA1 Message Date
Fredrik Adelöw 64b7132d40 fix(cli): exclude __fixtures__ from coverage in cli-module-build
When the transform tests were moved from @backstage/cli to
@backstage/cli-module-build, the coveragePathIgnorePatterns config
was not carried over. This caused test failures in CI when running
with --coverage, as Jest tried to instrument the fixture files
containing fake node_modules packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-17 15:37:24 +01:00
Patrik Oldsberg b3466f6f78 Merge pull request #33356 from backstage/conditional-extensions
frontend-app-api: add phased app preparation
2026-03-17 14:44:00 +01:00
Patrik Oldsberg 094cee6a40 repo: refresh remaining API reports
Check in the remaining generated API report updates after the rebase so verify sees the current exported surfaces and generated ordering.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 14:03:17 +01:00
Patrik Oldsberg 3860435f6c core-components: refresh alpha API report
Update the generated core-components alpha API report after the rebase so verify sees the current translation key ordering.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:49:09 +01:00
Johan Persson a91000018a fix(ui): improve screen reader output for Checkbox and Table selection
Added aria-hidden to the Checkbox indicator div to prevent screen
readers from announcing decorative icons. Added aria-label to the
Table header selection column wrapper.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson 1f9682bf28 fix(ui): make Table row a bg consumer for correct hover/selection states
Table rows now participate in the bg provider/consumer system, using
the appropriate neutral token level based on their container background.
On a neutral-1 surface (e.g. inside a Card), rows step up to neutral-2
tokens for hover, selected, pressed, and disabled states.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson 545129a9d8 fix(ui): use aria-label for Table selection checkboxes
Updated Table selection checkboxes to use aria-label instead of
empty fragment children, improving accessibility and removing the
unnecessary label gap in the selection cells.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Johan Persson a6b84e13ec fix(ui): make Checkbox children optional with a11y warning
Made children optional and only render the label wrapper div when
children are provided. When used without children, a dev warning is
shown if no aria-label or aria-labelledby is set.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-17 13:40:58 +01:00
Patrik Oldsberg 11328fc31b frontend-plugin-api: fix alpha API report exports
Re-export the PluginWrapperBlueprint support types from the alpha entrypoint and regenerate the affected API reports so verify passes after the rebase.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:37:17 +01:00
Patrik Oldsberg 7ffb61b703 frontend-app-api: fix rebased test type import
Remove a stale createSpecializedApp test import that started failing repository type checking after the rebase.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:19:10 +01:00
Patrik Oldsberg 46b530378d frontend-app-api: revert predicate traversal cleanup
Restore the more defensive predicate traversal implementation after the narrowing cleanup turned out not to be worth the type fallout.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg 0d6596f4e7 frontend-app-api: apply review follow-up cleanup
Tighten a few small follow-up details from review by improving stack traces in permission batching, simplifying synthetic child refs, and making predicate traversal narrowing more direct.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg c6d96e7426 frontend-app-api: address remaining review feedback
Move the deprecated createSpecializedApp API holder option back under advanced and disable DataLoader caching in IdentityPermissionApi so batching stays limited to same-tick requests.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:21 +01:00
Patrik Oldsberg d7ed46b83c frontend-app-api: follow up phased app review feedback
Fix utility API resolution for falsy values and clarify how phased app finalization is owned between onFinalized and finalize.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:20 +01:00
Patrik Oldsberg da11157729 frontend-app-api: move session reuse to prepare time
Remove the late-bound finalize session override so prepared apps accept reusable session state in one place. This keeps bootstrap and finalization semantics aligned and simplifies the prepared app API.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:20 +01:00
Patrik Oldsberg e04955b861 frontend-app-api: split prepared app wiring helpers
Extract the prepared app tree and API factory lifecycle helpers so prepareSpecializedApp reads as orchestration, while keeping the finalization flow documented and behaviorally unchanged.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00
Patrik Oldsberg 65805c8117 frontend-app-api: split prepared app session loading
Separate direct and callback-driven finalization by keeping async session loading inside onFinalized and simplifying the shared finalization helpers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00
Patrik Oldsberg 4a1a3496f2 frontend-app-api: separate prepared app finalization modes
Make prepared apps choose either onFinalized or finalize so the async and direct finalization flows can no longer be mixed on the same instance.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00
Patrik Oldsberg a5017f7951 frontend-app-api: extract prepare app finalizers
Move the session-state and bootstrap-error finalization flows into same-file helpers with explicit inputs so the local state updates remain visible at the call sites.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:11 +01:00
Patrik Oldsberg 0ce78c110c frontend-app-api: simplify prepare app finalization flow
Keep the sign-in finalization path local to the identity callback and use safer error normalization while preserving the finalized bootstrap error flow.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg 217de172dc frontend-app-api: finalize bootstrap failures through app root
Resolve async finalization failures by building a finalized app that throws from app/root.children, and simplify the identity proxy target callback to a synchronous fire-and-forget hook.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg 89fd91eaf8 frontend-app-api: store bootstrap errors for app root
Route bootstrap finalization failures through an external store that re-enters React at app/root.children, and simplify prepared app finalization to use a success-only callback.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg 12f809015f frontend-app-api: restore local prepare app state
Replace the consolidated runtime state object in prepareSpecializedApp with local variables so the control flow stays easier to follow while preserving the extracted helper modules.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg d30aba815a frontend-app-api: extract prepared app phase apis
Move the phase-specific API proxies and tree initialization helpers out of prepareSpecializedApp so the remaining file can stay focused on bootstrap and finalization flow.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg ca24aa2da9 frontend-app-api: extract prepared app predicates
Move predicate reference collection and predicate context loading out of prepareSpecializedApp so the session and finalization flow can focus on lifecycle state.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg 01f5660fe7 frontend-app-api: split prepare and create app wiring
Move the phased specialized app lifecycle into prepareSpecializedApp.tsx and leave createSpecializedApp.tsx as the deprecated wrapper so the public entry points and their related types live alongside their own implementations.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg 756e84eb9a frontend-app-api: capture sign-in through identity proxy
Let prepared apps observe sign-in completion through the bootstrap identity proxy instead of overriding the sign-in page component, and surface finalization failures back through the default app root.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:06:10 +01:00
Patrik Oldsberg ab3f15f3b3 frontend-app-api: share subtree instantiation logic
Move detached API discovery over to the same subtree instantiation traversal that powers the app tree so predicate handling and attachment traversal stay aligned in one place.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:46 +01:00
Patrik Oldsberg d7a44138d2 frontend-app-api: freeze materialized bootstrap APIs
Keep deferred API overrides only for bootstrap APIs that were never materialized, while reporting and ignoring overrides of implementations that were already used during bootstrap.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:39 +01:00
Patrik Oldsberg f919c714fc frontend-app-api: stop resetting the tree for api discovery
Collect bootstrap and deferred API factories without mutating app node instances, so conditional API roots stay deferred and visible API instances can survive finalization unchanged.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:30 +01:00
Patrik Oldsberg 268f8f8d9f frontend-app-api: fix sync specialized app predicates
Avoid finalizing prepared apps with an empty predicate context when sign-in is disabled, so deferred feature-flagged extensions resolve consistently in both bootstrap and finalized trees.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:18 +01:00
Patrik Oldsberg bfb6f50d4a changesets: shorten progress accessibility note
Keep the core-components changeset aligned with the shorter single-sentence style used for simple package notes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg 8e092338c6 changesets: add package metadata follow-up notes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg f80cf50cda core-components: name the shared progress indicator
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg 4195e7ccb0 repo: match colorized rspack startup output in accessibility CI
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg 80202546d5 plugin-app-react: update analytics blueprint snapshot
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg ea7d951677 repo: accept rspack startup output in accessibility CI
Use a generic Lighthouse server ready pattern so the accessibility job recognizes the example app startup log after the rspack switch.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:09 +01:00
Patrik Oldsberg ec794b9e8b frontend-app-api: fix changed-package lint regressions
Declare the new frontend test dependencies, avoid the finalize options shadowing lint error, and add explicit assertions in frontend-test-utils so the changed-package lint jobs pass again.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:05:00 +01:00
Patrik Oldsberg 837de816d5 frontend-app-api: export prepare app options type
Expose PrepareSpecializedAppOptions from the wiring entrypoint and refresh the API report so the new type is available to callers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:04:42 +01:00
Patrik Oldsberg 6234db86e9 style: apply prettier to phased app follow-up files
Align the recent phased app follow-up changes with the repository formatting rules to avoid carrying a stray formatting-only diff.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:04:30 +01:00
Patrik Oldsberg 03d2484cae frontend-app-api: expose root elements on specialized apps
Add an element shorthand to bootstrap and finalized app results so callers can render the root element without reaching through the tree instance.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:04:06 +01:00
Patrik Oldsberg e66bbfc85c frontend-test-utils: prepare apps before finalizing
Move the test app helpers over to prepareSpecializedApp().finalize() so they stop depending on the deprecated createSpecializedApp entrypoint.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:57 +01:00
Patrik Oldsberg 37ff856142 frontend-defaults: cover conditional page usage patterns
Add createApp coverage for the new page-level and page-child predicate patterns so the example app is backed by implementation-adjacent tests.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg 5b160f97db changesets: split phased app follow-up notes
Split the combined phased app changeset into package-specific entries so each published package describes only its own adopter-facing change.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg 3c6436cba0 core-compat-api: restore filter predicate dependency
Keep the redeclared filter-predicates dependency required by core-compat-api's inline frontend imports so the changed-package lint check passes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg e4d8a9ce52 repo: refresh blueprint snapshots for predicates
Update inline snapshots that now include the new extension predicate shape so the changed-package test suite matches the intentional blueprint output.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg 00982b947d repo: refresh phased app API reports
Update generated API reports to match the phased app and predicate changes, and drop the stray core-compat-api dependency addition that would otherwise require its own changeset.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:38 +01:00
Patrik Oldsberg b6fc7f861f frontend-app-api: fix phased predicate type checks
Use internal extension shapes when reading predicate metadata and type the finalized app test helper explicitly. This fixes the typecheck breakage introduced by the phased predicate and override changes.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:29 +01:00
Patrik Oldsberg d65d4812f6 frontend-plugin-api: support predicate overrides
Allow plugin and extension overrides to replace or remove existing if predicates. This makes conditional plugin and extension behavior overrideable through both plugin overrides and module-installed extension overrides.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:21 +01:00
Patrik Oldsberg 47f7cd2505 permission-react: keep batching internal
Revert the public multi-request authorize overload and rely on internal batching instead. Frontend app predicate checks now make separate authorize calls that still coalesce within the same tick.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 13:03:21 +01:00