Skip to content

feat(review): generalize review subjects beyond pull requests#93

Merged
barrettruth merged 6 commits intomainfrom
feat/review-subjects
Apr 7, 2026
Merged

feat(review): generalize review subjects beyond pull requests#93
barrettruth merged 6 commits intomainfrom
feat/review-subjects

Conversation

@barrettruth
Copy link
Copy Markdown
Owner

Summary

  • let review sessions start from branches and commits, not just pull requests
  • derive branch and commit review bases and materialize detached subjects in temporary worktrees when needed
  • add picker actions, :Forge review branch|commit, defaults, docs, and coverage for the new review entry points

Test plan

  • nix develop .#ci --command busted spec/review_spec.lua spec/command_spec.lua spec/git_sections_spec.lua spec/init_spec.lua
  • ./scripts/ci.sh

Refs #86

Problem: forge review only tracked a base ref and display mode, which made
PR review feel like a thin diff action rather than a coherent workflow.
That left no stable session object for later file indexing, view switching,
or subject generalization.

Solution: add structured review session state in `lua/forge/review.lua`,
populate it when PR review starts, and cover the new session model in help
docs and focused specs.
Problem: review still depended on the diff buffer's quickfix side effects,
so there was no first-class file index to anchor the local PR review flow.
That made file selection incidental and left the session model underused.

Solution: derive changed files from the active review session, open them in
a picker-backed review index, and route file opens through the review
session so later mode and navigation work can build on the same surface.
Problem: the review flow still described its file views as unified vs split,
which hid the real distinction between patch review and surrounding file
context. That made the session mode ambiguous even after the file index
landed.

Solution: normalize review sessions around explicit `patch` and `context`
modes, show the active mode in the review index, and make `toggle()` switch
the current file or pending index mode between those two views.
Problem: the review session still lacked first-class navigation, so moving
between files, returning to the index, and stepping through hunks depended
on picker state or backend-specific habits instead of explicit review
commands.

Solution: add review index/file/hunk navigation helpers, expose them through
`:Forge review` subcommands and review `<Plug>` mappings, and document and
test the navigation model on top of the new review session flow.
This lets the review index and navigation flow start from branches
and commits without disturbing the current checkout.
@barrettruth barrettruth changed the base branch from feat/review-navigation to main April 7, 2026 20:51
@barrettruth barrettruth merged commit ebd961b into main Apr 7, 2026
1 check passed
@barrettruth barrettruth deleted the feat/review-subjects branch April 7, 2026 20:53
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