Feat v0.5.3 chat polish (#33)
All checks were successful
CI/CD / detect-changes (push) Successful in 21s
CI/CD / test-frontend (push) Successful in 4s
CI/CD / test-sqlite (push) Successful in 2m47s
CI/CD / test-go-pg (push) Successful in 2m53s
CI/CD / build-and-deploy (push) Successful in 1m15s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #33.
This commit is contained in:
2026-03-30 17:04:40 +00:00
committed by xcaliber
parent 6931b125a4
commit 8092f00fbe
18 changed files with 1134 additions and 40 deletions

View File

@@ -2,6 +2,42 @@
All notable changes to Switchboard Core are documented here.
## v0.5.3 — Chat Polish + Integration Testing
### Added
- **`db.query()` search_like**: New kernel-level `search_like` kwarg for text
search. Accepts `{col: pattern}` dict, generates OR-joined `LIKE` (SQLite) /
`ILIKE` (Postgres) clauses. Composes with existing `filters` via AND. Reusable
by any package. 5 new sandbox tests.
- **Conversation search**: `GET /search?q=term` endpoint in `chat-core`. Searches
conversation titles and message content, scoped to user's conversations.
Returns `{conversations: [...], messages: [...]}`.
- **Search UI**: Debounced search input in chat sidebar. Results view replaces
conversation list showing matched conversations and message snippets with
section headers. Click result to navigate, clear button to dismiss.
- **`workflow-chat` library package**: `on_advance` hook that creates scoped
group conversations when workflow stages require team collaboration. Adds all
team members as participants, sends system message linking to the instance,
enriches `stage_data` with `conversation_id`. Idempotent — skips if
conversation already exists.
- **Multi-user E2E test infrastructure**: `docker-compose-e2e.yml` with 2
replicas, Postgres, and nginx load balancer. `ci/e2e-chat-test.sh` shell
script covering auth, conversation CRUD, message send/read, cross-replica
consistency, search, and pagination. `ci/e2e-ws-listener.js` Node.js
WebSocket client for realtime event testing.
- **Workflow hook tests**: 6 new Go tests for `parseOnAdvanceResult` covering
None, nil, error, enriched stage_data, non-dict, and nested structure cases.
### Changed
- **Message pagination polish**: Scroll position now preserved when loading older
messages — records `scrollHeight` before prepend, restores via
`requestAnimationFrame`. Loading spinner shown at top of thread during fetch.
"Load older messages" button hidden while loading.
- **chat-core** bumped to v0.2.0 (new search endpoint).
- **chat** bumped to v0.2.0 (search UI, pagination polish).
## v0.5.2 — Chat Surface
### Added