feat(nav): detail-page nav highlight + breadcrumbs for rate cards/contracts (PMS-312) #173

Merged
longjacksonle merged 1 commit from feat/PMS-312-detail-nav-highlight-breadcrumb into main 2026-06-16 00:46:52 +02:00

Implements PMS-312.

Problem

Opening a rate-card or contract detail page lost navigation context: the sidebar stopped highlighting the section, and there was no breadcrumb showing where you are.

Changes

  • src/components/layout.rs: NavItem highlighted only on exact route equality, so every *Detail page left its parent list nav unhighlighted (a gap the code comment had already flagged as deferred). Added section_route, which maps each detail route to its list route, and used it for the active check. Covers ticket, project, company, contact, contract, rate card, invoice, asset, KB article, and report detail pages.
  • src/pages/contracts.rs: added a breadcrumb to the rate-card detail page (Rate Cards > <name>) and the contract detail page (Contracts > <name>) via the existing Breadcrumbs component in PageHeader's breadcrumbs slot.

Verification

just pre-commit (pinned rust 1.94 = CI) passes: fmt, clippy -D warnings, cargo check --target wasm32-unknown-unknown, all 91 lib tests.

Acceptance criteria

  • Rate-card detail: "Rate Cards" stays highlighted + "Rate Cards > " breadcrumb.
  • Contract detail: "Contracts" stays highlighted + "Contracts > " breadcrumb.
  • Other detail pages keep their parent nav highlighted.
  • Breadcrumb section link returns to the list.

🤖 Generated with Claude Code

Implements PMS-312. ## Problem Opening a rate-card or contract detail page lost navigation context: the sidebar stopped highlighting the section, and there was no breadcrumb showing where you are. ## Changes - `src/components/layout.rs`: `NavItem` highlighted only on exact route equality, so every `*Detail` page left its parent list nav unhighlighted (a gap the code comment had already flagged as deferred). Added `section_route`, which maps each detail route to its list route, and used it for the active check. Covers ticket, project, company, contact, contract, rate card, invoice, asset, KB article, and report detail pages. - `src/pages/contracts.rs`: added a breadcrumb to the rate-card detail page (`Rate Cards > <name>`) and the contract detail page (`Contracts > <name>`) via the existing `Breadcrumbs` component in `PageHeader`'s `breadcrumbs` slot. ## Verification `just pre-commit` (pinned rust 1.94 = CI) passes: fmt, clippy `-D warnings`, `cargo check --target wasm32-unknown-unknown`, all 91 lib tests. ## Acceptance criteria - [x] Rate-card detail: "Rate Cards" stays highlighted + "Rate Cards > <name>" breadcrumb. - [x] Contract detail: "Contracts" stays highlighted + "Contracts > <name>" breadcrumb. - [x] Other detail pages keep their parent nav highlighted. - [x] Breadcrumb section link returns to the list. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(nav): keep parent nav highlighted on detail pages + breadcrumbs for rate cards/contracts (PMS-312)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 58s
Create release / Create release from merged PR (pull_request) Has been skipped
4c402331be
Opening a rate-card or contract detail page lost navigation context: the sidebar stopped highlighting the section, and there was no breadcrumb.

layout.rs: NavItem highlighted only on exact route equality, so every *Detail page left its parent list nav unhighlighted (a gap the code comment had already flagged as deferred). Add section_route, mapping each detail route to its list route, and use it for the active check. Covers ticket, project, company, contact, contract, rate card, invoice, asset, KB article, and report detail pages.

contracts.rs: add a breadcrumb to the rate-card detail page ("Rate Cards > <name>") and the contract detail page ("Contracts > <name>") via the existing Breadcrumbs component in PageHeader's breadcrumbs slot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-312-detail-nav-highlight-breadcrumb 2026-06-16 00:46:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!173
No description provided.