74233 Commits

Author SHA1 Message Date
Charles de Dreuille 5de4a10b30 chore: update scaffolder API reports
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-20 19:49:05 +01:00
1337 7348cc16fb Merge branch 'backstage:master' into feature/catalog-export 2026-04-20 20:14:38 +02:00
Patrik Oldsberg 94e941867b Merge pull request #34011 from backstage/rugvip/remove-unused-integration-exports
integration: remove unnecessary exports from internal helpers
2026-04-20 19:59:42 +02:00
Patrik Oldsberg 05eca714b6 Merge pull request #34008 from backstage/rugvip/remove-unused-addunprocessedentitiesresult
catalog-backend: 🧹
2026-04-20 19:59:20 +02:00
Charles de Dreuille c48da5c93d Merge branch 'master' into charlesdedreuille/act-355-header-improvements 2026-04-20 18:07:12 +01:00
Charles de Dreuille 2deaa49120 fix(ui): replace react-markdown with inline parser to fix ESM Jest failures
react-markdown v8+ is ESM-only and breaks Jest in Node-role packages that
transitively import @backstage/ui via core-app-api. Since the Header
description only needs inline link support, a small regex-based parser
is sufficient and avoids the ESM dependency entirely.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-20 17:59:45 +01:00
Andre Wanlin 391ef097e9 Merge pull request #34002 from awanlin/blog/bc-kc-amsterdam-2026
Backstage in Amsterdam: Highlights from BackstageCon and KubeCon + CloudNativeCon Europe 2026
2026-04-20 10:59:53 -05:00
Andre Wanlin 54b58d0fed Prettier
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-20 10:47:47 -05:00
Johan Persson e8a1a35714 feat(ui): add isPending prop and deprecate loading
Add `isPending` prop to Alert, Button, ButtonIcon, Table, and
TableRoot, aligning with React Aria naming conventions. The
`loading` prop is deprecated but remains functional as an alias.

CSS selectors now target `data-ispending` instead of `data-loading`
for pending state styling. The `data-loading` attribute is still
emitted for backward compatibility.

Internal Table hooks (`PaginationResult`, `UsePageCacheResult`)
renamed `loading` to `isPending`. The `useTable` hook returns both
`isPending` and `loading` on `tableProps` to preserve backward
compatibility.

Updated docs-ui documentation and stories accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-20 17:36:21 +02:00
Fredrik Adelöw 0ecb700add Remove NOT IN unstitched guard from facets no-filter path
The NOT IN guard against null final_entity rows was preventing the
query planner from using parallel workers and (with a future covering
index) index-only scans. Without the covering index it caused a 2.6x
regression on the no-filter path (7s -> 18.4s).

The filtered path already excludes unstitched entities via the
whereNotNull('final_entities.final_entity') in the inner
entityIdSubquery, so no guard is needed there.

The no-filter path now matches 1.49.x behavior. A followup migration
adding a covering index can re-introduce the guard efficiently.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 17:31:00 +02:00
Johan Persson df705bbdbf fix(ui): preserve external hrefs in BUI link components
When the app was served under a non-root base path, BUI link
components rewrote absolute `href` values as in-app paths — e.g.
`https://example.com` became `/basename/https:/example.com` —
because every href was passed through react-router's `useHref`,
which treats all strings as relative paths.

External URLs (`http://`, `https://`, `//`, `mailto:`, `tel:`)
now bypass href resolution. Internal hrefs are normalized to
their canonical pre-basename form in `useDefinition`, so
downstream resolution by react-router's `useHref` (for
rendering) and `navigate` (for click-navigation) adds the
basename exactly once.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-20 17:28:04 +02:00
Patrik Oldsberg 191b41a0b3 integration: remove unnecessary exports from internal helpers
Remove `export` from five internal helper functions that are not part of
the published API and are only used within their own files. The `sleep`
function in GitLabIntegration is kept exported for test access but marked
as `@internal`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:49:21 +02:00
Patrik Oldsberg 6316dc66d3 catalog-backend: remove unused AddUnprocessedEntitiesResult type
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:40:38 +02:00
Patrik Oldsberg 357d63949e Fix lockfile dependency removal detection in PackageGraph
The `otherGraph` variable in `listChangedPackages` was incorrectly
created from `thisLockfile` instead of `otherLockfile`, making the
merged dependency graph a duplicate of the current one. This meant
that dependencies only present in the old lockfile were never added
to the graph, so transitive removals could not be detected.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:37:26 +02:00
Fredrik Adelöw f32d334034 Exclude unstitched entities from facets via NOT IN null set
Instead of checking IS NOT NULL against ~520k rows (which adds a
2.6x regression on the no-filter path), exclude the tiny set of
entities where final_entity IS NULL (~3,700 rows). The anti-join
is nearly free and allows the guard to be applied unconditionally,
so facets results consistently exclude not-yet-stitched (or future
tombstoned) entities regardless of whether filters are present.

Also addresses review feedback:
- Add regression test for unstitched entity exclusion
- Extract setupFacetsCatalog helper to reduce test boilerplate
- Tighten assertions: use exact arrays instead of arrayContaining

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 16:14:03 +02:00
Fredrik Adelöw 88409600ba Revert to conditional final_entities constraint for facets
Benchmarking on a production-like database shows that always applying
the final_entities subquery (even without filters) causes a 2.6x
regression on the no-filter path (5.2s -> 13.5s) due to ~530k
memoized index lookups against final_entities. The FK cascade from
search -> final_entities already guarantees search rows only exist
for entities with a final_entities row, so the constraint is only
needed when filters route through final_entities.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 15:46:37 +02:00
Fredrik Adelöw d7c6ad8e14 Remove unnecessary whereNotNull guard from facets subquery
The whereNotNull('final_entities.final_entity') was copied from other
code paths that select the final_entity column, but the facets subquery
only needs entity_id. Removing it preserves exact v1.49 semantics
(search rows only exist for stitched entities anyway, due to the FK
cascade from search -> final_entities) and avoids an inconsistency
where the no-filter path did not exclude unstitched entities while the
with-filter path did.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:43:22 +02:00
Fredrik Adelöw 9ae08d07e2 Add thorough facets tests for predicate queries and compound filters
Adds standalone test coverage for the facets method in
DefaultEntitiesCatalog to ensure it works correctly with:
- Predicate query filtering (simple key match)
- Predicate query filtering using $in operator
- Compound allOf filters
- Compound anyOf filters
- Both filter and query combined

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:21:57 +02:00
Andre Wanlin 0d14cb6acf Clean up
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-20 07:03:42 -05:00
Fredrik Adelöw 673587dd4f Add patch release file for PR #34001
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:03:19 +02:00
Fredrik Adelöw cf195de72c catalog-backend: fix facets endpoint performance regression
Route the EXISTS-based filters through final_entities (one row per
entity) instead of correlating against the search table directly.
This avoids the pathological case where correlated subqueries scan
the much larger search table for every row in the outer facets query.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:02:02 +02:00
Charles de Dreuille c0817115e8 chore: update API reports to match master
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-20 10:38:44 +01:00
MT Lewis 7192e84cad Merge pull request #33948 from backstage/flex-item-props
ui: add support for flex-item props to generic layout components
2026-04-20 09:54:14 +01:00
Fredrik Adelöw e6f30e028a Merge pull request #33993 from backstage/freben/fix-scheduler-sleep
fix(scheduler): handle setTimeout overflow for long sleep durations
2026-04-20 09:47:11 +02:00
Fredrik Adelöw 1688bdc19d Merge pull request #33996 from backstage/freben/owner-column-cleanup
Simplify OwnerEntityColumn to use EntityRefLink directly
2026-04-20 09:46:34 +02:00
Andre Wanlin 60d785e5c9 Edits
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-19 15:25:15 -05:00
Charles de Dreuille 4e932ef781 chore(ui): regenerate API report
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 19:51:53 +01:00
Charles de Dreuille 039751e3f7 chore: fix prettier formatting in header page.mdx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 19:48:46 +01:00
Charles de Dreuille 9a5a3274cc chore: update lockfile after adding react-markdown dependency
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 11:44:11 +02:00
Charles de Dreuille 6310790556 feat(ui): add href support to HeaderMetadataUsers, remove bold from description, full-width header
- Add `href` to `HeaderMetadataUser`: avatar becomes a link and name renders as a primary `Link` with `standalone` (no underline at rest)
- Add `WithMetadataUsersNoLinks` story alongside `WithMetadataUsers` to cover both link and non-link variants
- Remove `strong`/`em` from ReactMarkdown `allowedElements` in Header description — only plain text and inline links are now supported
- Replace `<Container>` root with a plain `<div>` so the Header spans its full parent width
- Add `HeaderMetadataStatus` component and CSS (new files)
- Update docs: fixtures, snippets, props-definition, and page.mdx to reflect all changes

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 11:41:55 +02:00
Charles de Dreuille 0e8edce069 feat(ui): add HeaderMetadataUsers component and polish Header metadata/tags
- Add HeaderMetadataUsers component: single user shows avatar + name,
  multiple users show avatar stack with tooltip on hover
- Use Pressable from react-aria for tooltip trigger compatibility
- Switch tags and metadata text to body-medium variant
- Fix metadata item styling: secondary color label, no bold, no colon,
  flex row with gap-2 between label and value
- Update Header gap to space-3
- Update docs with HeaderMetadataUsers example, correct prop types,
  and synced default snippet

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 10:48:09 +02:00
the-serious-programmer ae7e0fdd68 feature(catalog export): fix review comments and build
Signed-off-by: the-serious-programmer <19777147+the-serious-programmer@users.noreply.github.com>
2026-04-19 10:21:42 +02:00
Charles de Dreuille fcc8c4d328 fix(ui): set Header gap to space-3
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 10:05:43 +02:00
Charles de Dreuille 6ba1167cb0 fix(ui): increase Header gap from space-1 to space-4
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 10:05:31 +02:00
Charles de Dreuille 2b97fc41bb docs(ui): simplify Header main example by removing metadata
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 10:04:35 +02:00
Charles de Dreuille 33ea7fb301 docs(ui): update Header docs with tags, description, and metadata props
Add new props to the Header API reference and examples on ui.backstage.io.
Also adds deprecated badge support to the shared PropsTable component so
the breadcrumbs prop is visually marked as deprecated.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 09:54:19 +02:00
Charles de Dreuille c96e2b3445 feat(ui): add description, tags, and metadata props to Header
Add three new props to the Header component:
- `tags`: renders a row of text/link items above the title, separated by
  3×3px circle dividers
- `description`: renders a markdown string below the title with inline
  link support via react-markdown
- `metadata`: renders key-value pairs below the description with 20px gaps

Also deprecates the `breadcrumbs` prop for future removal.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 09:48:56 +02:00
Charles de Dreuille 3e9f20340a fix(ui): improve DateRangePicker accessibility and fix docs link
- Add aria-label="Open calendar" and aria-hidden on icon for the calendar trigger button
- Add aria-hidden on nav button icons (React Aria provides built-in labels for prev/next slots)
- Update React Aria docs link to react-aria.adobe.com format

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 07:36:48 +02:00
Charles de Dreuille dc17c01a53 Update page.mdx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 07:33:10 +02:00
Charles de Dreuille d676565abb fix(ui): refine DateRangePicker calendar button styling
- Fixed size: 1.5rem (small), 2rem (medium) in rem units
- No padding, flex-centered icon
- Inset focus ring using 1px box-shadow with --bui-ring token
- Border radius bumped to radius-2
- Medium size padding-inline-end reduced to space-1

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:59:06 +02:00
Charles de Dreuille b6d52bdb7d chore: dedupe yarn.lock
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:45:32 +02:00
Charles de Dreuille f221068ab9 fix(ui): use BUI Popover and add unavailable dates story in DateRangePicker
- Switch DateRangePicker to use the BUI Popover component (with hideArrow)
  instead of the raw react-aria-components Popover
- Add WithUnavailableDates story showing isDateUnavailable with weekends
  blocked and non-contiguous ranges disallowed (default behaviour)

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:38:47 +02:00
Charles de Dreuille ff68a57b14 Update report.api.md
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 06:38:21 +02:00
Charles de Dreuille 20a5de0605 Fix styles
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 06:38:21 +02:00
Charles de Dreuille 401916d55b feat(ui): add DateRangePicker component
Adds a new DateRangePicker component to @backstage/ui built on React Aria,
featuring a custom field group with two DateInput fields and a calendar
trigger, a RangeCalendar popover with proper range selection visuals
(solid circles for start/end, transparent solid fill for in-range cells
with row-boundary rounding), and full BUI token usage including bg
consumer auto-increment. Includes Storybook stories and a docs-ui page.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:38:19 +02:00
Fredrik Adelöw 83ac69be86 Fix ListTaskPage test to match simplified OwnerEntityColumn
Update assertions to expect the entity presentation short ref (e.g.
'foo') instead of the old catalog-resolved display name (e.g.
'BackUser'), and remove now-unused entity fixtures and catalog API
mocking.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:50:30 +02:00
Fredrik Adelöw 415e30b489 Add changeset
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:33:41 +02:00
Fredrik Adelöw 8341f98940 Simplify OwnerEntityColumn to use EntityRefLink directly
Remove the catalog API lookup and manual title resolution. The
EntityRefLink already uses the entity presentation API to resolve
display names, so the component only needs the entity ref string.

This removes unused imports of useApi, useAsync, catalogApiRef,
parseEntityRef, and UserEntity.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:32:54 +02:00
Fredrik Adelöw 89d324840c fix(scheduler): handle setTimeout overflow for long sleep durations
Node.js setTimeout uses a 32-bit signed integer for the delay, so
values larger than 2^31-1 ms (~24.8 days) cause the callback to fire
immediately. Fix by chunking the wait into segments of at most 2^30 ms.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 15:30:07 +02:00
1337 7f48d8a5ec Update docs/features/software-catalog/catalog-customization.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: 1337 <19777147+the-serious-programmer@users.noreply.github.com>
2026-04-18 14:32:46 +02:00