Skip to content

feat(powershell,nvim,claude): terminal-editor seam for local ADO PR reviews#29

Merged
jinyeow merged 3 commits into
mainfrom
feat/pr-review-seam
Jul 23, 2026
Merged

feat(powershell,nvim,claude): terminal-editor seam for local ADO PR reviews#29
jinyeow merged 3 commits into
mainfrom
feat/pr-review-seam

Conversation

@jinyeow

@jinyeow jinyeow commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What

One seam for local Azure DevOps PR reviews: terminal owns discovery + worktree, editor owns stepping + commenting + vote, with the detached review worktree as the shared state.

  • prr / Invoke-AdoPrReview (profile Phase 2b, az-gated): fzf-picks an active PR via az repos pr list (or takes -Id), guards the bare-worktree layout (.bare common-dir leaf), creates/reuses the detached review worktree, refuses if dirty, then Set-Location + nvim "+AdoPrReview <id>". Explicit $LASTEXITCODE checks on az and git worktree add; empty fzf pick = deliberate cancel.
  • ado-pr.nvim loaded via guarded rtp:prepend of the local checkout — deliberately not vim.pack (no remote yet; a local-path spec would bake a machine-absolute src into nvim-pack-lock.json). Inert on machines without the checkout. <leader>ga:AdoPr picker (<leader>gp stays fugitive Git push).
  • review-ado-pr skill: discovery step added (az repos pr list) so "review my pending PRs" works without a pasted id; prr/ado-pr.nvim referenced.
  • Tests: 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).
  • Docs: CLAUDE.md Phase 2b + ado-pr.nvim load decision; fixed pre-existing load-order drift (added diffview).

Verification

  • 4/4 Pester green (full run + dirty test in isolation); PSSA clean with repo settings.
  • Headless nvim against this branch config: :AdoPr/:AdoPrReview/:AdoPrComment/:AdoPrVote exist, <leader>ga mapped, fugitive intact.
  • Positive-path .bare resolution verified live in this repo's own layout.
  • Codex cross-model review run; findings applied (lockfile-drift revert, exit-code checks, test order independence). -Id kept after discussion.

Out of scope

Live smoke test against a real ADO PR (gates trusting :AdoPrComment) — tracked in the ado-pr.nvim repo/brain.

jinyeow added 3 commits July 23, 2026 21:52
…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.
@jinyeow
jinyeow merged commit b6ab980 into main Jul 23, 2026
5 checks passed
@jinyeow
jinyeow deleted the feat/pr-review-seam branch July 23, 2026 13:07
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.

1 participant