Repository navigation
AI mode: global search (⌘K) - #38564
Conversation
Adds the AI-mode global search modal: results across data assets, tasks, glossary, people, domains, data products and Context Center, with per-type tabs ordered by hit count, asset facets and sort, an asset summary panel, and an Explore hand-off that carries the query, filters and sort. Plugins add result types and the assistant hand-off through the new app-mode.globalSearch.sources and app-mode.globalSearch.askAi extension points, and supply their own wording.
UI browser testsRan: all test files (changed translation keys not found in any test footprint) Result: ✅ 1099 passed · 154 skipped Changed code executed by these browser tests: 3 / 3 lines (100%)
Changed files no browser test loads
|
- Tabs for every matched type from the search API, overflow slot for +N more - Per-type quick filters, sort carried to Explore, Clear resets everything - Typing shows spinner + line loader; tab/filter/sort changes show skeletons - Rows only close the modal when they navigate - Query action replaces the Ask AI extension point; plugins own the copy - Decision record for the global search extension points - Unit tests for every new file
- A tab emptied by the user's own filter stays selected so the filter can be undone - Facets apply to the data asset query only on the assets tab - Fix the modal test suite failing to load on a DomainUtils import cycle
- Data asset preview then open, glossary term and domain routing - Explore hand-off keeps the query and sort - Recent searches survive a reload, recently viewed reopens a page
- Show Ctrl+K / Ctrl+Alt+K / Ctrl+Enter off Apple devices; the handler already accepted both - Shared OPEN_SEARCH_SHORTCUT and OPEN_SCOPED_SEARCH_SHORTCUT constants for plugins
- Scoped tab counts its source's recent rows before typing - Rows can carry an addon (e.g. participant avatars) and their own Enter label - Search everything link is gray with a trailing arrow - Summary panel shows owners, domains, glossary terms and tags like Explore, without counts; lighter stat values
- Task filters and sort reset on tab change and only apply on their own tab - Show the error state when any request failed and the view is empty - Ignore Enter/Esc while an IME is composing - Tab bar on core Tabs; +N more and footer link on core Button - Sidebar search is a real button matching the prototype field - Translated task filter labels via a light taskLabel.utils shared with the Inbox - Interpolated shortcut labels; formatted entity type; no lowercased type names - Quick filters can ignore the host page's deleted/NLP state - Refetch only the active type on tab, filter or sort change; abort counts and tasks - Incident count from the server total, as in Explore's summary - Summary panel keeps its compact layout with Explore's chips and avatars - Backspace never closes search - Enforce unique source keys and complete the decision record - Tests for key actions, active option, IME, preview-then-open and filters
…nter - Skeleton tabs and rows until a query's first results arrive - Filters stay on one line and scroll horizontally - Plain Enter never runs the query action; only Cmd/Ctrl+Enter does - First result is highlighted by default; ArrowUp reaches the action row - Drop the duplicate Ask AI enter hint from the footer
❌ 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 |
A tab change used to refetch only the new tab, so the tab just left kept the count its own filters narrowed: wrong totals, and a tab narrowed to zero dropped out of the bar. Leaving a tab whose filters narrowed it now reloads all types.
Browsers render <kbd> in a monospace font where the command glyph is tiny.
Not in the design, and before typing it only switched a hidden tab, so the click changed nothing. Chats stay reachable through Option+Cmd+K and the Recent Chat search button.
- Report loading on the render a query or filter changes, so the empty-tab fallback never acts on stale results - A failed asset or per-type search is a failure, not an empty result - Call plugin sources inside a promise so a synchronous throw is a failed source instead of a stuck spinner - Esc works when focus has left the input - No highlighted row (and no Enter) while the list reloads behind skeletons - Combobox pattern: the input controls one listbox per section, headings and their controls sit outside, the query action has its own listbox - Show the preview description as plain text (stripMarkdown) - Curated impact-map group runs GlobalSearch.spec.ts for every global search file - Record source failure behaviour in the decision record
- Esc always closes search (footer hint reads Close); Clear still clears - Clicking a row keeps focus in the input, and closing the preview returns it there, so the arrows and Enter keep working
Code Review ✅ Approved 🟡 Medium risk 4 closed / 4 findingsAdding global search across entity types, tasks, and plugin actions changes app-wide discovery and navigation; incorrect results or routing could misdirect users. Adds a global search modal (⌘K) to AI mode with type tabs, data-asset facets and preview, tasks filters, and plugin extension points for result sources and query actions. Three findings were resolved: the extension points now have a decision record, zero-hit filters no longer jump to All or leave hidden facets applied, and data-asset queries no longer pick up facets from another type's tab. No open issues remain. ✅ 4 closed✅ Quality: New global-search extension points ship without a decision record
✅ Bug: Zero-hit filter kicks user to All and leaves hidden facets applied
✅ Bug: Data-asset query applies facets picked on another type's tab
Closed: Bug: Tab switch keeps the previous tab's filtered count; zero-count tab vanishes
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
ShaileshParmar11
left a comment
There was a problem hiding this comment.
Thanks for the fixes. I checked all eight from my earlier review against this head, and each is fixed with a test.
* AI mode: global search (Cmd+K) Adds the AI-mode global search modal: results across data assets, tasks, glossary, people, domains, data products and Context Center, with per-type tabs ordered by hit count, asset facets and sort, an asset summary panel, and an Explore hand-off that carries the query, filters and sort. Plugins add result types and the assistant hand-off through the new app-mode.globalSearch.sources and app-mode.globalSearch.askAi extension points, and supply their own wording. * AI mode global search: core-ui rework, per-type filters, loaders, tests - Tabs for every matched type from the search API, overflow slot for +N more - Per-type quick filters, sort carried to Explore, Clear resets everything - Typing shows spinner + line loader; tab/filter/sort changes show skeletons - Rows only close the modal when they navigate - Query action replaces the Ask AI extension point; plugins own the copy - Decision record for the global search extension points - Unit tests for every new file * Global search: keep facets scoped to their own tab - A tab emptied by the user's own filter stays selected so the filter can be undone - Facets apply to the data asset query only on the assets tab - Fix the modal test suite failing to load on a DomainUtils import cycle * Global search: Playwright user flows - Data asset preview then open, glossary term and domain routing - Explore hand-off keeps the query and sort - Recent searches survive a reload, recently viewed reopens a page * Global search: platform-aware shortcut labels - Show Ctrl+K / Ctrl+Alt+K / Ctrl+Enter off Apple devices; the handler already accepted both - Shared OPEN_SEARCH_SHORTCUT and OPEN_SCOPED_SEARCH_SHORTCUT constants for plugins * Global search: chats scoped view and Explore-style summary details - Scoped tab counts its source's recent rows before typing - Rows can carry an addon (e.g. participant avatars) and their own Enter label - Search everything link is gray with a trailing arrow - Summary panel shows owners, domains, glossary terms and tags like Explore, without counts; lighter stat values * Global search: address review feedback - Task filters and sort reset on tab change and only apply on their own tab - Show the error state when any request failed and the view is empty - Ignore Enter/Esc while an IME is composing - Tab bar on core Tabs; +N more and footer link on core Button - Sidebar search is a real button matching the prototype field - Translated task filter labels via a light taskLabel.utils shared with the Inbox - Interpolated shortcut labels; formatted entity type; no lowercased type names - Quick filters can ignore the host page's deleted/NLP state - Refetch only the active type on tab, filter or sort change; abort counts and tasks - Incident count from the server total, as in Explore's summary - Summary panel keeps its compact layout with Explore's chips and avatars - Backspace never closes search - Enforce unique source keys and complete the decision record - Tests for key actions, active option, IME, preview-then-open and filters * Global search: loading skeletons, single-line filters, Enter vs Cmd+Enter - Skeleton tabs and rows until a query's first results arrive - Filters stay on one line and scroll horizontally - Plain Enter never runs the query action; only Cmd/Ctrl+Enter does - First result is highlighted by default; ArrowUp reaches the action row - Drop the duplicate Ask AI enter hint from the footer * Global search: reload every type when leaving a filtered tab A tab change used to refetch only the new tab, so the tab just left kept the count its own filters narrowed: wrong totals, and a tab narrowed to zero dropped out of the bar. Leaving a tab whose filters narrowed it now reloads all types. * Global search: draw the sidebar shortcut key in the app font Browsers render <kbd> in a monospace font where the command glyph is tiny. * Regenerate the Playwright impact map for the global search spec * Global search: drop the View all link on recent source rows Not in the design, and before typing it only switched a hidden tab, so the click changed nothing. Chats stay reachable through Option+Cmd+K and the Recent Chat search button. * Global search: address review feedback - Report loading on the render a query or filter changes, so the empty-tab fallback never acts on stale results - A failed asset or per-type search is a failure, not an empty result - Call plugin sources inside a promise so a synchronous throw is a failed source instead of a stuck spinner - Esc works when focus has left the input - No highlighted row (and no Enter) while the list reloads behind skeletons - Combobox pattern: the input controls one listbox per section, headings and their controls sit outside, the query action has its own listbox - Show the preview description as plain text (stripMarkdown) - Curated impact-map group runs GlobalSearch.spec.ts for every global search file - Record source failure behaviour in the decision record * Global search: Esc closes, arrows keep working with the preview open - Esc always closes search (footer hint reads Close); Clear still clears - Clicking a row keeps focus in the input, and closing the preview returns it there, so the arrows and Enter keep working (cherry picked from commit f8e3c8e)
What changes
AI mode gets a global search modal (⌘K), built from the design prototype:
Extension points (
utils/extensionPoints.ts):app-mode.globalSearch.sources: a plugin adds a result type (search, recent rows, footer link).app-mode.globalSearch.queryAction: a plugin adds an action row on the typed query (Collate: "Ask Collate AI") and where it opens.Plugins pass their own i18n keys for that text, so OpenMetadata ships no assistant or chat wording. Without contributions, the search covers OpenMetadata's types only. Contract recorded in ADR:2026-11-24-global-search-sources-and-query-action-extension-points.
Design-system notes
AssetSummaryPanelis not Explore'sEntitySummaryPanel. Reusing Explore's section components (DomainsSection,TagsSection,GlossaryTermsSection) brought their own padding and dividers, which broke the modal's compact layout in design review. The panel keeps its label-and-value layout but renders Explore's own pieces inside it: coreOwneravatars,DomainTags,GlossaryTagandClassificationTag.Button, not coreButton. It opens the search (a real button, so focus returns to it when the modal closes), but it has to look like the prototype's search field: a field border that darkens on hover, a leading icon, and a filled shortcut key. CoreButtonhas no field shape and coreInputis a text field, so neither draws it without overriding core styles.Tests
GlobalSearch.utils.test.ts: tab ordering and overflow, highlighting, quickFilter, sort and order carried to Explore.GlobalSearchModal.test.tsx: ⌘K open with recents only, tabs only for matched types, Explore hand-off, Ask row with ⌘↵ and contributed labels, ⌥⌘K chats-only mode, Esc and Backspace behaviour.AI-shell and Explore header suites pass. ESLint, Prettier,
tw-auditandyarn i18nare clean.playwright/e2e/Features/AIMode/GlobalSearch.spec.ts(5 user flows against a real server): data asset preview then open, glossary term and domain routing, Explore hand-off with query and sort, recent searches after a reload, recently viewed reopening a page. 5/5 passed locally (--no-deps, no retries).Screen recording
Recorded at OpenMetadata
d769010d4c6(this branch's head) against the local Docker stack:collate_server_gs(server2.0.0-SNAPSHOT, revisionbb2eb6ee327),openmetadata_mysqlandopenmetadata_elasticsearch, all up and healthy. This PR changes only the UI; the UI was served by Vite from the PR commit and proxied to that server, so the backend image was not rebuilt.Data: the stack's existing sample data, plus a small fixture created through the API:
snowflake_demo.SALES_DB.PUBLIC.dim_customer: owner Riya Kapoor,PII.Sensitive, glossary termBusinessGlossary.Customer, domain Customer 360.TASK-00001andTASK-00002that match "customer".omd-global-search.webm
Shown, in order:
ff01898062fand shows the earlier clear-then-close Esc; Esc now closes in one press.)The recording browser is not detected as a Mac, so key labels read "Ctrl" where a Mac shows "⌘".
Screenshots
Playwright run
playwright/e2e/Features/AIMode/GlobalSearch.spec.tsagainst the same stack (--no-deps, no retries): 5 passed, 0 failed, 0 flaky.🤖 Generated with Claude Code