fix(assets): make list rows clickable and add a detail breadcrumb #496

Merged
longjacksonle merged 2 commits from fix/PMS-745-asset-list-and-detail-nav into main 2026-08-09 04:19:05 +02:00

Closes PMS-745.

Two navigation defects on the Assets surface, both reported from staging.

1. The list row was not clickable. TableRow in the assets list passed neither clickable: true nor an onclick, so the asset-name Link was the only navigable target in a row roughly 1200px wide. An audit of clickable: true against Route::*Detail references shows Assets was the only list page with a detail route that had zero clickable rows: contracts, tickets, billing, contacts, quotes, projects, time and the KB all navigate from anywhere in the row. There was a second effect: TableRow scopes its hover background and cursor-pointer to clickable rows (MAPPS-389), so the Assets list was also the one list giving no hover feedback. Fixed by matching ContractRow / TicketRow. The checkbox column needed no work, because SelectRowCell already calls stop_propagation() on its td - that is exactly how Tickets combines per-row selection with a clickable row. The name Link stays, so middle-click and open-in-new-tab still work.

2. The detail page had no breadcrumb. AssetDetailPage rendered a PageHeader with title and actions but no breadcrumbs, leaving the browser Back button or the sidebar as the only route back to the list. AssetNewPage already had Assets > New Asset from MAPPS-294; the detail page was missed in that pass. Now renders Assets > <asset name>, matching ContractDetailPage.

Scope note worth reading. The report compares Assets against Contracts, and that comparison is accurate, but breadcrumbs on detail pages are not yet the norm: only 3 of the 9 non-portal detail pages have one (contract, rate card, company). Ticket, project, invoice, quote and contact detail pages are all missing it too. This PR fixes the reported page, and the remaining five are a separate consistency pass rather than something quietly folded in here.

The crumb list is built by asset_detail_crumbs, split out so its labels and parent route can be asserted without standing up a router. One test added; 269 lib tests pass, clippy and fmt clean.

Verify on staging: click the Type or Company cell of an asset row (opens the asset), click the row checkbox (selects, does not navigate), hover a row (background and pointer match a contract row), then open an asset and use the Assets crumb to get back.

Closes PMS-745. Two navigation defects on the Assets surface, both reported from staging. **1. The list row was not clickable.** `TableRow` in the assets list passed neither `clickable: true` nor an `onclick`, so the asset-name `Link` was the only navigable target in a row roughly 1200px wide. An audit of `clickable: true` against `Route::*Detail` references shows Assets was the only list page with a detail route that had zero clickable rows: contracts, tickets, billing, contacts, quotes, projects, time and the KB all navigate from anywhere in the row. There was a second effect: `TableRow` scopes its hover background and `cursor-pointer` to clickable rows (MAPPS-389), so the Assets list was also the one list giving no hover feedback. Fixed by matching `ContractRow` / `TicketRow`. The checkbox column needed no work, because `SelectRowCell` already calls `stop_propagation()` on its `td` - that is exactly how Tickets combines per-row selection with a clickable row. The name `Link` stays, so middle-click and open-in-new-tab still work. **2. The detail page had no breadcrumb.** `AssetDetailPage` rendered a `PageHeader` with `title` and `actions` but no `breadcrumbs`, leaving the browser Back button or the sidebar as the only route back to the list. `AssetNewPage` already had `Assets > New Asset` from MAPPS-294; the detail page was missed in that pass. Now renders `Assets > <asset name>`, matching `ContractDetailPage`. **Scope note worth reading.** The report compares Assets against Contracts, and that comparison is accurate, but breadcrumbs on detail pages are not yet the norm: only 3 of the 9 non-portal detail pages have one (contract, rate card, company). Ticket, project, invoice, quote and contact detail pages are all missing it too. This PR fixes the reported page, and the remaining five are a separate consistency pass rather than something quietly folded in here. The crumb list is built by `asset_detail_crumbs`, split out so its labels and parent route can be asserted without standing up a router. One test added; 269 lib tests pass, clippy and fmt clean. **Verify on staging:** click the Type or Company cell of an asset row (opens the asset), click the row checkbox (selects, does not navigate), hover a row (background and pointer match a contract row), then open an asset and use the `Assets` crumb to get back.
The Assets list was the only list page with a detail route whose rows were not clickable: the asset-name Link was the sole navigable target, so clicking the type, company, serial or status cell did nothing. TableRow also scopes its hover background and pointer cursor to clickable rows (MAPPS-389), so the list gave no hover feedback either.

Matches ContractRow and TicketRow. The checkbox cell already stops propagation, so selecting a row still does not open it, and the name Link stays so middle-click and open-in-new-tab keep working.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011myibMMwyb6za3GVWJGkiX
fix(assets): show a breadcrumb trail on the asset detail page
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 2m52s
Create release / Create release from merged PR (pull_request) Has been skipped
0e8e3234c6
Opening an asset left no in-page route back to the list: the header carried a title and actions but no breadcrumbs, so the only way back was the browser Back button or the sidebar. AssetNewPage already had the trail from MAPPS-294; the detail page was missed in that pass.

The crumb list is built by a small helper so the labels and the parent route can be asserted without standing up a router.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011myibMMwyb6za3GVWJGkiX
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-08-09 04:17:46 +02:00
longjacksonle deleted branch fix/PMS-745-asset-list-and-detail-nav 2026-08-09 04:19:05 +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!496
No description provided.