[FEATURE] Displaying the function in which a diff is occurring
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently with diffs in the terminal it is impossible to tell the exact context of an edit just from what is shown. The same code may appear in different functions in the file and it matters which one the change is occuring in.
<img width="569" height="124" alt="Image" src="https://github.com/user-attachments/assets/be5d7d90-2b70-4546-b6bd-d0877b3be2d2" />
Proposed Solution
Github Desktop does this nicely by showing the relevant function, seen here with the line @@ -121,7 +121,6 @@ def index(request): in a different style above the diff. This simple change is massively helpful!
<img width="569" height="154" alt="Image" src="https://github.com/user-attachments/assets/eb2c3328-626e-4f0a-89c9-8214b85a0254" />
Alternative Solutions
Only real alternative is using a separate diff tool (like Github Desktop) which kind of breaks the flow.
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
Any code suggestions
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗