Skip to content

[tui] Implement NavigationProvider with stack-based screen routing and context #40

@roninjin10

Description

@roninjin10

Implement NavigationProvider with stack-based screen routing and context

Type: engineering
Domain: Codeplane TUI

Create the NavigationProvider that manages the screen navigation stack consumed by the ScreenRouter, HeaderBar breadcrumbs, and all go-to/deep-link features. (1) providers/NavigationProvider.tsx: React context providing push(screen, params), pop(), replace(screen, params), reset(screen, params), canPop(), stack (read-only), current (top of stack). (2) router/types.ts: ScreenEntry type { id: string, params?: Record<string, string> }, NavigationContextType interface. (3) Stack model: array of ScreenEntry, max depth 32, oldest entry dropped on overflow, push deduplicates consecutive identical screens. (4) push() adds to stack, pop() removes top (no-op on root), replace() swaps top, reset() clears to single entry. (5) useNavigation() consumer hook. (6) Stack is not persisted across TUI restarts. (7) All operations are synchronous and trigger re-render.


Auto-generated by smithers workflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    tuiTerminal UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions