Skip to content

Conversation

@EnesEfeTokta
Copy link
Owner

This pull request introduces significant changes to the project, primarily focused on renaming the namespace from FinTrack to FinTrackForWindows and adding new DTOs for accounts, budgets, and chats. These updates aim to align the codebase with a more platform-specific naming convention and enhance data transfer capabilities.

Namespace Renaming:

  • Updated the namespace throughout the project from FinTrack to FinTrackForWindows, affecting multiple files, including App.xaml, App.xaml.cs, and core classes like ISecureTokenStorage, SessionManager, and TokenValidator. [1] [2] [3] [4] [5]

Core Enhancements:

  • Added FirstName and LastName properties to NewUserInformationManager for better user data management.

DTO Additions:

  • Introduced new DTOs for accounts, including AccountCreateDto, AccountDto, AccountResponseDto, and AccountUpdateDto, to standardize data structures for account-related operations. [1] [2] [3] [4]
  • Added budget-related DTOs, such as BudgetCreateDto, BudgetDto, BudgetCategoryCreateDto, BudgetCategoryDto, and their update counterparts, to facilitate budget management. [1] [2] [3] [4] [5] [6]
  • Created ChatRequestDto to handle chat-related requests.

These changes provide a clearer structure and improve the maintainability and scalability of the codebase.

Changed the license badge from MIT to GPL, updated the repository clone URL, and removed most emojis for a cleaner look. Also made minor formatting improvements for consistency.
Renamed BudgetDashboard to BudgetDashboardModel and updated all references accordingly. Introduced IBudgetService interface and BudgetService class for budget-related operations. Updated DebtStatus enum to DebtStatusType with revised statuses. Added warning icon resource to project.
All namespaces throughout the project have been updated from 'FinTrack' to 'FinTrackForWindows' to reflect the new project identity. Project and solution files have also been renamed accordingly. Entity Framework migration files were removed, likely to reset or reinitialize the database context for the new namespace.
Changed the namespace from FinTrack to FinTrackForWindows in App.xaml.cs to reflect the application's platform-specific implementation.
Updated debt status references from DebtStatus to DebtStatusType for consistency and clarity. Changed namespaces from FinTrack to FinTrackForWindows across models, viewmodels, and views. Adjusted XAML model namespace import to match new structure.
Replaces the single full name field with separate first and last name fields throughout registration flow, including DTOs, view models, service interfaces, and UI. Updates API endpoints and package versions in the project file. Improves user data handling and aligns with backend requirements.
Corrected 'FistName' to 'FirstName' in RegisterRequestDto and updated all references. Improved full name formatting in RegisterViewModel by removing spaces. Added a new command in OtpVerificationViewModel to handle navigation and logging when returning to the registration page.
Introduces DTO classes for accounts, budgets, and transactions to support API integration. Refactors BudgetModel and related view models to use new DTOs, improves API service with enum serialization and list fetching, and updates UI bindings for budget management. Adds password validation to registration and improves dashboard data loading from API.
Refactored AccountViewModel, TransactionsViewModel, and FinBotViewModel to use IApiService for CRUD operations, replacing sample data with API calls. Added ChatRequestDto and ChatResponseDto for chat functionality. Updated AccountCreateDto and AccountUpdateDto to include new properties and use enums. Modified AccountModel and TransactionModel to use integer IDs. Improved quick actions and chat handling in FinBotViewModel.
…e property

Replaces CurrentBalance and TargetBalance with a single Balance property in AccountModel and updates related view models and views accordingly. Removes progress bar and target balance UI elements, simplifies balance display logic, and introduces AccountResponseDto for API responses. Also improves logging for currency parsing and centers header text in ApplicationRecognizeSlideView.
…ccount model

Added LiveCharts-based statistics chart to AccountView, including a new BrushToLvcPaintConverter helper. Refactored AccountModel to use BaseCurrencyType and made balance nullable. Removed Balance from AccountCreateDto and AccountUpdateDto. Enhanced AccountViewModel to support chart data, currency/account type selection, and improved transaction history loading. Updated AccountType enum with descriptions and added ScottPlot.WPF package.
@EnesEfeTokta EnesEfeTokta requested a review from Copilot July 25, 2025 13:02
@EnesEfeTokta EnesEfeTokta self-assigned this Jul 25, 2025
@EnesEfeTokta EnesEfeTokta added the enhancement New feature or request label Jul 25, 2025
Removed unnecessary using directives and fixed minor formatting issues across multiple ViewModel and service files. These changes improve code readability and maintain consistency without affecting functionality.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements a comprehensive namespace change from FinTrack to FinTrackForWindows across the entire codebase and introduces significant new functionality with DTOs for API integration. The changes aim to align the codebase with a more platform-specific naming convention and enhance data transfer capabilities between the client and server.

  • Namespace refactoring from FinTrack to FinTrackForWindows across all files
  • Addition of comprehensive DTO classes for accounts, budgets, transactions, and chat functionality
  • Enhanced user registration flow with separate first name and last name fields
  • Updated API service configuration and endpoints

Reviewed Changes

Copilot reviewed 159 out of 160 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Updated project title, license change from MIT to GPL, and repository URL correction
Views/.xaml and Views/.xaml.cs Namespace updates and UI improvements including registration form changes
ViewModels/*.cs Namespace updates and integration with new API services and DTOs
Models/*.cs Namespace updates and model structure improvements
Dtos/*.cs New DTO classes for API communication (accounts, budgets, transactions, chat)
Services/*.cs Updated API service endpoints and authentication flow
Core/*.cs Namespace updates and addition of FirstName/LastName properties
FinTrackForWindows.csproj Package version updates and project file renaming
Files not reviewed (1)
  • FinTrack/Migrations/20250626151252_InitialCreate.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)

README.md:110

  • The repository URL should reflect the new project name 'FinTrackForWindows' to be consistent with the namespace changes throughout the project.
    git clone https://github.com/EnesEfeTokta/FinTrack.git

FinTrack/ViewModels/BudgetViewModel.cs:104

  • The variable 'selectedBudget' should use Pascal case 'SelectedBudget' to match C# naming conventions and be consistent with the property name.
                    await _apiService.PutAsync<BudgetModel>($"Budgets/{selectedBudget.Id}", budgetDto);

NewUserInformationManager.FullName = FullName_RegisterView_TextBox;
NewUserInformationManager.FirstName = FirstName_RegisterView_TextBox;
NewUserInformationManager.LastName = LastName_RegisterView_TextBox;
NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Replace(" ", "").Trim() + "_" + LastName_RegisterView_TextBox.Replace(" ", "").Trim();
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The FullName generation logic removes spaces and joins with underscore, which may not be the intended format for a full name. Consider using a space separator or documenting this specific formatting requirement.

Suggested change
NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Replace(" ", "").Trim() + "_" + LastName_RegisterView_TextBox.Replace(" ", "").Trim();
NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Trim() + " " + LastName_RegisterView_TextBox.Trim();

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +83
if (string.IsNullOrEmpty(NewUserInformationManager.FirstName) ||
string.IsNullOrEmpty(NewUserInformationManager.LastName) ||
string.IsNullOrEmpty(NewUserInformationManager.Email) ||
string.IsNullOrEmpty(NewUserInformationManager.Password))
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition logic is inverted. The code should execute the registration when fields are NOT null/empty, but the condition checks if they ARE null/empty and then proceeds with registration.

Suggested change
if (string.IsNullOrEmpty(NewUserInformationManager.FirstName) ||
string.IsNullOrEmpty(NewUserInformationManager.LastName) ||
string.IsNullOrEmpty(NewUserInformationManager.Email) ||
string.IsNullOrEmpty(NewUserInformationManager.Password))
if (!string.IsNullOrEmpty(NewUserInformationManager.FirstName) &&
!string.IsNullOrEmpty(NewUserInformationManager.LastName) &&
!string.IsNullOrEmpty(NewUserInformationManager.Email) &&
!string.IsNullOrEmpty(NewUserInformationManager.Password))

Copilot uses AI. Check for mistakes.
var response = await _httpClient.GetAsync(endpoint);
response.EnsureSuccessStatusCode();

var strean = await response.Content.ReadAsStreamAsync();
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code reads from the response stream on line 95 but then calls GetFromJsonAsync which will try to read the already consumed stream, potentially causing issues. Either use the stream approach or the GetFromJsonAsync approach, not both.

Suggested change
var strean = await response.Content.ReadAsStreamAsync();

Copilot uses AI. Check for mistakes.
Comment on lines 168 to 170
var jsonPayload = JsonSerializer.Serialize(data);
var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json");

Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code creates a JSON payload on lines 168-169 but then doesn't use it, instead using PostAsJsonAsync directly with the data object. The manual JSON serialization should be removed.

Suggested change
var jsonPayload = JsonSerializer.Serialize(data);
var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json");

Copilot uses AI. Check for mistakes.
Replaced 'selectedBudget' with 'SelectedBudget' to match the correct property casing in API update and logging statements within BudgetViewModel.
Introduces new DTOs for currency data transfer, removes ScottPlot.WPF dependency, and updates CurrencyModel to include an Id. Refactors CurrenciesViewModel to fetch live currency data from the API instead of using sample data, and updates the currencies list UI for better virtualization. Also translates static text in AccountViewModel from Turkish to English.
…ViewModel

Moved the FinTrackForWindows.Enums using directive to the top for consistency and removed an unnecessary duplicate. Also fixed minor whitespace formatting in object initialization.
@EnesEfeTokta EnesEfeTokta merged commit 5623850 into main Jul 26, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants