Skip to content

[Test] shellframe_app has zero test coverage #21

@fissible

Description

@fissible

Problem

`shellframe_app` (the multi-screen driving loop in `src/app.sh`) has no unit tests and no integration tests. It is featured in `docs/showcase.md` and is the primary API for multi-screen flows, but its behavior is entirely unverified.

What needs coverage

  • Screen type dispatch: `confirm`, `alert` types correctly routed
  • `_SHELLFRAME_APP_NEXT` transitions: render → widget → event → next screen
  • `QUIT` sentinel exits the loop
  • Details array (`_SHELLFRAME_APP_DETAILS`) forwarded to widget correctly
  • Event handler naming convention (`PREFIX_SCREEN_()`)
  • Guard against infinite loop when event handler does not set `_SHELLFRAME_APP_NEXT`

Suggested approach

Integration tests via ptyunit — send key sequences through a two-screen app and assert the screen transitions and exit code.

Effort

S (1–2h)

Depends on

None (can be written against the current API)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions