fix(nav): drop duplicate child crumb from breadcrumb trails - #681
Open
chrisgeo wants to merge 1 commit into
Open
fix(nav): drop duplicate child crumb from breadcrumb trails#681chrisgeo wants to merge 1 commit into
chrisgeo wants to merge 1 commit into
Conversation
chrisgeo
force-pushed
the
fix/breadcrumb-duplicate-child-crumb
branch
from
June 13, 2026 05:00
49e636e to
52a2fb7
Compare
chrisgeo
force-pushed
the
fix/breadcrumb-duplicate-child-crumb
branch
from
July 20, 2026 01:45
52a2fb7 to
d4eb79d
Compare
navTrailForPathname already returns the complete Area → Child trail (its unit-test contract: ['Admin','Connections']). Six pages appended a second hard-coded child crumb on top of it, rendering 'Improve / Automations / Automations' (and likewise for AI Impact / Review Load / Automations / Governance Risk / PR Evidence). The accompanying .map(href ?? area) also forced an href onto the link-less current crumb, turning the duplicate into a stray link back to the area landing page. - Simple child pages now pass navTrailForPathname() through directly. - Sub-pages (ai/risk tabs, ai/impact/evidence) slice off the trail's current-page crumb and re-add the parent as a filter-preserving link. - ai/attribution is intentionally unchanged: its child is navVisible:false so the trail is area-only and the manual append is correct. Verified: tsc clean, 169 nav unit tests pass, ai-navigation (6) and ai-governance-risk-tabs (8) e2e pass.
chrisgeo
force-pushed
the
fix/breadcrumb-duplicate-child-crumb
branch
from
July 25, 2026 13:38
d4eb79d to
64b0c02
Compare
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.
Problem
The Improve → Automations page rendered its breadcrumb as
Improve / Automations / Automations(reported via screenshot). The page itself was not broken — the empty "All monitored metrics are within thresholds" card is a legitimate `detectorReady === true` empty state.Root cause
`navTrailForPathname()` is a complete trail builder: for a registered nav child it returns the full
Area → Childpair (its unit-test contract asserts["Admin","Connections"]), with the child as the link-less current crumb. Six pages appended a second hard-coded child crumb on top of that complete trail, and the accompanying.map(c => ({ ...c, href: c.href ?? area }))also forced anhrefonto the link-less current crumb — turning the duplicate into a stray link back to the area landing page.Fix
improve/automationsai/automationsai/impactai/review-loadai/riskai/impact/evidencenavTrailForPathname()through directly.ai/risktabs,ai/impact/evidence)slice(0, -1)the trail's current-page crumb and re-add the parent as a filter-preserving link.ai/attributionintentionally unchanged — its child isnavVisible: false, so its trail is area-only and the manual append is correct.No change to
navTrailForPathnameitself, so its unit-test contract is preserved.Verification
tsc --noEmit: cleanai-navigation: 6 passed ·ai-governance-risk-tabs: 8 passed