feat: chat list and chat detail flows with light cache #43
No reviewers
Labels
No labels
auto-merge
bug
chore
dependency
duplicate
enhancement
upstream-sync
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
OpenCode/Arachne!43
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/11_chat_list"
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
Core flows for ticket #11:
list_page/list_allcallGET /api/v1/chats/listwith the OWUI pagination scheme (1-basedpageparam, fixed server-side page size of 60). Pagination stops on an empty page or a short page — no infinite loop, no missed chats.get_chatcallsGET /api/v1/chats/<id>; the response is parsed through the #8 models (history tree preferred, legacy flat-list fallback, defensive timestamps).ChatListCachepersists the last seen chat list per account as JSON in the XDG cache dir (offline sidebar). Hostile account keys are sanitized so the file stays inside the cache dir; corrupt caches are treated as absent.ts_defensiveserde helper is now public so wire structs outsidemodelscan reuse the defensive timestamp parsing.Acceptance (ticket #11)
list_all→ChatSummarymitts_defensive)get_chat+active_thread(); Test mit History-Tree)ChatListCachesave/load/clear + IO-Fehler →None; UI-Anzeige folgt in #15)Design decision (per ticket): Refresh is manual/pull-to-refresh (wired in the sidebar UI, #15); no automatic background polling — chat list reloads when the sidebar gains focus or the user refreshes. Cache writes happen after every successful full load; the cache is never a source of truth, only an offline fallback.
Test coverage
49/49 core tests green (6 new: page mapping, multi-page + empty stop, short-page stop, tree parsing via
get_chat, cache roundtrip + clear, hostile-key sanitization).Closes #11
Co-Authored-By: OpenCode opencode@noreply.code.hoppe-dev.eu