Feature: Profile Import CSV#3502
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
Pull request overview
This PR implements importing network profiles from a CSV file (closing #3492). It cleanly mirrors the existing Active Directory import architecture: a new import source is added to the method picker, a source-specific dialog parses the file into ProfileImportCandidates, and those candidates flow into the shared ImportProfilesResultViewModel for review, duplicate detection, and final import. The implementation reuses established patterns (child-window sizing, drag-and-drop, validators, RelayCommand, settings persistence, and localized resources), so it integrates consistently with the existing profile-import subsystem.
Changes:
- Adds
CsvProfileImportParser(delimiter auto-detection, optional header, quoted-field handling, SHA-256 based duplicate key) plus theProfileImportSource.Csvenum value. - Adds the
ImportCsvFileViewModel/ImportCsvFileChildWindowdialog and wires it intoProfileDialogManagerandImportProfilesViewModel, with a newProfiles_ImportCsvLastFilePathsetting andCsvFileExtensionFilter. - Adds localized strings/designer entries plus documentation and changelog updates.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Source/NETworkManager.Profiles/CsvProfileImportParser.cs | New CSV parser producing import candidates; minor doc-comment/behavior mismatch in delimiter detection. |
| Source/NETworkManager.Profiles/ProfileImportSource.cs | Adds Csv enum value. |
| Source/NETworkManager/ViewModels/ImportCsvFileViewModel.cs | New view model handling browse, drag/drop, parse, status, and path persistence. |
| Source/NETworkManager/ViewModels/ImportProfilesViewModel.cs | Adds CSV as a selectable import method. |
| Source/NETworkManager/ProfileDialogManager.cs | Adds ShowImportCsvFileDialog and routes the CSV source to the shared result dialog. |
| Source/NETworkManager/Views/ImportCsvFileChildWindow.xaml(.cs) | New child window with file-path validation, help tooltip, and drag/drop. |
| Source/NETworkManager.Settings/SettingsInfo.cs | Adds Profiles_ImportCsvLastFilePath setting. |
| Source/NETworkManager.Settings/GlobalStaticConfiguration.cs | Adds CsvFileExtensionFilter. |
| Source/NETworkManager.Localization/Resources/Strings.resx + .Designer.cs | Adds CSV import labels, hints, and status strings. |
| Source/NETworkManager.Localization/Resources/StaticStrings.resx + .Designer.cs | Adds example CSV file-path watermark. |
| Website/docs/groups-and-profiles.md | Documents the CSV import source and format. |
| Website/docs/changelog/next-release.md | Adds changelog entry for CSV import. |
Files not reviewed (2)
- Source/NETworkManager.Localization/Resources/StaticStrings.Designer.cs: Generated file
- Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Changes proposed in this pull request
Related issue(s)
Copilot generated summary
Provide a Copilot generated summary of the changes in this pull request.
Copilot summary
This pull request adds support for importing profiles from CSV files. It introduces a new CSV import source, a parser for CSV files, new UI components for the import process, and localized strings and settings to support the feature.
CSV Import Feature:
ProfileImportSource.Csvenum value to represent CSV as an import source.CsvProfileImportParserto parse CSV files intoProfileImportCandidateobjects, supporting auto-detection of delimiters and optional headers.ImportCsvFileViewModeland integrated a new dialog flow (ShowImportCsvFileDialog) for importing profiles from CSV files in the UI. [1] [2] [3]GlobalStaticConfiguration.ImportProfilesViewModelto include CSV as an available import method.Localization and Settings:
.resxand designer files. [1] [2] [3] [4]Profiles_ImportCsvLastFilePath, to remember the last used CSV file path.To-Do
Contributing
By submitting this pull request, I confirm the following: