User Story
As a developer building Phase 0 channel-list UI, I want FakeConversationRepository to start with three pre-populated channels so that composables have realistic data to render without each call site having to call createDiscussion + promote in setup.
Context
Phase 0 UI work (channel list screen and downstream) needs fixture data. FakeConversationRepository currently initializes empty (delivered by #4). Three seeded channels with distinct cwd / currentSessionId / lastUsedAt give the channel-list screen something to render against until the Phase 4 backend ships.
The parallel discussions seed (#6) handles isPromoted = false entries; this ticket must leave discussions state untouched.
Acceptance Criteria
Technical Notes
- The existing
observeConversations_emitsEmpty_initially_for_all_filters test in FakeConversationRepositoryTest will fail once initial state is non-empty — adjust or replace it as part of this change (count goes from 0 to 3 for Channels; Discussions stays at 0).
observeConversations does not currently sort. The ordering AC implies adding a sortedByDescending { it.lastUsedAt } projection inside the existing state.map { ... } block.
- Use
kotlinx.datetime.Clock.System.now() offset by kotlin.time.Duration deltas (or Instant.fromEpochSeconds) so each seed gets a deterministic, distinct lastUsedAt.
Size Estimate
XS — three seed entries in the state initializer, one short sortedByDescending, one new test, one adjusted existing test.
Depends on
User Story
As a developer building Phase 0 channel-list UI, I want
FakeConversationRepositoryto start with three pre-populated channels so that composables have realistic data to render without each call site having to callcreateDiscussion+promotein setup.Context
Phase 0 UI work (channel list screen and downstream) needs fixture data.
FakeConversationRepositorycurrently initializes empty (delivered by #4). Three seeded channels with distinctcwd/currentSessionId/lastUsedAtgive the channel-list screen something to render against until the Phase 4 backend ships.The parallel discussions seed (#6) handles
isPromoted = falseentries; this ticket must leave discussions state untouched.Acceptance Criteria
isPromoted = true) populateFakeConversationRepository's initial state on construction — e.g. "Pyrycode Mobile", "Joi Pilates", "Personal" (or similar).cwd, a stablecurrentSessionId, and a distinctlastUsedAt.observeConversations(Channels)emits all three on first collection.observeConversations(Discussions)emits empty (feat(data): seed FakeConversationRepository with 2 fake discussions #6 runs in parallel and is out of scope here).lastUsedAtdescending.Technical Notes
observeConversations_emitsEmpty_initially_for_all_filterstest inFakeConversationRepositoryTestwill fail once initial state is non-empty — adjust or replace it as part of this change (count goes from 0 to 3 for Channels; Discussions stays at 0).observeConversationsdoes not currently sort. The ordering AC implies adding asortedByDescending { it.lastUsedAt }projection inside the existingstate.map { ... }block.kotlinx.datetime.Clock.System.now()offset bykotlin.time.Durationdeltas (orInstant.fromEpochSeconds) so each seed gets a deterministic, distinctlastUsedAt.Size Estimate
XS — three seed entries in the
stateinitializer, one shortsortedByDescending, one new test, one adjusted existing test.Depends on