Skip to content

Fixes 36429: Restyle Ontology Studio to the new design in AI mode - #36433

Merged
anuj-kumary merged 7 commits into
mainfrom
anuj-kumary/ontology-studio-ui-update
Oct 28, 2026
Merged

anuj-kumary merged 7 commits into
mainfrom
anuj-kumary/ontology-studio-ui-update

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #36429

This restyles Ontology Studio to the new design, in AI mode only. Every change is gated on useIsAiMode(), so classic mode looks and behaves exactly as before.

This is a UI-only change:

  • No API calls, query keys, permissions, data-testids or feature availability change in either mode.
  • Every control that classic mode shows is still there in AI mode.
  • Colours come only from core component variants and existing semantic tokens.

Type of change:

  • Improvement

High-level design:

  • Approach. Each affected component reads useIsAiMode() and renders an AI-mode branch. The classic branch is untouched: the reviewer compared every classic branch with main. Where a branch would push a component over the lint complexity limit, the choice moves into a small helper. No new state or data flow is added, except one form-UX fix (see the last bullet under AI-mode surfaces).
  • Shared design-system pieces reused, not forked:
    • The header is core PageHeader variant="gradient", the same header the AI-mode Metrics page uses.
    • Mode tabs use Tabs underline; surface tabs and Model/Data use Tabs button-border.
    • Tables are core Table/TableCard; the Library is core Dialog with dividers="always".
    • The empty catalogue uses FeaturesPlaceholder with the existing ontology-empty-* strings, as Glossary does.
  • AI-mode surfaces:
    • Header and sub-bar. "Find a concept" moves into the sub-bar through a small context, OntologyGraphSearchSlot.
    • Graph canvas: dotted background, joined zoom controls, health panel, tree view, connect pill, relationship picker.
    • Concept inspector, concept editor, column-binding editor and asset picker.
    • Definitions workspace (Concepts / Properties / Constraints / Settings), property and constraint editors, create-ontology form, AI-draft review panel.
    • Scope picker, Library (now a centred dialog instead of fullscreen), Review & publish, Releases, and native Import/Export.
    • Form fix: the property editor's Advanced section reopens on each save that leaves an advanced field invalid.
  • Added in AI mode only. These come from the design and reuse existing handlers:
    • a Data-mode concept picker (the same select handler as a node click);
    • an X on the connect pill (the same cancel as Esc);
    • a Cancel button in the Library footer and in the release-export modal footer (the same close handlers).
  • Not in the design. Query mode and the native Import/Export dialog have no design yet. Import/Export is styled to match the other AI-mode dialogs, and Query mode is unchanged.
  • Rejected alternative: showing tab counts on Concepts / Properties / Constraints. They would have added list requests, so they are not included.

Tests:

Use cases covered

  • Classic mode is unchanged. All existing Ontology, Glossary and page Jest suites pass unmodified, and they render in classic mode.
  • Every control still works in AI mode:
    • header actions, mode and surface tabs, scope picker entries;
    • graph controls, Model/Data, connect and cancel, the relationship picker;
    • inspector add property, add relationship and add mapping;
    • column binding and the asset picker;
    • definition paging and delete, property and constraint editors, create and settings forms;
    • library filter, install and dry run;
    • capture release, request review, releases export and activate;
    • native import and export.
  • AI-mode empty catalogue: the feature placeholder shows, and New Ontology opens the create form.
  • AI-mode all-ontologies tree: an ontology whose concepts are all unconnected keeps its name.
  • AI-mode property editor: Advanced reopens on each invalid save, including after the user collapses it.

Unit tests

  • New test files:
    • OntologyStudioHeader.test.tsx
    • OntologyStudioSubBar.test.tsx
    • OntologyStudioScopeMenu.test.tsx
    • OntologyStudioWorkspace.test.tsx
    • AllOntologiesGraphView.test.tsx
  • AI-mode cases added to the existing tests of every restyled component.
  • Jest: jest src/components/OntologyExplorer src/components/governance/ontology src/pages/OntologyExplorerPage src/components/Glossary gives 111 suites, 939 tests, all passed.
  • Coverage on the 42 changed source files: 90.3% lines (2487/2755).
  • Regression tests checked against the old code: both fail when their fix is reverted.
  • Static checks: eslint, prettier, tsc --noEmit and tw-audit are clean, with no hardcoded colour errors.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • No new specs. The existing specs run in classic mode, whose markup and test ids are unchanged; AI-mode behaviour is covered by the Jest cases above.

Local run on `5a44594754b`. Command: `PLAYWRIGHT_IS_OSS=1 PLAYWRIGHT_TEST_BASE_URL=http://localhost:3001 playwright test --project=chromium --workers=2`. It runs in classic mode, the default for the test users.

Specs (the impact-mapped Ontology specs plus the glossary relations graph):

  • `OntologyNativeImport`
  • `OntologyNativeOperations`
  • `OntologyNativeStudio`
  • `OntologyReview`
  • `OntologyStudio`
  • `OntologyStudioCardinality`
  • `OntologyStudioE2E`
  • `OntologyStudioIntegration`
  • `OntologyStudioInteractions`
  • `OntologyStudioIsolatedToggle`
  • `Glossary/GlossaryRelationsGraph`

Result: 80 passed, 2 failed.

  • Both failures are local data, not this branch. The two `OntologyNativeOperations` cases ("installs fibo/fhir into a new native ontology…") hit a strict-mode violation: two "FIBO Starter" / "HL7 FHIR Starter" options in the ontology picker. I had already installed those packs on the local instance for manual testing. The same two cases fail identically on `main` against the same data, so CI's fresh database is not affected.
  • Not run locally: the canary and smoke specs the planner also lists (Table, Topic, DomainIsolation and others). This change doesn't touch them; the merge queue runs the full suite.

Manual testing performed

  1. Ran the branch UI with Vite on :3001 against a local server on :8585.
  2. Installed four Library packs: FHIR, FIBO, ISA-95 and HR Open Standards.
  3. Switched to AI mode and went through the Studio:
    • all ontologies, then one ontology;
    • Graph, Tree, Model/Data and the zoom controls;
    • selected a concept (inspector);
    • Edit, then Add Concept;
    • Term: Concepts, Properties, Constraints and Settings;
    • Publish (Changes and Releases), Library (catalogue and pack detail), the scope picker and Import/Export.
  4. Switched to classic mode and checked the same screens are unchanged.
  5. Checked the empty-catalogue state before installing the packs.

UI screen recording:

Not applicable: this is a styling-only change with no new behaviour. Before/after screenshots are below, both in AI mode with the same data. Before is main and after is this branch.

All ontologies
All ontologies

Ontology graph (header, sub-bar search, Model/Data, zoom controls, health)
Ontology view

Concept inspector
Concept panel

Tree
Tree

Edit mode / Add concept
Edit
Add concept

Definitions workspace (Term)
Definitions

Review & publish
Publish

Library
Library

Scope picker
Scope menu

Import / export
Import export

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable (no schema changes).
  • For a UI feature or feature task: not applicable. This is a styling-only change; screenshots are above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    • The first pass on 8611b742c18 raised one 🔴: the AI tree dropped the ontology name for ontologies whose concepts are all unconnected. It is fixed in 5a44594754b, with a test. The same commit fixes the 🟡 about the Advanced section staying collapsed over errors.
    • The second pass on 5a44594754b raised no 🔴.
  • Decision check: no durable decision. The AI-mode-only gating follows the existing useIsAiMode pattern.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The repository's styling, file-structure, and heading requirements need to be satisfied before merging.

Findings

  1. P2 Local styles bypass core defaults ▶
  2. P2 Helpers remain in component files ▶
  3. P2 Section titles skip heading elements ▶

Summary

Restyles Ontology Studio in AI mode while keeping separate classic-mode branches.

  • Ontology Studio gets a new AI-mode shell and catalogue layout.
  • The graph and tree offer updated controls and concept selection in AI mode.
  • Concept editing and inspection use the redesigned AI-mode panels.
  • Definitions, properties, and constraints use redesigned AI-mode tables and forms.
  • Publishing and release screens use the redesigned AI-mode layout.
  • The Ontology Library uses a centered AI-mode dialog and redesigned pack cards.

Reviews (3) · Last reviewed commit: "Merge branch 'main' into anuj-kumary/ont..." · Reviewed by Greptile

AI mode only (useIsAiMode); classic mode renders unchanged. No logic,
API, permission or test-id changes; every existing control stays
reachable in AI mode.

- Header on core PageHeader (gradient variant), underline mode tabs,
  design action order; button-border segmented sub-bar
- Graph chrome: dotted canvas, search in the sub-bar, Model/Data
  segmented control, joined zoom controls, health panel, tree view,
  connect pill and relationship picker
- Concept inspector/editor sections, add forms and asset picker
- Definitions workspace tables, property/constraint editors, settings
  and create-ontology form, AI draft review panel
- Scope picker, library dialog, review & publish, releases and native
  import/export
- Empty catalog uses the glossary-style FeaturesPlaceholder
- AI-mode all-ontologies tree hides the per-ontology heading only when
  the tree's own header names it, so ontologies whose concepts are all
  unconnected keep their name
- Property editor Advanced section reopens on each save that leaves an
  advanced field invalid instead of staying collapsed over the error
@anuj-kumary
anuj-kumary requested a review from a team as a code owner October 28, 2026 10:18
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the UI UI specific issues label Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary self-assigned this Oct 28, 2026
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Oct 28, 2026
In AI mode the description sat in the fixed header, so a long description
could push the scrollable sections out of reach. It now opens the
scrollable body, as in the design.
…pdate' into anuj-kumary/ontology-studio-ui-update
@gitar-bot

gitar-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Restyling Ontology Studio across 69 UI files and adding AI-mode controls could disrupt ontology editing or publication workflows if wiring differs.

Restyles Ontology Studio to the new design in AI mode only, gated on useIsAiMode() so classic mode is unchanged. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

Comment on lines +84 to +89
<Box className="tw:rounded-lg tw:bg-secondary_alt tw:p-4" direction="col">
<Typography as="p" className="tw:m-0" size="text-sm">
{title}
</Typography>
{hint ? (
<Typography as="p" className="tw:m-0 tw:text-tertiary" size="text-xs">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Local styles bypass core defaults

ConceptEmptyState sets padding, background, and radius on core Box, then sets text colour through a class on Typography. The repository requires callers to use core props and variants for appearance; Box is layout-only. Use an appropriate core surface and Typography color instead. The same pattern appears in ConceptFormPreview and elsewhere in the AI branches. This repository requirement must be satisfied before merging.

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +43 to +52
const AI_FIELD_ORDER = [
'displayName',
'description',
'owners',
'reviewers',
'layer',
'name',
'iri',
'namespace',
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Helpers remain in component files

The new AI_FIELD_ORDER constant and pure unlabelled helper sit in the component file. The repository requires module-level constants in sibling .constants.ts files and pure helpers in .utils.ts files. Move them there before merging. The same pattern appears in OntologyControlButtons.tsx and OntologyMemoryReviewPanel.tsx.

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +50 to +54
<Typography
aria-level={3}
role="heading"
size="text-sm"
weight="semibold">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Section titles skip heading elements

The new section title uses role="heading" and aria-level instead of a heading element. The repository requires semantic elements first. Use Typography as="h3" here and remove the role-based replacement. This repository requirement must be satisfied before merging.

Suggested change
<Typography
aria-level={3}
role="heading"
size="text-sm"
weight="semibold">
<Typography
as="h3"
size="text-sm"
weight="semibold">

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 80%
80.01% (132029/164998) 66.58% (46736/70195) 69.61% (26490/38053)

@sonarqubecloud

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit fc8874f Oct 28, 2026
88 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/ontology-studio-ui-update branch October 28, 2026 13:29
anuj-kumary added a commit that referenced this pull request Oct 28, 2026

This branch was previously deployed

1 inactive deployment
test — b1700460 Deployed Oct 28, 2026 by anuj-kumary via RDF Playwright execution #40909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ontology Studio: apply the new design in AI mode

2 participants