feat: TASK 034-036 - MicroDAO Multi-Room Support
TASK 034: MicroDAO Multi-Room Backend
- Added migration 031_microdao_multi_room.sql
- Extended city_rooms with microdao_id, room_role, is_public, sort_order
- Added CityRoomSummary, MicrodaoRoomsList, MicrodaoRoomUpdate models
- Added get_microdao_rooms, get_microdao_rooms_by_slug functions
- Added attach_room_to_microdao, update_microdao_room functions
- Added API endpoints: GET/POST/PATCH /city/microdao/{slug}/rooms
TASK 035: MicroDAO Multi-Room UI
- Added proxy routes for rooms API
- Extended CityRoomSummary type with multi-room fields
- Added useMicrodaoRooms hook
- Created MicrodaoRoomsSection component with role labels/icons
TASK 036: MicroDAO Room Orchestrator Panel
- Created MicrodaoRoomsAdminPanel component
- Role selector, visibility toggle, set primary button
- Attach existing room form
- Integrated into /microdao/[slug] page
This commit is contained in:
@@ -409,11 +409,39 @@ class MicrodaoAgentView(BaseModel):
|
||||
|
||||
|
||||
class CityRoomSummary(BaseModel):
|
||||
"""Summary of a city room for chat embedding"""
|
||||
"""Summary of a city room for chat embedding and multi-room support"""
|
||||
id: str
|
||||
slug: str
|
||||
name: str
|
||||
matrix_room_id: Optional[str] = None
|
||||
microdao_id: Optional[str] = None
|
||||
microdao_slug: Optional[str] = None
|
||||
room_role: Optional[str] = None # 'primary', 'lobby', 'team', 'research', 'security', 'governance'
|
||||
is_public: bool = True
|
||||
sort_order: int = 100
|
||||
|
||||
|
||||
class MicrodaoRoomsList(BaseModel):
|
||||
"""List of rooms belonging to a MicroDAO"""
|
||||
microdao_id: str
|
||||
microdao_slug: str
|
||||
rooms: List[CityRoomSummary] = []
|
||||
|
||||
|
||||
class MicrodaoRoomUpdate(BaseModel):
|
||||
"""Update request for MicroDAO room settings"""
|
||||
room_role: Optional[str] = None
|
||||
is_public: Optional[bool] = None
|
||||
sort_order: Optional[int] = None
|
||||
set_primary: Optional[bool] = None # if true, mark as primary
|
||||
|
||||
|
||||
class AttachExistingRoomRequest(BaseModel):
|
||||
"""Request to attach an existing city room to a MicroDAO"""
|
||||
room_id: str
|
||||
room_role: Optional[str] = None
|
||||
is_public: bool = True
|
||||
sort_order: int = 100
|
||||
|
||||
|
||||
class MicrodaoDetail(BaseModel):
|
||||
@@ -442,6 +470,9 @@ class MicrodaoDetail(BaseModel):
|
||||
logo_url: Optional[str] = None
|
||||
agents: List[MicrodaoAgentView] = []
|
||||
channels: List[MicrodaoChannelView] = []
|
||||
|
||||
# Multi-room support
|
||||
rooms: List[CityRoomSummary] = []
|
||||
public_citizens: List[MicrodaoCitizenView] = []
|
||||
|
||||
# Primary city room for chat
|
||||
|
||||
Reference in New Issue
Block a user