Deploying a VM meant answering a dozen questions in a row, never seeing the whole of one's choices, and starting over to revisit an answer. The first question is now which interface to use — TUI form or the classic prompts — defaulting to whatever TODO > Configuration says. The form shows every setting at once with a plan that recomputes on each change: names, resources, and the two collisions marked as they arise (a defined VM is skipped, an orphan qcow2 will make deploy_qemu fail). F2 edits one VM, F3 previews the commands, F5 deploys, F6/F7/F8 select all / main versions / none. Function keys rather than ctrl+letter: ctrl+p is Textual's command palette and silently swallowed the shortcut, and a bare letter is eaten by whichever input has focus. Both interfaces go through _qemu_deploy_parts_for, so the same choices produce the same command by construction — and a test now drives the CLI prompts and the form to the same state and compares the argv, which is what keeps them from drifting. Nothing privileged or networked runs inside the form. Every virsh call in this codebase goes through sudo, and a password prompt while Textual owns the terminal would wreck the display; the domain list and the remote branches are fetched before the app starts and arrive as plain data. The progress view is optional (preference: CLI output stays the default, since it is the easiest to copy from). It gives one collapsible block per VM, expanded while running, folded on success — and left OPEN on failure, which is the part worth reading. « c » copies the selected log, « C » all of them. On copying from a TUI over SSH: copy_to_clipboard emits OSC 52, which the LOCAL terminal emulator interprets, so it does reach the workstation's clipboard. Two caveats are handled: the payload is capped at 100 kB keeping the TAIL (some terminals truncate long OSC 52), and the notification says a compatible terminal is required — macOS Terminal.app has none, tmux needs set-clipboard on. Verified: pure logic (profiles, per-VM overrides surviving a profile change, totals, statuses) by direct calls; the form headless via run_test — default selection, F6/F7/F8, profile switch, and the orphan guard demanding a second F5; parity CLI/TUI on identical argv; the progress view on three fake jobs, with the failure staying open and the clipboard filled. The semaphore bounding concurrency was measured: four 0.35 s jobs take 1.63 s at 1 and 0.58 s at 4 — without it, « 4 in parallel » launched every VM at once. Also removed a duplicated @staticmethod on _qemu_install_dir, harmless since Python 3.10 but misleading. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| database_manager.py | ||
| kdbx_manager.py | ||
| logo_ascii.txt | ||
| qemu_deploy_form.py | ||
| qemu_install_monitor.py | ||
| README.base.md | ||
| README.fr.md | ||
| README.md | ||
| source_todo.sh | ||
| todo.json | ||
| todo.py | ||
| todo_example.json | ||
| todo_file_browser.py | ||
| todo_i18n.py | ||
| todo_prefs.py | ||
| todo_telemetry.py | ||
| todo_upgrade.py | ||
| version_manager.py | ||
TODO is an assistant robot to use ERPLibre
Execute it with ./script/todo/todo.py or make todo.
For a new project, copy todo_example.json to private/todo/todo_override.json | private/todo/todo_override_private.json and edit it.