You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file search feature only supports searching within a single
repository under one author.
Students in SWE courses find it useful to search across all
repositories to see how others implement certain files (e.g., testing
files, **/ug.md) by glob.
Let's add global search panel with mode toggle button in the summary
header.
The implementation preserves the existing local search functionality
while introducing a new global search mode. A mode toggle button
replaces the text field to switch between local and global search. The
global search panel displays results across all authors and
repositories.
Copy file name to clipboardExpand all lines: docs/dg/report.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,10 @@ The authorship module retrieves the relevant information from the corresponding
127
127
### Showing relevant information by authors
128
128
The files will be filtered, picking only files the selected author has written in. The lines are then split into chunks of "touched" and "untouched" code segments displayed in the tab view which will be popped up on the right side of the screen.
## Global file browser view ([c-global-file-browser.vue](https://github.com/reposense/RepoSense/blob/master/frontend/src/views/c-global-file-browser.vue))
132
+
The `c-global-file-browser` module is responsible for file filtering across repositories. It allows users to find files by glob and displays the results by path or by repository.
Copy file name to clipboardExpand all lines: docs/ug/usingReports.md
+79-2Lines changed: 79 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,7 @@ Here is an example of how a typical report looks like:
36
36
37
37

38
38
39
-
The report is divided into two sections: [_**Chart panel**_](#chart-panel) and the [_**Code panel**_](#code-panel). In some situations, the [_**Commits panel**_](#commits-panel) will appear in place of the _code panel_. All three are explained in the sections below.
40
-
39
+
The report is divided into two sections: [_**Chart panel**_](#chart-panel) and the [_**Code panel**_](#code-panel). In some situations, the [_**Commits panel**_](#commits-panel) or the [_**Global file browser**_](#global-file-browser) will appear in place of the Code panel.
41
40
<boxtype="info"seamless>
42
41
43
42
Links to external webpages (repository link, author's profile, blame view, etc.) is only properly supported when RepoSense analyzes a remote repository belonging to GitHub, GitLab or BitBucket.
@@ -189,3 +188,81 @@ The `Commits panel` allows users to see the commits attributed to a specific aut
189
188
* To promote and encourage the 50/72 rule for commit messages, a dotted vertical line will be shown for:
190
189
* Commit message subject that exceeds 50 characters.
191
190
* Commit message body after the 72nd character mark.
191
+
192
+
## Global file browser panel
193
+
194
+
The `Global file browser` provides a way to search and browse files across all repositories in the report. Unlike the [Code panel](#code-panel), which shows code attributed to a single author within one repository, the global file browser lets you explore files from every repository at once.
195
+
196
+
#### Accessing the global file browser
197
+
198
+
1. Locate the **filter mode** dropdown at the top of the tool bar.
199
+
2. Select **Global** from the dropdown.
200
+
3. The global file browser will appear on the right side of the report, replacing the Code panel.
201
+
202
+
To return to the normal view, select **Local** from the dropdown. You can also click any author's %%:fas-code:%% or %%:fas-list-ul:%% icon in the Chart panel, which automatically switches the filter mode back to Local and opens the corresponding Code or Commits panel.
203
+
204
+
<boxtype="info"seamless>
205
+
206
+
When you switch to global mode, any previously highlighted author in the Chart panel is deselected. Likewise, switching back to Local mode (or clicking an author icon) closes the global file browser.
207
+
</box>
208
+
209
+
#### Filtering files with glob patterns
210
+
211
+
The search input at the top of the panel filters files using [glob patterns](https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob). The file count updates in real-time as you type.
212
+
213
+
<boxtype="tip"seamless>
214
+
215
+
Glob matching uses the `matchBase` option, so a pattern like `*.java` will match `src/main/App.java` even though the file is nested in subdirectories. You do not need to prefix every pattern with `**/`.
216
+
</box>
217
+
218
+
#### View modes
219
+
220
+
The global file browser offers two view modes, toggled by the buttons below the search input:
221
+
222
+
##### Sort By Path (default)
223
+
224
+
Files from all repositories are displayed in a single flat list, sorted alphabetically by file path.
225
+
226
+
##### Group By Repo
227
+
228
+
Files are organized under collapsible repository headers, sorted alphabetically by repository name.
229
+
230
+
Each repository group shows:
231
+
* The **repository name** and **total file count** in the group header.
232
+
* A **badge** that reads _Click to expand_ or _Click to collapse_, indicating the current state.
233
+
* A **preview** of the top 3 matching files when the group is collapsed.
234
+
* An **"and N more file(s)..."** link if the repository has more than 3 matching files. Clicking this link lists all remaining files (without expanding their contents).
235
+
236
+
**Expanding all files in a repository group:** Click the **repository group header** to expand (or collapse) _all_ files in that group at once. This opens every file's content simultaneously, which is useful for quickly scanning an entire repository. Each repository group can be expanded and collapsed independently.
237
+
238
+
<boxtype="info"seamless>
239
+
240
+
Switching between _Sort By Path_ and _Group By Repo_ collapses all currently expanded files.
241
+
</box>
242
+
243
+
#### Viewing file contents
244
+
245
+
Click on any non-binary, non-ignored file header to expand it and view its contents. Click the same header again to collapse it.
246
+
247
+
The file content is displayed as **author-colored segments**:
248
+
* Each contiguous block of lines written by the same author is shown as a segment with a **colored left border** identifying the author.
249
+
* Hover over a segment to see a **tooltip** showing the author's name and whether they are the primary author or a co-author.
250
+
251
+
<boxtype="info"seamless>
252
+
253
+
Binary files (such as images, executables, and archives) and ignored files cannot be expanded. These files are indicated with yellow **binary** or **ignored** badges.
254
+
</box>
255
+
256
+
#### Use cases
257
+
258
+
The global file browser is particularly useful for:
259
+
260
+
***Cross-repository code search**: Find files matching a specific pattern (e.g., `*.yml` for CI configs) across all repositories.
261
+
***Code review**: Quickly browse all files of a specific type and see who wrote each line.
262
+
***Comparing implementations**: Filter for files with similar names or extensions across different repositories to compare how they are implemented.
263
+
***Identifying authorship**: Expand files to see author-colored segments, making it easy to identify who contributed which parts of a file.
264
+
265
+
<boxtype="tip"seamless>
266
+
267
+
Combine glob patterns with the Group By Repo view to see how a specific file type is distributed across repositories. For example, filter by `**/*Test*.java` and switch to Group By Repo to see which repositories have Java test files and how many.
0 commit comments