Skip to content

Standardize onboarding gateway choice on ListView pill selector - #1048

Merged
shanselman merged 1 commit into
mainfrom
bkudiess-onboarding-gateway-choice-listview
Jul 22, 2026
Merged

shanselman merged 1 commit into
mainfrom
bkudiess-onboarding-gateway-choice-listview

Conversation

@bkudiess

@bkudiess bkudiess commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

The onboarding Welcome step (gateway choice, step 2 of 6) rendered each option as an accent-bordered card wrapped in a RadioButtons group, while the code-behind UpdateCardSelection() also swapped the card border to accent on selection. The result was two competing selection indicators on every option: the default radio ellipse plus the highlighted card, which looked wrong.

Other onboarding surfaces (for example WizardPage's SelectOptions) already use a single-select ListView, whose selected item shows the Fluent "thin vertical accent pill." This PR standardizes the Welcome choice on that same pattern.

Changes

  • Replace the RadioButtons + two RadioButton cards with a single-select ListView (GatewayChoiceSelector) containing two ListViewItems. The ListView's built-in selection pill + row highlight is now the sole selection indicator.
  • Remove the per-card Border chrome and delete the redundant UpdateCardSelection() border-swap logic and its call sites (plus an unused using).
  • Keep the outer ScrollViewer and disable the ListView's own scroll so the outer scroller owns overflow (mirrors WizardPage).
  • Vertically center the 44x44 icon tiles against the title/caption block and give items a bit more padding, fixing the icon-too-high misalignment.
  • Enforce an "always exactly one selected" invariant in SelectionChanged (a single-select ListView can otherwise be cleared to no selection via Ctrl+click/automation, leaving the persisted value stale).
  • Add AutomationProperties.HelpText for the choice group.
  • Preserve the accessibility AutomationIds and the existing selection-state wiring. SelectedIndex/SelectionChanged are identical across both controls, so the code-behind's _suppressSelectionWrite / IsWelcomeInstallSelected / SetWelcomeInstallSelected flow is unchanged.

Validation

  • ./build.ps1: all projects build.
  • dotnet test tests/OpenClaw.Shared.Tests: 3170 passed, 31 skipped (unrelated MXC/device-identity integration).
  • dotnet test tests/OpenClaw.Tray.Tests: 1916 passed, including the hardened SetupWelcomePage_KeepsNavigationOutsideScrollableSemanticChoices contract test (now asserts single-select, disabled inner scroll, the wired handler, and absence of the old card chrome).
  • Rubber-duck review run before publishing: no blocking issues. Its no-selection edge case and contract-test hardening are included here.

Real behavior proof

  • Launched the isolated app at current head (run-app-local.ps1 -NoBuild -Isolated) and navigated to the Welcome step. The gateway choice now renders as a ListView with the Fluent selection pill on the selected row and a single selection indicator; the icon tiles are vertically centered against the title/caption. Developer-confirmed visually.
image

The Welcome step wrapped two accent-bordered cards in a RadioButtons group while also swapping the card border on selection, so each option showed two selection indicators (radio ellipse + highlighted card). Replace it with a single-select ListView whose built-in Fluent selection pill is the sole indicator, matching the ListView pattern already used by WizardPage. Vertically center the icon tiles so they align with the title/caption block.

Delete the now-redundant UpdateCardSelection border-swap logic and its call sites, and enforce an always-one-selected invariant in the SelectionChanged handler (a single-select ListView can otherwise be cleared to no selection). Add AutomationProperties.HelpText for the choice group and harden the WelcomePage contract test to lock in single-select, disabled inner scroll, the wired handler, and absence of the old card chrome.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Jul 22, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Standardize onboarding gateway choice on ListView pill selector This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@shanselman
shanselman merged commit e157ceb into main Jul 22, 2026
19 checks passed
@shanselman
shanselman deleted the bkudiess-onboarding-gateway-choice-listview branch July 22, 2026 21:24
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