Skip to content

Fixes #36797: Ontology Studio header/workspace alignment, Tasks badge, common placeholder and loader - #36798

Merged
anuj-kumary merged 3 commits into
mainfrom
anuj-kumary/header-graph-task-fix
Nov 2, 2026
Merged

anuj-kumary merged 3 commits into
mainfrom
anuj-kumary/header-graph-task-fix

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #36797

Ontology Studio layout and state fixes, raised in design review:

  • Tasks count on one line — the count Badge was a child of the button's text span and, being block-level, always wrapped under "Tasks" (56px tall button). It now goes in the Button's iconTrailing slot, the same pattern ChangeRequestsIndicator uses.
  • Header and graph aligned (Collate / AI mode) — the header is an inset card; the sub-bar and graph ran edge-to-edge under it. The workspace is now a card with the same 8px inset, rounded-xl and border-secondary, so the edges line up (header x 351–1426, sub-bar 352–1425 inside the 1px border). Classic mode is unchanged.
  • Header actions off the border and aligned with the tabs — PageHeader drops its bottom padding when it has a tab footer, so the action buttons sat on the border. The footer row is now bottom-aligned (tabs stay flush) and the actions get pb-1.5; tab text and button centres are within 0.5px, 7px above the border.
  • Common placeholders — the hand-rolled "We couldn't load this right now" text + full-width Retry button is replaced with SomethingWentWrongPlaceholder (load failures) and NoDataPlaceholder (aggregate graph too large) from components/common/EmptyPlaceholder, as Glossary does. Ontology shortcut buttons are kept as placeholder actions; the wrappers keep role="alert". The action label is now Reload (was Retry).
  • Loader animation — page-level "Loading…" text in the top-left corner is replaced by the common Loader spinner (Explorer page, single-ontology graph, and the graph Suspense fallbacks). Small inline "Loading…" labels inside panels/drawers are left as-is.

Type of change:

  • Bug fix

High-level design:

N/A — small UI change.

Tests:

Use cases covered

  • Tasks button with a count renders on one row in AI and classic mode.
  • AI-mode header and workspace cards share inset/radius/border in light and dark.
  • All-ontologies load failure, aggregate-too-large, and linked-ontology load failure render the common placeholders with working Reload / ontology / All ontologies actions.
  • Studio loading shows the spinner below the header.

Unit tests

  • Updated OntologyExplorerPage.integration.test.tsx (expects the loader and the Reload action) and OntologyGraphView.test.tsx (waits for the loader to disappear instead of a text that no longer exists).
  • OntologyExplorerPage, OntologyGraphView, AllOntologiesGraphView, OntologyStudioHeader, OntologyTasksDrawer suites: 190/190 pass.

Backend integration tests

  • Not applicable (no backend API changes).

Playwright (UI) tests

  • Updated OntologyReview.spec.ts to expect the Reload button on the ontology load-failure state. Not run locally.

Manual testing performed

  1. Served this branch with Vite on :3000 against a local server on :8585.
  2. Opened Governance → Ontology Studio in AI and classic mode, light and dark theme; pending-review count mocked to 3.
  3. Verified the Tasks button, header/workspace alignment (measured in the browser), error placeholder, and loader (ontology list request held open).

UI screen recording:

Not applicable — styling and state-rendering fix, not a feature. Screenshots below.

Before — Tasks count wraps, plain-text error (classic)
before classic

Before — AI header and workspace not aligned
before collate header

After — Collate (AI) light
after collate light

After — Collate (AI) dark
after collate dark

After — classic
after classic

After — loading, light
after loading light

After — loading, dark
after loading dark

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.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

…count on one line, use common placeholder and loader

- Tasks count badge moves to the Button's iconTrailing slot so it no longer
  wraps under the label.
- AI-mode header gets a bottom inset and the workspace below it becomes a
  card with the same inset, radius and border so their edges line up.
- Header actions are bottom-aligned with a small gap so they clear the card
  border and line up with the mode tab text.
- Aggregate and owner load errors render SomethingWentWrongPlaceholder /
  NoDataPlaceholder from components/common/EmptyPlaceholder.
- Page-level loading text is replaced by the common Loader.
@anuj-kumary anuj-kumary added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Nov 2, 2026
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 2, 2026 04:26
@anuj-kumary anuj-kumary self-assigned this Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 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 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 1 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 1 warning(s) across 1 changed file(s).

Count Rule
1 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/governance/ontology/OntologyGraphView/OntologyGraphView.tsx:586:9 openmetadata-imports/review-sequential-api-calls Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

… are listed

SomethingWentWrongPlaceholder only falls back to onReload when actions is
empty, so listing the ontology shortcuts hid the Reload action. Put Reload
in the actions array explicitly.
@gitar-bot

gitar-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Changing ontology load failures to shared placeholders and Reload actions could leave users without a clear recovery path if refetching fails.

Aligns Ontology Studio header and workspace cards, keeps the Tasks count on one line, and switches load failures and loader states to the common placeholder and spinner. The aggregate load error now keeps the Reload action when ontologies are listed, which addresses the resolved finding. No open issues remain.

✅ 1 closed
✅ Bug: Aggregate load error drops Reload when any ontology is listed

📄 openmetadata-ui/src/main/resources/ui/src/pages/OntologyExplorerPage/OntologyExplorerPage.tsx:1740-1745 📄 openmetadata-ui/src/main/resources/ui/src/pages/OntologyExplorerPage/OntologyExplorerPage.tsx:1758-1764
In renderAggregateError, the non-capacity branch passes both actions={ontologyActions} and onReload to SomethingWentWrongPlaceholder. That wrapper calls resolveSingleAction(actions, onReload, ...), which uses onReload only when actions is missing or empty (EmptyPlaceholder.utils.ts). So when allModels fails while availableOntologies is non-empty, which is the usual case because the ontology list loaded and only the aggregate failed, the Reload/refetch button disappears and the user can only pick a single ontology. Before this change the Retry button always rendered. To fix it, put the reload action into the array yourself.

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

@anuj-kumary
anuj-kumary enabled auto-merge November 2, 2026 04:54
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
80.93% (136904/169149) 67.82% (49109/72405) 70.89% (27662/39020)

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 6ff2856 Nov 2, 2026
70 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/header-graph-task-fix branch November 2, 2026 07:20
mohityadav766 added a commit that referenced this pull request Nov 3, 2026
#36798 put the Studio workspace inside a wrapper div, so the sub-bar's nav
is no longer a direct child of the shell and `:scope > nav` finds nothing.
The rdf Playwright lane runs only when RDF paths change, so #36798's
merge-queue run skipped this spec; main's scheduled run and every merge
group that turns the lane on now fail it. The sub-bar's test id does not
depend on where the wrapper puts the nav.
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Nov 3, 2026
…-metadata#36638)

* fix(users): keep credentials and the admin flag out of non-admin user writes

- User versions, history and PUT/PATCH/POST/DELETE responses never carry a
  stored password hash or bot token; another user's email is masked there as
  it is on reads.
- A non-admin PUT keeps the stored admin flag, and a non-admin CSV row cannot
  change an existing user's admin flag.
- Users CSV import and export authorize against users as a whole rather than
  against a user who shares the team's name.
- Self sign-up through the users API applies the registration domains.
- With an email-domain allowlist, a provider token must carry an email (in any
  principal claim) in an allowed domain.
- Identity comparisons use sameIdentifier instead of equalsIgnoreCase.

* fix(secrets): keep stored secrets out of RDF and off retargeted pipelines

- The RDF graph, JSON-LD and diff no longer carry connections, pipeline
  source configs, server connections or authentication mechanisms; the
  ontology and contexts stop advertising them.
- The RDF diff, which reads stored versions directly, is admin only, and a
  user's RDF needs access to the user's email.
- Storage manifest configs are typed like dbt ones, so their store
  credentials are masked on read and encrypted at rest.
- A caller who sees an ingestion pipeline's secrets masked must enter them
  again when the dbt or manifest source they belong to points elsewhere,
  on PUT and PATCH.

* fix(columns): apply search access policies to the column grid

The column grid aggregates over the table and data model search documents,
so with search access control on it now ANDs the caller's policy filter into
every query it runs, as search does.

* fix(lineage): leave assets the caller cannot view out of search lineage

- Search lineage, its direction and entity-count variants, the CSV exports
  (sync and async) and data quality lineage drop the nodes the caller cannot
  view, the nodes reachable only through them, edges to them, pipelines on
  edges the caller cannot view, and upstream-lineage entries naming them.
- Platform lineage, the whole catalog's lineage at once, is admin only.

* fix(search): keep access policies, query_filter and deleted in hierarchy search

The hierarchy rewrite turns the caller's query into one should clause among
name matches, so a term matching by name came back without meeting the
caller's search access policies, query_filter or deleted flag. They are now
applied around each query it builds; the parents that only draw the tree,
including those fetched for hits whose parent missed the page, still meet
the policies and the deleted flag.

* refactor(security): split the lineage filter and pipeline guard into small methods

* docs(decisions): record the rules this security batch sets

Provider tokens must carry an email while sign-in domains are restricted,
only admins grant or revoke the admin flag, the RDF projection never carries
stored secrets, search lineage returns only assets the caller can view, and
the connection secrets guard now covers ingestion pipeline sources.

* fix(lineage): filter a copy, across entity-count pages and in export jobs

- The lineage graph builders can cache the graph they return and hand the
  same one to the next caller, so a caller's view is cut from a copy and the
  graph is left whole for whoever reads it next.
- An entity-count page is a window of the nodes up to a depth, so the node
  that links one of them to the root can be on another page. Which nodes the
  root reaches through nodes the caller can view is decided on the
  depth-bounded graph the page is cut from, on the endpoint and its export.
- An async lineage export keeps the bot the request was made on behalf of
  and runs under that impersonation, so isImpersonated() rules hold for the
  export as they did for the request.

* fix(users): exporting users needs access to their emails

A users CSV carries each member's email in the clear, which user reads mask
for anyone but an admin or a bot, so only they may export one, on either
route. The file is not masked for other callers instead: an import writes
the email column, so a masked file would overwrite the emails with the mask.

* fix(secrets): refuse a storage manifest source that no source schema matches

A source that cannot be typed stays a map, which the masker and the secrets
manager never reach. Creating or updating a pipeline with one is refused
with 400. One stored before this check is read back without its manifest
source, and the rest of the pipeline stays readable so it can be repaired.

* fix(lineage): a pipeline shown as an edge reaches the assets it connects

Search lineage keeps the nodes the root reaches through nodes the caller can
view, walking the ends of edges. A pipeline shown as an edge is no end of the
edges it carries, so a non-admin opening a pipeline's lineage got the pipeline
alone. An edge's pipeline now links both of its ends. The domain filter for
domain-restricted users walks the same graph and is fixed with it.

* fix(search): stop scoping the domain picker to the selected domain

The navbar sends its selected domain as a query_filter on every search, the
domain picker's included. Re-applied by hierarchy search, it left the picker
unable to find any other domain while one was selected. Hierarchy search
still re-applies the access policies and the deleted flag; the query_filter,
the caller's own filter and never an access control, again narrows only the
caller's query, as it did before.

* test(ui): find the Ontology Studio sub-bar by its test id

open-metadata#36798 put the Studio workspace inside a wrapper div, so the sub-bar's nav
is no longer a direct child of the shell and `:scope > nav` finds nothing.
The rdf Playwright lane runs only when RDF paths change, so open-metadata#36798's
merge-queue run skipped this spec; main's scheduled run and every merge
group that turns the lane on now fail it. The sub-bar's test id does not
depend on where the wrapper puts the nav.

* chore(playwright): auto-refresh impact-map.generated.json

* fix(sessions): leave the session cookie alone on requests that sent none

A silent re-authentication could lose its pending session to a refresh that
was already in flight. The refresh carried no session cookie, the server
answered it with an expiring OM_SESSION, and that response could reach the
browser just after the login's, deleting the pending-session cookie the
login had set. The callback then found no session and sent the user to
sign in. A cookie is now cleared only when the request carried one,
malformed values included.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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: Tasks badge wraps, header/graph misaligned, plain-text error and loading states

2 participants