Repository navigation
Fixes #36069: Keep Browse Estate tree expanded to the remaining path after removing a browse chip - #38470
Merged
Conversation
…h after removing a chip Removing a browse chip rebuilds the explore tree from its static roots and re-keys every lazily loaded level, so the previous expansion was lost and the tree collapsed to the service-type level. The tree now expands the loaded ancestors of the active browsePath level by level, which also makes browse deep links and reloads open at the browsed node. Fixes #36069
Category roots carry no filterField, so a browse path outside the default-expanded Databases root (e.g. a dashboard service) never had its root opened on reload or deep link. Under a browse path each root's totalCount is scoped to that path, so expand the roots with matches.
…e path Selecting a tree node changes browsePath before the root counts refresh, so the stale unfiltered totals opened every populated category. Track the browsePath the root counts were refreshed for and ignore root counts until they match the current path.
Code Review ✅ Approved 🟡 Medium riskAuto-expanding Browse Estate ancestors after path changes alters tree navigation; stale or mismatched root counts could open unrelated categories. Keeps the Explore Browse Estate tree expanded along the remaining browse path after a chip is removed, on reload, and on deep links, by auto-expanding ancestor nodes whose filter field is a strict prefix of the active browse path. No issues found. 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 |
Rohit0301
enabled auto-merge (squash)
November 23, 2026 10:57
harsh-vador
approved these changes
Nov 23, 2026
2 tasks done
Rohit0301
added a commit
that referenced
this pull request
Nov 24, 2026
* fix(ui): align entity header badges with title actions (#38436) The badges box was pinned to the top of the header row while the title actions were centred against the 40px service logo, leaving the DQ alert icon and status badge ~4px higher than the copy/learning icons. Render badges in the same h-8 actions row instead. (cherry picked from commit 7ccb672) * Fixes #36069: Keep Browse Estate tree expanded to the remaining path after removing a browse chip (#38470) * fix(ui): keep Browse Estate tree expanded to the remaining browse path after removing a chip Removing a browse chip rebuilds the explore tree from its static roots and re-keys every lazily loaded level, so the previous expansion was lost and the tree collapsed to the service-type level. The tree now expands the loaded ancestors of the active browsePath level by level, which also makes browse deep links and reloads open at the browsed node. Fixes #36069 * fix(ui): expand the category root holding the browse path on reload Category roots carry no filterField, so a browse path outside the default-expanded Databases root (e.g. a dashboard service) never had its root opened on reload or deep link. Under a browse path each root's totalCount is scoped to that path, so expand the roots with matches. * fix(ui): expand category roots only once their counts match the browse path Selecting a tree node changes browsePath before the root counts refresh, so the stale unfiltered totals opened every populated category. Track the browsePath the root counts were refreshed for and ignore root counts until they match the current path. (cherry picked from commit 6aeece9) * Fixes open-metadata/openmetadata-collate#8792: Dark-mode logo and monogram support in Platform Settings > Theme (#38435) * feat(ui): dark-mode logo and monogram in Platform Settings > Theme Add optional customLogoDarkUrlPath and customMonogramDarkUrlPath to the logo configuration. BrandImage uses the dark variant only when the dark theme is active and one is set, falling back to the light URL, then the brand default; pre-auth pages read the theme the boot script applied. The AI shell sidebar now shows an admin-set custom logo (it showed only the build's mark), so the dark variant is visible after sign-in. Rebuild the Theme view and edit form to the design: light/dark previews with captions, an add/remove dark mode version field, live invalid-URL and image-load errors that block saving, a checking state, and a best-effort "hard to see in dark mode" warning. * fix(ui): address self-review of dark-mode logos - Only logo URLs edited in this session block Save, so a saved logo that no longer loads cannot hold up an unrelated theme change. - The classic Appearance page keeps the dark-mode URLs when it saves. - The AI sidebar resolves the custom logo for the active theme and keeps the build's sidebar mark when nothing applies. - Update the Platform Settings Playwright theme flow for the new copy, the image check and the dark-logo round trip. * fix(ui): mark a logo URL loaded before the optional contrast check Save no longer waits on the CORS image request used for the hard-to-see-in-dark-mode warning; the warning arrives separately. * chore(ui): use the design's Moon icon for the dark-mode preview captions Replace the Moon01 glyph with the Moon SVG from the design. * docs: record the dark-mode logo variant contract; use Typography color prop Add ADR:2026-11-23-dark-logo-variants-fall-back-to-the-light-url for the fallback, merge-on-write and Save-blocking rules. Colour logo field messages and captions through Typography's color prop. * style(ui): organize imports in LogoUrlField * fix(ui): enlarge the AI sidebar logo; drop the app-install tick background The sidebar wordmark (built-in or custom) fills the 32px header row instead of 24px. The app-install connector line now stops either side of the tick, so the tick needs no background to mask it. * fix(ui): show the AI sidebar logo at the classic sidebar's 40px The header row and wordmark grow from 32px to 40px, matching the 40px BrandImage in the classic left sidebar. (cherry picked from commit 8b18e8f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes:
Fixes #36069
In Explore › Browse Estate, removing a browse chip (for example
Schema ppgfrompostgres › mns_db › postgres › ppg) collapsed the tree to the service-type level instead of leaving it open at the remaining filters.Root cause: removing a chip changes
browsePath, which rebuilds the tree from its static roots (fetchEntityCountswithpreserveExpandedTree = false). Root keys are static, but every lazily loaded level below them gets a freshgenerateUUID()key. The old expanded keys then match nothing, and nothing re-expanded the tree alongbrowsePath. The same gap left browse deep links (like the one in the issue) and page reloads collapsed.Fix:
ExplorePureUtils.getBrowsePathAncestorKeys(treeNodes, browseFields)is a new pure helper. It returns the loaded nodes whosefilterFieldis a strict prefix of the active browse path, not the browsed node itself. It returns[]for an empty or category path.ExploreTreehas a new effect on[browsePath, treeData]that expands those ancestors. Each expansion lazy-loads the next level, which re-runs the effect, until the browsed node is revealed and highlighted by the existing selection sync.autoExpandedKeysRefmakes each node auto-expand only once, so a node the user collapses stays collapsed. It is cleared on rebuild together withrequestedKeysRef.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
service type › service › database, with the database highlighted.service type › service, with the service highlighted. Removing the Service chip leaves the service type highlighted.Unit tests
src/utils/ExplorePureUtils.test.ts: 5 cases forgetBrowsePathAncestorKeys(strict prefixes only, partially loaded deep path, empty/category path).ExplorePureUtilsandExploreTreeJest suites pass: 84/84.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Pages/ExploreBrowse.spec.ts:removing browse chips keeps the tree expanded to the remaining pathremoving the schema chip under an entity-type leaf keeps the database expandedreloading a browse deep link expands the tree to the browsed schemareloading a dashboard service browse link expands the Dashboards branch(added after review; not run locally yet)yarn lint:playwrightpasses with 0 errors.Local run of the new specs (chromium, against a backend built from this branch, UI dev server). All 3 passed:
Manual testing performed
mvn -pl openmetadata-dist -am package, UI build skipped) and ran it on a fresh MySQL database with Elasticsearch 9.3. Ran the UI with Vite against it.mns_db› databasespostgres,analytics› schemasppg,public,reporting, plus tables and the stored procedurerefresh_orders.UI screen recording:
Recorded on commit
a405bcb98bf(backend2.0.0-SNAPSHOTfrom the same branch) with the seeded data above.1. Chip removal at every level. Drill down to
ppg, then remove the Schema, Database and Service chips in turn. Each time the tree stays expanded to the remaining path and highlights the right node.1-chip-removal-every-level.webm
2. The issue's exact case. Open the issue's deep link (browse path to
ppgplus the Stored Procedures filter). The tree opens toppg. After removingSchema ppgit stays atpostgres › mns_db › postgres, and the Type chip stays.2-issue-deep-link-stored-procedures.webm
3. Reload at database level. After a page reload the tree re-opens to
postgres › mns_db › postgres.3-reload-at-database-level.webm
4. Another branch, and a manual collapse.
analytics › reporting: removing the schema chip leavesanalyticshighlighted. A node the user collapses stays collapsed.4-other-branch-and-manual-collapse.webm
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: I updated the migration scripts or explained why it is not needed. (N/A — no schema change)
For a UI feature or feature task: Docker build + sample-data recording. (Not applicable — this is a standalone bug fix. Recordings above come from a local build of this branch instead.)
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review against
REVIEW.md.Decision check. (N/A — no durable decision)
I have added a test that covers the exact scenario we are fixing. (Bug fix)
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues remain.Summary
Keeps Browse Estate open along the remaining browse path after chip removal and restores paths on reload.
Reviews (5) · Last reviewed commit: "fix(ui): expand category roots only once..." · Reviewed by Greptile