# Room nav — handoff ## Summary Room nav components render individual channel rows in sidebars and space channel lists: room items, category buttons, call participant indicators, sub-room actions, and unjoined sub-room join prompts. ## User-facing behavior - Room row: name, avatar, unread badge, active highlight - Context menu: add sub-room, room actions - Call participants indicator when call active in room - Unjoined sub-room row with join button - Category headers with collapse ## Architecture ``` features/room-nav/ RoomNavItem → per-room row + menus RoomNavCategoryButton → section headers UnjoinedSubRoomItem → join flow CallParticipantsIndicator → active call badge Used by Home.tsx, space sidebars, forum sidebars ``` ## Key files | Path | Role | |------|------| | `cinny/src/app/features/room-nav/RoomNavItem.tsx` | Main room row | | `cinny/src/app/features/room-nav/RoomNavCategoryButton.tsx` | Category header | | `cinny/src/app/features/room-nav/UnjoinedSubRoomItem.tsx` | Unjoined sub-room | | `cinny/src/app/features/room-nav/CallParticipantsIndicator.tsx` | In-call indicator | | `cinny/src/app/features/room-nav/styles.css.ts` | Nav styles | ## Data model Uses room state, unread atoms, `im.paarrot.sub_rooms` permissions — no own persistence. ## Dependencies - `usePermission` for sub-room create - `useOpenCreateSubRoomModal` from state hooks ## Integration points - **sub-rooms**: Add Sub-Room menu action - **voice-calls**: participant indicator - **create-flows**: opens create room modal with parent id - **home-and-sidebar**: primary consumer ## Testing ### Manual 1. Right-click/context menu on room row. 2. Add sub-room when permitted / disabled when not. 3. Active call shows participant indicator. 4. Unjoined sub-room join navigates correctly. ### Automated - None ## Known issues & gotchas - Depth indentation for sub-rooms passed as prop — styling in CSS - `canAddSubRoom` checks `StateEvent.PaarrotSubRooms` power level ## Future work - Consolidate with forum sidebar items if duplicated ## Related docs - [sub-rooms HANDOFF](../sub-rooms/HANDOFF.md) - [home-and-sidebar HANDOFF](../home-and-sidebar/HANDOFF.md) - [voice-calls HANDOFF](../voice-calls/HANDOFF.md) ## Add your extra things here - Export barrel: `features/room-nav/index.ts`