Repository navigation
fix(ui): stop an announcement with no entityLink crashing the page - #34192
shrabantipaul-collate wants to merge 1 commit into
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🔴 Playwright Results — workflow failedValidated commit ✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky ⚙️ No test failures. This run failed in CI infrastructure or reporting (see Pipeline and setup failures), not because of your changes — no test action needed from you. Pipeline and setup failures (6)
Performance⚪ Performance metrics unavailable; see the CI and reporting failures above.
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
`EntityLink.split` returns `[]` for an empty or unparseable link, so indexing
it yields `undefined` while the accessors' signatures promise a `string`.
Callers are entitled to treat the result as a string, and two of them do:
// AnnouncementCardV1.component.tsx:56 (MyData widget)
// AnnouncementItemV2.component.tsx:40 (Data Marketplace widget)
const fqn = getEntityFQN(announcement.entityLink ?? '');
entityName: fqn.split('::').pop() || '',
`fqn` is `undefined` there, so this throws `Cannot read properties of undefined
(reading 'split')` inside a `useMemo` during render — React unwinds to the error
boundary and the entire page becomes "Something went wrong", not just the card.
The trigger is a legal entity: `createAnnouncement.json` requires only
description/startTime/endTime, so an announcement with no `entityLink` is valid
and the API accepts it. Creating one bricks both the MyData home and the Data
Marketplace announcements widget. The `?? ''` already on the call sites is the
tell — the input was guarded, the return value was not.
Fixed at the source so all 20 caller files benefit rather than patching the two
that happen to chain a method today:
- `getEntityType` and `getEntityFqn` return `''` instead of `undefined`.
- `getEntityColumnFqn` returns `''` instead of interpolating the literal string
`"undefined"` — a non-empty value that reads as a real FQN wherever it is
rendered or compared. `''` is falsy, so callers' existing guards catch it.
No caller distinguishes `undefined` from `''`; the rest feed the value into
template strings, JSX or truthiness checks, where `''` behaves the same or
better.
## Testing
- New cases in `EntityLink.test.ts` covering both an empty and an unparseable
link, including the exact `.split('::')` call that crashed. Verified they fail
against the unfixed accessors and pass with them.
- 947 tests / 102 suites pass across the caller areas: MyData, Data Marketplace,
SchemaTable, EntityLineage, TasksPage, ActivityFeed and FeedUtils.
- ESLint 0 errors; Prettier clean. The remaining `antlr4` tsc error and the
circular-import warning in this file are pre-existing on main and untouched
by this change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
266cb06 to
6fa23ab
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Entity-link accessors now return empty strings across UI callers, changing missing-link handling. Fixes a crash on MyData and Data Marketplace pages when an announcement has no ✅ 1 closed✅ Quality: Comment and test wrongly claim empty column links no longer compare equal
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
`EntityLink.split` returns [] for an empty or unparseable link, so
`getEntityType` / `getEntityFqn` indexed past the end and returned `undefined`
while their signatures promise a `string`. Callers are entitled to trust the
declared type, and the announcement widgets do:
const fqn = getEntityFQN(announcement.entityLink ?? '');
entityName: fqn.split('::').pop() || '', // TypeError
That runs in a `useMemo` during render, so React unwinds to the error boundary
and the whole MyData page becomes "Something went wrong" rather than one broken
card. The home widget calls `getActiveAnnouncements()` with no entityLink, so a
single such announcement anywhere takes the page down for every user.
`getEntityColumnFqn` was the quieter half: an empty link interpolated to the
literal string "undefined" — truthy, and rendered and compared as though it
were a real FQN. Returning '' keeps a missing link falsy so existing guards
catch it.
Not reachable from the UI. The only UI path that creates an announcement is the
entity-page drawer, and `AddAnnouncementModal` always sets
`entityLink: getEntityFeedLink(entityType, entityFQN)` from required props. I
also checked the parser is not the way in: quoted segments, spaces, colons,
angle brackets and unicode in an FQN all parse fine — only an empty link yields
[]. So the trigger is a row written through the API, SDK, MCP or a script,
which the schema allows (`required` is description/startTime/endTime only), and
which is how it was hit locally. It also stops being theoretical if the
deferred `systemWide` announcements land, since those are entity-less by
definition.
Folded in here rather than kept as its own PR (#34192) because it is not
UI-reachable and does not warrant a separate review round.
## Testing
Audited the blast radius: `EntityLink` is shared, so every caller now sees ''
instead of `undefined`. 30 non-test files import it and none compare these
results to `undefined`, so no call site changes behaviour.
Added cases for '' and 'not-an-entity-link' covering all three accessors, that
`getEntityFqn('').split('::')` no longer throws, and that no literal
"undefined" leaks out. Verified the bug first by running main's own
`EntityLink.ts` against an empty link: `getEntityFqn` returned `undefined`,
`.split` threw, and `getEntityColumnFqn` returned "undefined".
|
Closing — folded into #34162 as 21c2832, unchanged apart from the commit message. The reason for closing rather than merging: this is not reachable from the UI, so it does not warrant its own review round. The only UI path that creates an announcement is the entity-page drawer, and The fix is still worth having, which is why it moved rather than being dropped:
Blast radius audited before folding it in: The PR description here overstated the severity by not saying it was API-only; the message on 21c2832 states it plainly. |
…ce (open-metadata#34162) * feat(announcements): type and colour announcements across every surface Announcements all rendered the same shade, so a deprecation notice and a critical outage looked identical wherever they appeared. This threads a type and a colour through every surface that shows one. ## Schema `type` already exists on the entity (open-metadata#33980) as Information / Warning / Issue, with a stored generated column, an index and a `?type=` filter behind it. Those values stay exactly as they are — the enum only gains `Deprecation` and `Custom`, and the UI relabels the two whose stored name differs from the design's vocabulary: `Information` renders as the blue **Notice** chip, `Issue` as the red **Critical** one. Nothing to migrate, and the existing filter keeps matching rows written before any of this. Two new fields ride along, read only when the type is `Custom`: | Field | Values | |---|---| | `color` | the 13 palette families, mapped 1:1 onto `BadgeColors` | | `customTypeName` | the announcement's own label, max 64 chars | Both live in the entity JSON, so there is still no migration. The form offers five of the thirteen colours; the schema accepts all of them so an announcement stored with another one still renders. ## Colour handling `ANNOUNCEMENT_COLORS` pins the schema enum to `BadgeColors` at compile time — if either list drifts, the record stops type-checking, so there is no raw hex anywhere. `Badge` supplies the pill; `ANNOUNCEMENT_SURFACE_CLASSES` supplies the banner's background, border, icon and title colour. Those classes are spelled out in full because Tailwind cannot see an interpolated class name. ## Surfaces - **Entity / domain / data-product pages** — a new `AnnouncementBanner`: a compact one-line strip that expands via View/Hide, with dismiss and carousel paging. Replaces `AnnouncementItemV3` and the 340px `AnnouncementCard`, so all three page types now show the same full-width strip above their tabs instead of a card wedged into the action-button row. - **Drawer** — All / Active / In-Active / Scheduled tabs replacing the active/inactive divider split, with each card tinted and badged by type, and its derived status as a filled pill hung off the card's top-right corner. Its header carries the same bottom rule as the add/edit dialog's, and the spacing settles into an even 24 / 24 / 20 rhythm — which meant deleting `announcement.less`: the redesign orphaned every rule in it, and the one still biting was a `margin-top` on `.announcement-thread-body` that, being unlayered LESS, beat the drawer's own gap. The status filter is `Badge` in toggle buttons — the same shape the type chips use — rather than a tab list: `Badge`'s own `color`/`brand` variant is exactly the frame's selected pill (blue-50 fill, blue-700 label, blue-200 edge, 8px radius) and `modern` is the resting one, needing only a `bg-secondary` override since it rests on white where the frame wants #FAFAFA. The header reserves its close-button space with a `md:`-prefixed padding, since core's own `tw:md:px-6` is a media-query rule and beats an unprefixed `tw:pr-*` whatever the class order — which had left the close button sitting on top of Add Announcement. - **Add / edit form** — type chips, plus a custom name and palette swatch row shown only for `Custom`. The two dialogs now share one body rather than keeping two copies of the field list in step. Both dates start empty rather than prefilled — a default window is a schedule the author never chose — and the submit button is gated on `formState.isValid`, so it stays disabled until every required field is filled. Both modals register with `mode: 'onChange'` so that validity tracks the fields live. A cleared date reads back as `null`, not `undefined`: react-hook-form treats `undefined` from `field.onChange` as "no change" and would keep the old value. No system-wide checkbox: broadcasting an announcement org-wide is its own change, so the dialog does not advertise a control that does nothing. The date fields' calendar icon sits at `z-1`: the input has to be positioned so the native picker indicator can stretch over it, and it carries an opaque background, so at `z-index: auto` paint order is DOM order and the input covered the icon entirely. `pointer-events-none` keeps the click falling through, so the picker still opens from anywhere in the field. Two tooltip fixes on the way through. The drawer's Add button suppresses its permission tooltip with `isDisabled` rather than by blanking `title` — an empty title still renders the bubble, which showed up as a small black dot beside the button. And the system-wide checkbox's tooltip drops `excludeTriggerFromTabOrder`: with a disabled child that branch renders a bare span with no `Focusable`, so the tooltip never opened at all; the focusable wrapper also makes the reason reachable by keyboard rather than hover only. The author on the banner and on the drawer card is wrapped in `UserPopOverCard`, so hovering it opens the usual profile card — `ProfilePicture` alone is just an avatar image and carries no popover of its own, which is why Collate's `UserChip` already wraps it the same way. ## Filtering The drawer's tabs need a status derived from the announcement's window. The stored `status` is only a snapshot of its last write, so a Scheduled announcement whose start time has since arrived still reads back as Scheduled. `getAnnouncementStatusCondition` computes it from `startTime`/`endTime`, both indexed, and reads `announcementStatus` so the generic `status` condition other resources share keeps meaning the column it names. That also fixes `?active=`, which was dead: `EntityDAO`'s list and count paths call the no-arg `getCondition()`, which passes a null table name, so the existing `announcement_entity` guard dropped the predicate on every call. Both announcement conditions now key off their query parameter alone — only `AnnouncementResource` sets them, and `startTime`/`endTime` exist on no other table. `AnnouncementUpdater` records `color` and `customTypeName` alongside `type`; without that a colour-only patch is silently a no-op. ## Testing - `mvn compile` and `spotless:apply` clean on `openmetadata-spec` + `openmetadata-service`. - `ListFilterTest`: 45 pass, including the window-derived status, the no-table-name paths, and that the announcement filter never falls through to the stored `status` column. - `AnnouncementResourceIT`: new cases for the Custom colour/name round-trip, colour-only and name-only patches, and status filtering across all three windows. - `tsc --noEmit` clean on every touched file; ESLint 0 errors; Prettier clean. - Jest: 208 tests / 18 suites pass across the announcement components and the three entity pages that embed them. - 11 new i18n keys, translated in all 20 locales; two keys the redesign makes unreachable removed. - Playwright: all 9 announcement specs **run green against a local stack** (entity-header 3, lifecycle 3, Domains 2, Data Marketplace 1). Selectors updated for the removed `view-all-btn`, `announcement-item-*`, `inActive-announcements` and the old counter. Two fixes the run surfaced: `announcementForm` no longer clicks and presses Enter on the date inputs — antd-DatePicker cruft that, now the picker indicator spans the whole native control, opened the picker and let Enter commit *today* over the end date just filled; and the carousel test names its announcements, since the list endpoint sorts by `name` and an omitted one is server-generated as `announcement-<uuid>`, making the "creation order" it asserted a random UUID sort. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): include the chosen end day in the announcement window Both date fields resolved to 00:00 of the picked day, so the end date was when the announcement *stopped* rather than its last day: an end date of Friday stopped showing as Friday began, and a one-day announcement was impossible — start and end landed on the same millisecond and tripped the `startTime >= endTime` guard. Picking today as the end date produced an announcement that was already Expired by the server's window-derived filter. `fromDateInputValue` now takes a boundary, and the end field passes `end` so it anchors to 23:59:59.999. `toDateInputValue` round-trips that back to the same date, so editing an existing announcement still shows the day the author chose. Reported by gitar-bot on open-metadata#34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): route every announcement list through ListFilter `AnnouncementDAO` overrode `listCount`/`listBefore`/`listAfter` with its own SQL whenever `active` was set, bypassing `ListFilter.getCondition()` entirely. That SQL bound `status`, but this branch moved the resource to set `announcementStatus`, so on that path the status predicate was always null and ?active=true&status=Scheduled returned every active announcement instead of none — a "Scheduled" query answering with Active ones. The overrides were redundant as well as wrong: their SQL duplicated the entityLink, type and active-window predicates that `ListFilter` already builds, and their `status` bind filtered on the stored `status` column — the stale snapshot this branch set out to stop relying on. Deleting them leaves one code path, and status is window-derived everywhere. ## Correcting the record The earlier commit claimed `?active=` was dead on main because `EntityDAO`'s list paths pass a null table name. That was wrong: these DAO overrides applied `active` through their own bind, so it worked. Removing the table-name guard from `getActiveCondition` is still required — it is what makes `active` work now that the overrides are gone — but it was not fixing a pre-existing bug, and the PR description has been corrected to say so. ## Testing Verified against a local stack, before and after: before: ?active=true&status=Scheduled -> 7 announcements, all Active after: ?active=true&status=Scheduled -> [] ?active=false&status=Active -> [] ?active=false&status=Scheduled -> the one scheduled announcement ?active=true&status=Active -> the seven active ones each of active / status / type alone unchanged - New `AnnouncementResourceIT` case pinning that `status` and `active` compose: both contradictory combinations are empty, the agreeing one narrows. - `ListFilterTest` 46 pass; `openmetadata-service` compiles with no dangling references to the removed queries. Reported by gitar-bot on open-metadata#34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): derive status on read and validate the Custom-only fields Two points from review on open-metadata#34162. **Status disagreed with the filter.** `status` was written once in `prepare()` and never recomputed, so a PATCH that moved the window left the old value in place. The list filter derives status from the window, so `?status=Expired` could return an announcement whose own `status` field still read `Active` — the UI derived it and looked right, but anyone reading the API saw the filter and the payload contradict each other: filter says Expired -> ['stale probe'] payload says -> Active `deriveStatus` is now the single source, called from `prepare()` on write and `setFields()` on read, so the stored column stops mattering for correctness. **`color` and `customTypeName` were unvalidated.** They only mean anything on a `Custom` announcement, and the form enforces that — but API, MCP and script callers do not go through the form, so the server would happily store a colour the UI never reads, or a `Custom` announcement with no label. `prepare()` now covers create, PUT and PATCH alike: `customTypeName` is required (and trimmed) for `Custom`, and both fields are cleared for every other type. ## Testing Verified against a local stack: Custom with no name -> 400 "customTypeName is required when the announcement type is Custom" Warning carrying a colour -> color and customTypeName both dropped Custom done properly -> color=success, customTypeName='Release' (trimmed) the stale announcement -> now reads Expired on GET (was Active) Across the 16 announcements on that stack: no non-Custom row carries a colour or name, and the four Custom ones keep theirs. - Three new `AnnouncementResourceIT` cases: status-on-read tracking a patched window, `Custom` rejected without a name, and a non-Custom announcement having its colour and name dropped. - `ListFilterTest` 46 pass. Reported by @sonika-shah. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * refactor(announcements)!: rename the type enum to match what the UI shows The stored enum said `Information` / `Issue` while every user saw "Notice" / "Critical", with a table in `AnnouncementsUtils` translating between them. That would have left the API and the UI speaking different languages permanently: anyone filtering with `?type=Issue`, reading the JSON, or building on the API from ingestion, MCP or a script would have had to know about that table. Renaming is free right now and stops being free shortly. open-metadata#33980 merged on Sep 25, is on no release branch, and was not backported — so nothing outside dev and sandbox holds these values. 2.1.0 is likewise untagged, so the one migration touch, the generated `type` column's `COALESCE` default, is edited in place rather than needing a follow-up data migration. `announcementType` is now `Critical` / `Notice` / `Warning` / `Deprecation` / `Custom`, default `Notice`: - both schemas and the regenerated POJOs and TS models - the 2.1.0 generated-column default, in MySQL and Postgres alike - `prepare()`'s backfill - `ANNOUNCEMENT_TYPE_CONFIG`, which now keys straight off the real values — the relabelling comment it carried is gone, which is the point of the change BREAKING CHANGE: `announcementType` values `Information` and `Issue` are now `Notice` and `Critical`. Unreleased, so no deployed caller is affected; any dev or sandbox row holding the old values needs recreating. ## Testing - `ListFilterTest` 46 pass; `openmetadata-service` and the integration tests compile; `AnnouncementResourceIT` renamed alongside. - Jest 158 tests / 16 suites; `tsc --noEmit` clean; ESLint 0 errors. - Grepped the tree: no `AnnouncementType.Information` or `.Issue` left in service, integration-test or UI sources, and no `Information` left in the schema or either dialect's 2.1.0 migration. Not re-verified against a running server: the local Collate build is blocked on an unrelated `PluginType.Hubspot` codegen failure from recent Collate main. The behavioural changes in the previous commit — status on read, Custom-field validation — were verified live before this rename. Requested by @sonika-shah on open-metadata#34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): migrate databases that already applied 2.1.0 to the new enum The rename commit claimed there was nothing to migrate because 2.1.0 is untagged. That is wrong for any database that has already run the 2.1.0 migration — nightly and sandbox both have. Two things are stale there: - rows written since open-metadata#33980 hold `"type":"Information"` or `"Issue"` in their JSON, which the renamed enum cannot deserialize; - rows written *before* open-metadata#33980 have no `$.type` at all and read back through the generated column's `COALESCE(..., 'Information')` default, so `?type=Notice` would never match them. Editing the existing `ADD COLUMN` statement in place does not reach them. A version is reprocessed statement-by-statement against SERVER_MIGRATION_SQL_LOGS (`MigrationFile.parseSQLFiles` skips any statement whose checksum is already logged), and that statement is both unchanged — so it never re-runs — and guarded on the column already existing, so it would be a no-op if it did. The fix has to be new statement text, which is what this is. Both dialects rewrite the two stored values, then redefine the column's default: MySQL with `MODIFY COLUMN`, Postgres by dropping and rebuilding the column (it cannot redefine a generation expression in place) and re-creating `idx_announcement_type`, which the drop takes with it. Both are guarded on the live generation expression still mentioning `Information`, so they are inert on a fresh install and on a second pass. ## Testing Ran both against real engines, seeding a table in the already-migrated shape (old `COALESCE(..., 'Information')` default) with one row per case — `Information`, `Issue`, `Warning`, and one with no `$.type` key: ``` before after Information / Information -> Notice / Notice Issue / Issue -> Critical / Critical Warning / Warning -> Warning / Warning (untouched) (none) / Information -> (none) / Notice (default moved) ``` MySQL 8 via the local dev container, Postgres 15 via a throwaway container. Verified afterwards that the generation expression reads `'Notice'` and that `idx_announcement_type` is present on both, and re-ran each script to confirm it is idempotent (`UPDATE 0`, guard false, no DDL). Reported by gitar-bot on open-metadata#34162. * fix(ui): step the announcement carousel from the rendered index `handleStep` stepped from `currentIndex` while the render clamps it with `Math.min(currentIndex, total - 1)`. Dismissing an announcement shrinks `visible` without moving `currentIndex`, so the two diverge and the arrow absorbs a click. With three announcements showing, paging to the last one and dismissing it leaves `currentIndex` at 2 while `total` drops to 2. The render clamps to 1 and shows the middle announcement; Previous is enabled because `index !== 0`. The first Previous click steps 2 -> 1, which is the announcement already on screen, so the arrow looks live and does nothing. The second click works. Stepping from the clamped `index` keeps the stored index from outliving the list. Dismiss is the only path that shrinks `visible` without a reset, but fixing it in `handleStep` covers any future one too. ## Testing Added a regression test that pages to the last announcement, dismisses it, and asserts a *single* Previous click reaches the first one. Verified it fails on the old code (1 failed / 11 passed) and passes on the new (12 passed), so it pins the behaviour rather than the implementation. Announcement suites: 98 pass / 13 suites. ESLint + Prettier clean. Reported by gitar-bot on open-metadata#34162. * fix(announcements): derive status on the list path too, not just on GET Deriving status in `setFields` covered single-entity reads only. The list path goes `listAfter` -> `setFieldsInBulk` -> `fetchAndSetFields`, which runs the registered field fetchers and never calls the per-entity `setFields`, so list responses kept returning the stored write-time snapshot. That put the filter and the payload in direct contradiction for exactly the rows the filter exists to find. Against a local stack, `?status=Expired` returned four announcements whose own `status` read `Active`, `Active`, `Expired`, `Scheduled` — the filter had correctly matched `endTime < now` on all four, and three of them then reported something else. The same row read `Expired` on `GET /announcements/{id}` and `Scheduled` in the list. Overriding the two-arg `setFieldsInBulk` covers both overloads, since the three-arg one delegates to it. ## Testing Extended `testStatusOnReadTracksTheWindowNotTheStoredValue` to assert the list path as well. It previously asserted only the GET, which is precisely how this escaped — the test passed while the list it shares a filter with disagreed. Verified live on the local stack after the fix: ``` ?status=Active n=12 statuses={'Active': 12} ?status=Scheduled n=1 statuses={'Scheduled': 1} ?status=Expired n=4 statuses={'Expired': 4} <- was mixed ``` and cross-checked every one of the 17 announcements in the database GET-vs-LIST: 0 mismatches. `ListFilterTest` 46 pass. * fix(ui): return '' from the EntityLink accessors instead of undefined `EntityLink.split` returns [] for an empty or unparseable link, so `getEntityType` / `getEntityFqn` indexed past the end and returned `undefined` while their signatures promise a `string`. Callers are entitled to trust the declared type, and the announcement widgets do: const fqn = getEntityFQN(announcement.entityLink ?? ''); entityName: fqn.split('::').pop() || '', // TypeError That runs in a `useMemo` during render, so React unwinds to the error boundary and the whole MyData page becomes "Something went wrong" rather than one broken card. The home widget calls `getActiveAnnouncements()` with no entityLink, so a single such announcement anywhere takes the page down for every user. `getEntityColumnFqn` was the quieter half: an empty link interpolated to the literal string "undefined" — truthy, and rendered and compared as though it were a real FQN. Returning '' keeps a missing link falsy so existing guards catch it. Not reachable from the UI. The only UI path that creates an announcement is the entity-page drawer, and `AddAnnouncementModal` always sets `entityLink: getEntityFeedLink(entityType, entityFQN)` from required props. I also checked the parser is not the way in: quoted segments, spaces, colons, angle brackets and unicode in an FQN all parse fine — only an empty link yields []. So the trigger is a row written through the API, SDK, MCP or a script, which the schema allows (`required` is description/startTime/endTime only), and which is how it was hit locally. It also stops being theoretical if the deferred `systemWide` announcements land, since those are entity-less by definition. Folded in here rather than kept as its own PR (open-metadata#34192) because it is not UI-reachable and does not warrant a separate review round. ## Testing Audited the blast radius: `EntityLink` is shared, so every caller now sees '' instead of `undefined`. 30 non-test files import it and none compare these results to `undefined`, so no call site changes behaviour. Added cases for '' and 'not-an-entity-link' covering all three accessors, that `getEntityFqn('').split('::')` no longer throws, and that no literal "undefined" leaks out. Verified the bug first by running main's own `EntityLink.ts` against an empty link: `getEntityFqn` returned `undefined`, `.split` threw, and `getEntityColumnFqn` returned "undefined". * fix(ui): read the EntityLink accessors with || in ActivityFeedCardNew `getEntityFQN` / `getEntityType` now answer '' for a missing or unparseable link rather than `undefined`, and `??` does not treat '' as absent. An activity event's `about` is optional, so for an event without one the card stopped falling through to `activity.entity` and rendered with an empty entity type and FQN: the header link pointed at `//`, the entity name was blank, the icon was missing and the popover had nothing to resolve. Switched both reads to `||`. The empty string and `undefined` are equally "no link here", which is exactly what `||` means and `??` does not. The other `??` call sites that touch these accessors are unaffected: `NavBar` and `ActivityThreadPanelBody` put the accessor on the left of a `?? ''`, where '' and `undefined` collapse to the same result, and `NotificationBox` puts it on the right of the fallback, so it is only reached when there is no entityRef and both values are falsy downstream. ## Testing Regression test renders an activity event with no `about` and asserts the header link resolves to the entity's own FQN. Verified it fails on the unfixed code (`href="//"`) and passes on the fix — 8 passed. ESLint 0 errors, Prettier clean, `tsc --noEmit` clean on both files. Reported by gitar-bot on open-metadata#34162. * fix(ui): drop the circle around the announcement type icon The type icons are already ringed glyphs — an info circle, a warning triangle in a circle — so wrapping each one in a hairline circle read as a frame around a frame. Removed the `rounded-full` / `border` / `bg-primary` chrome and the fixed 28px/40px box; the icon carries the type colour on its own, as it already did. The icon keeps the size it had inside the circle, 16px beside the badge and 20px on the landing banner. Losing the frame is not a reason to grow the glyph: it sits next to 12px label text, and anything larger outweighs the title it annotates. `AnnouncementTypeChip` is the single component all three announcement surfaces share — entity-page banner, drawer card and AI Home widget — so this lands on each of them at once. `surface.border` now has no consumer, so the prop type narrows to `{ icon: string }`. The 13 `border:` entries stay in ANNOUNCEMENT_SURFACE_CLASSES: it is a symmetric palette table, and pruning one of four slots per family is churn for no gain. The remaining span is layout-only. It holds `shrink-0` so the icon keeps its width in the flex rows all three surfaces put it in, and carries the test id. ## Testing `AnnouncementBanner.test.tsx` selected the chip with `querySelector('span.tw\\:rounded-full')` — coupled to a utility class it had no business reading, and the class this removes. Now queries the `announcement-type-icon` test id. 41 tests across all six announcement suites pass, plus Collate's AI Home widget suite (10) against a refreshed mirror. `tsc --noEmit` clean, ESLint 0 errors, Prettier clean. * chore(playwright): auto-refresh impact-map.generated.json * fix(announcements): require a colour for Custom and bound the name on every path Two gaps where the form enforced something the server did not, both reachable by any API, MCP or script caller. **Colour was required in the form but not on the server.** AnnouncementForm marks it required for Custom; prepare() only checked the name. A Custom announcement created over the API with no colour was stored and then rendered in getAnnouncementTypeConfig's pink fallback — a colour its author never chose, and one that looks deliberate. prepare() now rejects it. **The 64-character limit on customTypeName was bypassable with PATCH.** maxLength rides on `@Valid CreateAnnouncement`, so it runs on create and PUT only; JsonUtils.applyPatch binds the patched JSON straight to the POJO with OBJECT_MAPPER.readValue and no bean validation. Checking the length in prepare() covers create, PUT and PATCH at once. It is measured after trim(), which is the value actually stored — the schema measures the value as sent, so the two disagree only on names that are over the limit by whitespace alone, and the stricter of the two wins. Reproduced both against a running server before changing anything: POST Custom, no color -> 201, stored color: null POST 200-char customTypeName -> 400 "size must be between 1 and 64" PATCH the same value -> 200, stored and read back at 200 chars ## Testing AnnouncementResourceIT: 219 run, 0 failures on PostgreSQL. testCustomAnnouncementRequiresItsName asserted `Exception.class`, which a 500 would also satisfy. Now asserts InvalidRequestException — the SDK's 400 and only its 400, since any other status falls to ApiException in OpenMetadataHttpClient.handleErrorResponse. Three new cases: the missing-colour rejection, the PATCH length rejection (which also asserts the stored value is untouched), and a 64-character name accepted, so the boundary is pinned from both sides. The PATCH case asserts on the cause rather than the thrown type: unlike create, EntityServiceBase.update wraps every failure in a bare OpenMetadataException, so the typed 400 only survives underneath it. Reported by @sonika-shah on open-metadata#34162. * fix(announcements): use core components for the selectors, tabs and status pill Follow-up review pass over the announcement surfaces, replacing hand-rolled widgets with their `ui-core-components` equivalents and fixing the alignment and spacing the design called out. Core components in place of hand-rolled widgets: - The drawer's status filters were four `aria-pressed` buttons wrapping Badges. They switch which announcements the body below shows, which is what `role="tab"` means, so they are now `Tabs` + `Tabs.List` — one tab stop, arrow-key navigation and `aria-selected` instead of four independent toggles. - The announcement type chips and the colour swatches were also `aria-pressed` button rows. Both are single-choice, so both are now `RadioGroup` + `RadioButton`. The type chips hide the radio indicator and keep the Badge as the label; the colour swatches use the indicator *as* the swatch, so the selected white centre dot and brand edge come from `RadioButtonBase` rather than being drawn a second time. - `FieldError` hand-rolled the error line. It is now core's `HintText`, and the two `Input` fields take the message as `hint` instead — which also wires `aria-describedby` through `TextField`'s `errorMessage` slot, so the error is no longer invisible to screen readers. - The drawer card's status pill was a `Typography` plus a three-entry class table that reproduced `filledColors.success/.blue/.gray` verbatim. It is a `Badge` with a `BadgeColors` map. - The eight raw `<div className="tw:flex ...">` layout containers in the form are `Box`, matching the rest of the feature. - The drawer header's bare icon is the same framed `FeaturedIcon` the add/edit dialog header uses, so the two headers read as one component. Tooltips: - The banner wrapped `Typography` in a hand-written `Tooltip` in three places, reimplementing `ellipsis.tooltip`. Two of those copied core's trigger classes minus `tw:w-full`, so `twMerge` left the generated wrapper's `tw:w-max` in place and the text never ellipsized. All three now use the built-in. - The clickable title cannot: the trigger `Typography` generates is itself an AriaButton, so putting it inside a `<button>` nests one button in another — `Tooltip` excludes `button` from `NATIVELY_FOCUSABLE_HTML` on purpose and wraps it anyway. `Tooltip` now takes the click handler via `onTriggerPress` and generates that single button. - The generated trigger is a `<button>` and preflight does not reset the UA `text-align: center`, so a stretched trigger centred its label. The three hosts set `tw:[&>button]:text-start`. Accessibility and polish: - The banner root was `role="status"`. A live region re-announces its whole contents on every change, and this one holds buttons and steps through a carousel, so a screen reader read the entire banner again on each arrow press and each expand. It is a labelled `<section>`. - The colour swatches shipped the raw enum (`"BlueLight"`) as their accessible name. They now use `ANNOUNCEMENT_COLOR_LABEL_KEYS`, mapping each palette family to the colour name the app already uses elsewhere. Two had no key, so `label.color-brand` and `label.color-indigo` are new and translated in all 19 non-English locales. - Dropped the unused `border` entry from `ANNOUNCEMENT_SURFACE_CLASSES`, and recorded why that table restates `filledColors` and where it deliberately differs. - Both `tw:bg-primary!` Badge overrides now say why they exist. - Status pill moved clear of the actions menu, and the status tabs are a rounded rectangle rather than a pill, per the frame. The native date inputs stay as they are: `openmetadata-ui` and the linked core package resolve separate copies of `react-aria-components` and `@internationalized/date`, and `CalendarDate` declares `#private`, so core's `DatePicker` cannot accept an app-side `DateValue` and core's `DateInput` cannot be driven by an app-side `DateField`. * fix(announcements): draw the type chip's focus ring on the chip The chips hide the radio indicator, since the Badge is the whole visual. Core draws the focus ring on `RadioButtonBase` — the same element `indicatorClassName` lands on — so `tw:hidden` took the ring with it, and arrowing through the group left the selection fill as the only cue to where focus was. Move the ring to the chip itself. * feat(announcements): make the whole banner the click target The title alone was the click target, which made it carry the banner's action as well as its own tooltip. The whole card opens the announcement now. The banner cannot *be* the button: it holds the dismiss and expand controls, and ARIA makes a button's descendants presentational, which would hide those from a screen reader. A bare `onClick` on the container is no better — a static element with a click handler and no keyboard path, which `click-events-have-key-events`, `no-static-element-interactions` and `interactive-supports-focus` all reject. So the click target is a transparent control of its own, stretched across the banner, and it is the keyboard path. It deliberately carries no tooltip. Hanging it off the title's tooltip trigger instead — the first shape this took — meant a hover anywhere on the banner popped the title's tooltip and the description never showed its own. Title and description each own their trigger again, through `ellipsis.tooltip` like every other truncated label, and both sit above the overlay so a pointer on the text still opens the announcement. The chip, the badge and the padding stay beneath it, so a pointer there opens it too. That leaves no hand-written `Tooltip` in this file at all. The banner also gets `isolate`. Those z-indexes would otherwise land in the root stacking context, where they beat the announcement drawer: its overlay is `fixed` with no z-index, so it wins on DOM order alone and anything at `z-index >= 1` paints straight through it — the description, View and dismiss were drawing over the open drawer. The same trap core's `Tab` already documents for full-screen lineage. * fix(announcements): lift the rendered description above the click overlay The collapsed strip's flattened description was raised, but the markdown `RichTextEditorPreviewerV1` renders in the expanded and landing bodies was not, so once a banner was expanded its description sat under the transparent overlay. Links and mentions in it stopped working — every click opened the drawer instead — and the text could no longer be selected or copied. It gets no `onClick` of its own, unlike the collapsed strip: a handler there would fire on those same links. * refactor(announcements): use Box for the type chip's layout wrapper The chip's only element was a raw `<div>`-equivalent span doing flex layout; that is what `Box` is for. No visual change. Also records why this is not a `Badge`, since the question keeps coming up: `BadgeIcon` paints the same `50` fill the banner and drawer card use as their surface, so only its `200` outline would show — the hairline circle around an already-ringed glyph that this design dropped on purpose — and it takes no `className` to lift that fill with. `BadgeWithIcon` requires `children`, so it would fold the icon into the label's pill. Both hard-code the glyph at 12px. * refactor(announcements): drop the text-align workaround core now handles open-metadata#34106 landed `[text-align:inherit]` on `Typography`'s ellipsis tooltip trigger, so the trigger follows its host instead of keeping the UA `text-align: center` that preflight does not reset. The `[&>button]:text-start` this call site carried is redundant; the host keeps `min-w-0`, which is still the only way to let the trigger shrink below its content and ellipsize. Two tests described the old mechanism and now pin the new one: truncation comes from core's `max-w-full` capping `Tooltip`'s default `w-max`, and alignment from `[text-align:inherit]` on the trigger rather than a class on the host. * refactor(announcements): drop the type-chip wrapper It passed two classes through to an icon and added a span to hold `shrink-0`, which the icon can carry itself — the kind of pass-through wrapper the repo rules call a maintenance liability. Each of its three call sites is now the one-line icon it always rendered, and the 62-line module is gone. Its `data-testid` goes with it, since `IconComponentType` accepts only `className` and `strokeWidth`. The one test that used it now anchors on the type badge, which shares the same header row and pins the same invariant. * fix(announcements): skip the list-count cache for window-derived filters `getAnnouncementStatusCondition` and `getActiveCondition` compare an announcement's window against `System.currentTimeMillis()`, so the rows they return change as announcements cross their start and end times. `ListCountCache` hashes only `queryParams`, so `?announcementStatus=Active` always hashes the same and its `paging.total` is computed once and then reused. Nothing clears it. The cache's own javadoc notes that any write to the entity type refreshes the TTL for every field, leaving the invalidation hooks as the only bound — and those fire on create/delete/restore, none of which an announcement crossing its window performs. The total could stay out of step with the returned rows indefinitely. `ListFilter.isTimeDependent()` marks those two params and `getOrCompute` treats it like a bypass, so the count is recomputed per request. Everything else keeps caching as before. * fix(announcements): state the title's alignment instead of inheriting it Core's ellipsis trigger carries `[text-align:inherit]`, which cures the `text-align: center` a `<button>` is born with — preflight resets a button's font and colour but not its alignment — and then follows whatever the ancestors say. The trigger is `inline-flex`, so the moment its host is wider than the text, that inherited value decides where it sits. Collapsed, the host is capped at content width and there is no slack to drift into. Expanded, the host is a stretched flex item, and the title rendered in the middle of the banner. The host now says `text-start` rather than leaving it to the page the banner happens to be dropped into. * feat(announcements): show the expanded title in full, without a tooltip Collapsed, the title shares one line with the description, so it truncates and carries the overflow tooltip. Expanded there is room to wrap, so it now shows in full and drops the tooltip — repeating text already on screen. That also settles the centring. `Typography` only builds its trigger `<button>` when it has a tooltip to anchor, and a button is born with `text-align: center` that preflight does not reset; the untruncated title is a plain span, so there is nothing to centre. The collapsed title still has a trigger and still relies on the host's `text-start` for the same reason. * fix(announcements): let the untruncated title wrap instead of overflowing Dropping `truncate` on the expanded and landing titles also dropped the only thing keeping a long one inside the banner. A flex item's minimum is its min-content width, so a title with no break points — an FQN, a URL, a bare identifier — cannot shrink, and with nowhere to break it ran past the banner's edge, carrying the badge beside it on the landing layout. Measured against the app's own stylesheet at 900px: the title's right edge sat at 1157 against a 900 edge, 314px out. With `min-w-0 break-words` it wraps to two lines and both it and the badge land inside the padding. --------- Co-authored-by: Shrabanti Paul <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…gets (open-metadata#34770) * feat(announcements): type and colour announcements across every surface Announcements all rendered the same shade, so a deprecation notice and a critical outage looked identical wherever they appeared. This threads a type and a colour through every surface that shows one. ## Schema `type` already exists on the entity (#33980) as Information / Warning / Issue, with a stored generated column, an index and a `?type=` filter behind it. Those values stay exactly as they are — the enum only gains `Deprecation` and `Custom`, and the UI relabels the two whose stored name differs from the design's vocabulary: `Information` renders as the blue **Notice** chip, `Issue` as the red **Critical** one. Nothing to migrate, and the existing filter keeps matching rows written before any of this. Two new fields ride along, read only when the type is `Custom`: | Field | Values | |---|---| | `color` | the 13 palette families, mapped 1:1 onto `BadgeColors` | | `customTypeName` | the announcement's own label, max 64 chars | Both live in the entity JSON, so there is still no migration. The form offers five of the thirteen colours; the schema accepts all of them so an announcement stored with another one still renders. ## Colour handling `ANNOUNCEMENT_COLORS` pins the schema enum to `BadgeColors` at compile time — if either list drifts, the record stops type-checking, so there is no raw hex anywhere. `Badge` supplies the pill; `ANNOUNCEMENT_SURFACE_CLASSES` supplies the banner's background, border, icon and title colour. Those classes are spelled out in full because Tailwind cannot see an interpolated class name. ## Surfaces - **Entity / domain / data-product pages** — a new `AnnouncementBanner`: a compact one-line strip that expands via View/Hide, with dismiss and carousel paging. Replaces `AnnouncementItemV3` and the 340px `AnnouncementCard`, so all three page types now show the same full-width strip above their tabs instead of a card wedged into the action-button row. - **Drawer** — All / Active / In-Active / Scheduled tabs replacing the active/inactive divider split, with each card tinted and badged by type, and its derived status as a filled pill hung off the card's top-right corner. Its header carries the same bottom rule as the add/edit dialog's, and the spacing settles into an even 24 / 24 / 20 rhythm — which meant deleting `announcement.less`: the redesign orphaned every rule in it, and the one still biting was a `margin-top` on `.announcement-thread-body` that, being unlayered LESS, beat the drawer's own gap. The status filter is `Badge` in toggle buttons — the same shape the type chips use — rather than a tab list: `Badge`'s own `color`/`brand` variant is exactly the frame's selected pill (blue-50 fill, blue-700 label, blue-200 edge, 8px radius) and `modern` is the resting one, needing only a `bg-secondary` override since it rests on white where the frame wants #FAFAFA. The header reserves its close-button space with a `md:`-prefixed padding, since core's own `tw:md:px-6` is a media-query rule and beats an unprefixed `tw:pr-*` whatever the class order — which had left the close button sitting on top of Add Announcement. - **Add / edit form** — type chips, plus a custom name and palette swatch row shown only for `Custom`. The two dialogs now share one body rather than keeping two copies of the field list in step. Both dates start empty rather than prefilled — a default window is a schedule the author never chose — and the submit button is gated on `formState.isValid`, so it stays disabled until every required field is filled. Both modals register with `mode: 'onChange'` so that validity tracks the fields live. A cleared date reads back as `null`, not `undefined`: react-hook-form treats `undefined` from `field.onChange` as "no change" and would keep the old value. No system-wide checkbox: broadcasting an announcement org-wide is its own change, so the dialog does not advertise a control that does nothing. The date fields' calendar icon sits at `z-1`: the input has to be positioned so the native picker indicator can stretch over it, and it carries an opaque background, so at `z-index: auto` paint order is DOM order and the input covered the icon entirely. `pointer-events-none` keeps the click falling through, so the picker still opens from anywhere in the field. Two tooltip fixes on the way through. The drawer's Add button suppresses its permission tooltip with `isDisabled` rather than by blanking `title` — an empty title still renders the bubble, which showed up as a small black dot beside the button. And the system-wide checkbox's tooltip drops `excludeTriggerFromTabOrder`: with a disabled child that branch renders a bare span with no `Focusable`, so the tooltip never opened at all; the focusable wrapper also makes the reason reachable by keyboard rather than hover only. The author on the banner and on the drawer card is wrapped in `UserPopOverCard`, so hovering it opens the usual profile card — `ProfilePicture` alone is just an avatar image and carries no popover of its own, which is why Collate's `UserChip` already wraps it the same way. ## Filtering The drawer's tabs need a status derived from the announcement's window. The stored `status` is only a snapshot of its last write, so a Scheduled announcement whose start time has since arrived still reads back as Scheduled. `getAnnouncementStatusCondition` computes it from `startTime`/`endTime`, both indexed, and reads `announcementStatus` so the generic `status` condition other resources share keeps meaning the column it names. That also fixes `?active=`, which was dead: `EntityDAO`'s list and count paths call the no-arg `getCondition()`, which passes a null table name, so the existing `announcement_entity` guard dropped the predicate on every call. Both announcement conditions now key off their query parameter alone — only `AnnouncementResource` sets them, and `startTime`/`endTime` exist on no other table. `AnnouncementUpdater` records `color` and `customTypeName` alongside `type`; without that a colour-only patch is silently a no-op. ## Testing - `mvn compile` and `spotless:apply` clean on `openmetadata-spec` + `openmetadata-service`. - `ListFilterTest`: 45 pass, including the window-derived status, the no-table-name paths, and that the announcement filter never falls through to the stored `status` column. - `AnnouncementResourceIT`: new cases for the Custom colour/name round-trip, colour-only and name-only patches, and status filtering across all three windows. - `tsc --noEmit` clean on every touched file; ESLint 0 errors; Prettier clean. - Jest: 208 tests / 18 suites pass across the announcement components and the three entity pages that embed them. - 11 new i18n keys, translated in all 20 locales; two keys the redesign makes unreachable removed. - Playwright: all 9 announcement specs **run green against a local stack** (entity-header 3, lifecycle 3, Domains 2, Data Marketplace 1). Selectors updated for the removed `view-all-btn`, `announcement-item-*`, `inActive-announcements` and the old counter. Two fixes the run surfaced: `announcementForm` no longer clicks and presses Enter on the date inputs — antd-DatePicker cruft that, now the picker indicator spans the whole native control, opened the picker and let Enter commit *today* over the end date just filled; and the carousel test names its announcements, since the list endpoint sorts by `name` and an omitted one is server-generated as `announcement-<uuid>`, making the "creation order" it asserted a random UUID sort. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): include the chosen end day in the announcement window Both date fields resolved to 00:00 of the picked day, so the end date was when the announcement *stopped* rather than its last day: an end date of Friday stopped showing as Friday began, and a one-day announcement was impossible — start and end landed on the same millisecond and tripped the `startTime >= endTime` guard. Picking today as the end date produced an announcement that was already Expired by the server's window-derived filter. `fromDateInputValue` now takes a boundary, and the end field passes `end` so it anchors to 23:59:59.999. `toDateInputValue` round-trips that back to the same date, so editing an existing announcement still shows the day the author chose. Reported by gitar-bot on #34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): route every announcement list through ListFilter `AnnouncementDAO` overrode `listCount`/`listBefore`/`listAfter` with its own SQL whenever `active` was set, bypassing `ListFilter.getCondition()` entirely. That SQL bound `status`, but this branch moved the resource to set `announcementStatus`, so on that path the status predicate was always null and ?active=true&status=Scheduled returned every active announcement instead of none — a "Scheduled" query answering with Active ones. The overrides were redundant as well as wrong: their SQL duplicated the entityLink, type and active-window predicates that `ListFilter` already builds, and their `status` bind filtered on the stored `status` column — the stale snapshot this branch set out to stop relying on. Deleting them leaves one code path, and status is window-derived everywhere. ## Correcting the record The earlier commit claimed `?active=` was dead on main because `EntityDAO`'s list paths pass a null table name. That was wrong: these DAO overrides applied `active` through their own bind, so it worked. Removing the table-name guard from `getActiveCondition` is still required — it is what makes `active` work now that the overrides are gone — but it was not fixing a pre-existing bug, and the PR description has been corrected to say so. ## Testing Verified against a local stack, before and after: before: ?active=true&status=Scheduled -> 7 announcements, all Active after: ?active=true&status=Scheduled -> [] ?active=false&status=Active -> [] ?active=false&status=Scheduled -> the one scheduled announcement ?active=true&status=Active -> the seven active ones each of active / status / type alone unchanged - New `AnnouncementResourceIT` case pinning that `status` and `active` compose: both contradictory combinations are empty, the agreeing one narrows. - `ListFilterTest` 46 pass; `openmetadata-service` compiles with no dangling references to the removed queries. Reported by gitar-bot on #34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): derive status on read and validate the Custom-only fields Two points from review on #34162. **Status disagreed with the filter.** `status` was written once in `prepare()` and never recomputed, so a PATCH that moved the window left the old value in place. The list filter derives status from the window, so `?status=Expired` could return an announcement whose own `status` field still read `Active` — the UI derived it and looked right, but anyone reading the API saw the filter and the payload contradict each other: filter says Expired -> ['stale probe'] payload says -> Active `deriveStatus` is now the single source, called from `prepare()` on write and `setFields()` on read, so the stored column stops mattering for correctness. **`color` and `customTypeName` were unvalidated.** They only mean anything on a `Custom` announcement, and the form enforces that — but API, MCP and script callers do not go through the form, so the server would happily store a colour the UI never reads, or a `Custom` announcement with no label. `prepare()` now covers create, PUT and PATCH alike: `customTypeName` is required (and trimmed) for `Custom`, and both fields are cleared for every other type. ## Testing Verified against a local stack: Custom with no name -> 400 "customTypeName is required when the announcement type is Custom" Warning carrying a colour -> color and customTypeName both dropped Custom done properly -> color=success, customTypeName='Release' (trimmed) the stale announcement -> now reads Expired on GET (was Active) Across the 16 announcements on that stack: no non-Custom row carries a colour or name, and the four Custom ones keep theirs. - Three new `AnnouncementResourceIT` cases: status-on-read tracking a patched window, `Custom` rejected without a name, and a non-Custom announcement having its colour and name dropped. - `ListFilterTest` 46 pass. Reported by @sonika-shah. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * refactor(announcements)!: rename the type enum to match what the UI shows The stored enum said `Information` / `Issue` while every user saw "Notice" / "Critical", with a table in `AnnouncementsUtils` translating between them. That would have left the API and the UI speaking different languages permanently: anyone filtering with `?type=Issue`, reading the JSON, or building on the API from ingestion, MCP or a script would have had to know about that table. Renaming is free right now and stops being free shortly. #33980 merged on Sep 25, is on no release branch, and was not backported — so nothing outside dev and sandbox holds these values. 2.1.0 is likewise untagged, so the one migration touch, the generated `type` column's `COALESCE` default, is edited in place rather than needing a follow-up data migration. `announcementType` is now `Critical` / `Notice` / `Warning` / `Deprecation` / `Custom`, default `Notice`: - both schemas and the regenerated POJOs and TS models - the 2.1.0 generated-column default, in MySQL and Postgres alike - `prepare()`'s backfill - `ANNOUNCEMENT_TYPE_CONFIG`, which now keys straight off the real values — the relabelling comment it carried is gone, which is the point of the change BREAKING CHANGE: `announcementType` values `Information` and `Issue` are now `Notice` and `Critical`. Unreleased, so no deployed caller is affected; any dev or sandbox row holding the old values needs recreating. ## Testing - `ListFilterTest` 46 pass; `openmetadata-service` and the integration tests compile; `AnnouncementResourceIT` renamed alongside. - Jest 158 tests / 16 suites; `tsc --noEmit` clean; ESLint 0 errors. - Grepped the tree: no `AnnouncementType.Information` or `.Issue` left in service, integration-test or UI sources, and no `Information` left in the schema or either dialect's 2.1.0 migration. Not re-verified against a running server: the local Collate build is blocked on an unrelated `PluginType.Hubspot` codegen failure from recent Collate main. The behavioural changes in the previous commit — status on read, Custom-field validation — were verified live before this rename. Requested by @sonika-shah on #34162. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(announcements): migrate databases that already applied 2.1.0 to the new enum The rename commit claimed there was nothing to migrate because 2.1.0 is untagged. That is wrong for any database that has already run the 2.1.0 migration — nightly and sandbox both have. Two things are stale there: - rows written since #33980 hold `"type":"Information"` or `"Issue"` in their JSON, which the renamed enum cannot deserialize; - rows written *before* #33980 have no `$.type` at all and read back through the generated column's `COALESCE(..., 'Information')` default, so `?type=Notice` would never match them. Editing the existing `ADD COLUMN` statement in place does not reach them. A version is reprocessed statement-by-statement against SERVER_MIGRATION_SQL_LOGS (`MigrationFile.parseSQLFiles` skips any statement whose checksum is already logged), and that statement is both unchanged — so it never re-runs — and guarded on the column already existing, so it would be a no-op if it did. The fix has to be new statement text, which is what this is. Both dialects rewrite the two stored values, then redefine the column's default: MySQL with `MODIFY COLUMN`, Postgres by dropping and rebuilding the column (it cannot redefine a generation expression in place) and re-creating `idx_announcement_type`, which the drop takes with it. Both are guarded on the live generation expression still mentioning `Information`, so they are inert on a fresh install and on a second pass. ## Testing Ran both against real engines, seeding a table in the already-migrated shape (old `COALESCE(..., 'Information')` default) with one row per case — `Information`, `Issue`, `Warning`, and one with no `$.type` key: ``` before after Information / Information -> Notice / Notice Issue / Issue -> Critical / Critical Warning / Warning -> Warning / Warning (untouched) (none) / Information -> (none) / Notice (default moved) ``` MySQL 8 via the local dev container, Postgres 15 via a throwaway container. Verified afterwards that the generation expression reads `'Notice'` and that `idx_announcement_type` is present on both, and re-ran each script to confirm it is idempotent (`UPDATE 0`, guard false, no DDL). Reported by gitar-bot on #34162. * fix(ui): step the announcement carousel from the rendered index `handleStep` stepped from `currentIndex` while the render clamps it with `Math.min(currentIndex, total - 1)`. Dismissing an announcement shrinks `visible` without moving `currentIndex`, so the two diverge and the arrow absorbs a click. With three announcements showing, paging to the last one and dismissing it leaves `currentIndex` at 2 while `total` drops to 2. The render clamps to 1 and shows the middle announcement; Previous is enabled because `index !== 0`. The first Previous click steps 2 -> 1, which is the announcement already on screen, so the arrow looks live and does nothing. The second click works. Stepping from the clamped `index` keeps the stored index from outliving the list. Dismiss is the only path that shrinks `visible` without a reset, but fixing it in `handleStep` covers any future one too. ## Testing Added a regression test that pages to the last announcement, dismisses it, and asserts a *single* Previous click reaches the first one. Verified it fails on the old code (1 failed / 11 passed) and passes on the new (12 passed), so it pins the behaviour rather than the implementation. Announcement suites: 98 pass / 13 suites. ESLint + Prettier clean. Reported by gitar-bot on #34162. * fix(announcements): derive status on the list path too, not just on GET Deriving status in `setFields` covered single-entity reads only. The list path goes `listAfter` -> `setFieldsInBulk` -> `fetchAndSetFields`, which runs the registered field fetchers and never calls the per-entity `setFields`, so list responses kept returning the stored write-time snapshot. That put the filter and the payload in direct contradiction for exactly the rows the filter exists to find. Against a local stack, `?status=Expired` returned four announcements whose own `status` read `Active`, `Active`, `Expired`, `Scheduled` — the filter had correctly matched `endTime < now` on all four, and three of them then reported something else. The same row read `Expired` on `GET /announcements/{id}` and `Scheduled` in the list. Overriding the two-arg `setFieldsInBulk` covers both overloads, since the three-arg one delegates to it. ## Testing Extended `testStatusOnReadTracksTheWindowNotTheStoredValue` to assert the list path as well. It previously asserted only the GET, which is precisely how this escaped — the test passed while the list it shares a filter with disagreed. Verified live on the local stack after the fix: ``` ?status=Active n=12 statuses={'Active': 12} ?status=Scheduled n=1 statuses={'Scheduled': 1} ?status=Expired n=4 statuses={'Expired': 4} <- was mixed ``` and cross-checked every one of the 17 announcements in the database GET-vs-LIST: 0 mismatches. `ListFilterTest` 46 pass. * fix(ui): return '' from the EntityLink accessors instead of undefined `EntityLink.split` returns [] for an empty or unparseable link, so `getEntityType` / `getEntityFqn` indexed past the end and returned `undefined` while their signatures promise a `string`. Callers are entitled to trust the declared type, and the announcement widgets do: const fqn = getEntityFQN(announcement.entityLink ?? ''); entityName: fqn.split('::').pop() || '', // TypeError That runs in a `useMemo` during render, so React unwinds to the error boundary and the whole MyData page becomes "Something went wrong" rather than one broken card. The home widget calls `getActiveAnnouncements()` with no entityLink, so a single such announcement anywhere takes the page down for every user. `getEntityColumnFqn` was the quieter half: an empty link interpolated to the literal string "undefined" — truthy, and rendered and compared as though it were a real FQN. Returning '' keeps a missing link falsy so existing guards catch it. Not reachable from the UI. The only UI path that creates an announcement is the entity-page drawer, and `AddAnnouncementModal` always sets `entityLink: getEntityFeedLink(entityType, entityFQN)` from required props. I also checked the parser is not the way in: quoted segments, spaces, colons, angle brackets and unicode in an FQN all parse fine — only an empty link yields []. So the trigger is a row written through the API, SDK, MCP or a script, which the schema allows (`required` is description/startTime/endTime only), and which is how it was hit locally. It also stops being theoretical if the deferred `systemWide` announcements land, since those are entity-less by definition. Folded in here rather than kept as its own PR (#34192) because it is not UI-reachable and does not warrant a separate review round. ## Testing Audited the blast radius: `EntityLink` is shared, so every caller now sees '' instead of `undefined`. 30 non-test files import it and none compare these results to `undefined`, so no call site changes behaviour. Added cases for '' and 'not-an-entity-link' covering all three accessors, that `getEntityFqn('').split('::')` no longer throws, and that no literal "undefined" leaks out. Verified the bug first by running main's own `EntityLink.ts` against an empty link: `getEntityFqn` returned `undefined`, `.split` threw, and `getEntityColumnFqn` returned "undefined". * fix(ui): read the EntityLink accessors with || in ActivityFeedCardNew `getEntityFQN` / `getEntityType` now answer '' for a missing or unparseable link rather than `undefined`, and `??` does not treat '' as absent. An activity event's `about` is optional, so for an event without one the card stopped falling through to `activity.entity` and rendered with an empty entity type and FQN: the header link pointed at `//`, the entity name was blank, the icon was missing and the popover had nothing to resolve. Switched both reads to `||`. The empty string and `undefined` are equally "no link here", which is exactly what `||` means and `??` does not. The other `??` call sites that touch these accessors are unaffected: `NavBar` and `ActivityThreadPanelBody` put the accessor on the left of a `?? ''`, where '' and `undefined` collapse to the same result, and `NotificationBox` puts it on the right of the fallback, so it is only reached when there is no entityRef and both values are falsy downstream. ## Testing Regression test renders an activity event with no `about` and asserts the header link resolves to the entity's own FQN. Verified it fails on the unfixed code (`href="//"`) and passes on the fix — 8 passed. ESLint 0 errors, Prettier clean, `tsc --noEmit` clean on both files. Reported by gitar-bot on #34162. * fix(ui): drop the circle around the announcement type icon The type icons are already ringed glyphs — an info circle, a warning triangle in a circle — so wrapping each one in a hairline circle read as a frame around a frame. Removed the `rounded-full` / `border` / `bg-primary` chrome and the fixed 28px/40px box; the icon carries the type colour on its own, as it already did. The icon keeps the size it had inside the circle, 16px beside the badge and 20px on the landing banner. Losing the frame is not a reason to grow the glyph: it sits next to 12px label text, and anything larger outweighs the title it annotates. `AnnouncementTypeChip` is the single component all three announcement surfaces share — entity-page banner, drawer card and AI Home widget — so this lands on each of them at once. `surface.border` now has no consumer, so the prop type narrows to `{ icon: string }`. The 13 `border:` entries stay in ANNOUNCEMENT_SURFACE_CLASSES: it is a symmetric palette table, and pruning one of four slots per family is churn for no gain. The remaining span is layout-only. It holds `shrink-0` so the icon keeps its width in the flex rows all three surfaces put it in, and carries the test id. ## Testing `AnnouncementBanner.test.tsx` selected the chip with `querySelector('span.tw\\:rounded-full')` — coupled to a utility class it had no business reading, and the class this removes. Now queries the `announcement-type-icon` test id. 41 tests across all six announcement suites pass, plus Collate's AI Home widget suite (10) against a refreshed mirror. `tsc --noEmit` clean, ESLint 0 errors, Prettier clean. * chore(playwright): auto-refresh impact-map.generated.json * fix(announcements): require a colour for Custom and bound the name on every path Two gaps where the form enforced something the server did not, both reachable by any API, MCP or script caller. **Colour was required in the form but not on the server.** AnnouncementForm marks it required for Custom; prepare() only checked the name. A Custom announcement created over the API with no colour was stored and then rendered in getAnnouncementTypeConfig's pink fallback — a colour its author never chose, and one that looks deliberate. prepare() now rejects it. **The 64-character limit on customTypeName was bypassable with PATCH.** maxLength rides on `@Valid CreateAnnouncement`, so it runs on create and PUT only; JsonUtils.applyPatch binds the patched JSON straight to the POJO with OBJECT_MAPPER.readValue and no bean validation. Checking the length in prepare() covers create, PUT and PATCH at once. It is measured after trim(), which is the value actually stored — the schema measures the value as sent, so the two disagree only on names that are over the limit by whitespace alone, and the stricter of the two wins. Reproduced both against a running server before changing anything: POST Custom, no color -> 201, stored color: null POST 200-char customTypeName -> 400 "size must be between 1 and 64" PATCH the same value -> 200, stored and read back at 200 chars ## Testing AnnouncementResourceIT: 219 run, 0 failures on PostgreSQL. testCustomAnnouncementRequiresItsName asserted `Exception.class`, which a 500 would also satisfy. Now asserts InvalidRequestException — the SDK's 400 and only its 400, since any other status falls to ApiException in OpenMetadataHttpClient.handleErrorResponse. Three new cases: the missing-colour rejection, the PATCH length rejection (which also asserts the stored value is untouched), and a 64-character name accepted, so the boundary is pinned from both sides. The PATCH case asserts on the cause rather than the thrown type: unlike create, EntityServiceBase.update wraps every failure in a bare OpenMetadataException, so the typed 400 only survives underneath it. Reported by @sonika-shah on #34162. * feat(ui): unify the home page on persona-driven landing widgets Both app modes now render one home page from one widget catalog, chosen and placed per persona through the existing docStore layout and CustomizeMyData editor. No new customization infrastructure. - Ten landing widgets under components/MyData/Widgets (platform health, data estate, team activity, yours-and-followed, context center, curated assets, data quality, domains, data products, KPIs), sharing the TopicCard shell in Widgets/Common/TopicWidget. - components/MyData/HomeLandingPage is the shared shell: standing alert, announcements rail, needs-you-now inbox, then the persona widget grid. It takes a `footerSlot` so a deployment can pin its own chrome underneath. MyDataPage becomes a thin wrapper around it. - The registry is one module-scope map, so getMyDataWidgetFromKey and the new isKnownMyDataWidgetKey cannot disagree. The page drops layout entries whose widget was retired rather than leaving an empty grid cell. - getExcludedWidgetFqns retires MyData, Following, TotalAssets, DataAssets and MyTask: deleting their seeds only stops new installs getting them, since seeds are inserted once at startup. - CustomizeMyDataPageClassBase.getPlatformHealthInsight lets a deployment slot an insight block into the Platform Health card without OSS depending on it. - queryCacheUtils moves to utils/; curatedRule and dataQualityFilters move out of components into utils/ so hooks stop importing the UI layer. Landing-page queries are keyed under `landingPage` with retry disabled: each widget owns a card and renders its own error state, so a failure should show rather than stall through two silent retries. * fix(announcements): use core components for the selectors, tabs and status pill Follow-up review pass over the announcement surfaces, replacing hand-rolled widgets with their `ui-core-components` equivalents and fixing the alignment and spacing the design called out. Core components in place of hand-rolled widgets: - The drawer's status filters were four `aria-pressed` buttons wrapping Badges. They switch which announcements the body below shows, which is what `role="tab"` means, so they are now `Tabs` + `Tabs.List` — one tab stop, arrow-key navigation and `aria-selected` instead of four independent toggles. - The announcement type chips and the colour swatches were also `aria-pressed` button rows. Both are single-choice, so both are now `RadioGroup` + `RadioButton`. The type chips hide the radio indicator and keep the Badge as the label; the colour swatches use the indicator *as* the swatch, so the selected white centre dot and brand edge come from `RadioButtonBase` rather than being drawn a second time. - `FieldError` hand-rolled the error line. It is now core's `HintText`, and the two `Input` fields take the message as `hint` instead — which also wires `aria-describedby` through `TextField`'s `errorMessage` slot, so the error is no longer invisible to screen readers. - The drawer card's status pill was a `Typography` plus a three-entry class table that reproduced `filledColors.success/.blue/.gray` verbatim. It is a `Badge` with a `BadgeColors` map. - The eight raw `<div className="tw:flex ...">` layout containers in the form are `Box`, matching the rest of the feature. - The drawer header's bare icon is the same framed `FeaturedIcon` the add/edit dialog header uses, so the two headers read as one component. Tooltips: - The banner wrapped `Typography` in a hand-written `Tooltip` in three places, reimplementing `ellipsis.tooltip`. Two of those copied core's trigger classes minus `tw:w-full`, so `twMerge` left the generated wrapper's `tw:w-max` in place and the text never ellipsized. All three now use the built-in. - The clickable title cannot: the trigger `Typography` generates is itself an AriaButton, so putting it inside a `<button>` nests one button in another — `Tooltip` excludes `button` from `NATIVELY_FOCUSABLE_HTML` on purpose and wraps it anyway. `Tooltip` now takes the click handler via `onTriggerPress` and generates that single button. - The generated trigger is a `<button>` and preflight does not reset the UA `text-align: center`, so a stretched trigger centred its label. The three hosts set `tw:[&>button]:text-start`. Accessibility and polish: - The banner root was `role="status"`. A live region re-announces its whole contents on every change, and this one holds buttons and steps through a carousel, so a screen reader read the entire banner again on each arrow press and each expand. It is a labelled `<section>`. - The colour swatches shipped the raw enum (`"BlueLight"`) as their accessible name. They now use `ANNOUNCEMENT_COLOR_LABEL_KEYS`, mapping each palette family to the colour name the app already uses elsewhere. Two had no key, so `label.color-brand` and `label.color-indigo` are new and translated in all 19 non-English locales. - Dropped the unused `border` entry from `ANNOUNCEMENT_SURFACE_CLASSES`, and recorded why that table restates `filledColors` and where it deliberately differs. - Both `tw:bg-primary!` Badge overrides now say why they exist. - Status pill moved clear of the actions menu, and the status tabs are a rounded rectangle rather than a pill, per the frame. The native date inputs stay as they are: `openmetadata-ui` and the linked core package resolve separate copies of `react-aria-components` and `@internationalized/date`, and `CalendarDate` declares `#private`, so core's `DatePicker` cannot accept an app-side `DateValue` and core's `DateInput` cannot be driven by an app-side `DateField`. * fix(announcements): draw the type chip's focus ring on the chip The chips hide the radio indicator, since the Badge is the whole visual. Core draws the focus ring on `RadioButtonBase` — the same element `indicatorClassName` lands on — so `tw:hidden` took the ring with it, and arrowing through the group left the selection fill as the only cue to where focus was. Move the ring to the chip itself. * feat(announcements): make the whole banner the click target The title alone was the click target, which made it carry the banner's action as well as its own tooltip. The whole card opens the announcement now. The banner cannot *be* the button: it holds the dismiss and expand controls, and ARIA makes a button's descendants presentational, which would hide those from a screen reader. A bare `onClick` on the container is no better — a static element with a click handler and no keyboard path, which `click-events-have-key-events`, `no-static-element-interactions` and `interactive-supports-focus` all reject. So the click target is a transparent control of its own, stretched across the banner, and it is the keyboard path. It deliberately carries no tooltip. Hanging it off the title's tooltip trigger instead — the first shape this took — meant a hover anywhere on the banner popped the title's tooltip and the description never showed its own. Title and description each own their trigger again, through `ellipsis.tooltip` like every other truncated label, and both sit above the overlay so a pointer on the text still opens the announcement. The chip, the badge and the padding stay beneath it, so a pointer there opens it too. That leaves no hand-written `Tooltip` in this file at all. The banner also gets `isolate`. Those z-indexes would otherwise land in the root stacking context, where they beat the announcement drawer: its overlay is `fixed` with no z-index, so it wins on DOM order alone and anything at `z-index >= 1` paints straight through it — the description, View and dismiss were drawing over the open drawer. The same trap core's `Tab` already documents for full-screen lineage. * fix(announcements): lift the rendered description above the click overlay The collapsed strip's flattened description was raised, but the markdown `RichTextEditorPreviewerV1` renders in the expanded and landing bodies was not, so once a banner was expanded its description sat under the transparent overlay. Links and mentions in it stopped working — every click opened the drawer instead — and the text could no longer be selected or copied. It gets no `onClick` of its own, unlike the collapsed strip: a handler there would fire on those same links. * refactor(announcements): use Box for the type chip's layout wrapper The chip's only element was a raw `<div>`-equivalent span doing flex layout; that is what `Box` is for. No visual change. Also records why this is not a `Badge`, since the question keeps coming up: `BadgeIcon` paints the same `50` fill the banner and drawer card use as their surface, so only its `200` outline would show — the hairline circle around an already-ringed glyph that this design dropped on purpose — and it takes no `className` to lift that fill with. `BadgeWithIcon` requires `children`, so it would fold the icon into the label's pill. Both hard-code the glyph at 12px. * refactor(announcements): drop the text-align workaround core now handles #34106 landed `[text-align:inherit]` on `Typography`'s ellipsis tooltip trigger, so the trigger follows its host instead of keeping the UA `text-align: center` that preflight does not reset. The `[&>button]:text-start` this call site carried is redundant; the host keeps `min-w-0`, which is still the only way to let the trigger shrink below its content and ellipsize. Two tests described the old mechanism and now pin the new one: truncation comes from core's `max-w-full` capping `Tooltip`'s default `w-max`, and alignment from `[text-align:inherit]` on the trigger rather than a class on the host. * refactor(announcements): drop the type-chip wrapper It passed two classes through to an icon and added a span to hold `shrink-0`, which the icon can carry itself — the kind of pass-through wrapper the repo rules call a maintenance liability. Each of its three call sites is now the one-line icon it always rendered, and the 62-line module is gone. Its `data-testid` goes with it, since `IconComponentType` accepts only `className` and `strokeWidth`. The one test that used it now anchors on the type badge, which shares the same header row and pins the same invariant. * fix(announcements): skip the list-count cache for window-derived filters `getAnnouncementStatusCondition` and `getActiveCondition` compare an announcement's window against `System.currentTimeMillis()`, so the rows they return change as announcements cross their start and end times. `ListCountCache` hashes only `queryParams`, so `?announcementStatus=Active` always hashes the same and its `paging.total` is computed once and then reused. Nothing clears it. The cache's own javadoc notes that any write to the entity type refreshes the TTL for every field, leaving the invalidation hooks as the only bound — and those fire on create/delete/restore, none of which an announcement crossing its window performs. The total could stay out of step with the returned rows indefinitely. `ListFilter.isTimeDependent()` marks those two params and `getOrCompute` treats it like a bypass, so the count is recomputed per request. Everything else keeps caching as before. * fix(announcements): state the title's alignment instead of inheriting it Core's ellipsis trigger carries `[text-align:inherit]`, which cures the `text-align: center` a `<button>` is born with — preflight resets a button's font and colour but not its alignment — and then follows whatever the ancestors say. The trigger is `inline-flex`, so the moment its host is wider than the text, that inherited value decides where it sits. Collapsed, the host is capped at content width and there is no slack to drift into. Expanded, the host is a stretched flex item, and the title rendered in the middle of the banner. The host now says `text-start` rather than leaving it to the page the banner happens to be dropped into. * feat(announcements): show the expanded title in full, without a tooltip Collapsed, the title shares one line with the description, so it truncates and carries the overflow tooltip. Expanded there is room to wrap, so it now shows in full and drops the tooltip — repeating text already on screen. That also settles the centring. `Typography` only builds its trigger `<button>` when it has a tooltip to anchor, and a button is born with `text-align: center` that preflight does not reset; the untruncated title is a plain span, so there is nothing to centre. The collapsed title still has a trigger and still relies on the host's `text-start` for the same reason. * fix(announcements): let the untruncated title wrap instead of overflowing Dropping `truncate` on the expanded and landing titles also dropped the only thing keeping a long one inside the banner. A flex item's minimum is its min-content width, so a title with no break points — an FQN, a URL, a bare identifier — cannot shrink, and with nowhere to break it ran past the banner's edge, carrying the badge beside it on the landing layout. Measured against the app's own stylesheet at 900px: the title's right edge sat at 1157 against a 900 edge, 314px out. With `min-w-0 break-words` it wraps to two lines and both it and the badge land inside the padding. * feat(ui): lay the home widgets out two to a row Three changes to the shared landing page, all consequences of the same move. **Two columns.** LANDING_PAGE_MAX_GRID_SIZE drops from 3 to 2 and the default layout is re-flowed to match. The defaults carry explicit x/y, and the packer that would otherwise wrap them (packWidgetsTightly) only runs in customize mode, so leaving them at x=2 would have let react-grid-layout clamp them. **Saved layouts are re-packed on read.** A layout stored against the 3-column grid keeps its x; getConstrainedWidgetWidth bounds w alone. Those widgets now sit outside the grid, and RGL pushes them onto rows of their own rather than filling the space they vacate — one column renders short while the other runs long. reflowLayoutToGrid re-packs in reading order, and returns the same reference when the layout already fits so a still-valid persona layout is neither re-rendered nor re-saved. **The customize page stops previewing a header the home page dropped.** CustomiseLandingPageHeader — the welcome hero with its search, domain picker and announcements panel — is gone from CustomizeMyData. HomeLandingPage renders none of it, so the preview was advertising a header that no longer exists. CustomiseHomeModal still owns the widget and background-colour state, so nothing is orphaned. * fix(ui): follow the announcement card's two API changes upstream The merge brought both, and the Home card was the last caller of each. `AnnouncementTypeChip` is gone (2e375920d0): it passed two classes through to an icon and added a span to hold `shrink-0`, which the icon carries itself. The icon is now rendered directly, 16px beside the 12px badge label, as the banner does it. `ANNOUNCEMENT_STATUS_CLASSES` became `ANNOUNCEMENT_STATUS_COLORS`, a map to BadgeColors rather than class strings, so the status reads through the same `Badge` the drawer card uses instead of a hand-rolled span — one status, one appearance on both surfaces. * feat(ui): collapse, view toggle and loading states for the landing widgets Builds out the "Topics to catch up on" section the design calls for, and fixes what the widget set had drifted into. **Collapse and view.** The section gained the heading it never had, a per-card collapse chevron, Collapse all, and a grid/list toggle. The whole header strip is the control rather than the chevron alone -- a 26px target on an otherwise inert card -- with the chevron inside it as decoration, since a sibling button would nest controls or leave a dead zone between them. State lives in `useTopicsView` and is derived, never written back: collapsing a card must not read as a layout edit the persona editor would offer to save. The grid renders at a quarter row so a collapsed card can take less than one widget row. react-grid-layout cannot allocate less than a row, so a header-only card was given 133px and left ~58px of empty cell under every one of them. The subdivided row height is derived from RGL's own sizing formula so an expanded widget occupies exactly the pixels it did before. **Loading states.** Only two of the ten widgets surfaced a loading flag; the rest dropped it and rendered a confident empty state mid-fetch -- "No recent team activity", "0 followed assets changed" -- then replaced it. Every hook already returned `isLoading`; nothing read it. TopicCard now stands in for the summary, status and body while a widget fetches. **Picker.** CustomiseHomeModal built its list by subtracting a hardcoded denylist from every KnowledgePanel docStore holds. docStore accumulates every panel ever seeded, so anything the list missed was offered and then rendered as a blank cell. It is now an allowlist off the widget registry, shared with the grid's read path so the offered set and the renderable set cannot drift. **Description coverage.** `percentage_of_data_asset_with_description` returns one row per entity type, each already a percentage; summing them put 240% on the card. Now averaged, weighted by how many assets each type holds. **Saved layouts.** Read through one shared normaliser: retired and excluded keys are dropped rather than left as holes, and `w`/`x` saved against the three-column grid are re-packed. Widths collapse to one column -- the landing grid exposes no width control, so a stale `w: 2` spanned the whole row with no way back. Seed docs renamed for the widgets that replaced them (ActivityFeed is "Team Activity" now), with a 2.1.0 migration: the seed loader only inserts rows it cannot find, so a rename never reaches an upgraded install. Widget preview screenshots are dropped rather than left stale -- every one was taken of a widget the topic cards replaced. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(ui): page every ingestion pipeline and judge closed KPIs on the observed value Two review findings on #34770. **Pipeline stats stopped at 1000.** `fetchPipelineStats` read one capped page and never followed `paging.after`, so on an install with more pipelines than that, every service whose pipelines fell past the first page landed in "not run yet" however it was actually doing -- wrong on exactly the large deployments whose admins lean on this card. It now follows the cursor, with a page cap so a server that never clears `after` cannot spin forever. **A closed KPI with one result read as missed.** `projectValue` returns null whenever the series holds a single point, and `resolveStatus` treated a null projection on a closed window as a miss -- so a finished KPI that had already beaten its target was reported missed and counted in `atRiskCount`. Once the window has shut the projection is irrelevant; it now compares the observed value to the target. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(ui): restore the landing widget test handle, retire the FeedWidget suite The Playwright breakage was one missing attribute. Specs locate a landing widget by `[data-testid="KnowledgePanel.X"]`; the old widgets each rendered that themselves, and the topic cards that replaced them do not. Every spec calling `waitForLandingPageWidget` therefore waited on an element that would never appear -- 532s timeouts, and the reason failures spread well beyond the landing page into Domains, Tour, SearchRBAC and the rest. The grid cell now carries the layout key, which is where it belongs: the widgets share one shell, so the cell is the only per-widget node left. `DEFAULT_LANDING_PAGE_WIDGETS` still listed MyData, DataAssets, TotalAssets and Following. Those are excluded from both the grid and the picker now, so `checkAllDefaultWidgets` could only ever time out. Updated to the ten the default layout actually carries. `FeedWidget on landing page` is removed rather than rewritten. It drove a sort dropdown, `#feedWidgetData` and a reply drawer that belong to FeedWidget -- still a component, no longer on this page. Its replacement, Flow/LandingPageTopicWidgets.spec.ts, covers what the page does now: the Topics section, per-card collapse from the header strip, Collapse all, and the grid/list toggle. Removing it took three suppressed positional locators with it, so the baseline and its recorded counts are pruned to match. Also addresses the last review finding: the home page no longer mounts `SystemAlertBanner` or `NeedsYouNowSection`. Both are prototype-only -- their stand-in content is an invented security incident and an invented approval queue, with no API behind either -- and every OSS user was being shown it as fact. The greeting header and its Customize button now render unconditionally rather than only after the fake alert was dismissed, which was never persisted. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * chore(playwright): auto-refresh impact-map.generated.json * fix(ui): restore the landing surface the topic cards dropped, retarget its specs The whole Playwright run was red: 92 tests across 35 spec files. Four product regressions were behind nearly all of them, and each is fixed here rather than papered over in the spec. **The home page lost its search bar and domain selector.** NavBar suppressed its own pair on `/my-data` because the old customisable header carried them; HomeLandingPage carries neither, so the page had no search at all. That broke every spec reaching an entity through `visitEntityPage` -- 23 tests, most of them nowhere near the landing page. **Curated Assets never read its saved config.** `getWidgetFromKey` -- the single entry point for both the live page and the persona editor -- passes `currentLayout` and `widgetKey` but not the layout entry, so the widget's `widgetConfig` prop was permanently undefined: a saved rule was never applied, the title never showed, and the editor sat in its empty state forever. It now derives config from `currentLayout`, as the previous widget did. The filter builder is wired back in too (the modal had been orphaned), and the query is rebuilt in the shape the editor has always saved -- `dataAsset`/`all` with an entityType clause, rather than passing the selected resources as indices. **The grid cell carried the wrong key.** Widgets added through the picker get a lodash `uniqueId` suffix, so the layout key is per-instance while the widget key is not. The cell's test handle is now the base key via `getMyDataWidgetBaseKey`, which is what every landing-page assertion resolves. **Recently viewed had no surface left.** It lived in the header that HomeLandingPage replaced, leaving `RecentActivityUtils` dead. Rebuilt as `RecentlyViewedRail` on core components. Specs follow the page. Five suites covering widgets `getExcludedWidgetFqns` now excludes (My Data, Data Assets, Total Assets, Following, My Tasks) are removed along with their helpers; the rest are retargeted to what the topic cards actually offer -- a title, a footer link out, and removal/re-adding from the editor. `addAndVerifyWidget` becomes "ensure present": the picker refuses to re-add a widget already on the layout, which leaves `apply-btn` disabled and hangs the click. Deliberately not fixed: Flow/Tour.spec.ts. The tour anchors on `#feedWidgetData` and `#searchBox`, and TourPage blocks on the former before opening the tour at all, so it hangs rather than skipping a step. That page is being revamped separately. * chore(playwright): refresh impact-map for the retired landing-widget specs DataAssetsWidget and MyTaskWidgetStatus went with the widgets they drove, so their 22 source->spec entries no longer resolve. Regenerated rather than left for the drift workflow to auto-commit. * fix(ui): order the RecentlyViewedRail imports as organize-imports does CI's src checkstyle runs organize-imports -> eslint --fix -> prettier --write and fails on any diff. EntityLinkUtils sorted ahead of EntityIconUtils, which eslint alone does not reorder, so the step rewrote the file and tripped the gate. * fix(ui): split the data estate by connector, not by entity type The "by connector" breakdown read its groups from the `total_data_assets` data-insight chart, whose group dimension is the entity type — so the card listed `table 800`, `chart 120`, `databaseSchema 83` under that heading. No data-insight chart carries the service dimension, so the split now comes from the `serviceType` term aggregation the classic Data Assets widget used, which is what makes it read Snowflake / Redshift / Big Query again. The aggregation is a live count, so its query key carries no window: the range filter moves the totals delta and the coverage trend, both time series, and re-requesting the split on a range change would be work with no answer to show for it. Labels go through `getFormattedDataAssetServiceType` so the legend matches what the classic widget printed. The share bar also opens a tooltip per segment now. It was suppressed because the legend already prints every value, which held at nine entity types; at thirteen connectors the tail segments are a few pixels wide and the tooltip is the only way to tell which is which. `trigger: 'item'` is set through the consumer `option` rather than the `tooltip` prop: cartesian charts are built with `'axis'`, which on a one-category stack would open all thirteen series at once and restate the legend. * feat(ui): give the widget picker its previews, drop the recently-viewed rail Every landing-page widget now has a screenshot in the add-widget modal. The lookup table was deliberately empty: the screenshots it used to carry were of the widgets the topic cards replaced, so the picker showed a confident picture of the wrong thing. The replacements live under `widgets/landing/` rather than beside the older `*-widget.png` files, which would otherwise leave the two generations indistinguishable by name. A missing entry resolves to '' and paints an empty tile rather than failing, so a widget added without a preview would go unnoticed until someone opened the modal. The new test asserts the table covers every key in the widget registry. It asserts on keys, not images: jest maps every PNG import to '', so a test cannot tell "no entry" from "entry whose module stubbed to empty". Recently viewed comes off the home page. The comment defending it argued that nothing else in the product surfaced it; that is no longer true — it is on the Context Center dashboard and in the app-mode sidebar. Its mask entry in the visual-regression spec goes with it: a selector matching nothing would not have errored, it would have quietly misdescribed what the screenshot guards. The landing-page baseline needs regenerating. * test(playwright): cover the landing page as a page, and the estate's split `LandingPage.spec.ts` asserts the page a user with an uncustomised persona actually lands on: the shell, the topics controls, the customize entry point, and that all ten widgets in the default layout mount. Every existing widget spec adds its widget before asserting on it, so a widget that silently stopped mounting — a bad key, a throwing hook, an exclusion added downstream — left no failing test behind. The ten keys are duplicated from the layout constant on purpose: deriving them would make the test agree with the source, including when the source is wrong. `LandingPageDataEstate.spec.ts` covers the card that had none, and its central assertion is that no legend entry is an entity type. That is the exact shape of the bug the breakdown just had, written as an exclusion rather than an allow-list because which services exist depends on what the seed created. CustomizeWidgets picks up the Context Center and Data Quality lifecycle tests ported from Collate's `LandingPageWidgets.spec.ts`; both cards moved into OSS, and neither key had coverage here. The Data Quality one is rewritten against `data-quality-rows` — the helper it came with drove `widget-sort-by-dropdown` and `data-quality-status-table`, which the replacement card does not render. The impact map gains both specs and the `Basic` project, or a change to `customizeLandingPage.ts` / `widgetFilters.ts` would select them and then run no project that executes them. * chore(playwright): auto-refresh impact-map.generated.json * style(ui): organise imports in CustomizeMyDataPageImageUtils Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(ui): correct landing topic widget data, errors and copy Data correctness - Data Products: asset counts from getAllDataProductsWithAssetsCount; the search document excludes `assets`, so every product read 0. - Curated Assets: health from failing test cases on the test-case index (`failedTestCases` exists on no index, so every row read Healthy). - Data Quality: "View test" opens the test case page; "N more" uses the real failed total; all-passing no longer reads "No test results yet". - Domains / Data Products: chip counts are estate-wide and selecting a chip queries the server instead of filtering the 10 fetched rows. - Data Estate: all connectors counted (top 5 + Other), header falls back to the live connector sum when Data Insights has no rows. - KPI: metric-type aware formatting, projection over the real data span, all KPIs fetched. - Platform Health: counts from /services/overview instead of paging every pipeline; bounded requests, 5 min cache; permission-gated rather than isAdmin; health links only carry `health` where the listing reads it. - Yours & Followed / Team Activity / Context Center: real totals, honest scope copy, footer links to real destinations, encoded article paths. UX - TopicCard gains isError/onRetry and isFetching; filter changes keep the previous data instead of swapping the body (and the open filter) for a skeleton. - Window-aware delta labels; whole-sentence i18n keys instead of concatenated fragments; TopicFilterChips on ButtonGroup with keyboard support and per-widget test ids. - Unit tests for every widget and TopicWidget part that lacked them. * fix(ui): keep saved landing layouts intact and drop retired widgets - normalizeLandingPageLayout and the Add Widgets picker consult overridable getKnownWidgetKeyPrefixes / getPickableWidgetKeyPrefixes, so a subclass widget (Collate's Onboarding) survives a saved layout. - Saved heights are clamped to the single landing height, matching the editor; pre-redesign h:4/h:6 cards no longer render oversized. - The grid waits for the current user (and persona) before mounting, so the default layout no longer mounts, fetches and is replaced. - Header Theme is honoured as a light wash over the new header, and its preview renders the same PageHeader. - Announcements: the View all dialog outlives the rail, pages via the API cursor, and dismissals persist per user. - My Data document title restored; WidgetCard alt matches its caption. - 2.1.0 migration also refreshes the KnowledgePanel.DataQuality doc row. - Removed unmounted NeedsYouNow / SystemAlertBanner, the retired FeedWidget, MyDataWidget, DataAssets, MyTask, KPI, Domains, TotalDataAssets and DataProducts widgets, the legacy landing header, and their images. * chore(i18n): translate the landing widget keys and drop unused ones Adds the whole-sentence and plural keys the landing widgets now use, with real translations in every locale, and removes keys left unused by the retired widgets or duplicated by existing ones. * test(playwright): isolate and deepen the landing widget specs - Landing specs move to Features/LandingPageWidgets and run as a per-worker user with its own persona, so persona changes made by other specs cannot change the layout they assert. - Data Estate: the total must be > 0 and match what the charts / connector aggregate returned; the range switch must re-request with a 90-day window, relabel the trigger and keep the body mounted while it loads. - New Platform Health spec: server-tally chips, failing rows, navigation, and the permission gate (no overview request without access). - New Context Center spec: rows in server order, summary, navigation and the empty state. - CustomizeWidgets seeds data the Team Activity, Data Quality and KPI cards actually show (owned table, failing test, 90-day KPI window). - impact-map points the widget sources at these specs. * fix(ui): drop the greeting header from the home page The page opens on announcements and topics. Customize moves into the Topics section header, shown only when there is a persona to edit. * chore(playwright): auto-refresh impact-map.generated.json * fix(ui): put the classic home page on the white panel AI mode uses Classic has no app shell around routed pages, so the topic cards sat on the page ground. The page now draws the same rounded white panel as AI mode's assistant-content (the canvas step in dark mode). * fix(ui): keep the classic home panel clear of the sidebar The panel had right and bottom insets but none on the left, so it met the sidebar's selected item edge to edge. * fix(ui): offer Context Center in the Add Widgets picker The picker lists the KnowledgePanel seed docs, and the KnowledgeCenter doc only ever shipped from Collate, so an OSS install had nothing to offer for a widget that is in its own default layout. Seed it here as Context Center, and refresh the row an upgraded Collate install already holds under the old Knowledge Center copy. * test(playwright): quarantine the tour spec until the tour page is redesigned The new landing page no longer renders the tour's anchors: #feedWidgetData went with FeedWidget, and #searchBox with the old landing header. The tour waits on the first anchor before opening, so all three tests hang. Recorded in QUARANTINE.md with the known fix and the release condition. * fix(ui): keep columns out of Yours and Followed, and harden its landing specs Column documents inherit their table's owners and followers, so one owned table came back as a row per column and crowded the table out of the card. Both the owned/followed search and the changed-followed count now exclude tableColumn. Metric mappings gain the followers field the follow filter queries. The customize-widgets spec no longer deletes tables a failed beforeAll never created, and checkAllDefaultWidgets resolves the persona customize page's PageLayoutV1 root as well as the landing page's. * feat(ui): empty states for the landing-page topic widgets An empty widget now says what it is for and how to fill it, per the dashboard empty-states design, instead of a line of grey text over zeros: an icon, a title, a description and — where the viewer may act — a call to action. Platform Health, Data Estate, Data Quality and KPIs also flag "Not set up", since they stay empty until someone configures something. TopicCard takes an emptyState and swaps the header summary, status and footer for it; loading and error still win, as neither has an answer. Data Quality asks for an unfiltered test count alongside its filtered ones, so a quiet window is not mistaken for an estate with no tests. Calls to action reuse the existing flows: the add-service wizard, the Articles page's draft article, and the Data Quality, Domains, Data Products and add-KPI pages, gated on create permission where the destination is. * test(playwright): retarget the curated, domain and recently-viewed specs at the landing page A full OSS run against the merged branch failed 35 landing tests. Each one read the old widgets; none was a product bug. Curated Assets is in the default layout now, and every copy of a widget carries the same base-key test id, so adding a second one made every lookup of the card ambiguous: the visibility poll caught the strict-mode error and timed out. `addCuratedAssetPlaceholder` clears the default card first, and PersonaFlow's private copy of that helper now uses it. The remove button is keyed by the layout key, which for a picker-added widget carries a `uniqueId` suffix, so `removeAndCheckWidget` matches it by prefix. Three CuratedAssets assertions relied on the old widget. The "ALL" test waited for any request containing `true`, which only ever matched the old widget's `fetch_source=true`; it now waits for the saved rule's clause. `getByText('Rule')` also matched the new "No assets match this rule yet" empty state. And the unconfigured-widget test left the editor before its save landed, so the live page showed the previous test's layout; it now awaits the save. The Domains card lists one page of the estate, so whether a spec's two new domains appear depends on how many other specs made domains. DomainWidgetFilter now asserts the filter instead: more than one domain unfiltered, exactly the selected one filtered. RecentlyViewed.spec.ts is removed. The carousel it drove went with the old landing header and nothing else renders recently viewed assets, so there is no surface left to test. * fix(ui): bring the landing page back under its first-view budget, rebaseline its screenshots The bundle budget measures a route's first view: the bootstrap plus the route chunk and everything it imports statically. The landing page's was 1,442,453 Brotli bytes against a 1,064,960 budget; main's is 1,045,856. Two imports carried almost all of the excess: - AnnouncementsRail was imported statically, and its cards pull in ent…
What
An announcement with no
entityLinkcrashes the whole MyData page and the Data Marketplace announcements widget with:EntityLink.splitreturns[]for an empty or unparseable link, so indexing it yieldsundefinedwhile the accessors' signatures promise astring. Callers are entitled to treat the result as a string, and two of them do:It throws inside a
useMemoduring render, so React unwinds to the error boundary — the entire page becomes "Something went wrong", not just the card.The
?? ''already on those call sites is the tell: someone anticipated a missingentityLinkand guarded the input, but the return value went unguarded.Why it's reachable
createAnnouncement.jsonrequires onlydescription,startTimeandendTime—entityLinkis optional. So an entity-less announcement is a legal entity, the API accepts it (verified:HTTP 201), and it then bricks every page that lists it.I hit this while checking whether announcements could be authored from a Settings page; such announcements would be entity-less by definition, so this is also a precondition for that work.
Fix
At the source, so all 20 caller files benefit rather than patching the two that happen to chain a string method today:
getEntityTypeundefined''getEntityFqnundefined''getEntityColumnFqn"undefined"(literal string)''That third one is its own quiet bug: the template literal interpolated
undefinedinto the string"undefined"— a non-empty value that reads as a real FQN wherever it is rendered or compared (e.g. the===check inVirtualColumnList.component.tsx:125).''is falsy, so callers' existing guards catch it.To be precise about what this does not do: it does not stop two entity-less links comparing equal to each other —
'' === ''istruejust as'undefined' === 'undefined'was. The value is not leaking a bogus non-empty FQN.No caller distinguishes
undefinedfrom''; the remaining 18 feed the value into template strings, JSX or truthiness checks, where''behaves the same or better.Testing
EntityLink.test.tscovering both an empty and an unparseable link, including the exact.split('::')call that crashed, and one pinning that entity-less column links no longer compare equal.antlr4tsc error and the circular-import warning in this file are pre-existing onmainand untouched here.Notes
maintoday.🤖 Generated with Claude Code