Rebuild frontend from the Claude Design handoff, DarkSingularity brand

Replaces the Phase 1 placeholder UI with a single persistent app shell (top
bar + sidebar + chat pane, 860px responsive breakpoint) matching the
"PWA chat system UI" design handoff: message bubbles with consecutive-run
avatar/name grouping, auto-growing composer, room search, and the real
DarkSingularity logo (also used to regenerate the PWA icons).

The handoff didn't cover Phase 2 (private rooms, roles, invites) or
browsing/joining open rooms, so those are added using the same visual
language: a room info panel with role badges, invite-by-username with a
pending-invites list, member management (remove/promote/demote/transfer
ownership), room settings (rename/describe/delete), and separate
browse-rooms/invites-inbox modals. Unread badges, last-message preview, and
the typing indicator are deliberately deferred -- both need new backend
features (read-tracking, a WS typing event) that weren't in scope this pass.

Two small backend additions round out data the new UI needs but the API
didn't expose: MessageRead.username (historic messages had no sender name)
and InviteRead.target_username / MyInviteRead.room_name+invited_by_username
(a recipient's invite list can't otherwise resolve a room they're not in).
Both are additive; 35 backend tests still pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 21:10:58 -06:00
co-authored by Claude Sonnet 5
parent c79e96dd48
commit e9fcb9fea2
51 changed files with 2510 additions and 290 deletions
+17 -3
View File
@@ -6,7 +6,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from app.database import get_db
from app.dependencies import get_current_user
from app.models import User
from app.schemas.invite import InviteRead
from app.schemas.invite import InviteRead, MyInviteRead
from app.schemas.room import RoomMemberRead
from app.services.invite_service import (
InviteExpiredError,
@@ -21,12 +21,26 @@ from app.services.invite_service import (
router = APIRouter(prefix="/api/invites", tags=["invites"])
@router.get("/mine", response_model=list[InviteRead])
@router.get("/mine", response_model=list[MyInviteRead])
async def list_my_invites_endpoint(
current_user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db),
):
return await list_my_invites(db, current_user.id)
invites = await list_my_invites(db, current_user.id)
return [
MyInviteRead(
id=i.id,
room_id=i.room_id,
invited_by=i.invited_by,
target_user_id=i.target_user_id,
status=i.status,
expires_at=i.expires_at,
created_at=i.created_at,
room_name=i.room.name,
invited_by_username=i.inviter.username,
)
for i in invites
]
@router.post("/{invite_id}/accept", response_model=RoomMemberRead)