Skip to content

feat(dash): restore Release/Nightly channel toggle + version pin in onboarding - #73

Merged
michaelroy-amd merged 1 commit into
mainfrom
feat/onboarding-channel-toggle
Jul 1, 2026
Merged

feat(dash): restore Release/Nightly channel toggle + version pin in onboarding#73
michaelroy-amd merged 1 commit into
mainfrom
feat/onboarding-channel-toggle

Conversation

@michaelroy-amd

Copy link
Copy Markdown
Member

Summary

The dash onboarding's Install ROCm SDK path hardcoded --channel release --format wheel, dropping the Release/Nightly channel choice the legacy tui.rs onboarding used to offer (intentionally dropped when bootstrap adopted the dash onboarding UX in #67). The underlying CLI (rocm install sdk) and the TheRock resolver already fully support --channel, --version, and --build-date (mutually exclusive, validated) — only the onboarding UI was missing. This re-exposes it.

What changed

A new Configure sub-view on the InstallSdk path (crates/rocm-dash-tui/src/ui/onboarding.rs):

  • ←/→ (or Tab) toggle channel — Release / Nightly
  • ↑/↓ cycle an optional version pin — None / Build date / Version
  • typing edits the pin value; Enter stages the install for approval; Esc returns to the menu

The pin maps to the CLI's mutually-exclusive --build-date / --version flags and is available on both channels. A None pin (the default) leaves the command at --channel <ch> --format wheel, so the default Release path is byte-identical to the prior behavior.

Scope is limited to onboarding.rs. No CLI or resolver changes were needed.

Test plan

All in cargo test -p rocm-dash-tui (run --test-threads=1 per the known tui env-race flake):

  • Default Release confirm → args unchanged (--channel release --format wheel)
  • Nightly toggle → --channel nightly; toggle is reversible
  • Nightly + Build date pin → appends --build-date <YYYY-MM-DD>
  • Version pin → appends --version <v> (and not --build-date)
  • Empty pin value is omitted
  • Chars ignored until a pin mode is selected; Backspace edits the value
  • Esc returns to the Choose menu
  • Existing InstallSdk tests updated for the extra Configure-confirm step
  • cargo clippy -p rocm-dash-tui --all-targets clean; cargo build -p rocm green; 531 lib tests pass

Notes

  • Independent of the dash-ui-polish-work launcher-routing work; based on main.
  • The launcher front-door (bare rocm) does not yet expose this — a separate follow-up if desired.

…nboarding

The dash onboarding's Install ROCm SDK path hardcoded
`--channel release --format wheel`, dropping the channel choice the
legacy tui.rs onboarding offered. The underlying CLI (`install sdk`) and
TheRock resolver already support `--channel`, `--version`, and
`--build-date` (mutually exclusive, validated) — only the UI was missing.

Add a Configure sub-view to the InstallSdk path:
- ←/→ toggle channel (Release/Nightly)
- ↑/↓ cycle an optional version pin (None / Build date / Version)
- typing edits the pin value; Enter stages the install for approval

A None pin leaves the command at `--channel <ch> --format wheel`, so the
default Release path is byte-identical to the prior behavior. The pin is
available on both channels and maps to the CLI's `--build-date`/`--version`.

Tests: default Release args unchanged; nightly toggle; build-date and
version pins; empty pin omitted; chars ignored until a pin mode is
selected; backspace editing; Esc returns to Choose. Existing InstallSdk
tests updated for the extra Configure-confirm step.

Signed-off-by: Michael Roy <michael.roy@amd.com>

@rominf rominf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. The default Release path is provably unchanged (byte-identical args, pinned by a dedicated test), the new Configure sub-view is self-contained and well covered, and the generated commands match the real rocm install sdk contract.

Verified the flag contract end-to-end against the CLI, not just the unit tests:

  • --channel release|nightly (default release), --version, --build-date <YYYY-MM-DD> all match — the UI's date placeholder even mirrors the CLI metavar.
  • rocm install sdk --channel nightly --build-date <date> parses and reaches the TheRock resolver correctly (a subsequent "no compatible packages for that date" is a data-level result, not a flag issue).
  • PinMode being a single enum means the UI can only ever emit one of --version/--build-date, so the mutually-exclusive pair can't be sent together.

Two optional, non-blocking follow-ups:

  1. pin_value carries over when the Pin mode is switched (e.g. type a build date, switch to Version, and the date becomes the version value). Clearing it on mode change would re-show the placeholder and avoid feeding stale input to a different flag.
  2. Pin values are passed through with no client-side validation (spaces / arbitrary non-control chars accepted); the user only learns of an unusable value after approving and running. Delegating to the resolver is a reasonable scoped choice — just noting there's no pre-flight feedback.

Neither blocks merge.

@michaelroy-amd
michaelroy-amd added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit a8ba99a Jul 1, 2026
9 checks passed
@michaelroy-amd
michaelroy-amd deleted the feat/onboarding-channel-toggle branch July 1, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants