Skip to content

Develop#25

Open
vov4uk wants to merge 20 commits into
masterfrom
develop
Open

Develop#25
vov4uk wants to merge 20 commits into
masterfrom
develop

Conversation

@vov4uk
Copy link
Copy Markdown
Owner

@vov4uk vov4uk commented May 21, 2026

No description provided.

@vov4uk vov4uk closed this May 22, 2026
@vov4uk vov4uk reopened this May 22, 2026
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add rules management, multi-provider exchange rates, PKO bank support, and saldo reports with comprehensive refactoring

✨ Enhancement 🧪 Tests

Grey Divider

Walkthroughs

Description
• **Rules Management System**: Added comprehensive transaction categorization rules with support for
  description matching, MCC-based conditions, and automatic rule application during transaction
  imports
• **Exchange Rate Provider Support**: Refactored exchange rate loader to support multiple providers
  (FreeCurrencyRates and OpenExchangeRates) with configurable settings dialog
• **PKO Bank Statement Parser**: Implemented new PKO bank PDF statement parser using Tabula and
  PdfPig libraries for transaction extraction
• **Saldo Report Structure**: Added new net worth/saldo report with configurable date ranges and
  multi-currency support (USD and default currency)
• **Toast Notifications**: Integrated toast notification system with custom display components and
  wrapper interface
• **Code Quality Improvements**:
  - Reorganized using statements across multiple files to follow C# conventions
  - Added nullable reference type annotations to AsyncCommand classes
  - Refactored test classes with parameterized testing and JSON constants
  - Renamed TagDto to TagDTO for naming consistency
• **Bank Helper Namespace Reorganization**: Consolidated all bank helper classes under
  Financier.Desktop.Helpers.BankHelper namespace
• **Project Configuration**: Implemented centralized package version management via
  Directory.Packages.props and updated .editorconfig with comprehensive style rules
• **Emoji Library Migration**: Updated from Emoji.Wpf to iNKORE.UI.WPF.Emojis across all XAML
  files
• **UI Enhancements**: Added Rules management page, Settings dialog, and exchange rate refresh
  functionality to main window
Diagram
flowchart LR
  A["Transaction Import"] -->|"Apply Rules"| B["Rule Engine"]
  B -->|"Categorize"| C["Transaction Categories"]
  D["Exchange Rates"] -->|"Multiple Providers"| E["Rate Loader"]
  E -->|"Convert"| F["Multi-Currency Support"]
  G["Bank Statements"] -->|"PKO Parser"| H["Transaction Extraction"]
  H -->|"Import"| A
  I["Reports"] -->|"New Saldo Report"| J["Net Worth Analysis"]
  K["UI Components"] -->|"Toast Notifications"| L["User Feedback"]
  M["Code Organization"] -->|"Centralized Config"| N["Package Management"]

Loading

File Changes

1. src/Tests/Financier.Desktop.Tests/Pages/BlotterVMIntegrationTests.cs 🧪 Tests +263/-262

Test refactoring with JSON constants and parameterized tests

• Reorganized using statements to follow C# conventions (namespace first, then using statements)
• Added multiple private const string fields containing JSON test data for various transaction and
 transfer scenarios
• Refactored test methods by extracting JSON constants and reordering test execution (moved
 CreateSplitTransaction_DifferentCurrencies_BalancesUpdated earlier)
• Converted multiple test methods to use [Theory] with [InlineData] attributes for parameterized
 testing
• Reorganized helper methods and moved JSON data definitions from method bodies to class-level
 constants
• Changed assertion from Assert.Equal(1, vm.Entities.Count) to Assert.Single(vm.Entities) for
 improved readability

src/Tests/Financier.Desktop.Tests/Pages/BlotterVMIntegrationTests.cs


2. src/Tests/Financier.Desktop.Tests/Pages/MainWindowVMTest.cs 🧪 Tests +294/-293

Test class refactoring and mock dependency reorganization

• Renamed class from FinancierVMTest to MainWindowVMTest to better reflect its purpose
• Reorganized and alphabetically sorted mock field declarations for consistency
• Added toastNotifierMock field and updated constructor to initialize it
• Removed unused System.IO import
• Added new import for Financier.Desktop.Helpers.BankHelper
• Reordered test methods and reorganized test logic (moved Constructor_NoParameters_PagesCreated
 test earlier)
• Updated GetFinancierVM() method to pass toastNotifierMock.Object parameter
• Changed mock initialization syntax from new (MockBehavior.Strict) to new() for consistency

src/Tests/Financier.Desktop.Tests/Pages/MainWindowVMTest.cs


3. src/Tests/Financier.DataAccess.Tests/FinancierDatabaseTest.cs 🧪 Tests +165/-167

Test method reordering for logical grouping

• Reordered test methods to group related functionality together
• Moved Constructor_NoParameters_AllRepositoriesCreated test to appear after other tests
• Reorganized test execution order: CreateUnitOfWork_Execute_UOWCreated, GetOrCreate_* tests,
 and GetSubTransactions_* tests
• Moved RebuildRunningBalanceForAccount_Have3Transactions_BalanceUpdated test to the end of the
 file
• No functional changes to test logic or assertions

src/Tests/Financier.DataAccess.Tests/FinancierDatabaseTest.cs


View more (95)
4. src/Tests/Financier.Desktop.Tests/Pages/Dialog/TransactionDialogVMTest.cs 🧪 Tests +38/-38

Test method reordering

• Reordered test methods: moved ClearCommand_Execute_SetDefaultValues before
 OpenSubTransactionDialogCommand_Execute_TransactionUpdated
• No changes to test logic or assertions

src/Tests/Financier.Desktop.Tests/Pages/Dialog/TransactionDialogVMTest.cs


5. src/Financier.Common/AsyncCommand.cs ✨ Enhancement +5/-5

Add nullable reference type annotations

• Added nullable reference type annotations (?) to EventHandler and object parameters
 throughout the file
• Updated ICommand.CanExecuteChanged event to use EventHandler? type
• Updated ICommand.CanExecute(object parameter) to ICommand.CanExecute(object? parameter)
• Updated ICommand.Execute(object parameter) to ICommand.Execute(object? parameter) in both
 AsyncCommand and AsyncCommand classes

src/Financier.Common/AsyncCommand.cs


6. src/Tests/Financier.Desktop.Tests/Wizards/Mono/MonoWizardVMTest.cs 🧪 Tests +171/-133

Update MonoWizard tests with dialog wrapper and bank helper refactoring

• Updated test constructor calls to include IDialogWrapper parameter for MonoWizardVM
• Reorganized and refactored test methods with updated namespace references for bank helpers (e.g.,
 Helpers.BankHelper.MonobankHelper)
• Added new test LoadTransactions_PKO_ExpectedTransactions for PKO bank statement parsing
• Reordered test methods alphabetically and fixed formatting inconsistencies (trailing commas,
 spacing)

src/Tests/Financier.Desktop.Tests/Wizards/Mono/MonoWizardVMTest.cs


7. src/Tests/Financier.Desktop.Tests/Wizards/Mono/Page3VMTest.cs 🧪 Tests +547/-6

Add rule application tests and dialog wrapper integration

• Added IDialogWrapper mock dependency to Page3VM constructor calls throughout tests
• Introduced comprehensive rule application tests covering description matching, MCC conditions, and
 multiple rule scenarios
• Added tests for rule dialog interaction including rule creation, cancellation, and property
 preservation
• Expanded test coverage with async task support and rule-based transaction categorization

src/Tests/Financier.Desktop.Tests/Wizards/Mono/Page3VMTest.cs


8. src/Financier.Common/Entities/DbManual.cs ✨ Enhancement +76/-0

Add rules management and MCC categories to DbManual

• Added _rules list field and Rules property for managing rule models
• Introduced MCCCategories dictionary with comprehensive MCC code mappings for transaction
 categorization
• Added LoadRulesAsync() and SaveRulesAsync() methods for persisting rules to JSON file
• Added SetupTests() overload for RuleModel list to support unit testing

src/Financier.Common/Entities/DbManual.cs


9. src/Financier.Desktop/MainWindowVM.cs ✨ Enhancement +117/-27

Add rules management and exchange rate settings functionality

• Reorganized using statements alphabetically for better code organization
• Added IToastNotifierWrapper dependency and RulesVM property for rules page management
• Implemented Settings_Click() and RefreshExchangeRates_Click() methods for exchange rate
 configuration
• Added support for multiple exchange rate providers (freecurrencyrates.com and
 openexchangerates.org)
• Added ExchangeRatesSettings property and related command properties

src/Financier.Desktop/MainWindowVM.cs


10. src/Financier.Common/Converters/MccConverter.cs ✨ Enhancement +3/-38

Refactor MCC converter to use centralized categories

• Removed duplicate MCC categories dictionary definition from converter class
• Updated converter to use centralized DbManual.MCCCategories instead of local dictionary
• Simplified code by eliminating redundant category mapping logic

src/Financier.Common/Converters/MccConverter.cs


11. src/Financier.Reports/Structure/ReportStructureSaldoVM.cs ✨ Enhancement +307/-0

Add saldo structure report view model with charting

• New file implementing saldo (net worth) report visualization with configurable date ranges
• Supports multiple time period filters (Current Year, Last 6/12/24 Months, Last 2 Years)
• Generates bar and line charts showing assets, liabilities, and net worth in multiple currencies
• Includes USD and default currency balance calculations with exchange rate conversions

src/Financier.Reports/Structure/ReportStructureSaldoVM.cs


12. src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs ✨ Enhancement +183/-0

Add PKO bank statement PDF parser helper

• New file implementing PKO bank statement PDF parser using Tabula and PdfPig libraries
• Extracts transaction data including date, description, amount, balance, and currency information
• Handles multi-page PDF documents with regex-based pattern matching for transaction parsing
• Supports original currency amounts and exchange rate information extraction

src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs


13. src/Financier.Desktop/Helpers/ExchangeRateLoader.cs ✨ Enhancement +108/-31

Refactor exchange rate loader for multiple providers

• Refactored to support multiple exchange rate providers with separate methods for each
• Added LoadFreeCurrencyRates() and LoadOpenExchangeRates() methods with provider-specific logic
• Extracted common currency pair retrieval into GetRatesPairsAsync() method
• Added OpenExchangeCurrencyRates class for deserializing OpenExchangeRates API responses
• Improved error handling and logging with Microsoft.Extensions.Logging

src/Financier.Desktop/Helpers/ExchangeRateLoader.cs


14. src/Financier.Desktop/Wizards/MonoWizard/Page3VM.cs ✨ Enhancement +122/-7

Add rule application and dialog integration to Page3VM

• Added IDialogWrapper dependency injection for rule dialog management
• Implemented ApplyRules() method to apply transaction categorization rules based on conditions
• Added AddRuleCommand async command for creating new rules from transaction descriptions
• Implemented OpenRulesDialogAsync() method for rule creation and persistence
• Added support for rule conditions: "Description contains", "Description matches", and "MCC"

src/Financier.Desktop/Wizards/MonoWizard/Page3VM.cs


15. src/Financier.Desktop/Pages/RulesVM.cs ✨ Enhancement +119/-0

Add rules management view model for UI integration

• New file implementing rules management view model extending EntityBaseVM
• Provides CRUD operations for transaction categorization rules with dialog-based editing
• Integrates with DbManual for rule persistence and loading from JSON storage
• Supports rule activation/deactivation and automatic title generation based on rule properties

src/Financier.Desktop/Pages/RulesVM.cs


16. src/Financier.Reports/Structure/ReportStructureSaldoModel.cs ✨ Enhancement +94/-0

Add saldo report data models with currency support

• New file defining data models for saldo report including ReportStructureSaldoModel and
 ReportStructureSaldoRawModel
• Includes formatted string properties for displaying balances in multiple currencies
• Maps database columns to model properties with display name attributes
• Supports assets, liabilities, and net worth calculations in both default and USD currencies

src/Financier.Reports/Structure/ReportStructureSaldoModel.cs


17. src/Financier.Desktop/Data/RuleDTO.cs ✨ Enhancement +124/-0

Add rule data transfer object for UI binding

• New file defining RuleDTO data transfer object for rule management UI operations
• Implements BindableBase for MVVM property change notifications
• Includes properties for rule conditions, descriptions, and entity associations (category,
 location, payee, project)
• Provides conversion constructor from RuleModel for editing existing rules

src/Financier.Desktop/Data/RuleDTO.cs


18. src/Financier.Desktop/MainWindow.xaml.cs ✨ Enhancement +15/-13

Update MainWindow initialization and version display

• Reorganized using statements alphabetically for consistency
• Updated MainWindowVM instantiation to include ToastNotifierWrapper dependency
• Modified version display to use build date calculation from assembly version
• Updated exchange rate refresh call to use async command pattern

src/Financier.Desktop/MainWindow.xaml.cs


19. src/Financier.Common/Model/RuleModel.cs ✨ Enhancement +71/-0

Add rule model for transaction categorization

• New file defining RuleModel class for transaction categorization rules
• Includes properties for rule conditions, descriptions, and entity associations
• Implements IActive interface for rule activation/deactivation
• Provides BuildTitle() and UpdateTitle() methods for dynamic rule description generation

src/Financier.Common/Model/RuleModel.cs


20. src/Financier.Reports/Structure/ReportStructureActivesVM.cs ✨ Enhancement +11/-2

Add USD balance calculation to actives report

• Added balance_usd column to SQL query for USD balance calculations
• Updated exchange rate filter logic to use parameterized date filtering instead of transaction
 datetime
• Added USD balance calculation case statement with exchange rate conversion to USD currency

src/Financier.Reports/Structure/ReportStructureActivesVM.cs


21. src/Financier.Desktop/Pages/BlotterVM.cs Formatting +5/-7

Add missing using statements to BlotterVM

• Added missing using statements for System, System.Collections.Generic, System.Linq,
 System.Linq.Expressions, and System.Threading.Tasks

src/Financier.Desktop/Pages/BlotterVM.cs


22. src/Financier.Desktop/Pages/Dialogs/RuleControlVM.cs ✨ Enhancement +71/-0

New Rule Control ViewModel for dialog management

• New ViewModel class for managing rule dialog interactions with properties for condition type and
 MCC selection
• Implements property change notifications and validation logic for MCC-based conditions
• Provides OnRequestSave() method to persist rule entity changes back to the data model

src/Financier.Desktop/Pages/Dialogs/RuleControlVM.cs


23. src/Financier.Desktop/Pages/Dialogs/SettingsVM.cs ✨ Enhancement +60/-0

New Settings ViewModel for exchange rates configuration

• New ViewModel for application settings dialog with exchange rate provider selection
• Manages boolean properties for provider selection (OpenExchangeRates vs FreeCurrencyRates)
• Implements save logic to persist selected provider and clear API credentials when switching
 providers

src/Financier.Desktop/Pages/Dialogs/SettingsVM.cs


24. src/Tests/Financier.Desktop.Tests/Pages/FinancierVMIntegrationTest.cs 🧪 Tests +4/-3

Update integration tests for MainWindowVM constructor changes

• Updated MainWindowVM constructor calls to include additional null parameters
• Added import for Financier.Desktop.Helpers.BankHelper namespace
• Modified test setup to pass null for new BankHelperFactory parameter in first test

src/Tests/Financier.Desktop.Tests/Pages/FinancierVMIntegrationTest.cs


25. src/Financier.Reports/BaseReportVM.cs ✨ Enhancement +7/-8

Refactor BaseReportVM property access and date filtering

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Changed PlotModel property setter from private to protected for inheritance flexibility
• Updated date filter logic to use Unix timestamp instead of formatted date string

src/Financier.Reports/BaseReportVM.cs


26. src/Financier.Desktop/Pages/Controls/CustomDisplayPart.xaml.cs ✨ Enhancement +59/-0

New custom toast notification display component

• New custom notification display component extending NotificationDisplayPart
• Implements CustomNotification class with INotifyPropertyChanged for message binding
• Provides close button functionality and property change notifications

src/Financier.Desktop/Pages/Controls/CustomDisplayPart.xaml.cs


27. src/Financier.Desktop/Helpers/BankHelper/IToastNotifierWrapper.cs ✨ Enhancement +49/-0

New toast notification wrapper interface and implementation

• New interface and implementation for toast notification wrapper functionality
• ToastNotifierWrapper configures notification positioning, lifetime, and display options
• Provides ShowMessage() and ShowWarning() methods for displaying notifications

src/Financier.Desktop/Helpers/BankHelper/IToastNotifierWrapper.cs


28. src/Financier.Desktop/Data/SettingsDTO.cs ✨ Enhancement +48/-0

New Settings data transfer object

• New data transfer object for application settings with exchange rate provider configuration
• Implements properties for provider selection, API credentials, and auto-update flag
• Uses BindableBase for property change notifications

src/Financier.Desktop/Data/SettingsDTO.cs


29. src/Financier.Desktop/Wizards/MonoWizard/MonoWizardVM.cs ✨ Enhancement +5/-2

Add dialog wrapper dependency to MonoWizard

• Added IDialogWrapper dependency injection to constructor
• Passed dialog wrapper to Page3VM for rule creation functionality
• Updated constructor signature to accept dialog wrapper parameter

src/Financier.Desktop/Wizards/MonoWizard/MonoWizardVM.cs


30. src/Financier.Desktop/Helpers/BankHelper/PumbHelper.cs ✨ Enhancement +2/-2

Reorganize PumbHelper namespace and fix exchange rate type

• Moved class to Financier.Desktop.Helpers.BankHelper namespace
• Changed exchange rate calculation to return double instead of nullable double

src/Financier.Desktop/Helpers/BankHelper/PumbHelper.cs


31. src/Financier.DataAccess/FinancierDatabase.cs Formatting +8/-9

Reorganize using statements in FinancierDatabase

• Reorganized using statements to follow standard ordering (System namespaces first)
• Removed unused System.Linq.Expressions import

src/Financier.DataAccess/FinancierDatabase.cs


32. src/Financier.Desktop/Helpers/BankHelper/BankHelperFactory.cs ✨ Enhancement +2/-1

Add PKO bank support to BankHelperFactory

• Moved class to Financier.Desktop.Helpers.BankHelper namespace
• Added support for new WizardTypes.Pko bank type with PKOHelper instantiation

src/Financier.Desktop/Helpers/BankHelper/BankHelperFactory.cs


33. src/Financier.Reports/Period/ReportByPeriodMonthCrcVM.cs Formatting +1/-1

Clean up trailing whitespace in SQL query

• Removed trailing whitespace from SQL query string

src/Financier.Reports/Period/ReportByPeriodMonthCrcVM.cs


34. src/Financier.Desktop/Pages/Dialogs/RuleControl.xaml.cs ✨ Enhancement +26/-0

New RuleControl code-behind file

• New code-behind for RuleControl user control
• Simple initialization of the control with no additional logic

src/Financier.Desktop/Pages/Dialogs/RuleControl.xaml.cs


35. src/Financier.Desktop/Pages/Dialogs/SettingsControl.xaml.cs ✨ Enhancement +26/-0

New SettingsControl code-behind file

• New code-behind for SettingsControl user control
• Simple initialization of the control with no additional logic

src/Financier.Desktop/Pages/Dialogs/SettingsControl.xaml.cs


36. src/Financier.Desktop/Pages/RulesView.xaml.cs ✨ Enhancement +26/-0

New RulesView code-behind file

• New code-behind for RulesView user control
• Simple initialization of the control with no additional logic

src/Financier.Desktop/Pages/RulesView.xaml.cs


37. src/Financier.Desktop/Pages/TagVM.cs ✨ Enhancement +2/-2

Rename TagDto to TagDTO for naming consistency

• Renamed TagDto class references to TagDTO for consistency
• Updated type casting and instantiation to use new naming convention

src/Financier.Desktop/Pages/TagVM.cs


38. src/Financier.Desktop/Data/TagDto.cs ✨ Enhancement +3/-3

Rename TagDto class to TagDTO

• Renamed class from TagDto to TagDTO for consistency
• Updated all constructor references to use new class name

src/Financier.Desktop/Data/TagDto.cs


39. src/Financier.Reports/Structure/ByCategoryReportVM.cs Formatting +5/-6

Reorganize using statements in ByCategoryReportVM

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Removed unused OxyPlot import

src/Financier.Reports/Structure/ByCategoryReportVM.cs


40. src/Financier.Desktop/Pages/Dialogs/TagControlVM.cs ✨ Enhancement +2/-2

Update TagControlVM to use TagDTO naming

• Updated TagDto references to TagDTO for consistency
• Changed property type and constructor parameter to use new naming

src/Financier.Desktop/Pages/Dialogs/TagControlVM.cs


41. src/Financier.Desktop/Helpers/MapperHelper.cs Formatting +4/-4

Reorganize using statements and update namespace reference

• Reorganized using statements to follow standard ordering
• Updated namespace reference from BankPdfHelperBase to BankHelper.BankPdfHelperBase

src/Financier.Desktop/Helpers/MapperHelper.cs


42. src/Financier.Desktop/Wizards/WizardTypes.cs ✨ Enhancement +4/-7

Add PKO wizard type and clean up imports

• Removed unused using statements (System collections, LINQ, etc.)
• Added new Pko enum value with PDF description attribute

src/Financier.Desktop/Wizards/WizardTypes.cs


43. src/Financier.Desktop/Helpers/BankHelper/AbankExcelHelper.cs ✨ Enhancement +1/-1

Reorganize AbankExcelHelper namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/AbankExcelHelper.cs


44. src/Financier.Desktop/Helpers/BankHelper/PrivatHelper.cs ✨ Enhancement +1/-1

Reorganize PrivatHelper namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/PrivatHelper.cs


45. src/Financier.Desktop/Helpers/BankHelper/MonobankHelper.cs ✨ Enhancement +1/-1

Reorganize MonobankHelper namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/MonobankHelper.cs


46. src/Financier.Desktop/Helpers/BankHelper/BankPdfHelperBase.cs ✨ Enhancement +1/-1

Reorganize BankPdfHelperBase namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/BankPdfHelperBase.cs


47. src/Financier.Reports/Structure/ReportStructureActivesModel.cs ✨ Enhancement +3/-0

Add USD balance property to ReportStructureActivesModel

• Added new UsdBalance property for USD currency balance tracking
• Property includes display name and database column mapping attributes

src/Financier.Reports/Structure/ReportStructureActivesModel.cs


48. src/Financier.DataAccess/BaseRepository.cs Formatting +4/-4

Reorganize using statements in BaseRepository

• Reorganized using statements to follow standard ordering (System first, then third-party)

src/Financier.DataAccess/BaseRepository.cs


49. src/Tests/Financier.Desktop.Tests/GlobalSuppressions.cs ⚙️ Configuration changes +8/-0

New global code analysis suppressions file

• New file for code analysis suppressions at assembly level
• Suppresses StyleCop documentation requirement for test members

src/Tests/Financier.Desktop.Tests/GlobalSuppressions.cs


50. src/Financier.Desktop/Properties/Settings.Designer.cs ✨ Enhancement +7/-0

Add ExchangeRatesSettings property to application settings

• Added new ExchangeRatesSettings property for storing exchange rate configuration
• Property is user-scoped with string type for serialized settings storage

src/Financier.Desktop/Properties/Settings.Designer.cs


51. src/Financier.Desktop/Helpers/BankHelper/PireusHelper.cs ✨ Enhancement +1/-1

Reorganize PireusHelper namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/PireusHelper.cs


52. src/Financier.Desktop/Helpers/BankHelper/ABankHelper.cs ✨ Enhancement +1/-1

Reorganize ABankHelper namespace

• Moved class to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/ABankHelper.cs


53. src/Financier.DataAccess/Utils/UnitOfWorkHelper.cs Formatting +2/-3

Reorganize using statements in UnitOfWorkHelper

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Removed unused Financier.DataAccess.Data import

src/Financier.DataAccess/Utils/UnitOfWorkHelper.cs


54. src/Financier.Desktop/App.xaml.cs Error handling +1/-1

Improve exception message display with inner exception fallback

• Enhanced error message display to show inner exception message when available
• Uses null-coalescing operator for safer exception message handling

src/Financier.Desktop/App.xaml.cs


55. src/Financier.Desktop/Wizards/MonoWizard/Page2VM.cs Formatting +3/-4

Reorganize using statements in Page2VM

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Removed unused Financier.Common.Entities import

src/Financier.Desktop/Wizards/MonoWizard/Page2VM.cs


56. src/Financier.DataAccess/View/BlotterTransactionsForAccountWithSplits.cs Formatting +1/-5

Clean up BlotterTransactionsForAccountWithSplits file

• Removed unnecessary using statements and blank lines
• Cleaned up file header

src/Financier.DataAccess/View/BlotterTransactionsForAccountWithSplits.cs


57. src/Financier.Common/BlotterUtils.cs Formatting +2/-4

Reorganize using statements in BlotterUtils

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Removed unused System.Xml.Linq and Microsoft.Extensions.Primitives imports

src/Financier.Common/BlotterUtils.cs


58. src/Financier.Desktop/Helpers/BankHelper/IBankHelper.cs ✨ Enhancement +1/-1

Reorganize IBankHelper namespace

• Moved interface to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/IBankHelper.cs


59. src/Financier.Reports/Structure/ReportStructureSaldo.xaml.cs ✨ Enhancement +9/-0

New ReportStructureSaldo code-behind file

• New code-behind for ReportStructureSaldo user control
• Simple initialization with lambda expression

src/Financier.Reports/Structure/ReportStructureSaldo.xaml.cs


60. src/Financier.Desktop/Helpers/BankHelper/IBankHelperFactory.cs ✨ Enhancement +1/-1

Reorganize IBankHelperFactory namespace

• Moved interface to Financier.Desktop.Helpers.BankHelper namespace

src/Financier.Desktop/Helpers/BankHelper/IBankHelperFactory.cs


61. src/Financier.Desktop/Data/LocationDTO.cs ✨ Enhancement +1/-1

Update LocationDTO to use TagDTO base class

• Updated base class reference from TagDto to TagDTO for consistency

src/Financier.Desktop/Data/LocationDTO.cs


62. src/Financier.Reports/ReportsControlVM.cs ✨ Enhancement +1/-0

Add ReportStructureSaldoVM to reports tree

• Added new ReportStructureSaldoVM to reports tree structure

src/Financier.Reports/ReportsControlVM.cs


63. src/Financier.Reports/SafePlotModel.cs Formatting +2/-5

Reorganize using statements in SafePlotModel

• Reorganized using statements to follow standard ordering (System first, then third-party)
• Removed unused System.Text and System.Threading.Tasks imports

src/Financier.Reports/SafePlotModel.cs


64. .editorconfig ⚙️ Configuration changes +269/-29

Comprehensive EditorConfig update with style rules

• Completely rewritten with comprehensive C# code style rules and formatting guidelines
• Added rules for naming conventions, spacing, indentation, and expression preferences
• Includes configuration for multiple file types (C++, XML, JSON, etc.)

.editorconfig


65. src/Financier.Desktop/MainWindow.xaml ✨ Enhancement +40/-3

Add Rules and Settings UI elements to MainWindow

• Added data template for RulesVM view binding
• Added ribbon group for Rules with add, edit, delete commands
• Added ribbon group for Exchange Rates with refresh command
• Added PKO bank import button to import ribbon
• Uncommented and enabled Settings menu item with command binding

src/Financier.Desktop/MainWindow.xaml


66. src/Financier.Desktop/Pages/Dialogs/RuleControl.xaml ✨ Enhancement +155/-0

New RuleControl XAML dialog interface

• New XAML user control for rule editing dialog
• Includes condition type selection (Description contains/matches/MCC)
• Provides action configuration for categories, locations, projects, and payees
• Implements MCC selection with visibility binding

src/Financier.Desktop/Pages/Dialogs/RuleControl.xaml


67. src/Financier.Desktop/Financier.Desktop.csproj Dependencies +24/-14

Update project configuration and dependencies

• Enabled centralized package version management
• Added references to .editorconfig and Directory.Packages.props
• Updated package references to use centralized versions
• Added new image resources for PKO and rules
• Added toast notification package dependencies

src/Financier.Desktop/Financier.Desktop.csproj


68. src/Financier.Desktop/Pages/Dialogs/SettingsControl.xaml ✨ Enhancement +62/-0

New SettingsControl XAML dialog interface

• New XAML user control for application settings dialog
• Includes exchange rate provider selection (radio buttons)
• Provides API ID input field with conditional visibility
• Includes checkbox for auto-update on startup

src/Financier.Desktop/Pages/Dialogs/SettingsControl.xaml


69. src/Financier.Reports/Structure/ReportStructureSaldo.xaml ✨ Enhancement +72/-0

New ReportStructureSaldo XAML report interface

• New XAML user control for balance report structure
• Includes view mode selection (graphics/grid)
• Provides currency selection (default/USD)
• Implements period range selection with plot and data grid display

src/Financier.Reports/Structure/ReportStructureSaldo.xaml


70. src/Financier.DataAccess/Financier.DataAccess.csproj Dependencies +8/-4

Update DataAccess project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions
• Added .editorconfig file reference

src/Financier.DataAccess/Financier.DataAccess.csproj


71. Directory.Packages.props ⚙️ Configuration changes +45/-0

New centralized package versions configuration

• New centralized package version management file
• Defines versions for all production and test dependencies
• Includes packages for desktop, reports, data access, and adapter layers

Directory.Packages.props


72. src/Tests/Financier.Desktop.Tests/Financier.Desktop.Tests.csproj Dependencies +17/-9

Update Desktop tests project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions
• Added .editorconfig file reference
• Added PKO test asset file reference

src/Tests/Financier.Desktop.Tests/Financier.Desktop.Tests.csproj


73. src/Tests/Financier.Adapter.Tests/Financier.Adapter.Tests.csproj Dependencies +10/-9

Update Adapter tests project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions

src/Tests/Financier.Adapter.Tests/Financier.Adapter.Tests.csproj


74. src/Financier.Desktop/Pages/RulesView.xaml ✨ Enhancement +44/-0

New RulesView XAML list interface

• New XAML user control for rules list view
• Displays rules in data grid with columns for created date, condition, description, and title
• Implements double-click edit command binding
• Uses emoji text block for title display

src/Financier.Desktop/Pages/RulesView.xaml


75. src/Tests/Financier.DataAccess.Tests/Financier.DataAccess.Tests.csproj Dependencies +10/-9

Update DataAccess tests project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions

src/Tests/Financier.DataAccess.Tests/Financier.DataAccess.Tests.csproj


76. src/Financier.Desktop/Pages/Controls/CustomDisplayPart.xaml ✨ Enhancement +33/-0

New CustomDisplayPart XAML notification template

• New XAML for custom toast notification display component
• Includes icon, message text, and close button
• Implements notification styling and layout

src/Financier.Desktop/Pages/Controls/CustomDisplayPart.xaml


77. src/Financier.Desktop/Wizards/MonoWizard/Page2.xaml Dependencies +6/-6

Update emoji library and column header in Page2

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis
• Changed emoji:TextBlock to emoji:EmojiedTextBlock for new library
• Updated column header from "UAH" to "Amount"

src/Financier.Desktop/Wizards/MonoWizard/Page2.xaml


78. src/Financier.Desktop/Pages/BlotterView.xaml Dependencies +2/-2

Update emoji library in BlotterView

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis
• Changed emoji:TextBlock to emoji:EmojiedTextBlock for new library

src/Financier.Desktop/Pages/BlotterView.xaml


79. src/Financier.Common/Assets/Generic.xaml Dependencies +5/-5

Update emoji library in Generic resources

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis
• Changed emoji:TextBlock to emoji:EmojiedTextBlock for new library

src/Financier.Common/Assets/Generic.xaml


80. src/Financier.Reports/Financier.Reports.csproj Dependencies +7/-6

Update Reports project configuration and emoji library

• Enabled centralized package version management
• Updated package references to use centralized versions
• Replaced Emoji.Wpf with iNKORE.UI.WPF.Emojis

src/Financier.Reports/Financier.Reports.csproj


81. src/Tests/Financier.Converter.Test/Financier.Common.Test.csproj Dependencies +6/-5

Update Common tests project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions

src/Tests/Financier.Converter.Test/Financier.Common.Test.csproj


82. src/Financier.Common/Financier.Common.csproj Dependencies +6/-5

Update Common project configuration and emoji library

• Enabled centralized package version management
• Updated package references to use centralized versions
• Replaced Emoji.Wpf with iNKORE.UI.WPF.Emojis

src/Financier.Common/Financier.Common.csproj


83. Financier.Desktop.slnx ⚙️ Configuration changes +18/-0

New solution file with project organization

• New solution file with organized project structure
• Includes solution items folder with .editorconfig and README.md
• Organizes test projects in separate folder

Financier.Desktop.slnx


84. src/Tests/Financier.Tests.Common/Financier.Tests.Common.csproj Dependencies +6/-5

Update Tests.Common project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions

src/Tests/Financier.Tests.Common/Financier.Tests.Common.csproj


85. src/Financier.Desktop/Pages/CategoriesView.xaml Dependencies +2/-2

Update emoji library in CategoriesView

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis
• Changed emoji:TextBlock to emoji:EmojiedTextBlock for new library

src/Financier.Desktop/Pages/CategoriesView.xaml


86. src/Financier.Desktop/Wizards/MonoWizard/Page3.xaml ✨ Enhancement +11/-1

Add New Rule button to Page3 wizard

• Added new "New Rule" button to create rules during transaction import
• Adjusted grid column definitions to accommodate new button
• Updated button column indices for existing buttons

src/Financier.Desktop/Wizards/MonoWizard/Page3.xaml


87. src/Financier.Desktop/Pages/Dialogs/TransactionControl.xaml Dependencies +2/-2

Update emoji library in TransactionControl

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis
• Changed emoji:TextBlock to emoji:EmojiedTextBlock for new library

src/Financier.Desktop/Pages/Dialogs/TransactionControl.xaml


88. src/Financier.Adapter/Financier.Adapter.csproj Dependencies +3/-2

Update Adapter project configuration

• Enabled centralized package version management
• Updated package references to use centralized versions

src/Financier.Adapter/Financier.Adapter.csproj


89. src/Financier.Common/Filters/CategoryFilter.xaml Dependencies +1/-1

Update emoji library in CategoryFilter

• Updated emoji namespace from Emoji.Wpf to iNKORE.UI.WPF.Emojis

src/Financier.Common/Filters/CategoryFilter.xaml


90. src/Financier.Desktop/App.xaml ✨ Enhancement +5/-1

Add toast notification theme resources to App

• Added merged resource dictionary for toast notification themes
• Includes default theme from ToastNotifications.Messages package

src/Financier.Desktop/App.xaml


91. src/Financier.Reports/ReportsControl.xaml ✨ Enhancement +3/-0

Add ReportStructureSaldo data template

• Added data template for ReportStructureSaldoVM view binding

src/Financier.Reports/ReportsControl.xaml


92. src/Financier.Desktop/Pages/Dialogs/LocationControl.xaml Formatting +1/-2

Remove background styling from LocationControl

• Removed background brush binding from GroupBox

src/Financier.Desktop/Pages/Dialogs/LocationControl.xaml


93. README.md 📝 Documentation +1/-1

Update .NET runtime version in README

• Updated .NET runtime download link from version 8.0 to 10.0

README.md


94. Financier.Desktop.sln Additional files +0/-93

...

Financier.Desktop.sln


95. src/Financier.Common/Converters/AccountTypeConverter.cs Additional files +0/-4

...

src/Financier.Common/Converters/AccountTypeConverter.cs


96. src/Financier.DataAccess/Utils/IgnoreAttribute.cs Additional files +0/-2

...

src/Financier.DataAccess/Utils/IgnoreAttribute.cs


97. src/Financier.Desktop/Pages/Dialogs/TransactionControlVM.cs Additional files +0/-1

...

src/Financier.Desktop/Pages/Dialogs/TransactionControlVM.cs


98. src/Financier.Reports/Dynamic/ReportDynamicRestVM.cs Additional files +0/-30

...

src/Financier.Reports/Dynamic/ReportDynamicRestVM.cs


<img src="https://www.q...

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 22, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Settings JSON can crash ✓ Resolved 🐞 Bug ☼ Reliability
Description
MainWindowVM deserializes ExchangeRatesSettings JSON without exception handling, so a corrupted
persisted settings value will crash the Settings and RefreshExchangeRates commands.
Code

src/Financier.Desktop/MainWindowVM.cs[R458-470]

Evidence
Both Settings and Refresh paths call JsonConvert.DeserializeObject directly on the persisted
string; there is no catch/fallback, so invalid JSON will throw and crash the command handler.

src/Financier.Desktop/MainWindowVM.cs[456-490]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`JsonConvert.DeserializeObject<SettingsDTO>(ExchangeRatesSettings)` is called without try/catch; invalid JSON in user settings will throw and break UI commands.

## Issue Context
`ExchangeRatesSettings` is persisted in `Settings.Default.ExchangeRatesSettings` and may become invalid after partial writes, manual edits, or future schema changes.

## Fix Focus Areas
- src/Financier.Desktop/MainWindowVM.cs[456-490]

## Proposed fix
- Wrap both deserializations in try/catch for `JsonException` / `JsonSerializationException`.
- On failure: fall back to a default `SettingsDTO`, optionally reset `ExchangeRatesSettings`, and show a warning to the user.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Nested namespace typo ✓ Resolved 🐞 Bug ≡ Correctness
Description
BlotterTransactionsForAccountWithSplits.cs declares namespace Financier.DataAccess.View twice,
changing the class’ fully-qualified name and forcing a compensating (incorrect) nested using in
the DbContext.
Code

src/Financier.DataAccess/View/BlotterTransactionsForAccountWithSplits.cs[R1-4]

Evidence
The view type is currently declared under a nested duplicate namespace, and the DbContext contains
an unusual nested using to reference it, proving the namespace change is affecting consumers.

src/Financier.DataAccess/View/BlotterTransactionsForAccountWithSplits.cs[1-8]
src/Financier.DataAccess/FinancierDataContext.cs[1-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`BlotterTransactionsForAccountWithSplits` is wrapped in a duplicated nested namespace (`Financier.DataAccess.View` inside `Financier.DataAccess.View`), which changes its fully-qualified name and leaks into consumers.

## Issue Context
`FinancierDataContext` now imports `using Financier.DataAccess.View.Financier.DataAccess.View;` to compile, indicating the type ended up in the nested namespace.

## Fix Focus Areas
- src/Financier.DataAccess/View/BlotterTransactionsForAccountWithSplits.cs[1-8]
- src/Financier.DataAccess/FinancierDataContext.cs[1-5]

## Proposed fix
- Remove the inner `namespace Financier.DataAccess.View` block so the class is in `Financier.DataAccess.View`.
- Remove the compensating nested `using` from `FinancierDataContext.cs` afterwards.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. PKO parser can crash ✓ Resolved 🐞 Bug ☼ Reliability
Description
PKOHelper.ParseReport uses IndexOf/Substring and regex match indexing without validating
results, so PDFs with missing/shifted headers or unexpected number formats can throw and crash the
import flow.
Code

src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs[R69-105]

Evidence
The code uses Substring(startTextIndex + 26) without checking for IndexOf failure and indexes
decimalMatches without ensuring the regex found enough values, both of which will throw at
runtime.

src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs[67-105]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PKO PDF parser assumes specific markers and numeric patterns always exist:
- `startTextIndex` may be `-1`, but is used to compute a `Substring` start.
- `decimalMatches[0]`/`decimalMatches[1]` are indexed without ensuring at least 2 matches.

## Issue Context
This code runs on user-provided PDFs; minor template changes or extraction differences can easily violate these assumptions.

## Fix Focus Areas
- src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs[67-105]

## Proposed fix
- If `startTextIndex < 0`, skip the page (and optionally log/notify).
- Check `decimalMatches.Count >= 2` before indexing; otherwise skip the row block.
- Consider wrapping per-transaction parsing in try/catch so one malformed row doesn’t abort the whole import.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (2)
4. Missing rate key checks ✓ Resolved 🐞 Bug ☼ Reliability
Description
ExchangeRateLoader.LoadOpenExchangeRates reads rates via FirstOrDefault(...).Value without
verifying the currency key exists, so missing keys yield 0 and can trigger division-by-zero (and
unchecked nulls can crash) during rate computation.
Code

src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[R81-89]

Evidence
The code dereferences .Value from a FirstOrDefault() lookup and immediately divides by it, with
no checks for missing keys or zero values.

src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[68-98]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LoadOpenExchangeRates()` uses `exchangeRates.rates.FirstOrDefault(...).Value` and then divides by it. If a currency code is not present in the dictionary, the default value is `0`, causing division-by-zero and/or incorrect rates.

## Issue Context
The method iterates over currency pairs derived from the DB (`GetRatesPairsAsync()`), so any mismatch between DB currency codes and API response keys can crash the refresh.

## Fix Focus Areas
- src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[68-99]

## Proposed fix
- Validate `exchangeRates` and `exchangeRates.rates` are non-null before use.
- Use `TryGetValue(fromCurrency.Name, out var fromRate)` / `TryGetValue(toCurrency.Name, out var toRate)`.
- Skip/log pairs where either rate is missing or `fromRate == 0` (avoid division-by-zero).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. UpdatedOn uses seconds ✓ Resolved 🐞 Bug ≡ Correctness
Description
ExchangeRateLoader.LoadFreeCurrencyRates writes CurrencyExchangeRate.UpdatedOn in Unix seconds, but
the rest of the codebase (and tests) use Unix milliseconds, making newly saved rates ~1000x older
and breaking timestamp-based logic.
Code

src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[R43-50]

Evidence
The PR sets UpdatedOn to Unix seconds for freecurrency rates, but repository code and tests use
milliseconds, creating an inconsistent time unit that will skew ordering/comparisons.

src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[25-50]
src/Financier.DataAccess/FinancierDatabase.cs[219-227]
src/Tests/Financier.Tests.Common/PredefinedData.cs[31-48]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`ExchangeRateLoader.LoadFreeCurrencyRates()` stores `CurrencyExchangeRate.UpdatedOn` using Unix *seconds*, while the rest of the codebase uses Unix *milliseconds*.

## Issue Context
`FinancierDatabase.InsertOrUpdateAsync()` sets `UpdatedOn` using `ToUnixTimeMilliseconds()`, and test fixtures also use millisecond timestamps.

## Fix Focus Areas
- src/Financier.Desktop/Helpers/ExchangeRateLoader.cs[43-50]
- src/Financier.DataAccess/FinancierDatabase.cs[219-227]

## Proposed fix
Change `ToUnixTimeSeconds()` to `ToUnixTimeMilliseconds()` when populating `CurrencyExchangeRate.UpdatedOn` in `LoadFreeCurrencyRates()`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

6. API key stored plaintext ✓ Resolved 🐞 Bug ⛨ Security
Description
The OpenExchangeRates app id is persisted as plain JSON inside a UserScopedSetting, exposing it to
any process/user that can read the user settings file.
Code

src/Financier.Desktop/MainWindowVM.cs[R477-480]

Evidence
The code serializes the settings DTO (which includes OpenExchangeRatesProviderAppId) and saves it
to Settings.Default.ExchangeRatesSettings, a user-scoped string setting, meaning the key is stored
in plaintext in the user settings store.

src/Financier.Desktop/MainWindowVM.cs[456-481]
src/Financier.Desktop/Properties/Settings.Designer.cs[18-27]
src/Financier.Desktop/Data/SettingsDTO.cs[5-47]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The OpenExchangeRates app id is stored inside `Settings.Default.ExchangeRatesSettings` as plain JSON, which is written to the user settings store unencrypted.

## Issue Context
`ExchangeRatesSettings` is a `[UserScopedSetting]` string and is populated by `JsonConvert.SerializeObject(updated)`.

## Fix Focus Areas
- src/Financier.Desktop/MainWindowVM.cs[475-481]
- src/Financier.Desktop/Properties/Settings.Designer.cs[18-27]

## Proposed fix
- Store the app id separately from the JSON in an encrypted form (e.g., DPAPI `ProtectedData` on Windows), or use OS credential storage.
- If keeping JSON, encrypt/decrypt the sensitive field before serialize/after deserialize so it is not written in plaintext.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread src/Financier.Desktop/Helpers/ExchangeRateLoader.cs
Comment thread src/Financier.Desktop/Helpers/ExchangeRateLoader.cs Outdated
Comment thread src/Financier.Desktop/Helpers/BankHelper/PKOHelper.cs
Comment thread src/Financier.Desktop/MainWindowVM.cs
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