Skip to content

TUI: '-' as wordlist freezes the UI; scan errors render as "Aborted"; exit code is always 0 #55

Closed

Description

@TMHSDigital

Why it matters

These three problems make the TUI hard to trust for the newcomers it's aimed at.

Evidence

  1. Freeze.
    • internal/tui/model.go:116: beginScan runs inside Update and calls wordlist.LoadWordlist(path).
    • If the wordlist field is -, it reads os.Stdin until EOF. Bubble Tea owns stdin and an interactive TTY never sends EOF, so the event loop blocks and even Ctrl+C can't be handled.
    • Large wordlists also block the UI with no feedback, because loading is synchronous.
  2. Wrong status.
  3. Exit code. tui.Start returns 0 even when the scan failed.

Suggested approach

  • Reject - in form.validate() with a clear message.
  • Load the wordlist in a tea.Cmd that returns a message, and show a spinner while it loads.
  • Track a failed state set by the error message and render "Failed: ".
  • Return a non-zero exit code when the last scan failed.

Done when

Model tests cover all three. The UI stays responsive with a 1M-line wordlist, and a failed preflight shows "Failed".

Activity

  1. added
    bug
    priority: medium
    area: tui
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: tuibugpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions