Skip to content

feat(ui): Archived Discussions screen + ViewModel + Settings entry #94

@ilmoniemi

Description

@ilmoniemi

User Story

As a Pyrycode mobile user, I want to open Settings → "Archived discussions", see the discussions my 30-day auto-archive has evicted, and restore any I want back, so an auto-archive doesn't lose work I still care about.

Context

Plan Phase 3 specifies an "Archived discussions" view reachable from Settings. The repository primitives are in place: archive(conversationId) from #3, retain-on-archive semantics + the archived-conversations observable + the seeded archived discussion from #93, and unarchive(conversationId) from #96. This ticket builds the screen, its ViewModel, and the Settings row that navigates to it.

The 30-day auto-archive mechanism itself is a separate ticket; this slice assumes archived state is reachable (which the seed in #93 guarantees for manual verification).

Acceptance Criteria

  • Settings screen gains a row "Archived discussions" that navigates to a new screen (route added to the navigation graph)
  • Screen displays a LazyColumn of conversations matching isPromoted = false AND archived = true, observed from the repository
  • Each row renders: discussion name (or its auto-generated label), last-message preview, archive date
  • Long-press on a row reveals a "Restore" affordance; selecting it invokes unarchive(conversationId) via the ViewModel and the row leaves the list
  • Returning to the main Channel List shows the restored discussion in the Recent discussions section
  • Empty state renders the copy "No archived discussions"
  • TopAppBar shows a back arrow and the title "Archived discussions"
  • ViewModel unit test covers the archived-list observation and the restore-action path

Technical Notes

  • The screen is stateless; hoist state to a new ViewModel exposing a sealed UiState + Event per the MVI convention in CLAUDE.md.
  • Restore affordance: long-press is the spec; if the architect determines swipe-to-restore would be more consistent with the rest of the app, they may substitute — but exactly one gesture, not both.

Size Estimate

S

Figma

N/A — no dedicated Archived Discussions view exists in the canonical Figma file (g2HIq2UyPhslEoHRokQmHG) yet. The screen should derive its visuals from the existing Recent Discussions row treatment built in #69 (Channel List, node 15-8), with a reduced-contrast / muted treatment to signal the archived state. A dedicated Figma view for this screen is recommended as a follow-up — the architect should flag this back via needs-rework:po if a derived spec is judged insufficient, so Juhana can add the view before development starts.

Blocked by

Both are now CLOSED; the GitHub blocked-by links resolve mechanically via the dispatcher.

Split from

#77

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