Repository navigation
docs: add new ADR identifying a new TUI crate for setup command - #3631
turmelclem wants to merge 2 commits into
Conversation
ad7ad61 to
dc20463
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The ADR lacks required comparison evidence and contains a filename typo.
2 open findings
What changed in this PR
Adds ADR 014 documenting the selection of Ratatui with Crossterm for the signer setup TUI.
Changes:
- Defines TUI requirements and compares candidate crates.
- Records the selected implementation and its consequences.
| File | Summary |
|---|---|
docs/website/adr/014-indentify-a-TUI-crate-for-setup-command.md |
Adds the TUI selection ADR; requires filename correction and missing evaluation evidence. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
0a0c6cf to
63224ef
Compare
63224ef to
6941deb
Compare
Alenar
left a comment
There was a problem hiding this comment.
LGTM, but I feel that this ADR is quite lacking for a decision making:
- only one table to compare the crates
- no code sample to compare the crates
- I think a focus on easy of use / implementation complexity is missing
Anyhow I think that Ratatui would have won even with all of those given it provide much more features.
7ca5e21 to
9580147
Compare
| --- | ||
| slug: 14 | ||
| title: | | ||
| 14. Choosing a TUI crate for setup command |
There was a problem hiding this comment.
suggestion: The title and the filename disagree ("Choosing" vs "identify"). All other ADR filenames are lowercase, so the file could be renamed 014-choose-a-tui-crate-for-signer-setup-command.md.
| 14. Choosing a TUI crate for setup command | |
| 14. Choose a TUI crate for the signer setup command |
| 14. Choosing a TUI crate for setup command | ||
| authors: | ||
| - name: Mithril Team | ||
| tags: [Proposed] |
There was a problem hiding this comment.
question: All the existing ADRs are merged as Accepted or Superseded. Since this PR is approved, should the tag and the Status section switch to Accepted before merge? Also, the second commit Update ADR 14 with more criteria... does not follow the commit convention, so it could be squashed into the first one.
|
|
||
| ## Context | ||
|
|
||
| With the goal of increasing Mithril adoption, we want to simplify the installation of the Mithril Signer for SPOs. |
There was a problem hiding this comment.
nit: Use lowercase "signer" consistently, as in the next line.
| With the goal of increasing Mithril adoption, we want to simplify the installation of the Mithril Signer for SPOs. | |
| With the goal of increasing Mithril adoption, we want to simplify the installation of the Mithril signer for SPOs. |
|
|
||
| #### Types of inputs | ||
|
|
||
| Two interaction modes were considered: |
There was a problem hiding this comment.
suggestion: The Q&A mode requirements are listed but the decision only keeps the grid edit mode. Could you add a sentence explaining why the Q&A mode was discarded? Otherwise these requirements read as unmet.
| - Downloads¹: 59 106 231 | ||
| - Size²: 70.7 + 18.4 KiB | ||
| - Dependencies³: 207 (including color-eyre) | ||
| - Testable: ✅ [UI output unit test](https://ratatui.rs/tutorials/counter-app/basic-app/#testing-the-ui-output) |
There was a problem hiding this comment.
Line 65
suggestion: The decision mentions TestBackend, so it would be clearer to link its documentation here too.
| - Testable: ✅ [UI output unit test](https://ratatui.rs/tutorials/counter-app/basic-app/#testing-the-ui-output) | |
| - Testable: ✅ [UI output unit test](https://ratatui.rs/tutorials/counter-app/basic-app/#testing-the-ui-output) with [`TestBackend`](https://docs.rs/ratatui/latest/ratatui/backend/struct.TestBackend.html) |
| - Dependencies³: 207 (including color-eyre) | ||
| - Testable: ✅ [UI output unit test](https://ratatui.rs/tutorials/counter-app/basic-app/#testing-the-ui-output) | ||
| - Q&A mode: ✅ | ||
| - Grid edit mode: ✅ Offer widgets Row and Cell structure to design tables |
There was a problem hiding this comment.
nit: Grammar.
| - Grid edit mode: ✅ Offer widgets Row and Cell structure to design tables | |
| - Grid edit mode: ✅ offers `Row` and `Cell` widgets to design tables |
| - Q&A mode: ✅ | ||
| - Grid edit mode: ✅ Offer widgets Row and Cell structure to design tables | ||
| - Mouse support: ✅ | ||
| - Ease of development : **Medium**. Lot of things are possible with Ratatui so it offer a lot of options and can bring complexity. ([Q&A Prototype](https://github.com/IntersectMBO/mithril/blob/ctl/3618-identify-a-TUI-crate-for-setup-command/ratatui-question-answer/src/main.rs), [Grid Edit Prototype](https://github.com/IntersectMBO/mithril/blob/ctl/3618-identify-a-TUI-crate-for-setup-command/ratatui-grid-edit-mode/src/main.rs)) |
There was a problem hiding this comment.
issue: The prototype links point to the ctl/3618-identify-a-TUI-crate-for-setup-command branch, so they will break once the branch is deleted.
|
|
||
| ## Consequences | ||
|
|
||
| - The dependency footprint is significantly larger (~200 crates vs ~10-20 for prompt-based crates). |
There was a problem hiding this comment.
issue: The numbers do not match the comparison above. Please update them once the Ratatui count is measured without color-eyre.
|
|
||
| - The dependency footprint is significantly larger (~200 crates vs ~10-20 for prompt-based crates). | ||
| - Input widgets (text, integer validation, defaults, selection) must be implemented or pulled from companion crates (e.g. `tui-input`). | ||
| - UI rendering can be covered by unit tests using Ratatui's `TestBackend`. |
There was a problem hiding this comment.
suggestion: Add the consequence of the separate crate decision.
| - UI rendering can be covered by unit tests using Ratatui's `TestBackend`. | |
| - UI rendering can be covered by unit tests using Ratatui's `TestBackend`. | |
| - A new binary must be built, packaged and distributed for the setup command. |


Content
Introduce a new ADR file that identify a TUI crate that will be used for the one command setup signer
Pre-submit checklist
Issue(s)
this PR relates to #3618