The sidebar no longer offers **Memberships** as a top-level destination. The
`/memberships` route, the `MembershipsListPage`, and the `canManageMemberships`
capability are all untouched.
## Why the route stays
Memberships is not a destination of its own — it is always reached *about a pool*:
- the Inventory detail panel's **View Memberships** link,
- the dangling-member links on the inventory and pool pages,
- direct deep links carrying a `poolId`.
Opened cold from the drawer, the page has no pool to talk about, so the nav entry
was the one way to reach it in a state where it could not show anything useful.
Removing the entry while keeping the route removes exactly that entry point and
breaks none of the links above.
## Changes
| File | Change |
|---|---|
| `src/features/shell/Shell.tsx` | Dropped the `{ label: 'Memberships', to: '/memberships', … }` item from `navItems` and the now-unused `PeopleAltIcon` import. |
| `src/features/shell/Shell.test.tsx` | Renamed the admin case to *"admin sees every nav link"* and removed its Memberships assertion; added the missing **Purge** assertion while there; dropped the vacuous Memberships queries from the requester/auditor cases; added a regression test asserting the link is absent even for an admin. |
The new test:
```ts
// Memberships is not a destination of its own: every route to it starts from a pool, and the
// page itself needs a poolId to show anything. The route stays for those links.
it('offers no Memberships nav link, even to an admin',()=>{
with `colSpan = 6 + (showActions ? 1 : 0)` for the empty-state row. A requester —
who manages no memberships but does book — now gets exactly one action; an auditor,
who can do neither, gets no column at all rather than a blank one.
**Dangling members get no link.** A dangling membership's resource is gone from the
inventory, so a search about it would answer about something that is not there. The
button is gated on `caps.canSearchAvailability && expandable && !m.dangling`; the
admin's cleanup button still appears for those rows in the same column.
**The icon does not expand the row.** The member row is itself a toggle for the
per-resource reservations panel, so the button's `onClick` calls
`e.stopPropagation()` before navigating.
## Changes by file
| File | Change |
|---|---|
| `src/features/pools/PoolDetailPage.tsx` | `MembersPanel` takes `useNavigate()`; new inline `AvailabilityIcon` (MUI `EventAvailable` path); shared `showActions` column with the new per-row `IconButton` (aria-label `Search availability of <tmf639Id>`, tooltip "Search this resource's availability"). |
| `src/features/availability/AvailabilitySearchPage.tsx` | Seeds `membershipId` state from `searchParams.get('membershipId')`, the same way `poolId` and the range are already seeded. |
| `src/features/pools/pools.test.tsx` | `makeMembersWrapper` now takes `{ listByResource, members, roles }` and mounts a `LocationProbe` inside the `MemoryRouter`, so the destination URL is asserted from the real router rather than a mocked `navigate`. Five new tests. |
| `src/features/availability/AvailabilitySearchPage.test.tsx` | Two new tests for arriving with `?poolId=…&membershipId=…`. |
## Tests added
`MembersPanel — search availability of one resource`:
- sends the row to `/availability?poolId=pool-1&membershipId=mem-1`;
- does not expand the row on its way there;
- offers nothing for a dangling member, while its cleanup button remains;
- is offered to a requester, who gets no membership actions;
- drops the Actions column entirely for an auditor.
`AvailabilitySearchPage — preselected resource from the URL`:
- preselects the resource named in the query string;
- searches that resource (`membershipId: 'res-1'` — the TMF639 id) rather than the pool.
## Verification
-`npx vitest run` — **1025/1025 passing**, 67 files (+7 from this change and the
memberships-menu removal).
-`npm run lint` — 106 errors, all pre-existing `no-explicit-any`; baseline unchanged.
-`npx tsc -b --force` — no new errors versus the stored baseline.
Behaviour is untouched: `handleBookSpan` and `handleWindowSelect` are the same
functions with the same query strings, including the agreed-suggestion resource
handoff from `20260809_1530`. `Alert` is no longer imported by this page.
## Changed files
| File | Change |
|---|---|
| `src/features/availability/AvailabilitySearchPage.tsx` | Span action lifted out of the `Alert` into a header row beside the count; `spanBookable` flag; row label becomes "Book separate" alongside it; `Alert` import removed. |
| `src/features/availability/AvailabilitySearchPage.test.tsx` | Two tests added. |
## Tests
```ts
it('offers the span action as a button of its own, not inside an info alert',…)
// asserts no role="alert" on the page and span.closest('.MuiAlert-root') === null
it('names the per-window action "Book separate" while the span button is offered',…)
// "Book" in STRICT; "Book separate" once Clip to calendar is picked
```
The existing `getByRole('button', { name: /book whole span/i })` queries — the
clipped-mode test and the three suggested-resource span tests — all still resolve:
the caption mentions the same words but is a `Typography`, not a button. The row's
`aria-label="select window {i}"` is unchanged, so the row queries were unaffected by