-
Notifications
You must be signed in to change notification settings - Fork 3
Sandbox TUI page with create wizard #781
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestsandboxSandbox mode: isolated chain with yes_cryptoSandbox mode: isolated chain with yes_crypto
Milestone
Description
Summary
Dedicated TUI page for sandbox management. TUI-first design with list view, detail panel, and action keys. Includes a Form_builder-based create wizard.
Blocked by: #779 (sandbox orchestration library)
Design
Page layout
╭─ Sandbox ─────────────────────────────────────────────────────────╮
│ │
│ ● sandbox-mainnet mainnet ● node ● baker head: 7234601 │
│ sandbox-ghostnet ghostnet ○ node ○ baker — │
│ │
│ ┌─ Details ──────────────────────────────────────────────────┐ │
│ │ Name: sandbox-mainnet │ │
│ │ Network: mainnet (isolated, no peers) │ │
│ │ Node: sandbox-mainnet-node ● running │ │
│ │ Baker: sandbox-mainnet-baker ● running │ │
│ │ Head: 7,234,601 │ │
│ │ Delegates: 20 (top by staking power) │ │
│ │ RPC: http://127.0.0.1:8732 │ │
│ │ Wallet: ~/.octez-manager/sandbox/sandbox-mainnet/... │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │
│ c:Create s:Start S:Stop d:Destroy a:Add Account r:RPC │
╰────────────────────────────────────────────────────────────────────╯
Actions (keyboard-driven)
| Key | Action | UX |
|---|---|---|
c |
Create sandbox | Navigate to sandbox create form (Form_builder wizard) |
s |
Start sandbox | Job_manager.submit → Lifecycle.start_group → toast |
S |
Stop sandbox | Job_manager.submit → Lifecycle.stop_group → toast |
d |
Destroy sandbox | Modal_helpers.confirm_modal → Job_manager.submit → Sandbox.destroy → toast |
a |
Add account | Modal_helpers.prompt_validated_text_modal for tz address → Job_manager.submit → Yes_wallet.add_account → toast |
r |
Open RPC browser | Context.navigate to RPC page with sandbox node instance |
Enter |
Toggle details | Expand/collapse detail panel |
Changes
6a. Sandbox list page
- File:
src/ui/pages/sandbox_page.ml - State: list of sandbox groups + selected index + expanded details
- Layout: Flex column (header / sandbox list / detail panel / footer)
- Detail panel:
Description_listwith sandbox info (name, network, node/baker status, head, delegates, RPC, wallet path) - Data access:
- Sandbox list:
Group_registry.list_sandboxes()— called inrefresh, NOT inview. Cache in state, refresh every ~5s or on dirty flag. - Node/baker status: existing
Datacache (service status) - Head level:
Rpc_schedulercache for the sandbox node instance
- Sandbox list:
- Use
Themed_page.Makewrapper
6b. Create form (Form_builder wizard)
- File:
src/ui/pages/sandbox_create_form.ml - Uses
Form_builder.Makepattern (likeinstall_node_form_v3.ml) - Fields:
- Network: choice field (dynamic list from
Network_config) - Snapshot: custom field — choice between Auto (tzinit), File path (file browser modal), or URL (text input)
- Name: text field, auto-filled as
sandbox-<network>, editable, validated for duplicates + safe chars - RPC Address: validated text, default
127.0.0.1:8732 - Max Delegates: validated number, default
20
- Network: choice field (dynamic list from
on_submit:Job_manager.submitcallingSandbox.createwith~on_progresslogging viaappend_log
6c. Registration
- File:
src/ui/pages/manager_app.ml— registerSandbox_pageandSandbox_create_form - Add navigation entry (keyboard shortcut or menu item from instances page)
6d. Dependencies
- File:
src/ui/dune— addoctez_manager_sandboxdependency
Key TUI patterns to follow
- NO I/O in view functions — all data from caches/schedulers
Job_manager.submitfor background operationsModal_helpers.*for confirmations and text inputContext.toast_*for feedbackContext.mark_instances_dirty()after mutationsDescription_listfor the detail panelFlex_layoutfor responsive page structure
Reference files
src/ui/pages/instances.ml— list page patternsrc/ui/pages/install_node_form_v3.ml— Form_builder wizardsrc/ui/job_manager.ml— background operation APIsrc/ui/modal_helpers.mli— modal dialogs APIsrc/ui/context.mli— toasts, navigation, dirty flags
Verification
- TUI: Sandbox page shows sandbox list with status
- TUI:
copens create wizard with all fields - TUI: Create submits via Job_manager, shows progress, toast on completion
- TUI: Start/Stop/Destroy actions work with toast feedback
- TUI: Add Account prompts for address and adds to wallet
- TUI: RPC key navigates to RPC page with correct instance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsandboxSandbox mode: isolated chain with yes_cryptoSandbox mode: isolated chain with yes_crypto