Skip to content

Refactor application settings and enhance service functionalities#158

Open
efargas wants to merge 29 commits intorefactorUIfrom
test-payload-compilation
Open

Refactor application settings and enhance service functionalities#158
efargas wants to merge 29 commits intorefactorUIfrom
test-payload-compilation

Conversation

@efargas
Copy link
Copy Markdown
Owner

@efargas efargas commented Mar 23, 2026

This pull request introduces several improvements and refactorings across the codebase, focusing on interface organization, memory region profile path consistency, and enhancements for payload management and settings. The most significant changes include a large-scale reorganization of service interfaces, updates to memory region naming conventions for consistency and backward compatibility, and improvements to user settings management.

Interface and Service Refactoring:

  • Moved all service interfaces from src/S7Tools.Core/Services/Interfaces/ to src/S7Tools.Core/Interfaces/Services/ and updated namespaces accordingly for consistency and clarity. This includes interfaces such as IBootloaderService, ICentralizedTaskLogService, IJobManager, IJobScheduler, IMemoryRegionProfileService, IMemorySegmentValidator, IPathService, IPayloadProvider, and IPlcClient. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Memory Region Profile Path and Naming Consistency:

  • Standardized the folder and file naming for memory region profiles from MemoryRegions to MemoryRegion in both code and file paths, while introducing a LegacyMemoryRegionsFolder constant for backward compatibility. [1] [2]
  • Removed the unused MemoryRegionsDirectory property from the IPathService interface.

Settings and Configuration Enhancements:

  • Refactored the IApplicationSettingsService interface to provide a strongly-typed AppSettings property, simplified the API, and added methods for importing/exporting settings as JSON. The SettingsChangedEventArgs class was also simplified. [1] [2] [3]

Payload and File Handling Improvements:

  • Added a .gitattributes entry to treat .bin files as binary, and introduced a README.md in the payloads_out directory describing the available compiled payloads and their usage. [1] [2]
  • Improved file enumeration in FileTreeItemViewModel.cs to use EnumerateFiles for .bin and .dmp files, optimizing directory traversal and file filtering. [1] [2]

Bootloader Payload Communication:

  • Enhanced UART protocol code to allow cancellation of data transmission by detecting a specific signal (0x03) from the host, and added supporting functions for checking and reading UART data. [1] [2] [3]

These changes collectively improve maintainability, user experience, and reliability across the project.

efargas and others added 24 commits March 19, 2026 18:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…mplement LoadSettingsAsync config reload

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/54ab14c5-4797-4276-a148-c99cc0b4ca79
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fix: synchronize settings writes and implement real config reload
fix: update tests to compile against strongly-typed settings API
….gitattributes, settings root fix

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/5a16c1ca-5572-438c-852f-43adf470cd92
…t key casing, delay caching, tests

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/7129b323-9bf3-47a1-9abf-30845587aa92
Apply PR review feedback: async settings write, config root fix, UI thread safety, configurable dump delays, general settings UI, binary gitattributes
…o `Dialogs/UnifiedProfileDialogService` and remove obsolete dialog, bootloader, and view model factory services.
…IBootloaderService and standardize memory region path handling.
…, logging, and dialog management across services and viewmodels.
…n path, add legacy constant, remove ISupportExternalScope

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/1d734e19-4a3b-43de-94f6-8315f58f72ab
fix: MemoryRegion path alignment, debounced settings saves, ISupportExternalScope cleanup
Copilot AI review requested due to automatic review settings March 23, 2026 15:23
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

This comment was marked as outdated.

@efargas
Copy link
Copy Markdown
Owner Author

efargas commented Mar 23, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

@efargas I've opened a new pull request, #159, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits March 23, 2026 15:36
…leanup on disconnect

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/44d9dd1e-b8a2-45d1-91e1-0ed96cb90f91
…move unused Plc.Adapters duplicate

Co-authored-by: efargas <9705611+efargas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/efargas/S7-Tools/sessions/6b3076ee-61ea-4021-90c9-d79753c8857c
Fix PlcTransportAdapter: unreliable reconnect guard and leaked stream on disconnect
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.

3 participants