scope a picker-agnostic master workflow for :Forge #79
Labels
No labels
bug
documentation
duplicate
enhancement
fugitive
good first issue
help wanted
invalid
question
v0.1.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/forge.nvim#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
Issue #59 captured the rough idea of a "master picker", but the current top-level workflow is still pretty thin and hard to reason about.
Today
:Forgeis mostly a route launcher:routes.luabuilds the root sections (prs,issues,ci,branches,commits,worktrees,browse,releases)vim.g.forge.routespickers.luaThat works, but it does not make the overall workflow obvious from the top:
branches,commits,worktrees) are useful but visually lighter than PR/issue/CI pickersI’d like a scoped pass that defines what the “master workflow” should be and whether it should stay backend-driven or become something more first-party.
Current state
Root workflow
require('forge').open()->routes.open()->open_root().The root menu is section-based and currently only renders plain labels. It uses the
clientabstraction, but only for the root menu; nested pickers go straight throughforge.picker.Default route map:
prs->prs.openissues->issues.openci->ci.current_branchbrowse->browse.contextualreleases->releases.allbranches->branches.localcommits->commits.current_branchworktrees->worktrees.listWhat it shells out to today
For a GitHub repo like this one:
git rev-parse --show-toplevelgit branch --show-currentgit rev-parse HEADgit remote get-url origingh issue list --limit <n> --state <state> --json ...gh pr list --limit <n> --state <state> --json ...git for-each-ref --format=... refs/headsgit switch <branch>git log --max-count=100 --format=... <branch>git show --stat --patch --decorate=short <sha>git worktree list --porcelain:cd <path>inside Neovimgit fetch origin pull/<num>/head:pr-<num>git worktree add ../pr-<num> pr-<num>Equivalent forge-specific commands exist for GitLab (
glab) and Codeberg/Gitea/Forgejo (tea).Picker backend support
Current built-in backends:
fzf-luasnacks.nvimtelescope.nvimAll three backends currently support:
Notable differences:
fzf-luahas the richest action header treatment (FzfLuaHeaderBind/FzfLuaHeaderText)telescopeandsnackspreserve row highlights, but do not currently get the same header UXclientextension point for the root menu, but there is no equivalent public picker-backend registration API yetScope
:Forgeentry pointbranches,commits, andworktreesclientDeliverables
:Forgemaster workflowfzf-lua,snacks, andtelescopeNice-to-haves
Consolidating this into #59, which now tracks the :Forge master picker / home workflow more explicitly. The review-centric work stays under #63 and its child issues.
Consolidating the detailed planning in #87.
#87 rolls up the architecture/scope work from this issue and #59 into a single thread, with a clearer statement of philosophy, concrete implementation phases, and the recommendation to start with root picker legibility plus branches/commits/worktrees polish.