# Room settings — handoff

## Summary

Per-room settings overlay: general info, permissions, members (via common-settings), sub-rooms (Paarrot), and developer tools. Opened from room header/menu without leaving the room.

## User-facing behavior

- Edit room name, topic, avatar, address, join rules, encryption
- Permissions and power levels
- Sub-rooms management (Paarrot)
- Member list and moderation actions

## Architecture

```
RoomSettingsRenderer (Router overlay)
  → RoomSettings.tsx — page nav
  → room-settings/general/, permissions/, sub-rooms/
  → delegates to common-settings/ for shared pages
roomSettings.ts atom — which page open
```

## Key files

| Path | Role |
|------|------|
| `cinny/src/app/features/room-settings/RoomSettings.tsx` | Settings shell |
| `cinny/src/app/features/room-settings/general/` | General tab |
| `cinny/src/app/features/room-settings/permissions/` | Permissions |
| `cinny/src/app/features/room-settings/sub-rooms/SubRooms.tsx` | Sub-rooms (Paarrot) |
| `cinny/src/app/state/roomSettings.ts` | Modal/page state |
| `cinny/src/app/state/hooks/roomSettings.ts` | Open/close hooks |
| `cinny/src/app/features/common-settings/` | Shared setting pages |

## Data model

Standard Matrix room state events (`m.room.name`, `m.room.power_levels`, etc.) plus `im.paarrot.sub_rooms`.

## Dependencies

- `useRoomPermissions`, `usePowerLevels`
- common-settings components

## Integration points

- **sub-rooms**: Paarrot-specific tab
- **common-settings**: members, emojis, developer tools reuse
- **embed-filters**: `EmbedFilters.tsx` in common-settings general

## Testing

### Manual

1. Open room settings from ⋮ menu.
2. Change topic; verify state event.
3. Sub-rooms tab: reorder children.
4. Permissions: change power level.

### Automated

- None

## Known issues & gotchas

- Overlay vs full page on mobile — check ScreenSize branches
- `RoomSettingsRenderer` must stay mounted in Router for deep links

## Future work

- Room settings deep link URL

## Related docs

- [sub-rooms HANDOFF](../sub-rooms/HANDOFF.md)
- [common-settings HANDOFF](../common-settings/HANDOFF.md)
- [embed-filters HANDOFF](../embed-filters/HANDOFF.md)

## Add your extra things here

- `SubRoomsPage` enum in `roomSettings.ts`
