Skip to content

feat(view): add skeleton DiffviewWorktreeOverview to show git worktrees - #341

Merged
dlyongemallo merged 1 commit into
mainfrom
worktree_overview_skeleton
Oct 9, 2026
Merged

dlyongemallo merged 1 commit into
mainfrom
worktree_overview_skeleton

Conversation

@dlyongemallo

@dlyongemallo dlyongemallo commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Part of #334.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Bare repositories, duplicate overview tabs, command failures, and the documented selection action are not handled correctly.

5 open findings
What changed in this PR

Adds the initial Git worktree overview view and command.

Changes:

  • Registers :DiffviewWorktreeOverview with 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 thread lua/diffview/init.lua
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
Comment thread lua/diffview/scene/views/worktree_overview/worktree_overview_view.lua Outdated
Comment thread lua/diffview/scene/views/worktree_overview/worktree_overview_view.lua Outdated
utils.info("No worktree on this line.")
return
end
utils.info(("Selected worktree: %s"):format(entry.path))
Comment thread lua/diffview/tests/functional/worktree_overview_view_spec.lua Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Selection is not implemented, and repository detection fails for bare-only and preferred-Jujutsu Git repositories.

3 open findings
3 resolved since last review

🧠 Review effort: Balanced

Comment thread lua/diffview/init.lua Outdated
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
dlyongemallo force-pushed the worktree_overview_skeleton branch from ada0960 to 8ed4b57 Compare October 9, 2026 14:09
@dlyongemallo
dlyongemallo merged commit e269921 into main Oct 9, 2026
15 of 16 checks passed
@dlyongemallo
dlyongemallo deleted the worktree_overview_skeleton branch October 9, 2026 14:39
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