User Story
As an app developer wiring the Archived Discussions UI, I want archived conversations to remain observable through the repository (with a flag, not by deletion), so the UI layer can filter and render an "Archived discussions" list against a realistic data shape.
Context
The forthcoming Archived Discussions view (split from #77) needs to observe conversations matching isPromoted = false AND archived = true and offer a restore action. The repository surface introduced in #3 already exposes archive(conversationId), but the current FakeConversationRepository implementation removes the conversation from the in-memory store entirely (records - conversationId), so archived state is unobservable today and the existing filter enum (All, Channels, Discussions) has no way to surface it.
This ticket converts archive into flag-based retention so the UI slice has something to observe. The trivial inverse — unarchive(conversationId) — lands in a separate sibling ticket that this one unblocks.
Acceptance Criteria
Technical Notes
- The repository interface in
data/repository/ConversationRepository.kt uses raw String for conversationId parameters today; there is no ConversationId value type yet. Stay consistent with the existing surface — do not introduce a value type as part of this ticket.
- Any seed-count assertions in
FakeConversationRepositoryTest (e.g. assertEquals(5, ...)) need updating to reflect the new seeded archived discussion.
Size Estimate
XS
Split from
#77
User Story
As an app developer wiring the Archived Discussions UI, I want archived conversations to remain observable through the repository (with a flag, not by deletion), so the UI layer can filter and render an "Archived discussions" list against a realistic data shape.
Context
The forthcoming Archived Discussions view (split from #77) needs to observe conversations matching
isPromoted = false AND archived = trueand offer a restore action. The repository surface introduced in #3 already exposesarchive(conversationId), but the currentFakeConversationRepositoryimplementation removes the conversation from the in-memory store entirely (records - conversationId), so archived state is unobservable today and the existing filter enum (All,Channels,Discussions) has no way to surface it.This ticket converts archive into flag-based retention so the UI slice has something to observe. The trivial inverse —
unarchive(conversationId)— lands in a separate sibling ticket that this one unblocks.Acceptance Criteria
Conversation(indata/model/Conversation.kt) gains anarchived: Boolean = falsefieldFakeConversationRepository.archive(conversationId)retains the conversation witharchived = trueinstead of removing it from the storeConversationRepositoryexposes an archived-only observable stream — exact shape is the architect's call (newConversationFiltervariant, additional argument, or other), butDiscussionsmust continue to mean "non-promoted and not archived" so the existing Recent Discussions list stays correctFakeConversationRepositoryseeds at least one already-archived discussion (isPromoted = false,archived = true) so the archived stream is non-empty for manual verificationDiscussionsstream; the existingarchive_removes_from_observeConversationstest is rewritten to assert the new flag-based semantics (archived items leave theDiscussionsstream and appear in the archived stream)Technical Notes
data/repository/ConversationRepository.ktuses rawStringforconversationIdparameters today; there is noConversationIdvalue type yet. Stay consistent with the existing surface — do not introduce a value type as part of this ticket.FakeConversationRepositoryTest(e.g.assertEquals(5, ...)) need updating to reflect the new seeded archived discussion.Size Estimate
XS
Split from
#77