Skip to content

feat(ui): Channel List — inline Recent discussions section + See all link #69

@ilmoniemi

Description

@ilmoniemi

User Story

As a Pyrycode mobile user on the home screen, I want recent discussions surfaced inline below the channels — section header, divider, preview cards, and a "See all discussions" affordance — instead of a single bottom-of-screen pill, so I can glance at recent scratch work without navigating away.

Context

Phase 1's #46 shipped a RecentDiscussionsPill that renders the count at the bottom of ChannelListScreen and navigates to DiscussionListScreen. The canonical Figma treatment (node 15:8) replaces the pill with an inline "Recent discussions" section: divider (Figma 15:85), section header (Figma 15:87), three preview cards (Figma 15:88/15:92/15:96) showing title + 2-line body + workspace · time meta, and a tappable "See all discussions (N) →" affordance (Figma 15:102) that navigates onward.

Acceptance Criteria

  • ChannelListScreen renders, below the channels list, in order: a thin horizontal divider (Figma 15:85), a "Recent discussions" section header (Figma 15:87), up to three discussion preview rows for the most-recent discussions, and a "See all discussions (N)" link with a trailing forward-arrow icon (Figma 15:102/15:103)
  • Each preview row shows a single-line title, a 2-line (max) ellipsised body, and a <workspace> · <relative-time> meta line — typography/spacing/colours per Figma nodes 15:8915:99
  • Tapping "See all discussions (N)" emits the existing ChannelListEvent.RecentDiscussionsTapped — do not introduce a parallel event
  • ChannelListUiState.Loaded and Empty expose the top-3 most-recent discussions alongside the existing count; ChannelListViewModel derives this list from the existing ConversationFilter.Discussions flow
  • When the recent-discussions list is empty, the entire section (divider + header + rows + link) is hidden — no orphan header
  • Quality bar: RecentDiscussionsPill removed from ChannelListScreen (file deleted if no call sites remain); zero hardcoded colour or dimension literals (everything via MaterialTheme tokens); light + dark previews for ChannelListScreen cover loaded-with-discussions and no-discussions states, and the new preview row composable ships with its own preview

Technical Notes

  • Existing files: app/src/main/java/de/pyryco/mobile/ui/conversations/list/ChannelListScreen.kt, app/src/main/java/de/pyryco/mobile/ui/conversations/list/ChannelListViewModel.kt, app/src/main/java/de/pyryco/mobile/ui/conversations/components/RecentDiscussionsPill.kt
  • New file expected: DiscussionPreviewRow.kt under ui/conversations/components/ — architect to finalise naming
  • Depends on the channels-section/avatar slice landing first (sectioned LazyColumn shape, "Channels" header above)
  • The message-content previews shown in the Figma mock are aspirational: the Conversation model carries no last-message field, and ConversationRepository.observeMessages is a paginated per-conversation stream that's expensive to call per row. Render placeholder body text (e.g. conversation name, or a synthesised string from the fake repo) and defer real message-content previews to a follow-up ticket once message access is wired

Size Estimate

S

Figma

https://www.figma.com/design/g2HIq2UyPhslEoHRokQmHG?node-id=15-8

Split from #63.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size:s<100 lines; default for non-trivial tickets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions