Skip to content

Add shared breadcrumb component#587

Open
jmarrxyz wants to merge 1 commit into
jmarr/maintenance-infra-devicesfrom
jmarr/breadcrumb-component
Open

Add shared breadcrumb component#587
jmarrxyz wants to merge 1 commit into
jmarr/maintenance-infra-devicesfrom
jmarr/breadcrumb-component

Conversation

@jmarrxyz

Copy link
Copy Markdown
Contributor

Summary

Adds a shared Breadcrumb component for hierarchical navigation across ProtoFleet detail surfaces. The component supports linked ancestor segments plus an optional current-segment sibling switcher, which lets follow-up detail pages replace one-off back buttons with consistent location context.

How it works

Callers pass an ordered segments array. Non-current segments with to render as React Router links, while the current segment renders as text or as a button-backed switcher when siblings are supplied. The switcher handles click-away dismissal, Escape dismissal, keyboard navigation, and selection through useNavigate.

Diagrams

flowchart LR
  caller["Detail page or story"] --> breadcrumb["Breadcrumb"]
  breadcrumb --> ancestors["Ancestor links"]
  breadcrumb --> current["Current segment"]
  current --> switcher["Optional sibling switcher"]
  switcher --> navigate["React Router navigate"]
Loading

Areas of the code involved

Area / file What changed Why it matters for review
client/src/shared/components/Breadcrumb/ New component, index export, and Storybook stories Reusable navigation primitive used by the follow-up detail-view PRs

Key technical decisions & trade-offs

Decision Trade-off
Keep the component data-driven via segments Callers own fetching labels/siblings, keeping the shared component UI-only
Allow only the current segment to expose siblings Keeps keyboard and menu behavior narrow and predictable

Testing & validation

  • Storybook checked locally for site, building, and rack breadcrumb shapes.
  • Targeted ESLint passed for the component files.
  • Full client-typecheck is currently blocked by unrelated infra/maintenance TypeScript errors already present on the parent branch.

@jmarrxyz jmarrxyz requested a review from a team as a code owner June 25, 2026 19:34
@github-actions github-actions Bot added javascript Pull requests that update javascript code client labels Jun 25, 2026
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated security-focused code review generated by Codex.
It should be used as a supplementary check alongside human review.
False positives are possible - use your judgment.

Scope summary

  • Reviewed pull request diff only (5bba3f7d0cf10dc2ce406bd484f8a8a89de22147...12d782e995a542fa5d91fd6a628e9eee571392c6, exact PR three-dot diff)
  • Model: gpt-5.5

💡 Click "edited" above to see previous reviews for this PR.


Review Summary

Overall Risk: NONE

Findings

No security, correctness, or reliability findings in the reviewed diff.

Notes

Reviewed .git/codex-review.diff only. The PR adds a shared React breadcrumb component, Storybook stories, and an index export. I did not find changed backend, protobuf, plugin, discovery, database, Docker, or pool-configuration behavior in scope.

Labels are rendered as React text, not HTML, and the added stories use static internal routes. Static diff checks passed with git diff --check.


Generated by Codex Security Review |
Triggered by: @jmarrxyz |
Review workflow run

@flesher

flesher commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

looks good, but you need to fix up CI failures before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants