Phase 4: vector retrieval, branching, drawer polish #6
Reference in New Issue
Block a user
Delete Branch "phase-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 4 polish per requirements doc §13: vector retrieval, branching UI, drawer-edit on every field, backup tooling, significance review, surgical delete with cascade preview, hide-from-view soft delete, and cross-chat search. Plus the 3 Phase 3.6 carry-over fixes.
Notable pivot: sqlite-vec was deferred — host Python build doesn't support
enable_load_extension. Phase 4 ships pure-Python cosine similarity over a JSON-blob embeddings table. For single-user scale (< few thousand memories per chat), Python iteration is sub-millisecond and the API stays stable for a Phase 4.5+ swap.What shipped (15 tasks, 8 waves)
Architecture notes
is_activeconsultation by event readers) deferred to Phase 4.5+.Test plan
Phase 4.5 / 5 backlog (tracked in CLAUDE.md)
is_activePlan
`docs/plans/2026-04-27-v4-phase4-implementation.md` (committed in
bffd9a2).Wires T93's `search_all_memories` service into a small read-only HTML surface so users can find a memory across every chat in the database. * `chat/web/search.py` (new): GET `/search?q=...` runs the FTS service with k=50, hydrates each row with bot name + scene timestamp, and renders `search.html`. Empty `q` short-circuits to no results so the top-bar form can submit even with an empty input. * `chat/templates/search.html` (new): empty-state placeholder, results list with chat-level "Open chat" links (`/chats/{chat_id}` — memories don't carry an event_id today, so no per-turn anchor). * `chat/templates/layout.html`: append a small `<form>` to the rail nav, additive only. * `chat/app.py`: register `search_router` (additive import + include). * `tests/test_search_ux.py`: 3 tests — multi-chat results, empty-query placeholder, chat link.