Repository navigation
Description
Current behavior
The approval-dialog command preview builds its display string with a plain args.join(" ") (no quoting), in at least these spots:
crates/rocm-dash-tui/src/ui/onboarding.rs(stage_approval)crates/rocm-dash-tui/src/ui/install_manager.rscrates/rocm-dash-tui/src/ui/serve_wizard.rscrates/rocm-dash-tui/src/ui/automations_manager.rscrates/rocm-dash-tui/src/ui/command_screen.rscrates/rocm-dash-tui/src/ui/engine_manager.rscrates/rocm-dash-tui/src/ui/config_manager.rscrates/rocm-dash-tui/src/ui/runtime_manager.rscrates/rocm-dash-tui/src/ui/job_console.rs
If any argument value contains a space (most notably a --prefix folder path, e.g. /mnt/my folder or a Windows path like C:\Program Files\ROCm), the rendered preview is ambiguous about where that argument ends. For example:
rocm install sdk --channel release --format wheel --prefix /mnt/my folder --approve-replacing-active-default
reads as though folder were a separate argument.
Expected behavior
The preview shown in the approval gate should unambiguously reflect the actual argv the job will be spawned with — e.g. by quoting any argument that contains whitespace (or by joining with a small shared shell-quoting helper) before display.
Note: this is a display-only issue. The spawned process itself is unaffected, since args are passed as a Vec<String> directly to the process (not through a shell), so this does not change what actually runs — it only affects whether the user approving the mutating action can trust what the preview shows.
Steps to reproduce
- Open the onboarding wizard's Install SDK Configure step (or the Install Manager / Serve Wizard / etc.).
- Tab into the folder browser and choose (or create) a folder whose path contains a space.
- Confirm to reach the approval screen.
- Observe the rendered command preview — the path is not quoted or otherwise delimited.
Possible solution
Add a small shared shell_quote/display_args helper (e.g. alongside crate::ui::format) that quotes any arg containing whitespace or shell-meaningful characters, and use it at all the args.join(" ") call sites listed above instead of the bare join.
Additional context
Surfaced during code review of #441 (onboarding --prefix folder-browse support), which uses the same pre-existing args.join(" ") pattern for its approval preview. Scope was kept out of that PR since the pattern is repo-wide, not specific to onboarding.
Activity
fix(dash-tui): close two more unquoted preview sites + bare-quote gap
fix(dash-tui): quote whitespace in approval-preview args (ROCm#500)
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
tomastola commentedon Oct 15, 2026
Fixed in #500, which is in v0.2.0: the approval preview now quotes any argument containing whitespace (and embedded quotes), so
--prefix "/mnt/my folder"reads unambiguously. #563 additionally switches to full POSIX quoting and covers the CLI-side previews; that is a follow-up, not needed for this report. Closing — reopen if you still see an unquoted preview on v0.2.0 or newer.fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make the command preview denote the argv it runs
fix: make every command preview denote the argv it runs (POSIX quotin…