Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

refactor(frontend): move table-filter into detail-navigation/ as text-filter

Sergey Kozyrenkoe041b11cef73
diff --git a/frontend/src/components/shared/README.md b/frontend/src/components/shared/README.md
index 7cd42537..efd9334f 100644
--- a/frontend/src/components/shared/README.md
+++ b/frontend/src/components/shared/README.md
@@ -60,7 +60,6 @@ that every list reuses.
| Module | Purpose |
| ------------------------- | ------------------------------------------------------------------------------------ |
-| `table-filter.ts` | `createTextMatcher` — case + diacritic-insensitive substring matcher. |
| `table-state.ts` | Unified `table_4_<path>` JSON slot. Carries filter + sorting + columnVis + pageSize. |
| `view-options-storage.ts` | `viewOptions_4_<path>` for FileManager-style screens (folders-first, etc.). |
| `storage-keys.ts` | Single source of truth for storage-key conventions and `getTopLevelPath`. |
@@ -143,7 +142,7 @@ and deletes them.
## Testing notes
-- `vitest run` covers the pure utilities (`table-filter`, `table-state`,
+- `vitest run` covers the pure utilities (`table-state`,
`view-options-storage`, `url-params`), the hook behaviours
(`use-pagination`, `use-table-query-filter`, `use-inline-edit`,
`use-page-storage-keys`, `use-detail-navigation`), and the components
diff --git a/frontend/src/components/shared/detail-navigation/detail-navigation-toolbar.test.tsx b/frontend/src/components/shared/detail-navigation/detail-navigation-toolbar.test.tsx
index a743d49c..de5af7a1 100644
--- a/frontend/src/components/shared/detail-navigation/detail-navigation-toolbar.test.tsx
+++ b/frontend/src/components/shared/detail-navigation/detail-navigation-toolbar.test.tsx
@@ -125,7 +125,7 @@ describe('DetailNavigationToolbar', () => {
it('narrows the listbox to filtered items', async () => {
const user = userEvent.setup();
// "pha" matches only "Alpha" — substring is case-insensitive and
- // diacritic-insensitive (see lib/table-filter tests).
+ // diacritic-insensitive (see ./text-filter tests).
renderToolbar({ currentId: 'a', filter: 'pha' });
await user.click(screen.getByRole('button', { name: /1\/1/ }));
diff --git a/frontend/src/lib/table-filter.test.ts b/frontend/src/components/shared/detail-navigation/text-filter.test.ts
similarity index 99%
rename from frontend/src/lib/table-filter.test.ts
rename to frontend/src/components/shared/detail-navigation/text-filter.test.ts
index 6deb594b..bdb0e66d 100644
--- a/frontend/src/lib/table-filter.test.ts
+++ b/frontend/src/components/shared/detail-navigation/text-filter.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
-import { createTextMatcher, matchesTextFilter, normalizeForFilter } from './table-filter';
+import { createTextMatcher, matchesTextFilter, normalizeForFilter } from './text-filter';
describe('normalizeForFilter', () => {
it('lowercases ASCII text', () => {
diff --git a/frontend/src/lib/table-filter.ts b/frontend/src/components/shared/detail-navigation/text-filter.ts
similarity index 100%
rename from frontend/src/lib/table-filter.ts
rename to frontend/src/components/shared/detail-navigation/text-filter.ts
diff --git a/frontend/src/components/shared/detail-navigation/use-navigation.ts b/frontend/src/components/shared/detail-navigation/use-navigation.ts
index 2f3f8972..3c46bcbc 100644
--- a/frontend/src/components/shared/detail-navigation/use-navigation.ts
+++ b/frontend/src/components/shared/detail-navigation/use-navigation.ts
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
-import { createTextMatcher } from '@/lib/table-filter';
+import { createTextMatcher } from './text-filter';
interface NavigationInput<T> {
currentId: null | string | undefined;