Add optional suggested fixes to review comments#94
Open
sahilagr123 wants to merge 1 commit into
Open
Conversation
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.
Summary
This PR adds an optional
suggested_fixfield to review comments.The motivation is issue #31: some comments point out a problem, but do not always give the author a concrete next step. This also connects to the interaction part of the roadmap, since comments are more useful if authors can actually act on them.
What changed
suggested_fixto theCommentmodel.suggested_fixthrough progressive consolidation.Out of scope
I kept this limited to the main CLI /
Commentpipeline. I did not update the Claude Code skill pipeline, benchmarks, provider code, OCR code, or add any new dependencies.The malformed-JSON fallback parser also does not try to recover
suggested_fix, it will just default to empty there.Testing
Ran:
Results: 27 passed, 1 failed.
The failing test appears unrelated to this PR:
test_count_tokens_falls_back_when_model_encoding_init_failsfails because the fake tokenizer in the test does not accept thedisallowed_specialargument.I also manually tested the UI by temporarily adding a
suggested_fixto an old local review result JSON and runningopenaireview serve. The “Suggested fix” block rendered correctly, hid when the comment was resolved, and comments without the field looked unchanged. That temporary JSON edit is not included in this PR.Please let me know what you think, and if there is anything to change or revise. Thanks!