Add resizable room panel, searchable user picker, and direct room membership

Room info panel is now user-resizable (fixing a layout clip at narrow
widths), and every user-selection spot (room membership, admin ownership
transfer) uses a new searchable UserPicker instead of raw text input or
prompt(). Member rows fold role + actions into a single inline dropdown
instead of a row of buttons, so the member list stays usable as rooms grow.

Room invites (the accept/decline flow) are replaced by adding a user to a
room directly -- an admin/owner picks someone and they're a member
immediately, with a "you've been added" notification email instead of an
invite email. Drops the now-unused room_invites table.
This commit is contained in:
2026-08-14 20:40:37 -06:00
parent b724f8a33b
commit 91589ee647
32 changed files with 735 additions and 1052 deletions
-31
View File
@@ -1,31 +0,0 @@
import uuid
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from app.models import InviteStatus
class InviteCreate(BaseModel):
target_username: str = Field(min_length=1)
class InviteRead(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: uuid.UUID
room_id: uuid.UUID
invited_by: uuid.UUID
target_user_id: uuid.UUID | None
target_username: str | None = None
status: InviteStatus
expires_at: datetime
created_at: datetime
class MyInviteRead(InviteRead):
"""InviteRead plus context the recipient can't otherwise resolve client-side --
GET /api/invites/mine is for rooms the user isn't a member of yet."""
room_name: str
invited_by_username: str
+4
View File
@@ -45,6 +45,10 @@ class RoomMemberRead(BaseModel):
joined_at: datetime
class RoomMemberAdd(BaseModel):
user_id: uuid.UUID
class RoomMemberRoleUpdate(BaseModel):
role: RoomRole
+14
View File
@@ -25,3 +25,17 @@ class UserRead(BaseModel):
class ProfileUpdate(BaseModel):
display_name: str | None = Field(default=None, max_length=50)
class UserDirectoryRead(BaseModel):
"""Lightweight entry for user-picker UIs (room invites, admin ownership
transfer) -- same visibility level as an avatar: any authenticated user
can see this much about anyone (excludes bots, which aren't invited
through these flows)."""
model_config = ConfigDict(from_attributes=True)
id: uuid.UUID
username: str
display_name: str | None
avatar_filename: str | None