Group results based on the file they belong to
Currently, irrespective of a file the results belong, they're being shown all at once. It'd look like mess when we have results for say 20 different files or even more and each file having 10 source ranges. Imagine, user will have to scroll all the way down to go through all the files' results. Now we can do two things to avoid this:
- Display only file names in result tab. Clicking on the file names would display all the results for corresponding file. Clicking on another file would close the results for previous one and open for the current file. Can be done with simple toggle.
- Use pagination in case when number of files are large.
IMO 2nd option seems sustainable
cc @AbdealiJK @sils1297
Point 1 seems to be very similar to the Files tab. Except that its an alternative UI. In the files tab we'd eventually want to hide parts of the file that have no results (Like git shows diffs)
Point 2 - pagination makes sense. but as this will be running locally I wonder if it's needed. Needless, the feature looks like a good value add (which can be set to items_in_page to -1 to disable) :) We should do it.
Also - your whole issue about too many results - Possible a good search is the correct way to solve it ? We could add a "Group by" field in the advanced search (Group by file, severity, or bear ?)
@AbdealiJK @hemangsk after adding pagination, the advanced search filter can be further added