WIP: feat(wizard): offer the default token when adding or editing an account #106

Closed
KofTwentyTwo wants to merge 1 commits from feat/default-token-wizard into feat/default-token-ux
pull from: feat/default-token-wizard
KofTwentyTwo commented 2026-10-10 22:11:14 +00:00 (Migrated from github.com)

What

Step 2 of the approved UX plan, stacked on #103 (step 1). Part of #102.

  • Wizard step 2 (AccountWizardViewModel, AccountWizardDialog): when a default token is saved, a radio group offers Use the default token from Settings (preselected for a new account) or Use a different token for this account; the token box is enabled only for the latter. The caption says who else uses the default token and, on an edit switching to it, that the account's own token will be removed. Validation fetches the default token for that one call only; it is never loaded into the box. Missing default token → a Settings-specific message. Edit mode starts from the account's current source and can switch either way. The seeded wizard preselects the default when the Quick Sync token is the default token (compared in memory).
  • Pane: default-token accounts show a Default token tag next to the name (and in the automation name), refreshed on edit.
  • Sync All: a default-token account with no default token saved is skipped with the reason "no default token is saved (Settings)" before any GitHub call.
  • MainWindow passes the default-token accessor to both wizard constructors.

Closes #105.

How it was tested

  • dotnet build -warnaserror 0 warnings; dotnet format --verify-no-changes clean.
  • gclo.Engine.Tests 459/459 (+12: wizard choice/validation/save in both modes, seeded preselection, caption counts, Sync All skip and run); line coverage 100% on gclo.Engine and gclo.ViewModels.
  • FlaUI suite run locally against the rebuilt app (result in the PR comments).

Generated with Claude Code

## What Step 2 of the approved [UX plan](docs/plans/default-token-ux.md), stacked on #103 (step 1). Part of #102. - **Wizard step 2** (AccountWizardViewModel, AccountWizardDialog): when a default token is saved, a radio group offers *Use the default token from Settings* (preselected for a new account) or *Use a different token for this account*; the token box is enabled only for the latter. The caption says who else uses the default token and, on an edit switching to it, that the account's own token will be removed. Validation fetches the default token for that one call only; it is never loaded into the box. Missing default token → a Settings-specific message. Edit mode starts from the account's current source and can switch either way. The seeded wizard preselects the default when the Quick Sync token is the default token (compared in memory). - **Pane**: default-token accounts show a *Default token* tag next to the name (and in the automation name), refreshed on edit. - **Sync All**: a default-token account with no default token saved is skipped with the reason "no default token is saved (Settings)" before any GitHub call. - MainWindow passes the default-token accessor to both wizard constructors. Closes #105. ## How it was tested - `dotnet build -warnaserror` 0 warnings; `dotnet format --verify-no-changes` clean. - `gclo.Engine.Tests` 459/459 (+12: wizard choice/validation/save in both modes, seeded preselection, caption counts, Sync All skip and run); line coverage 100% on `gclo.Engine` and `gclo.ViewModels`. - FlaUI suite run locally against the rebuilt app (result in the PR comments). Generated with [Claude Code](https://claude.com/claude-code)
KofTwentyTwo commented 2026-10-10 22:11:48 +00:00 (Migrated from github.com)

FlaUI suite run locally against the rebuilt unpackaged app: 11/11 passed (the fixture seeds no default token, so the new radio group stays hidden there; the wizard's existing flows are unchanged).

FlaUI suite run locally against the rebuilt unpackaged app: 11/11 passed (the fixture seeds no default token, so the new radio group stays hidden there; the wizard's existing flows are unchanged).

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.