Skip to content

refactor(actions): dedup goto_file variants#53

Merged
dlyongemallo merged 1 commit intomainfrom
dedup_goto_file
Mar 27, 2026
Merged

refactor(actions): dedup goto_file variants#53
dlyongemallo merged 1 commit intomainfrom
dedup_goto_file

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 11:03
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

This PR refactors diffview.actions to deduplicate the goto_file* action implementations by routing them through a shared helper, and adds functional tests to validate the exported API and command routing behavior.

Changes:

  • Introduce a local open_goto_file(opts) helper in lua/diffview/actions.lua and reimplement goto_file, goto_file_edit, goto_file_split, and goto_file_tab via that helper.
  • Add new functional specs covering the goto_file* exports, expected error behavior without an active view, and command routing behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lua/diffview/actions.lua Refactors goto_file* actions to share a single implementation helper.
lua/diffview/tests/functional/actions_spec.lua Adds functional tests for goto_file* API surface and routing behavior.

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

Comment thread lua/diffview/tests/functional/actions_spec.lua Outdated
@dlyongemallo dlyongemallo merged commit 6140a91 into main Mar 27, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the dedup_goto_file branch April 8, 2026 01:31
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