Repository navigation
feat(view): add skeleton DiffviewWorktreeOverview to show git worktrees - #341
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Bare repositories, duplicate overview tabs, command failures, and the documented selection action are not handled correctly.
5 open findings
Support standalone bare repositories in overview initialization · New Use unique buffer names for multiple overview tabs · New Preserve worktree query failures instead of showing an empty state · New Implement or remove the nonfunctional <CR> DiffView mapping · New Check normalized lhs when detecting the <CR> mapping · New
What changed in this PR
Adds the initial Git worktree overview view and command.
Changes:
- Registers
:DiffviewWorktreeOverviewwith configurable actions. - Renders linked worktrees in a dedicated tab.
- Adds documentation and functional coverage.
| File | Description |
|---|---|
plugin/diffview.lua |
Registers the command. |
lua/diffview/init.lua |
Resolves repositories and opens the view. |
lua/diffview/config.lua |
Adds default keymaps. |
lua/diffview/actions.lua |
Adds the selection action. |
lua/diffview/scene/views/worktree_overview/worktree_overview_view.lua |
Implements the overview UI. |
lua/diffview/tests/functional/worktree_overview_view_spec.lua |
Tests rendering and keymaps. |
doc/diffview.txt |
Documents the command. |
doc/diffview_defaults.txt |
Documents default keymaps. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Comment on lines
+214
to
+221
| for _, entry in ipairs(entries) do | ||
| if not entry.is_bare then | ||
| local err, adapter = git.GitAdapter.create(entry.path, {}, nil) | ||
| if not err then | ||
| return adapter | ||
| end | ||
| end | ||
| end |
| utils.info("No worktree on this line.") | ||
| return | ||
| end | ||
| utils.info(("Selected worktree: %s"):format(entry.path)) |
dlyongemallo
force-pushed
the
worktree_overview_skeleton
branch
from
October 9, 2026 13:51
ca728d1 to
ada0960
Compare
Comment on lines
+233
to
+235
| local adapter = M.get_adapter() | ||
| local cwd_path = adapter and adapter.ctx and adapter.ctx.toplevel or nil | ||
| adapter = adapter or resolve_bare_overview_adapter() |
dlyongemallo
force-pushed
the
worktree_overview_skeleton
branch
from
October 9, 2026 14:09
ada0960 to
8ed4b57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Part of #334.