Repository navigation
feat(ui): move AI-assistant shell + shared routes into OSS app-mode framework - #31911
Conversation
Popover switcher for Classic/AI app mode with 'Open in {mode} when I
log in' checkbox. Routes are prop-configurable (default '/'); no
Electron/desktop gating (that lives in downstream shells).
…ery domain The AI Explore presentation (search header + quick filters) moves from the Collate ai-chat plugin into openmetadata-ui under components/discovery/explore. ExplorePageV1's default export now selects its presentation from the active app mode: classic renders the shared page unchanged, AI mode wraps it with the AI search header. Both modes mount the same /explore route. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Renames ExploreAiHeader/AIExplore* to ExploreHeader/Explore* and neutralizes testids, class-name constants, i18n keys, and the header asset. Adds the renamed explore-* i18n keys and syncs locales. Presentation is still selected by app mode inside ExplorePageV1; the naming no longer carries an AI prefix. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…rm/ai-shell) Adds the mode-aware assistant shell (AssistantLayout, Sidebar tree, KeepAliveRoutes, AppModeRoutes) and the AppModule/SubNav contract under components/platform/ai-shell, plus app-mode.* extension points so downstream plugins contribute nav+routes without OSS importing them. Neutral naming (no AI prefixes); sharedAppModules starts empty and is populated as domains migrate. Additive — nothing consumes it yet. Also: add optional isNLPActive to UserPreferences and fix Explore wrapper pageTitle forwarding surfaced by the moved Explore header. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…p-mode framework Wave 1 of the domain migration: ports the shared AI-mode helpers (LiveRefreshBoundary, PermissionedLiveRoute, ListPageHeader) and section layouts, and moves the observability, context-center, and marketplace surfaces into OSS as AppModule descriptors registered in sharedAppModules. Presentations live under their handbook domains with neutral naming; routes are mode-selected by the shell. Pipeline/Alert observability pages remain in Collate for a later wave (served via the app-mode fallback). Syncs new i18n keys. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…-mode framework Wave 2: entity-detail and personal-space surfaces become OSS AppModules in sharedAppModules (both icon-less; reached via deep links / a header entry point). The entity wrapper resolves the OSS entity-detail component; the inbox/my-data shell exposes triageContent/myDataContent injection slots (the proprietary feed bodies stay in Collate and render via those slots, placeholder until wired). Adds inbox i18n keys. Governance is intentionally NOT moved — it stays Collate. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…1Mode
First step of turning the migrated AI-mode shell into a generic ClassicV1
layout: renames the AI_APP_MODE constant to CLASSIC_V1_APP_MODE ('classicV1')
and useIsAiMode to useIsClassicV1Mode across every caller in the OSS UI, so
downstream tasks can build the generic ClassicV1 layout on top of it.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…es-registry lookup
…itch) AppRouter now switches on the stored app mode directly (no route registry/install-gate consultation), leaving useResolvedAppMode with zero callers in OSS. Delete it and its test rather than gutting it. useAppRoutesRegistry itself is NOT deleted: CustomizeUI, AppModeSwitcher, SettingsAppModePage, and PersonaDetailsPage still read registry.routes to gate "is a non-default mode installed" UI (unrelated to AppRouter's routing decision). See task-3-report.md for the full BLOCKED analysis. Also fixes the now-stale AppModeRoutes doc comment (no more plugin-registration mechanism; OSS AppRouter renders the shell directly by mode) and a dangling comment reference to the deleted hook.
ClassicV1 now ships in-tree in OSS (AppRouter switches on the stored mode directly, no install-gate) so the registry's "is a non-default mode installed" read is always true. Migrate the 4 real consumers (AppModeSwitcher, SettingsAppModePage, CustomizeUI, PersonaDetailsPage) to an unconditional `true` and remove the now-dead import, then delete the registry and its test. Update the 2 consumer tests that asserted gated behavior to assert the mode is always available instead. Also fixes the 2 remaining comment-only references in appMode.constants.ts so the module is what AppRouter actually does now: match the resolved mode string against CLASSIC_V1_APP_MODE directly, no registry involved.
…nerate in full env)
…-token remember Rebrands AppModeSwitcher's AI toggle into the ClassicV1 app-mode switch: renames identifiers/testids/labels (isAiMode->isClassicV1Mode via the already-committed useIsClassicV1Mode hook, handleAiClick->handleClassicV1Click, app-mode-option-ai->app-mode-option-classic-v1, label.ai->label.classic-v1), renames app-mode-ai.svg->app-mode-classic-v1.svg, and removes the dead isAiInstalled disabled-gate now that ClassicV1 ships in-tree with no install-gate (Task 3 already hardcoded it to true). Fixes the pre-existing #31906 wire-contract bug: handleRememberToggle was writing the runtime mode string ("default"/"classicV1") straight to the AppModePreference.config.value preference, whose wire enum is actually ["ai","classic","classicV1",null]. Adds a local runtime->wire map ('default'->'classic', 'classicV1'->'classicV1' identity) and routes both the remember-checkbox write and its "is remembered" read through it. Also adds the genuinely-missing label.classic key to en-us.json (the component already called t('label.classic') with no key defined) and label.classic-v1, translated per-locale (classic-v1 stays untranslated like label.ai, since both are mode/product names). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…n read
Closes the symmetric read-side gap left by the AppModeSwitcher wire-token
fix: resolveInitialAppMode and AuthProvider.hydrateAndResolveAppMode both
read preferences.appMode and used it directly as a runtime mode string, but
it now holds the AppModePreference wire token ("classic"/"classicV1", plus
legacy "ai") written by the switcher's remember checkbox. A remembered
Classic user stored "classic" and would have read back the literal string
"classic" as the runtime mode instead of DEFAULT_APP_MODE.
Adds RUNTIME_TO_PREFERENCE_WIRE (moved from AppModeSwitcher.tsx, now the
single source of truth) and its inverse PREFERENCE_MODE_TO_RUNTIME plus a
translatePreferenceMode wrapper in useAppMode.ts, co-located with the
analogous CONFIG_MODE_TO_RUNTIME/translateWireMode pair for the tenant-wide
appConfiguration wire vocabulary. Routes both resolveInitialAppMode and
AuthProvider's boot-time preference read through the translation.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… boot Task 3 deleted useResolvedAppMode, which also removed the only code that fetched the persona doc and resolved the persona-forced app mode. The boot path in AuthProvider.hydrateAndResolveAppMode was left calling resolveEffectiveAppMode(userPref, null, appDefault) with persona hard-coded null, so a persona with appMode set no longer forced the mode. Fold persona resolution into the boot path: fetch the persona's UICustomization doc (personaDocFqn + getDocumentByFQN) when the precedence chain actually needs to run, translate its appMode via a new pure resolvePersonaAppMode helper (reusing translatePreferenceMode: classic->default, classicV1/legacy AI/ai->classicV1), and pass the resolved mode into resolveEffectiveAppMode. No route-registry install-gate is reintroduced. Update the stale doc comments that referenced the deleted async resolver. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Mount the existing AppModeSwitcher in the user profile dropdown (UserProfileIcon) so users can switch between Classic and ClassicV1 interfaces from the navbar avatar menu, alongside the persona switcher. Add the three i18n keys the switcher needs to the OSS catalog (mode-label, switch-interface, open-in-mode-when-login), sync across all locales, and copy he-he/zh-cn translations from the Collate catalog. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…allback, sidebar styling Make the ClassicV1 app-mode shell render standalone in OSS (no plugin required), so it works for every OpenMetadata user, not only when Collate contributes its surfaces. - AppModeRoutes: when no plugin contributes a routes fallback, render the shared page route table via `applicationRoutesClass.getRouteElements()` (OSS `AuthenticatedAppRouter`) as the catch-all — mirroring how the classic `AppContainer` renders its content, just wrapped in the ClassicV1 `AppShell` chrome instead of the classic sidebar. Every canonical page (Explore, Glossary, Settings, entity details) now renders inside the shell, and `/` -> `/my-data` comes from that table's own redirect. Replaces the earlier interim `/my-data` redirect fallback. - Add Home, Explore and Govern sidebar modules to `sharedAppModules`. Home and Explore are nav-only (content served by the fallback table); Govern carries the classic governance sub-nav (Glossary, Ontology Explorer, Classification, Metrics, Workflows). - Sidebar: port the full cosmetic sidebar styling (rail/panel widths, colors, spacing, hover/active) that the initial platform/ai-shell port left as a structural-only stub — the neutral shell rendered unstyled with no consumer. - vite: force-prebundle `react-hook-form` in `optimizeDeps.include`. Through a symlinked node_modules Vite otherwise serves it raw via `@fs`, pulling a second React copy and throwing "Invalid hook call" in every RHF form; `dedupe` alone does not cover the dev pre-bundle path. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The ClassicV1 sidebar header/footer rendered only plugin-contributed slots, so standalone OSS had no logo and no user card. Add OSS-native defaults, shown by MainPanel and Rail whenever no plugin contributes the matching slot (so a downstream Collate brand/user card still overrides them): - SidebarBrand (`ask-logo-btn`) — the OpenMetadata monogram via `brandClassBase.getMonogram()` (honours white-labeling), navigating home. - UserProfileCard (`ask-user-card`) — reuses the shared `UserProfileIcon` (avatar, name, and the profile dropdown that carries the mode switcher). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… content panel
Address review feedback on the ClassicV1 shell:
- Home and Govern nav icons were off — use the UntitledUI `Home02` and
`Scales01` line icons (Home02 matches the classic sidebar), replacing the
mismatched raster/coloured SVGs.
- Collapsed rail logo looked wrong: SidebarBrand hard-coded the MainPanel logo
class (which sizes the SVG for a wide logo). Add a `variant` so the rail uses
`ask-rail__logo-btn` and centers the square monogram.
- User card now bottom-aligned (`ask-main-panel__footer { margin-top: auto }`)
and carries the Classic/ClassicV1 AppModeSwitcher, mirroring Collate. The
collapsed rail shows a compact avatar-only card (the switcher label can't fit
the 65px rail).
- AssistantLayout content panel had only a structural stub — give
`.assistant-content` the white surface, flex column and relative positioning,
and the layout a page background so the content reads as a framed panel.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…p AppPlugin.getModeModules ClassicV1 is an app layout, not a plugin layout, so its sidebar modules should be owned by the app the same way the Classic sidebar is — not contributed by an installed plugin. - LeftSidebarClassBase gains `getAppModeModules()` / `setAppModeModules()`, the sibling of `getSidebarItems()` for the ClassicV1 layout. It holds the OSS app-mode modules (home, explore, entity, observability, govern, context center, marketplace, personal space). A downstream build overrides it to append its own, exactly like it extends the Classic sidebar. - `useAllAppModules()` now reads `leftSidebarClassBase.getAppModeModules()` and sorts by navOrder — no `ApplicationsProvider`/plugin merge. - Remove `AppPlugin.getModeModules` and its shell merge; update the docs on `ExtensionPointTypes` and `AppModule` and the `sharedAppModules` test. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Use the Collate nav-bar Home and Governance icons (default + active) for the ClassicV1 Home and Govern sidebar modules, replacing the UntitledUI stand-ins so they match the rest of the AI-shell icon set. - AssistantLayout: give default-variant PageLayoutV1 pages a 16px top inset (`.page-layout-v1:not([data-variant='compact'])`) — ClassicV1 has no top navbar, so pages otherwise render flush to the panel. Compact pages keep their own p-2; PageLayoutV1 owns all other page padding. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nbox01 The ClassicV1 Inbox page header showed the generic @untitledui `Inbox01`, inconsistent with the sidebar/nav icon set (Marketplace, Observability, etc. already use their own svg). Use the `ask-collate-nav-bar/inbox-default.svg` icon so the header matches the rest of the shell. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… into OSS The ClassicV1 user card was OSS-only chrome around the shared `UserProfileIcon`; the real AI user menu and the sidebar Inbox launcher lived in Collate. Move them (and the personal-space store + inbox helpers they need) into OSS so the OSS ClassicV1 shell has a first-class user card, and Collate reuses it. - New OSS: `components/discovery/personal-space/AIUserMenu/` (avatar, name, profile dropdown; uses OSS `NavbarUtilClassBase.getHelpItems()` — Collate's override is picked up automatically by the class-replacement plugin), `components/discovery/personal-space/InboxIconButton/` (inbox launcher with open-task + unread-activity badge), `hooks/usePersonalSpaceStore.ts`, `hooks/useUnreadInboxActivity.ts`, `InboxPage/inbox.utils.ts`, and `personal-space/inbox.constants.ts` (the two inbox query keys). - `UserProfileCard` now composes `AIUserMenu` + `InboxIconButton` + `AppModeSwitcher` (expanded) / a compact rail variant, replacing the `UserProfileIcon` placeholder. - All imports repointed to OSS relative paths; 52 moved unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ne React `@openmetadata/ui-core-components` is a yarn `link:` dependency, and worktree dev setups (e.g. Conductor) symlink `node_modules` itself. With Vite's default symlink-following, such deps resolve to a real path OUTSIDE the project root and get served raw via `@fs`, pulling a SECOND React instance — every react-hook-form `useForm` page then throws "Invalid hook call" / "Cannot read properties of null (reading 'useRef')" on mount. Preserving symlinks keeps deps on their node_modules-relative path so their `import 'react'` resolves to the single optimized React. Benign for plain installs (no symlinks to follow). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
|



Fixes https://github.com/open-metadata/openmetadata-collate/issues/6028
Moves the AI-assistant layout and shared-surface routes from the Collate
ai-chatplugin into OpenMetadata OSS, with route/presentation selection driven by app mode. The goal is that only genuinely AI-specific surfaces remain downstream; everything with a classic equivalent (Explore, Observability, Context Center, Marketplace, …) lives in OSS and renders its AI presentation whenuseIsAiMode().Stacks on top of #31906 (AppMode switcher) — the first commit here is that switcher, cherry-picked so this branch builds standalone; it will collapse once #31906 merges.
What's in this branch so far
components/platform/ai-shell/): a mode-agnostic assistant shell (AssistantLayout,Sidebar,KeepAliveRoutes,AppModeRoutes) and anAppModulecontract. Downstream plugins contribute their AI-exclusive nav + routes through newapp-mode.*extension points onExtensionPointRegistry— OSS imports no plugin code. Neutral naming (noAIprefixes);sharedAppModulesis populated as domains migrate.ExplorePageV1renders the AI search header (moved tocomponents/discovery/explore/ExploreHeader/) when in AI mode, and the classic page otherwise. Same/exploreroute in both modes — noAIExplorePage.AppModules: observability, context-center, marketplace, plus the shared helpers/layouts they need (LiveRefreshBoundary,PermissionedLiveRoute,ListPageHeader).Still to come (tracked, not in this draft yet)
AppModeRoutes, contribute the AI-exclusive modules + fallback) lands in the Collate repo.Verification
yarn build(standalone OSS UI) passes.tscclean for the new/changed files (the repo's pre-existingtscbacklog and the linked-@types/reactdual-type noise are unaffected).🤖 Generated with Claude Code