Skip to main content
Background Image

GitHub Finally Fixes Pull Request Reviews: Comment Anywhere

·614 words·3 mins·
Pini Shvartsman
Author
Pini Shvartsman
Architecting the future of software, cloud, and DevOps. I turn tech chaos into breakthrough innovation, leading teams to extraordinary results in our AI-powered world. Follow for game-changing insights on modern architecture and leadership.

After years of frustration, GitHub just fixed one of code review’s most annoying limitations.

The new Pull request “Files changed” page now supports commenting anywhere in a changed file, not just the three lines surrounding a change.

If you’ve ever wanted to flag a function that should have been updated but wasn’t, or suggest improvements to code beyond the immediate changes, you know how overdue this is.

What changed
#

Before: You could only comment on changed lines plus three lines of context. Want to reference a related function higher up in the file? Tough luck.

Now: Click the + button on any line in a changed file and add your comment or suggestion.

This seemingly simple change fixes years of awkward workarounds:

  • ❌ “See line 42 above” comments
  • ❌ Separate GitHub issues for related concerns
  • ❌ Slack messages explaining what you couldn’t comment on
  • ✅ Direct, contextual feedback exactly where it belongs

Why this matters for code reviews
#

🎯 Flag missing changes
#

“This function also needs to handle the new authentication flow” — directly on the function that needs updating.

💡 Provide broader context
#

Explain how unchanged code relates to the changes being made, helping reviewers understand the full picture.

📚 Educational opportunities
#

Authors can proactively explain unchanged parts of files to help reviewers understand complex interactions.

🔍 Comprehensive analysis
#

Reviewers can now address the entire changed file, not just the diff hunks.

Single file mode improvements
#

Along with anywhere comments, GitHub enhanced single file mode for reviewing large PRs:

⚡ Auto-navigation
#

Mark a file as viewed and automatically move to the next one. No more manual clicking through dozens of files.

⌨️ Keyboard shortcuts
#

  • J - Next file
  • K - Previous file

Finally, vim-style navigation for PR reviews.

🎯 Smart filtering
#

Navigate with Next/Previous buttons and your file filters stay applied. No more losing your filtering context.

📍 Better orientation
#

Clear indicators when you’re in single file mode prevent confusion about what you’re reviewing.

The technical details
#

🔧 How it works
#

  1. Use the new Files changed page (still in public preview)
  2. Select any changed file
  3. Expand the diff to show unchanged lines
  4. Click + on any line and comment normally

⚠️ Important notes
#

  • Comments only work on files that have changes (not completely unchanged files)
  • Classic Files changed page shows a warning if there are comments it can’t display
  • API support is currently limited but comments appear in existing webhook events
  • This changes comment positioning logic — report any issues you encounter

What developers are saying
#

The response has been overwhelmingly positive:

“Finally! No more ‘see function above’ comments” — frustrated reviewer everywhere

“This should have existed years ago, but better late than never” — the general consensus

“Now I can actually provide useful feedback on entire files” — senior developers rejoicing

The bigger picture
#

This update represents GitHub listening to developer pain points and fixing fundamental UX issues rather than just adding flashy new features.

It’s a reminder that sometimes the most impactful improvements are the ones that remove longstanding friction rather than introduce new capabilities.

Better tooling leads to better code reviews. Better code reviews lead to better software.

Getting started
#

The feature is rolling out gradually on a per-repository basis as part of the new Files changed page public preview.

Start using it and provide feedback through GitHub’s community channels — they’re actively iterating on the experience.

Your pull request reviews just got significantly more useful. Time to leave those inline comments exactly where they belong.


Learn more: Visit the GitHub changelog for technical details and provide feedback in the GitHub community discussions.

Related

GitHub's Coding Agent Goes Live: 1 Million Pull Requests and Counting
·666 words·4 mins
Copilot Code Review Arrives in JetBrains and Visual Studio: The Art of Constructive Criticism
·788 words·4 mins
GitHub Copilot CLI: AI Invades Your Terminal
·786 words·4 mins