Wiring up session Archive (sidebar + Session History + auto-unarchive) #10154
yixuanzhong
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Following up on #10069 (sidebar delete) — a maintainer noted that archive is the primitive you'd rather lean on than delete, and that the data model already has an unused
archived_atfield. This is a proposal to actually wire archive up, per the contributing guide's "discuss direction first."What already exists
_goose/unstable/session/archiveand.../unarchive(ArchiveSessionRequest_unstable/UnarchiveSessionRequest_unstable) →on_archive_session/on_unarchive_session, which set/cleararchived_at.Session.archived_aton the model, DB column, and it's returned inSessionInfo.What's missing (why it's currently a no-op)
archived_at—list_sessions_matchinghas no archived clause, so archived sessions still show everywhere. Archiving hides nothing.archived_at—add_messageonly bumpsupdated_at, so an archived chat you keep talking in stays hidden.Proposed direction
archived_at IS NULL, with aninclude_archivedopt‑in for an archived view).archived_atwhen a message is appended (add_message), so continuing a conversation brings the chat back — Gmail‑style. (Only the live append path; bulkreplace_conversationfor import/replay would be left alone.)Open questions for maintainers
I have a working implementation of all of the above and am happy to open a PR (or split it — the
archived_at IS NULLlist filter is the smallest self‑contained piece). Wanted to align on direction first.All reactions