Skip to content

bug(cli): 'q' rendered to terminal when exiting command-view #1

Description

@AndrewPHunter

Symptom

After pressing q (or the exit keybind) to dismiss the Ink full-screen dashboard (/command-view / /cv), the character q is visibly written to the terminal output before the readline prompt is restored.

Reproduction

  1. Run archon in a TTY
  2. Type /cv and press Enter to open the dashboard
  3. Press q to exit
  4. Observe q appearing in the terminal output

Analysis

Ink exits by calling useApp().exit() in response to the keypress. The q keystroke is being echoed to stdout during the transition between Ink's raw-mode teardown and readline resuming.

Likely cause: a window exists between Ink calling setRawMode(false) (disabling raw mode, which re-enables OS-level echo) and readline's resume() call in restore(). During that window, the q keypress is echoed by the OS.

Files

-packages/cli/src/tui/shell.tsmountDashboard() / restore()
-packages/cli/src/tui/dashboard/DashboardView.tsx — exit keybind handler

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions