Back / Esc per surface

Navigation specs/navigation/back-behavior.kmd

Step diagram

  1. User triggers back

    User

    Hardware back on Android, swipe-back on iOS, browser back on web, or Esc on desktop.

  2. KoderBackScope intercepts

    SDK

    Single intent handler shared by every surface; no per-screen workarounds.

  3. Pop one route

    App

    Navigation stack pops exactly one entry. Never an unrelated tab switch, never two pops at once.

  4. User reaches the root

    User

    Stack is now down to one entry — the root screen.

  5. Next back exits the app

    SDK

    Configurable: enableSystemExitAtRoot=true closes the app; otherwise back at root is a no-op (often desktop windows).

Common pitfalls