Skip to content

fix: wire sign-in pages to injected viewmodel#2

Merged
ethanndickson merged 1 commit intomainfrom
token-generation-atj5
Feb 23, 2026
Merged

fix: wire sign-in pages to injected viewmodel#2
ethanndickson merged 1 commit intomainfrom
token-generation-atj5

Conversation

@ethanndickson
Copy link
Member

What changed

  • Updated SignInWindow.UpdateStage() to instantiate sign-in pages with the shared SignInViewModel constructor.
  • Removed redundant page.DataContext = _vm assignment in UpdateStage() because constructors already set DataContext.

Why

The token page button handler (GenerateTokenButton_Click) and other code-behind handlers read the page ViewModel property, not DataContext. UpdateStage() previously created pages with parameterless constructors, leaving ViewModel null and causing handlers to no-op (including "Generate a token via the Web UI").

Validation

  • Attempted: dotnet restore App.Avalonia/App.Avalonia.csproj -v q
  • Result: blocked in this environment because no .NET SDK is installed (No .NET SDKs were found).

Risk / rollback

  • Low risk: narrow change in page construction for sign-in stages only.
  • Rollback: revert commit d5f4d65.

@ethanndickson
Copy link
Member Author

Tested and it works

@ethanndickson ethanndickson added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 44b428b Feb 23, 2026
1 check passed
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.

1 participant