Skip to content

feat(file-panel): add multi-file selection for batch stage/unstage/restore#36

Merged
dlyongemallo merged 1 commit intomainfrom
add_multifile_selection
Mar 12, 2026
Merged

feat(file-panel): add multi-file selection for batch stage/unstage/restore#36
dlyongemallo merged 1 commit intomainfrom
add_multifile_selection

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:39
Copy link
Copy Markdown

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

Adds multi-file selection support to Diffview’s FilePanel, enabling batch stage/unstage and restore operations from the panel UI.

Changes:

  • Introduces selection state and APIs on FilePanel (toggle_selection, is_selected, get_selected_files, clear_selections) plus functional tests for this behavior.
  • Renders a visual marker for selected files in the file panel and adds a highlight group link for it.
  • Adds a default keybinding (w) to toggle selection and updates staging/restoring listeners to operate on selected files when present.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lua/diffview/tests/functional/panel_spec.lua Adds functional coverage for FilePanel selection APIs.
lua/diffview/scene/views/diff/render.lua Displays a marker for selected files during file panel rendering.
lua/diffview/scene/views/diff/listeners.lua Implements multi-select toggle action and batch stage/restore behavior when selections exist.
lua/diffview/scene/views/diff/file_panel.lua Adds selection state tracking and exposes selection-related methods.
lua/diffview/hl.lua Adds highlight link for the “marked/selected” indicator.
lua/diffview/config.lua Adds default keymap (w) for toggling selection in the file panel.
lua/diffview/actions.lua Exposes toggle_select_entry as an action name.
doc/diffview_defaults.txt Documents the new default keymap.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo force-pushed the add_multifile_selection branch from 03e466d to 3c15343 Compare March 12, 2026 10:17
@dlyongemallo dlyongemallo merged commit 1ac4c7f into main Mar 12, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the add_multifile_selection branch March 12, 2026 10:18
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