Skip to content

Improve action validation system - #180

Merged
paul-fresquet merged 14 commits into
masterfrom
feature/improve-action-validation-system
Aug 17, 2025
Merged

Improve action validation system#180
paul-fresquet merged 14 commits into
masterfrom
feature/improve-action-validation-system

Conversation

@paul-fresquet

@paul-fresquet paul-fresquet commented Aug 17, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive framework for validating atomic actions in the synchronization process, including new enums and result classes, and updates to resource files for localization. The main focus is on improving how validation failures are tracked, categorized, and displayed to users, with support for both English and French.

Validation Framework Enhancements

  • Added the AtomicActionValidationFailureReason enum to categorize all possible validation failure reasons for atomic actions, making validation logic more structured and maintainable (AtomicActionValidationFailureReason.cs).
  • Introduced the AtomicActionValidationResult class to encapsulate the result of a validation check, including whether it passed and the specific failure reason if it did not (AtomicActionValidationResult.cs).
  • Refactored AtomicActionConsistencyCheckCanAddResult to use a list of ComparisonItemValidationResult objects, replacing the previous valid/invalid sets, and added methods to retrieve valid and invalid items and validation results. This change enables more granular tracking and reporting of validation outcomes (AtomicActionConsistencyCheckCanAddResult.cs).

Localization and UI Improvements

  • Updated English and French resource files (Resources.resx, Resources.fr.resx) to include new localized strings for all validation failure reasons, UI messages about action issues, and item pluralization. This ensures users receive clear feedback about validation failures in their preferred language. [1] [2]
  • Added corresponding property accessors in the auto-generated designer file (Resources.Designer.cs) for each new string resource, allowing code to easily retrieve localized messages for display in the UI.

@sonarqubecloud

Copy link
Copy Markdown

@paul-fresquet
paul-fresquet requested a review from Copilot August 17, 2025 20:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a comprehensive framework for validating atomic actions in the synchronization process. The main goal is to improve how validation failures are tracked, categorized, and displayed to users with proper localization support for both English and French.

  • Validation Framework: Adds enums and result classes to systematically categorize and report atomic action validation failures
  • Enhanced UI: Updates the targeted action dialog to show detailed validation failure information with tooltips
  • Localization: Adds comprehensive localized strings for all validation failure reasons in English and French

Reviewed Changes

Copilot reviewed 70 out of 72 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
AtomicActionValidationFailureReason.cs Introduces enum with 48 categorized validation failure reasons
AtomicActionValidationResult.cs Encapsulates validation results with success/failure states
AtomicActionConsistencyChecker.cs Refactored to return detailed validation results instead of boolean checks
TargetedActionGlobalViewModel.cs Enhanced to display detailed validation failures with localized messages
TargetedActionGlobalView.axaml Updated UI to show validation failure summaries with tooltips
Resources.resx/Resources.fr.resx Added 100+ localized strings for validation messages
Test files Comprehensive test coverage for new validation components
Files not reviewed (1)
  • src/ByteSync.Client/Assets/Resources/Resources.Designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@paul-fresquet
paul-fresquet merged commit d603170 into master Aug 17, 2025
24 checks passed
@paul-fresquet
paul-fresquet deleted the feature/improve-action-validation-system branch August 17, 2025 20:44
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