databrickslabs / databrickslabs/ontos
[Bug]: Contract-property / contract-schema semantic links are not navigable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 212
- Forks
- 71
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 43
Description
Summary
Clicking a contract-property (or contract-schema) semantic link in the Linked objects panel always fails with "Cannot navigate to data_contract_property" — these entity types have no navigation handler.
Steps to reproduce
- Open a concept that is linked to a
data_contract_property(ordata_contract_schema). - Click the linked object in the Linked objects panel.
Expected: navigate to the contract property/schema (e.g. the parent contract's schema view, anchored to the property).
Actual: a destructive error toast: "Cannot navigate to data_contract_property".
Root cause (traced)
src/frontend/src/components/semantic/linked-objects-panel.tsx:287-325 — navigateToEntity has case branches for data_product, data_contract, asset, data_domain, and uc_catalog/uc_schema/uc_table/uc_column, but no case for data_contract_property or data_contract_schema. Those fall through to the default branch (error toast).
Note: these two entity types are handled elsewhere in the same file (icon map at :76-77, colour map at :91-92, and the schema/property detail branches at :148-173), so navigation is the only gap.
PR #596 touches this file but does not add these navigation cases.
Suggested fix
Add case 'data_contract_schema' and case 'data_contract_property' to navigateToEntity, routing to the parent contract's detail view (the composite id encodes {contract_id}#{schema}[#{property}], so the contract id can be parsed out and the schema/property used as an anchor/highlight).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/frontend/src/components/semantic/linked-objects-panel.tsx, reading navigateToEntity around lines 287-325 alongside the schema/property detail branches at lines 148-173. Add navigation coverage for data_contract_schema and data_contract_property using the composite id described in the issue; done means linked objects open the parent contract schema view with the schema or property targeted instead of showing the error toast.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100