Skip to content

Implement the terminal user interface of the mithril-setup signer command #3699

In review

Description

@jpraynaud

Why

The mithril-setup signer command must guide the operator through the setup of a Mithril signer in a terminal, with every parameter prefilled and editable in a single view, as decided in ADR 014 (https://mithril.network/doc/adr/14).

What

The mithril-setup signer command shows a form screen (a grid of the prefilled parameters with their provenance and status, editable in place) and a result screen (the install command to run), built with ratatui and driven by the setup orchestrator.

How

  • Add ratatui to the mithril-setup crate
  • Implement the form screen
    • Banner with the messages of the command
    • Table of the parameters with their value, provenance and status
    • Row selection, in place editing
    • Message of the selected row and key help
    • Abort and Continue buttons
  • Implement the result screen with:
    • the install command
    • the warnings line
    • the Exit button
  • How do deal with errors? (new screen or crash the TUI with error in the console, overwriting an existing file)
    • Failure screen that allows to go back to the list of values
  • Wire the terminal interface in the signer sub-command
  • Document the screens in the mithril-setup README
  • Next fine tuning steps:
    • TBD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature 🚀

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions