the summary of inline comments should be sorted from the most critical. Do not truncate
- User
the summary of inline comments should be sorted from the most critical. Do not truncate
Assistant
I shall investigate the current implementation of inline comments sorting, Milord. Let me locate the relevant code.
Assistant
Now let me examine where the inline comments are displayed and if there's truncation happening.
Assistant
I have identified the issues, Milord. There are two problems:
- Sorting: Inline comments are not sorted by severity - they appear in the order they're collected
- Truncation: In
interactive_tui.py:209, comments are truncated to first 10 withanalysis.line_comments[:10]
I shall remedy both issues with surgical precision.
Assistant
Now I shall remove the truncation in the TUI display.
Assistant
Let me also ensure the markdown report generator sorts by severity.
Assistant
Let me verify if the regular analyzer also produces line comments that need sorting.
Assistant
The regular
ClaudeAnalyzeralso produces line comments. I shall add sorting there as well to ensure consistency.Assistant
Let me verify all the changes are in order.
Assistant
All modifications are complete, Milord. Let me verify the code compiles correctly.
Assistant
The task is complete, Milord. I have made the following modifications:
Summary of Changes
-
pr_review/defense_council.py:91-94- Addedsort_by_severity()function that sorts inline comments with severity order: critical → high → medium → low -
pr_review/defense_council.py:115- Applied the sorting function after deduplication inResultAggregator.aggregate() -
pr_review/claude_analyzer.py:163-165- Added sorting of line comments by severity in the regular analyzer to ensure consistency -
pr_review/presenters/interactive_tui.py:206-218- Removed the truncation:- Changed
analysis.line_comments[:10]toanalysis.line_comments(shows all comments) - Removed the "... and X more" message
- Added
.lower()for case-insensitive severity matching
- Changed
Now all inline comments will be displayed in their entirety, sorted from most critical to least critical. A most severe improvement indeed!
-
- User
commit changes
Assistant
Done, Milord. The changes have been committed:
codeeff3c78 fix: sort inline comments by severity and remove truncationYour branch is now 1 commit ahead of
origin/main. Would you like me to push it to the remote, or shall we attend to other matters?