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
+37
View File
@@ -0,0 +1,37 @@
import { Link } from 'react-router-dom'
import type { MyRoomItem } from '../types'
import { RoomAvatar } from './RoomAvatar'
import './RoomRow.css'
interface RoomRowProps {
room: MyRoomItem
colorIndex: number
active: boolean
}
export function RoomRow({ room, colorIndex, active }: RoomRowProps) {
return (
<Link to={`/rooms/${room.id}`} className={`room-row${active ? ' room-row-active' : ''}`}>
<RoomAvatar colorIndex={colorIndex} />
<div className="room-row-body">
<div className="room-row-name">
{room.name}
{room.is_private && (
<svg
className="room-row-lock"
width="12"
height="12"
viewBox="0 0 20 20"
fill="none"
aria-label="Private room"
>
<rect x="4" y="9" width="12" height="8" rx="2" stroke="currentColor" strokeWidth="1.6" />
<path d="M7 9V6.5a3 3 0 0 1 6 0V9" stroke="currentColor" strokeWidth="1.6" />
</svg>
)}
</div>
{room.description && <div className="room-row-subtitle">{room.description}</div>}
</div>
</Link>
)
}