Skip to content

Feature: Hosts File Editor bulk edit comments, enable/disable, and delete entries - #3624

Open
omrzgit wants to merge 1 commit into
BornToBeRoot:mainfrom
omrzgit:feature/hosts-file-editor-bulk-operations
Open

omrzgit wants to merge 1 commit into
BornToBeRoot:mainfrom
omrzgit:feature/hosts-file-editor-bulk-operations

Conversation

@omrzgit

@omrzgit omrzgit commented Oct 15, 2026 •

Copy link
Copy Markdown

Changes proposed in this pull request

  • Added bulk enable/disable, bulk delete, and bulk comment editing to the Hosts File Editor when multiple rows are selected
  • Implemented atomic batch operations in HostsFileEditor.cs (EnableEntriesAsync, DisableEntriesAsync, EditCommentAsync, DeleteEntriesAsync) with single backup and single write
  • Added HostsFileEditorCommentChildWindow and HostsFileEditorCommentViewModel for comment editing
  • Added Enable, Disable, Edit comment..., and Delete menu items to MultiRowContextMenu in HostsFileEditorView.xaml
  • Supported keyboard shortcuts: Delete key for multi-item deletion (with confirmation modal) and F2 key for multi-item comment editing

Summary

This PR enables bulk management of entries in the Hosts File Editor. Previously, when multiple items were selected in the DataGrid, only the "Export..." option was available. Now users can enable, disable, edit comments, or delete multiple hosts entries simultaneously in a single atomic file operation.

Contributing

By submitting this pull request, I confirm the following:

@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

🟡 Changes recommended

Batch updates and deletions can silently commit partial changes and report success when selected entries are missing.

2 open issues
1 file not reviewed
  • Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Generated file
What changed in this PR

Adds bulk entry management to NETworkManager’s Hosts File Editor.

Changes:

  • Adds batch enable, disable, comment editing, and deletion with one backup and write per batch.
  • Connects multi-selection commands, keyboard actions, and confirmation dialogs.
  • Adds a comment editor and localized labels.
File Description
Source/​NETworkManager/​Views/​HostsFileEditorView.xaml Adds bulk context-menu actions.
Source/​NETworkManager/​Views/​HostsFileEditorCommentChildWindow.xaml.cs Focuses the comment input.
Source/​NETworkManager/​Views/​HostsFileEditorCommentChildWindow.xaml Defines the comment dialog.
Source/​NETworkManager/​ViewModels/​HostsFileEditorViewModel.cs Handles multi-selection operations and dialogs.
Source/​NETworkManager/​ViewModels/​HostsFileEditorCommentViewModel.cs Manages comment input and commands.
Source/​NETworkManager.Models/​HostsFileEditor/​HostsFileEditor.cs Implements batch file operations.
Source/​NETworkManager.Localization/​Resources/​Strings.resx Adds labels and deletion confirmation text.
Source/​NETworkManager.Localization/​Resources/​Strings.Designer.cs Exposes the new localized strings.

Review effort: Balanced

}

if (!entryFound)
if (!anyModified && entriesList.Count > 0)
}

if (!entryFound)
if (!anyDeleted && entriesList.Count > 0)

This branch has not been deployed

No deployments
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