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
|**Filter & aggregation**|`src/aggregate.ts`|`aggregate()` — filters `CodeMatch[]` by repository and extract exclusion lists; normalises both `repoName` and `org/repoName` forms. |
97
-
|**Team grouping**|`src/group.ts`|`groupByTeamPrefix()` — groups `RepoGroup[]` into `TeamSection[]` keyed by team slug; `flattenTeamSections()` — converts back to a flat list for the TUI row builder. |
98
-
|**Row builder**|`src/render/rows.ts`|`buildRows()` — converts `RepoGroup[]` into `Row[]` with expanded/collapsed state; `rowTerminalLines()` — measures wrapped height; `isCursorVisible()` — viewport clipping. |
|**Filter stats**|`src/render/filter.ts`|`buildFilterStats()` — produces the `FilterStats` object (visible count, total count, active filter string) used by the TUI status bar. |
101
-
|**Selection helpers**|`src/render/selection.ts`|`applySelectAll()` — marks all visible rows as selected; `applySelectNone()` — deselects all. |
102
-
|**Syntax highlighter**|`src/render/highlight.ts`|`highlightFragment()` — maps file extension to a language token ruleset and applies ANSI escape sequences. Falls back to plain text for unknown extensions. |
103
-
|**Output formatter**|`src/output.ts`|`buildOutput()` — entry point for both `--format markdown` and `--format json` serialisation of the confirmed selection. |
|**Filter & aggregation**|`src/aggregate.ts`|`aggregate()` — filters `CodeMatch[]` by repository and extract exclusion lists; normalises both `repoName` and `org/repoName` forms. |
108
+
|**Team grouping**|`src/group.ts`|`groupByTeamPrefix()` — groups `RepoGroup[]` into `TeamSection[]` keyed by team slug; `flattenTeamSections()` — converts back to a flat list for the TUI row builder. |
109
+
|**Row builder**|`src/render/rows.ts`|`buildRows()` — converts `RepoGroup[]` into `Row[]` filtered by the active target (path / content / repo); `rowTerminalLines()` — measures wrapped height; `isCursorVisible()` — viewport clipping. |
|**Filter stats**|`src/render/filter.ts`|`buildFilterStats()` — produces the `FilterStats` object (visible repos, files, matches) used by the TUI filter bar live counter. |
112
+
|**Pattern matchers**|`src/render/filter-match.ts`|`makePatternTest()` — builds a case-insensitive substring or RegExp test function; `makeExtractMatcher()` — wraps it for path or content targets; `makeRepoMatcher()` — wraps it for repo-name matching. |
113
+
|**Selection helpers**|`src/render/selection.ts`|`applySelectAll()` — marks all visible rows as selected (respects filter target); `applySelectNone()` — deselects all visible rows. |
114
+
|**Syntax highlighter**|`src/render/highlight.ts`|`highlightFragment()` — maps file extension to a language token ruleset and applies ANSI escape sequences. Falls back to plain text for unknown extensions. |
115
+
|**Output formatter**|`src/output.ts`|`buildOutput()` — entry point for both `--format markdown` and `--format json` serialisation of the confirmed selection. |
104
116
105
117
## Design principles
106
118
107
119
-**No I/O.** Every component in this layer is a pure function: given the same inputs it always returns the same outputs. This makes them straightforward to test with Bun's built-in test runner.
108
120
-**Single responsibility.** Each component owns exactly one concern (rows, summary, selection, …). The TUI composes them at render time rather than duplicating logic.
109
-
-**`types.ts` as the contract.** All components share the interfaces defined in `src/types.ts` (`TextMatchSegment`, `TextMatch`, `CodeMatch`, `RepoGroup`, `Row`, `TeamSection`, `OutputFormat`, `OutputType`). Changes to these types require updating all components.
121
+
-**`types.ts` as the contract.** All components share the interfaces defined in `src/types.ts` (`TextMatchSegment`, `TextMatch`, `CodeMatch`, `RepoGroup`, `Row`, `TeamSection`, `OutputFormat`, `OutputType`, `FilterTarget`). Changes to these types require updating all components.
110
122
-**`render.ts` as façade.** External consumers import from `src/render.ts`, which re-exports all symbols from the `src/render/` sub-modules plus the top-level `renderGroups()` and `renderHelpOverlay()` functions.
In addition to pre-query exclusions, the [interactive mode](/usage/interactive-mode) offers a live **path filter** (press `f`) to narrow the displayed extracts by file path substring without permanently excluding anything.
80
+
In addition to pre-query exclusions, the [interactive mode](/usage/interactive-mode) offers a live **filter bar** (press `f`) to narrow the displayed results without permanently excluding anything.
81
81
82
-
Use the path filter for **exploration** (no side effects), and `--exclude-extracts` / `--exclude-repositories` for **reproducible** exclusions in replay commands.
|`content`| Code fragment returned by GitHub Search (case-insensitive) | Individual file |
90
+
|`repo`| Full repository name `org/repo` (case-insensitive) | Entire repo |
91
+
92
+
With `repo` mode the matching portion of the repository name is highlighted in yellow in the result list.
93
+
94
+
### Regex mode
95
+
96
+
Press `Tab` inside the filter bar to enable regex matching. The badge updates to `[path·regex]` (or `[content·regex]`, etc.). Invalid expressions are silently ignored.
97
+
98
+
### Filter vs. exclusions: when to use which
99
+
100
+
Use the **TUI filter** for **exploration** — it has no side effects and can be reset instantly with `r`.
101
+
102
+
Use `--exclude-repositories` / `--exclude-extracts` for **reproducible** exclusions that should be encoded in the replay command (e.g. for CI pipelines).
0 commit comments