Repository navigation
Conversation
Test Results 5 files ± 0 211 suites ±0 58m 21s ⏱️ - 54m 12s Results for commit dcf2dc7. ± Comparison against base commit 736297b. This pull request removes 72 and adds 104 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
damrobi
force-pushed
the
damrobi/3699-implement-tui-mithril-setup-signer
branch
from
November 26, 2026 17:51
f746e74 to
8626979
Compare
damrobi
marked this pull request as ready for review
November 26, 2026 18:16
damrobi
requested review from
Alenar,
jpraynaud and
turmelclem
as code owners
November 26, 2026 18:16
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate and critical findings remain for incomplete endpoint validation, inconsistent preview/mainnet defaults, and missing private-network magic enforcement.
3 open issues
What changed in this PR
This pull request expands the mithril-setup signer command into an interactive terminal workflow with review, validation, result, and failure screens connected through the orchestrator.
Changes:
- Added reusable TUI widgets, review-table navigation, editing, paste support, mouse-wheel handling, status indicators, validation feedback, and error popups.
- Added success and failure result screens with Back and Exit navigation.
- Expanded signer configuration fields and validation rules, added hardcoded discovery and guessing values, and documented the workflow.
| File | Description |
|---|---|
| mithril-setup/src/tui/widgets/wrapped_text.rs | Adds reusable width-aware text wrapping for descriptions and key help. |
| mithril-setup/src/tui/widgets/mod.rs | Exposes the shared TUI widgets. |
| mithril-setup/src/tui/widgets/button.rs | Adds reusable focused and unfocused button rendering. |
| mithril-setup/src/tui/terminal.rs | Handles review and result screen event loops and terminal modes. |
| mithril-setup/src/tui/setup_result/view.rs | Renders setup success and failure result screens. |
| mithril-setup/src/tui/setup_result/model.rs | Models result-screen state, outcomes, and navigation. |
| mithril-setup/src/tui/setup_result/mod.rs | Registers the result-screen modules. |
| mithril-setup/src/tui/setup_result/keys.rs | Maps result-screen keyboard input to actions. |
| mithril-setup/src/tui/review/view.rs | Renders the review table, footer, buttons, and validation-error popup. |
| mithril-setup/src/tui/review/model.rs | Adds review validation, button navigation, paste handling, and popup state. |
| mithril-setup/src/tui/review/mod.rs | Registers review columns and popup modules. |
| mithril-setup/src/tui/review/keys.rs | Maps keyboard, paste, and mouse-wheel events for review interactions. |
| mithril-setup/src/tui/review/errors_popup.rs | Renders the list of fields with validation errors. |
| mithril-setup/src/tui/review/columns.rs | Defines review-table columns and value truncation and editing behavior. |
| mithril-setup/src/tui/mod.rs | Exposes the result-screen and shared widget modules. |
| mithril-setup/src/setups/signer/schema.rs | Adds signer configuration fields, allowed values, and validation rules. |
| mithril-setup/src/setups/signer/effect_handler.rs | Adds hardcoded signer discovery and guessing values and result-screen effects. |
| mithril-setup/src/orchestrator/state_machine.rs | Adds result, failure, and back-navigation states and transitions. |
| mithril-setup/src/orchestrator/runner.rs | Executes result and failure display effects. |
| mithril-setup/src/config/rules.rs | Adds path, endpoint, IP, JSON, whitespace, and bounded-error validation rules. |
| mithril-setup/README.md | Documents the signer setup screens and keyboard controls. |
Review effort: Lite
Comment on lines
+74
to
+79
| (ERA_READER_ADAPTER_TYPE, "cardano-chain"), | ||
| (ERA_READER_ADAPTER_PARAMS, ERA_READER_ADAPTER_PARAMS_EXAMPLE), | ||
| ( | ||
| PROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIG, | ||
| PROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIG_EXAMPLE, | ||
| ), |
Comment on lines
+94
to
+101
| Arc::new(|value| { | ||
| let after_scheme = value | ||
| .strip_prefix("https://") | ||
| .or_else(|| value.strip_prefix("http://")); | ||
|
|
||
| match after_scheme { | ||
| Some(rest) if !rest.is_empty() && !rest.starts_with('/') => Ok(()), | ||
| _ => Err(format!("{} is not an http(s) URL", quoted(value))), |
Comment on lines
121
to
123
| description: "Magic number of the Cardano network, for the devnet and private networks", | ||
| presence: Presence::Optional, | ||
| rules: vec![integer_between(0, u32::MAX as u64)], |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Content
This PR implements more features for the terminal user interface of the
mithril-setup signercommand.It includes:
AbortandContinuebuttonsContinue…, footer wrapped on narrow terminalsBackbutton to the reviewBackbuttonPre-submit checklist
Comments
The file
tui/setup_result/view.rsis modified several times, mostly for adding parts of the display, so it might be worth it to review only its final state.The value
SIMULATE_SCRIPT_GENERATION_FAILUREinsrc/setups/signer/effect_handler.rscan be set totrueto force theContinuebutton to move to the failure screen.Issue(s)
Closes #3699