feat(powershell,nvim,claude): terminal-editor seam for local ADO PR reviews#29
Merged
Conversation
…eviews prr (Invoke-AdoPrReview, profile Phase 2b): fzf-discovers an active PR via az repos pr list (or takes -Id), guards the bare-worktree layout, creates or reuses the detached review worktree, refuses if dirty, and hands off to nvim +AdoPrReview. Load ado-pr.nvim from its local checkout via guarded rtp prepend (not vim.pack - no remote yet, keeps machine paths out of the lockfile); <leader>ga opens its :AdoPr picker beside the diffview maps. review-ado-pr skill gains a discovery step so 'review my pending PRs' works without a pasted id. Pester coverage for the prr guards, worktree creation, and nvim handoff via an AST-extracted function and a PATH-shimmed nvim.
az repos pr list cost ~2-3s of az cold start on every prr call. Discovery now parses the origin remote (ConvertFrom-AdoRemoteUrl: https-with-userinfo, plain https, and ssh v3 forms, %-unescaped) and lists active PRs over REST with a session-cached bearer token (Get-AdoAccessToken; az only on cache miss, token lives ~1h). Verified live against T2.ServiceCatalogue: token cold 0.8s / cached 6ms, PR list 173ms. Parser is Pester-covered (4 tests, RED first).
GitHub Actions' pwsh shell sets ErrorActionPreference=Stop, turning the guards' Write-Error terminating before the 2>&1 capture - pin Continue in BeforeAll (verified locally under Stop). The nvim shim was Windows-only (.cmd); the Ubuntu job runs this suite too, so write an executable sh shim there instead.
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.
What
One seam for local Azure DevOps PR reviews: terminal owns discovery + worktree, editor owns stepping + commenting + vote, with the detached
reviewworktree as the shared state.prr/Invoke-AdoPrReview(profile Phase 2b, az-gated): fzf-picks an active PR viaaz repos pr list(or takes-Id), guards the bare-worktree layout (.barecommon-dir leaf), creates/reuses the detachedreviewworktree, refuses if dirty, thenSet-Location+nvim "+AdoPrReview <id>". Explicit$LASTEXITCODEchecks onazandgit worktree add; empty fzf pick = deliberate cancel.rtp:prependof the local checkout — deliberately not vim.pack (no remote yet; a local-path spec would bake a machine-absolute src intonvim-pack-lock.json). Inert on machines without the checkout.<leader>ga→:AdoPrpicker (<leader>gpstays fugitive Git push).az repos pr list) so "review my pending PRs" works without a pasted id;prr/ado-pr.nvim referenced.tests/ado-pr-review.Tests.ps1— AST-extracts the function (fzf-pickers pattern), PATH-shims nvim, real bare-worktree git fixture in TestDrive. Covers both guards, worktree creation + handoff args, dirty refusal (order-independent).diffview).Verification
:AdoPr/:AdoPrReview/:AdoPrComment/:AdoPrVoteexist,<leader>gamapped, fugitive intact..bareresolution verified live in this repo's own layout.-Idkept after discussion.Out of scope
Live smoke test against a real ADO PR (gates trusting
:AdoPrComment) — tracked in the ado-pr.nvim repo/brain.