Skip to content

Migrate Calculator ViewModels from C++ to C# - #2491

Open
Gebril Fradj (gebrilfradj) wants to merge 6 commits into
microsoft:mainfrom
gebrilfradj:users/t-gfradj/github-csharp-viewmodels
Open

Migrate Calculator ViewModels from C++ to C##2491
Gebril Fradj (gebrilfradj) wants to merge 6 commits into
microsoft:mainfrom
gebrilfradj:users/t-gfradj/github-csharp-viewmodels

Conversation

@gebrilfradj

@gebrilfradj Gebril Fradj (gebrilfradj) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the legacy C++/CX ViewModel layer with Calculator.ViewModels in C# and the required managed/native interop.
  • Preserve the existing Calculator UI/UX.
  • Restore behavioral parity across Standard, Scientific, Programmer, Date, Graphing, History, Memory, Currency, and Recall flows.
  • Add the managed ViewModel test suite to the solution and CI with zero-test detection.
  • Delete CalcViewModel, CalcViewModelCopyForUT, and the obsolete ViewModel-specific C++ tests while retaining the native calculation engine and its remaining tests.

Validation

  • Full x64 Debug rebuild: succeeded with 0 errors.
  • Calculator.Tests: 294 passed, 0 failed, 0 skipped.
  • Remaining CalculatorUnitTests: 86 passed, 0 failed.

Preserve the existing GitHub UI and the merged accessibility fixes while replacing the application ViewModel layer with its managed implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port the parity, concurrency, lifetime, Recall, localization, and converter fixes without introducing the redesigned converter UI. Replace the skipped migration stubs with active managed coverage and add the suite to the existing CI paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete CalcViewModel and its copied test project now that the managed ViewModels have active parity coverage. Keep the remaining native engine tests and their resource provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port the remaining graphing ViewModel behavior, make currency refresh retryable after initial load, restore localized default currencies and app licensing, and fix converter narration localization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create a fresh CalculatorManager fixture before every test so mode-change state cannot leak into the Standard test under Release ordering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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