Repository navigation
Fixes #36960: Memory details open linked assets and documents, and name a deleted query for admins - #36991
Conversation
Release testing could not open the Query a memory cites: Linked Data Assets rows rendered no link at all, and the table's Queries tab showed only a timestamp and the SQL, so near-identical queries were indistinguishable. - A linked asset opens on its own page; a linked Query opens full screen on the table it was linked from, and stays unlinked when the memory names no table. - A Query card names the query when it has a display name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he way out Review of the linked-asset links found three gaps: - A document a memory was extracted from linked to /table/<fqn>, because getEntityLink falls back to a table page for any type it has no route for. Documents now open in Context Center, previewed (contextCenterClassBase .getDocumentPath, shared with the "Extracted from" link), and any other type with no route of its own stays unlinked (entityUtilClassBase.hasEntityLink). - In AI mode the memory modal outlives a route change, so following a linked asset or the "Extracted from" link left it open over the new page. Both links now close it, as the derived-term link already did. - The utils file imported EntityReference twice, which failed the type check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…porting query Review of the linked-asset links: - A link to another document now previews it on the Documents page. The page stays mounted, and it skipped any ?document= change while a preview was open. - Following a link out of a memory no longer drops ?memory from history, so Back from the linked page reopens the memory as before. The Memories page closes the modal in place (onNavigate). A new-tab click (Cmd/Ctrl/Shift/Alt or a non-primary button) leaves the modal open. - A linked Query opens only when the memory links exactly one table. With several tables it stays unlinked instead of opening on the first. - hasEntityLink is false for an ingestion pipeline, which is routed through its service and has no route without it. - The Dashboard uses getDocumentPath. QueryCard's separators use a semantic token and the size prop. A memory held because a supporting Query was deleted stores only the Query's id in its reason. The memory list and view now name the Query when the memory's version history gives this viewer its name. The versions endpoint already reduces a Query reference to its id and type for a caller who may not view it. A Query delete is always a hard delete, so the Query's own endpoint cannot name it. The stored reason stays id-only. ADR:2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-review Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ew-tab click
A Query that no longer exists now reads in full only to an admin. Policy
conditions that need the Query, such as hasDomain() or matchAnyTag(), cannot
be evaluated once it is gone, and they failed open. A DomainOnly reader that a
Query was hidden from then saw its name and FQN once it was deleted: in the
hold's change, in every version, and so in the Context Center's named reason.
ContextMemoryEvidenceAccess now gives any other caller {id, type} for a Query
whose row is gone. The evidence-hold ADR amendment says so: the reason is named
for admins, and every other reader keeps the id.
The derived-term link no longer closes the memory on a new-tab click. That
click left ?memory= in the URL, so the memory could not be reopened from its
row. navigatesThisTab now lives in LinkClickUtils, shared by every link in the
memory.
MemoryEvidenceHoldsTest pins the Context Center's RETIRED_QUERY_REASON to
EVIDENCE_RETIRED.
ADR:2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-review
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
| Count | Rule |
|---|---|
| 7 | react-hooks/exhaustive-deps |
| 1 | openmetadata-imports/no-lower-layer-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Database/TableQueries/QueryCard.tsx:126:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterDashboardPage/ContextCenterDashboardPage.tsx:207:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 't'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx:588:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'setCurrentPage'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx:636:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setCurrentPage'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx:645:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setCurrentPage'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx:650:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setCurrentPage'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx:665:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setCurrentPage'. Either include it or remove the dependency array. |
| 🟡 | src/utils/EntityUtilClassBase.ts:29:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…ce-ux # Conflicts: # openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/CreateMemoryModal/CreateMemoryModal.component.tsx
❌ 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 |
| * The status reason a memory gets when a Query it cites is deleted, as MemoryEvidenceHolds writes | ||
| * it: the Query's id sits between the two parts. | ||
| */ | ||
| export const RETIRED_QUERY_REASON = { |
There was a problem hiding this comment.
these text doesn't required translations ?
There was a problem hiding this comment.
Good catch. These two strings are the reason text the server stores when a cited Query is deleted (MemoryEvidenceHolds), so they have to stay in English: the UI only matches them to recognise that hold and read the Query id out of it. The UI was also rebuilding the shown text from them, so viewers saw English. Fixed in 5cbe133: the hook now shows message.memory-supporting-query-deleted with the Query's name, or its id when the viewer can't see the name. The key has a translation in all 21 locales, and the constant's comment says it's matched only, never shown.
The stored reason stays the English contract the UI recognises; what the viewer reads is message.memory-supporting-query-deleted, in every locale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ce-ux # Conflicts: # docs/decisions/2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-review.md # openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/CreateMemoryModal/CreateMemoryModal.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/CreateMemoryModal/CreateMemoryModal.test.tsx # openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.test.tsx
Each held card in the memory list read and parsed the memory's full version history on every mount. The lookup now goes through React Query, keyed by memory and Query, so a card, its panel and a remount share one result. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review ✅ Approved 1 closed / 1 findings🔴 High risk · Restricting deleted-query details to admins changes authorization; an incorrect existence or admin decision could expose restricted query names in memory histories. Memory details modal now links assets, documents and single-table queries to their own pages, closes on same-tab navigation, and names deleted queries for admins. Resolved the finding where the memory list fetched full version history once per held card, so each card now uses one shared cached lookup. No open issues remain. ✅ 1 closed✅ Performance: Memory list fetches full version history once per held card
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 |
|



Describe your changes:
Fixes #36960
In the memory details modal:
/versionsand the change description.Type of change:
High-level design:
CreateMemoryModal.utils(getLinkedAssetPath,getQueryTableFqn),contextCenterClassBase.getDocumentPath, andentityUtilClassBase.hasEntityLink, which is false foringestionPipeline.onNavigateonly for same-tab clicks (utils/LinkClickUtils.navigatesThisTab).?document=changes and clears the preview when Back removes that parameter.useMemoryStatusReasonreads the deleted query's name from the memory's version history. The reason's text is shared throughRETIRED_QUERY_REASON, and a Java test pins it toEVIDENCE_RETIRED.ContextMemoryEvidenceAccesshides a Query reference whose row is gone from non-admins (EntityDAO.exists, cached per response).2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-reviewgets amendment v2: the UI resolves the name at view time, and the stored reason stays id-only.Tests:
Use cases covered
/versionsand GET.Unit tests
abdd2f77abf: 117 Jest tests passed in 10 touched suites; 94 planner-selected Java tests passed.MemoryRouterBack-navigation regression, observed failing before the preview fix.yarn tsc:checkremains blocked by two unchanged files:IngestionWorkflowForm.tsx:413(RJSF validator type) andOntologyIriInput.test.tsx:104(exactinByRoleOptions). No errors were reported in changed files.Backend integration tests
Not run locally:
make java_affectedselects 56 integration tests. The newContextMemoryQueryEvidenceIT#aDeletedQueryStaysHiddenFromAReaderOutsideItsDomainis written, but the IT module does not compile against the local snapshot jars; its errors are in unrelated ontology and MCP ITs. The tests run in the merge queue.Playwright (UI) tests
Not run: the planner selects 62 specs, plus impact-map gaps that make CI run the full suite. They need a server built from this branch.
UI screen recording:
36991-memory-links.webm
Recorded on the combined review instance (all 12 memory PRs plus the 2026-11-06 fixes):
orderslink opens the table and closes the memory; Back reopens it.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md: fresh review ofabdd2f77abffound no remaining Important findings. Fixed Back leaving the document preview open and CI checkstyle failures.Regression follow-up (2026-11-04)
ContextMemoryQueryEvidenceITcases passed on isolated MySQL/Elasticsearch.7d7ac24b6e4e274b935954a067dbae7fa61007a3, AIeacb39819e854615b6eebf27b6fa486b4b9beba3, Collatef10b2d235cd4ec4f461a2db409f43a9289d4e3ae. Targeted combined runs are reported here; this does not claim that every planner-selected integration or browser suite ran.Restricted Query label (2026-11-05)
message.no-permission-to-viewtext: “You do not have the necessary permissions to view this data.” It stays unlinked because it has no FQN; the reference used when editing/saving stays id/type-only. Accessible Query names and destinations keep their existing behavior.IngestionWorkflowForm.tsx:413andOntologyIriInput.test.tsx:104; no errors were reported in changed files.8fc99ba5ef7f25f28a11b9de559c43f79bfd7203, no Important findings. No new decision record: this renders the existing redaction contract.Merge readiness (2026-11-06)
main(f95264c). Resolved aLinkedAssetCardsignature conflict with Fixes 7423: Standardize icons on tertiary ButtonUtility across the UI #35438, keepinghref/onNavigateand main'st. 26CreateMemoryModalJest tests pass.MemoriesViewandCreateMemoryModal. That resolution is already recorded and checked on a combined tree, where 90 Jest tests pass.🤖 Generated with Claude Code