Feat v0.5.2 chat surface (#32)
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m28s
CI/CD / test-sqlite (push) Successful in 2m42s
CI/CD / build-and-deploy (push) Successful in 1m8s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #32.
This commit is contained in:
2026-03-30 15:25:33 +00:00
committed by xcaliber
parent 7155aaf663
commit 6931b125a4
13 changed files with 1513 additions and 23 deletions

View File

@@ -2,6 +2,68 @@
All notable changes to Switchboard Core are documented here.
## v0.5.2 — Chat Surface
### Added
- **`chat` surface package**: Full messaging UI built on `chat-core` library.
Route `/s/chat`, icon `💬`, depends on `chat-core`.
- **Conversation list sidebar**: Conversations sorted by recent activity, last
message preview, relative timestamps, unread count badges. "New" button
for conversation creation.
- **Message thread**: Paginated message history with cursor-based load-more on
scroll-to-top. Participant avatars, display names, timestamps. Scroll-to-
bottom on new messages.
- **Compose bar**: Auto-resizing textarea, Enter-to-send, Shift+Enter for
newline. Typing indicator broadcast on keypress (3s debounce).
- **Participant sidebar**: Collapsible right panel with participant list, online
status via presence hub, role badges. Add participant via `sw.ui.Dialog` +
`sw.ui.UserPicker`. Remove participant with confirmation.
- **Create conversation dialog**: Group or Direct Message type selector. Multi-
user picker with chip display for group, single picker for DM. Auto-title
from participant names.
- **Typing indicators**: Realtime broadcast via `POST /typing/:id` Starlark
endpoint. Frontend subscribes to `conversation:{id}` channel, shows
"X is typing..." with 4s auto-expire. Handles multiple typers.
- **Read receipts**: Auto mark-read on conversation focus and new incoming
messages. Unread counts in conversation list, cleared on selection.
- **Message editing**: Inline edit mode on own messages with textarea. Save on
Enter, cancel on Escape. "(edited)" label on edited messages. Realtime
propagation to other participants.
- **Message deletion**: Confirm dialog before delete. "This message was deleted"
placeholder. Admin can delete any message. Realtime propagation.
### Fixed
- **Stale token login deadlock**: REST client's 401→refresh→retry loop caused
a deadlock when the refresh endpoint itself returned 401 (stale DB). Auth
endpoints (`/auth/login`, `/auth/refresh`, `/auth/register`) are now excluded
from the retry loop. Defensive 8s timeout on `auth.boot()` ensures login
page always renders even on unexpected hangs.
- **Bundled package permissions**: Bundled packages were installed with
`pending_review` status and `granted=0` permissions, requiring manual admin
approval. Bundled installer now auto-grants all declared permissions and
sets status to `active` on install.
- **Creator display name**: `chat-core.create()` now accepts
`creator_display_name` so the conversation creator shows a readable name
in the participant sidebar instead of a raw UUID.
- **Chat dark mode theming**: Replaced non-existent CSS variable names with
actual theme tokens from `variables.css`. Fixes invisible text and wrong
backgrounds in dark mode.
- **Dialog dropdown clipping**: UserPicker autocomplete dropdown in dialogs
(New Conversation, Add Participant) no longer clipped by `overflow: auto`
on `.sw-dialog__body`.
- **User menu at scaled UI**: Menu primitive now divides anchor coordinates
and viewport dimensions by `sw.shell.getScale()` to compensate for CSS
`transform: scale()` on `#surfaceInner`. Fixes menu clipping at 110%+.
### Changed
- **Named Docker volume**: `docker-compose.yml` switched from bind mount
(`./data:/data`) to named volume (`sb_data:/data`). Fixes volume mount
failures when Docker daemon runs on a remote host (DinD, k8s pod).
Deterministic wipe via `docker compose down -v`.
## v0.5.1 — Chat Core Library
### Added