paliadin chat: server-side history persistence (so responses survive navigate-away) #19
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Currently
paliadin.tsstores history only inlocalStorage(paliadin:history:<sessionId>). Design comment at line 7-8 of frontend/src/client/paliadin.ts: "session-only persistence".Real-world friction (m, 2026-05-08): if the user navigates away from the paliadin chat before a response finishes streaming (or before localStorage gets written), the response is lost from the UI. The shim has already written
/tmp/paliadin/<uuid>.txtand (presumably) the Go side has the result, but nothing persists it.Fix
(session_id, user_id, turn_id, prompt, response, started_at, duration_ms, error_code)row to apaliadin_turns(or similar) table inpaliadschema.GET /api/paliadin/history?limit=Nreturns the user's most recent turns, oldest-first.hydrate()renders localStorage immediately, then fetches server history and reconciles — same pattern that just landed in youpcorgfrontend/js/components/ai/chat.js(commit on mai/klaus/124d-history-hydrate-fix in yoUPC/youpc.org).Out of scope
Multi-device sync semantics, deletion endpoints — separate ticket if needed.
Cross-ref