Bump Vite 8, matrix-js-sdk, and related deps; fix immer/vanilla-extract imports for new majors. Replace blocking sync error dialog with background recovery on wake/offline, and disable Vite auto-open in dev. Add feature handoff documentation index.
3.5 KiB
3.5 KiB
Lobby & forums — handoff
Summary
Spaces in Paarrot can show a Lobby view: a card-based hierarchy of child rooms with drag-and-drop ordering, hero header, and category collapse. Forum spaces (m.forum room type or im.paarrot.room.kind = forum_space) use a post-feed style navigation instead of the standard lobby when opened.
User-facing behavior
- Opening a space lands on lobby (or forum feed for forum spaces)
- Lobby: hero, categories, room cards, DnD reorder (with permissions)
- Forum spaces: routed to post feed per
getSpaceDefaultPath/shouldShowForumLobby - Category open/closed state persisted per space
Architecture
Space route → Lobby.tsx (SpaceCardLobby)
→ LobbyHeader, LobbyHero, SpaceHierarchy
→ DnD reorder → m.space.child order updates
→ closedLobbyCategories atom (per-space category collapse)
→ shouldShowForumLobby(space) gates forum vs lobby behavior
Key files
| Path | Role |
|---|---|
cinny/src/app/features/lobby/Lobby.tsx |
Main lobby view |
cinny/src/app/features/lobby/LobbyHeader.tsx |
Space header |
cinny/src/app/features/lobby/LobbyHero.tsx |
Hero banner area |
cinny/src/app/features/lobby/SpaceHierarchy.tsx |
Room tree/cards |
cinny/src/app/features/lobby/DnD.tsx |
Drag and drop |
cinny/src/app/features/lobby/RoomItem.tsx |
Room card |
cinny/src/app/state/closedLobbyCategories.ts |
Collapsed categories |
cinny/src/app/state/hooks/closedLobbyCategories.ts |
Jotai hook |
cinny/src/app/pages/pathUtils.ts |
getSpaceLobbyPath, forum routing |
cinny/src/app/utils/room.ts |
shouldShowForumLobby, getStateEvent |
cinny/src/types/matrix/room.ts |
RoomType.Forum, PaarrotRoomKind |
Data model
| Event / field | Purpose |
|---|---|
m.space.child |
Child room membership + order |
im.paarrot.sub_rooms |
Paarrot nested children (see sub-rooms handoff) |
im.paarrot.room.kind |
e.g. forum_space for forum behavior |
m.room.create type |
m.forum for forum rooms |
Local: closedLobbyCategories |
UI collapse state (not Matrix) |
Dependencies
- Matrix space hierarchy events
- DnD library (see Lobby imports)
- Room power levels for reorder permission (
useCanDropLobbyItem)
Integration points
- Sub-rooms:
SpaceHierarchymergesim.paarrot.sub_roomschildren - Navigation:
getSpaceDefaultPathchooses lobby vs forum path - local-api:
isSpaceLikeRoomtreats forum kind as space-like for channel API
Testing
Manual
- Open a normal space → lobby with child rooms.
- Collapse/expand category; reload — state should persist.
- Drag reorder child (as admin); verify
m.space.childorder. - Open forum-type space; verify feed navigation not lobby cards.
- Test with sub-rooms under a child space card.
Automated
- None
Known issues & gotchas
- Forum detection spans two signals:
m.forumcreate type andim.paarrot.room.kind - DnD permission logic is custom per
useCanDropLobbyItem— read before changing makeLobbyCategoryId(spaceId, childId)keys collapse state
Future work
- Unified hierarchy model (space.child + sub_rooms)
- Lobby theming from space avatar metadata
Related docs
- forum HANDOFF — post feed UI for forum spaces
- sub-rooms HANDOFF
Add your extra things here
- Route constant:
SPACE_LOBBY_PATHin path utils SpaceCardLobbyis the default export wrapper inLobby.tsx