fix(frontend): keep IPAM namespace context on IP links from namespace relationship tabs#9893
Merged
Merged
Conversation
… relationship tabs (closes #9892) IP prefix/address links on a namespace object's relationship tabs went through the generic object-relationship table, which builds links via getObjectDetailsUrl without any namespace context. On those pages the active namespace lives in the route path, not the `namespace` query param that IPAM links rely on, so the links dropped it and the target resolved to the default namespace. Thread an optional identifier override param through the relationship table's column builder and inject `namespace=<parentId>` when the relationship's parent is an IP namespace.
Contributor
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Bug fix to preserve IPAM namespace context in relationship table links; adds optional override params and tests, no impact on other logic.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would require human review. Modifies core routing and URL construction logic, threading new optional params through multiple components. Risk of breaking IPAM navigation or other table links. Tests only cover one function; full regression risk requires human review.
Re-trigger cubic
bilalabbad
approved these changes
Jul 21, 2026
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.
Closes #9892
Problem
When viewing an IPAM namespace object and its relationship tabs (e.g.
/ipam/namespaces/IpamNamespace/<id>/ip_prefixes), clicking an IP prefix/address link dropped the namespace context and the target resolved to the default namespace.Those pages render through the generic object-relationship table, whose links are built by
getObjectDetailsUrlwith no namespace context. IPAM links preserve the active namespace via the?namespace=<id>query param, but on a namespace object detail page the namespace lives in the route path, not that query param — so there was nothing to preserve and the link fell back to the default namespace.Fix
Thread an optional
identifierOverrideParamsthrough the relationship table column builder (getObjectTableColumns→getObjectIdentifierColumns→TableIdentifierCell).RelationshipTableinjectsnamespace=<parentId>only when the relationship's parent object is an IP namespace (isOfKind(IP_NAMESPACE_GENERIC, parentSchema)). All params are optional/additive, so other object tables are unaffected.Scope note
This fixes the entry point from a namespace object's relationship tabs. Once you land on the IP detail page with
?namespace=<id>, the existingIpNamespaceProviderkeeps that namespace for subsequent links. Other places that link to an IP without namespace context (e.g. an IP relationship shown on a Device page) are out of scope for this change.Testing
src/entities/nodes/utils.test.tscoveringgetObjectDetailsUrlwith/without a namespace override for IP prefix kinds.biome checkclean on touched files; touched files are type-clean undertsc --noEmit.Summary by cubic
Fixes IPAM links on a namespace’s relationship tabs so they keep the current namespace instead of jumping to the default. Clicking an IP prefix or address now stays in the same namespace.
?namespace=<id>when the relationship parent is an IP namespace.overrideParamsthroughgetObjectTableColumns→getObjectIdentifierColumns→TableIdentifierCelltogetObjectDetailsUrl.getObjectDetailsUrlwith and without a namespace override.Written for commit 231f293. Summary will update on new commits.