feat(cmd): make subject completion cache-backed and state-aware #330
No reviewers
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!330
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/dynamic-completion"
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?
Problem
Ex completion was still mostly grammar-driven. It could complete repos, refs, and static modifier values, but not real PR, issue, CI, or release subjects, so flows like
:Forge pr merge <Tab>and:Forge issue close <Tab>could not suggest actionable items. The picker already had state- and capability-aware gating for many of these operations, which left the Ex surface drifting away from the picker surface tracked by #314 and #298.Solution
Add cache-backed dynamic subject completion for PRs, issues, CI runs, and releases in
forge.cmd, using existing durable list caches first and falling back to backend list commands when the relevant cache is cold. Resolve completion scope fromrepo=when present and otherwise from the current forge scope so completion reuses the same scoped cache keys as the pickers. Extract shared PR availability helpers intoforge.availabilityand use them from both picker action gating and Ex completion filtering so merge / approve / draft / ready suggestions stay aligned with picker behavior. Extend the command specs to cover cache hits, backend fallback, scoped completion, and state-aware filtering across PR, issue, CI, and release subjects.