Skip to content

fix(frontend): keep IPAM namespace context on IP links from namespace relationship tabs#9893

Merged
iddocohen merged 2 commits into
stablefrom
ic/fix-ip-namespace-link-m65n6
Jul 21, 2026
Merged

fix(frontend): keep IPAM namespace context on IP links from namespace relationship tabs#9893
iddocohen merged 2 commits into
stablefrom
ic/fix-ip-namespace-link-m65n6

Conversation

@iddocohen

@iddocohen iddocohen commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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 getObjectDetailsUrl with 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 identifierOverrideParams through the relationship table column builder (getObjectTableColumnsgetObjectIdentifierColumnsTableIdentifierCell). RelationshipTable injects namespace=<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 existing IpNamespaceProvider keeps 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

  • Added src/entities/nodes/utils.test.ts covering getObjectDetailsUrl with/without a namespace override for IP prefix kinds.
  • biome check clean on touched files; touched files are type-clean under tsc --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.

  • Bug Fixes
    • Pass the parent namespace into child links via ?namespace=<id> when the relationship parent is an IP namespace.
    • Thread optional overrideParams through getObjectTableColumnsgetObjectIdentifierColumnsTableIdentifierCell to getObjectDetailsUrl.
    • Add tests covering getObjectDetailsUrl with and without a namespace override.

Written for commit 231f293. Summary will update on new commits.

Review in cubic

… 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.
@iddocohen
iddocohen requested a review from a team as a code owner July 13, 2026 16:48
@github-actions github-actions Bot added the group/frontend Issue related to the frontend (React) label Jul 13, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@iddocohen
iddocohen merged commit 70bacd8 into stable Jul 21, 2026
56 checks passed
@iddocohen
iddocohen deleted the ic/fix-ip-namespace-link-m65n6 branch July 21, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: IPAM IP links drop the namespace context and fall back to the default namespace

2 participants