Skip to content

feat(ui): add Settings screen placeholder route to NavHost #16

@ilmoniemi

Description

@ilmoniemi

User Story

As a developer wiring up Pyrycode Mobile's UI scaffolding, I want an empty-but-routable settings destination registered in the NavHost so that the Channel List TopAppBar's gear icon (to be wired in a later ticket) has a real route to navigate to, and so that Phase 3 can build the actual Settings sections inside this scaffold without re-routing.

Context

The NavHost from #8 currently registers two routes: welcome and channel_list. Settings is a Phase 3 surface (Connection / Appearance / Notifications / Memory / About), but the entrypoint affordance — a gear icon in the Channel List TopAppBar — will land before Phase 3. To keep that wiring ticket trivial, we need the destination to exist as a placeholder now.

The placeholder is intentionally empty: a single Text("Settings placeholder") plus a back-navigation affordance. Wiring the gear icon itself is out of scope — that lives with whatever ticket introduces the Channel List TopAppBar.

Acceptance Criteria

  • A settings route is registered in MainActivity's NavHost, alongside the existing welcome and channel_list routes.
  • The route's content is a stateless Composable that renders Text("Settings placeholder") and a back-navigation affordance (e.g. an IconButton with Icons.AutoMirrored.Filled.ArrowBack, or equivalent Material 3 back-button pattern).
  • Tapping the back-navigation affordance calls navController.popBackStack() (or equivalent) so the previous destination is restored.
  • Navigating to settings from any source route renders the placeholder; navigating back returns to the source route.
  • ./gradlew assembleDebug passes.

Technical Notes

  • Add the route constant alongside the existing Routes object in MainActivity.kt (const val Settings = "settings").
  • Keep the placeholder Composable stateless — it receives an onBack: () -> Unit and the route block in NavHost supplies { navController.popBackStack() }.
  • No ViewModel, no DI wiring, no theme work beyond what the existing scaffold provides.

Out of Scope

  • Real Settings sections — Phase 3 builds Connection / Appearance / Notifications / Memory / About.
  • Wiring the Channel List TopAppBar gear icon to navigate here — separate ticket once the TopAppBar exists.
  • Deep-link support or argument passing for the settings route.

Depends On

Size Estimate

XS — single file touched (MainActivity.kt), ~15–25 LOC of production code, no new packages or dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size:xs<30 lines production code; trivial change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions