chore(ui): сохранить основу поэтапной миграции таблиц
This commit is contained in:
1 parent
c30f817926
commit
e7755a4d16
100 files changed
+30178
-1089
No files matched your search
@@ -0,0 +1,56 @@
|
||||
# ReUI: исходные замечания установленного реестра
|
||||
|
||||
2026-09-13. Команда: `npx eslint components/reui/data-grid components/reui/filters components/reui/cascader`. 23 ошибки, 27 предупреждений. Правила не отключены. Требует разбора перед завершением этапа 2.
|
||||
|
||||
| Файл | Замечание |
|
||||
| --- | --- |
|
||||
| `components/reui/cascader/cascader-async.tsx` | 786:7 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader-virtual.tsx` | 132:5 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader.tsx` | 934:15 error Error: Cannot access refs during render |
|
||||
| `components/reui/cascader/cascader.tsx:934:15` | 934:15 error Error: Cannot access refs during render |
|
||||
| `components/reui/cascader/cascader.tsx:934:15` | 1089:22 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader.tsx:1089:22` | 1142:5 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader.tsx:1142:5` | 1672:5 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader.tsx:1672:5` | 1688:27 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/cascader/cascader.tsx:1688:27` | 2111:45 error Error: Cannot access refs during render |
|
||||
| `components/reui/cascader/cascader.tsx:2111:45` | 2112:36 error Error: Cannot access refs during render |
|
||||
| `components/reui/data-grid/data-grid-scroll-area.tsx` | 234:7 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/data-grid/data-grid-table-dnd-rows.tsx` | 62:3 warning 'verticalListSortingStrategy' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table-dnd-rows.tsx` | 67:39 warning 'Table' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table-dnd-rows.tsx` | 454:5 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/data-grid/data-grid-table-dnd.tsx` | 61:3 warning 'Table' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx` | 32:28 warning 'Table' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx` | 762:23 warning Compilation Skipped: Use of incompatible library |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 807:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 811:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 813:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 815:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 817:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 835:9 warning The 'virtualItems' conditional could make the dependencies of useEffect Hook (at line 1037) change on every render. To fix this, wrap the initialization of 'virtualItems' in its own useMemo() Hook react-hooks/exhaustive-deps |
|
||||
| `components/reui/data-grid/data-grid-table-virtual.tsx:762:23` | 1052:3 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 31:42 warning 'Table' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 744:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 746:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 748:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 750:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 756:5 warning Unused eslint-disable directive (no problems were reported from 'react-hooks/exhaustive-deps') |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 959:3 warning 'rowId' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 1463:11 warning 'table' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 2342:30 warning 'TData' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid-table.tsx` | 2411:24 warning 'TData' is defined but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/data-grid/data-grid.tsx` | 889:3 error Error: Cannot access refs during render |
|
||||
| `components/reui/data-grid/data-grid.tsx:889:3` | 892:3 error Error: Cannot access refs during render |
|
||||
| `components/reui/data-grid/data-grid.tsx:892:3` | 899:3 error Error: Cannot access refs during render |
|
||||
| `components/reui/data-grid/data-grid.tsx:899:3` | 949:44 error Error: Cannot access refs during render |
|
||||
| `components/reui/data-grid/data-grid.tsx:949:44` | 950:5 warning React Hook useMemo has an unnecessary dependency: 'table.store'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps |
|
||||
| `components/reui/data-grid/data-grid.tsx:949:44` | 988:7 error Error: Expected the dependency list to be an array of simple expressions (e.g. `x`, `x.y.z`, `x?.y?.z`) |
|
||||
| `components/reui/data-grid/data-grid.tsx:988:7` | 990:7 error Error: Expected the dependency list to be an array of simple expressions (e.g. `x`, `x.y.z`, `x?.y?.z`) |
|
||||
| `components/reui/filters/filters-advanced.tsx` | 757:18 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/filters/filters-advanced.tsx:757:18` | 765:5 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/filters/filters-advanced.tsx:765:5` | 1529:9 warning 'issueMap' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/filters/filters-advanced.tsx:765:5` | 1544:6 warning React Hook React.useMemo has an unnecessary dependency: 'rowStateVersion'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps |
|
||||
| `components/reui/filters/filters-advanced.tsx:765:5` | 1566:9 warning 'focusFirstIssue' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/filters/filters-chip.tsx` | 377:15 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/filters/filters-chip.tsx:377:15` | 466:18 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
| `components/reui/filters/filters-chip.tsx:466:18` | 550:9 warning 'operator' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars |
|
||||
| `components/reui/filters/filters-chip.tsx:466:18` | 569:18 error Error: Calling setState synchronously within an effect can trigger cascading renders |
|
||||
+36
-1
@@ -16,7 +16,7 @@
|
||||
| --- | --- | --- |
|
||||
| 0 | Исходная база, карта миграции, проверки и обзор экранов | Завершён 2026-09-13 |
|
||||
| 1 | Достоверность сохранения, удаления, включения и опроса серверов | Завершён 2026-09-13 |
|
||||
| 2 | Общая оболочка Data Grid/TanStack v9, Filters и эталон серверов | Следующий, отдельное окно |
|
||||
| 2 | Общая оболочка Data Grid/TanStack v9, Filters и эталон серверов | В работе: основа и серверы перенесены, приёмка не завершена |
|
||||
| 3 | Основные таблицы и справочники | Не начат |
|
||||
| 4 | Остальные таблицы, удаление старых API, общая регрессия | Не начат |
|
||||
| 5 | Состояния данных, свежесть, частичные сбои, гонки polling | Не начат |
|
||||
@@ -106,6 +106,41 @@ Lint hotspots: components/reui/sortable.tsx (8 ошибок), app/(main)/probes/
|
||||
|
||||
В новом окне проверить лимиты, git status и последние коммиты. Создать ветку `codex/reui-v9-migration`, перепроверить актуальный совместимый API ReUI Data Grid/TanStack и Filters. Мигрировать общую оболочку и одну таблицу серверов, закрепить зависимости и описать образец переноса. Сохранить проверки операций из этапа 1. Ветку не выпускать до завершения этапа 4. После этапа — отдельный локальный коммит без push.
|
||||
|
||||
## Этап 2 — промежуточное сохранение 2026-09-13
|
||||
|
||||
Ветка `codex/reui-v9-migration`, исходный HEAD `c30f817`. Этап **не завершён**. На старте оставалось 51% пятичасового лимита, после основного блока — 24%; новые блоки остановлены по правилу резерва.
|
||||
|
||||
### Выполнено
|
||||
|
||||
- Проверены MCP API и dry-run официального реестра base-nova; установлен Data Grid, новый Filters с Cascader и учебный `components/examples/c-data-grid-1.tsx`. Пример не подключён к маршрутам приложения. 13 общих примитивов при установке не перезаписывались; итоговых изменений глобальной темы нет.
|
||||
- Закреплён `@tanstack/react-table` 9.2.4. Для поэтапной совместимости старые таблицы используют alias `@tanstack/react-table-v8` (8.21.3), `components/reui/legacy-data-grid/` и `shared/legacy-data-grid-*`. Это временная изоляция, не эмуляция API v8 поверх v9. Все старые импорты изменены механически; семантика старых экранов сохраняется. Удалить alias и legacy-файлы после последнего потребителя в этапе 4.
|
||||
- Канонические `shared/data-grid-shell.tsx`, `data-grid-sort-header.tsx`, `data-grid-layout.ts` типизированы через `DataGridFeatures`. `servers-data-grid.tsx` использует `ColumnDef<DataGridFeatures, Server>` и `useTable({ features: dataGridFeatures, ... })`. Отдельные `get*RowModel` удалены. `manualPagination: true` сохраняет прежний полный список: bundle включает пагинацию по умолчанию, а экран серверов её пока не показывает. Стабильный `getRowId` и раскрытие сохранены.
|
||||
- Новый Filters установлен в `components/reui/filters/`; старый `components/reui/filters.tsx` и его шесть потребителей пока работают. При переносе импортировать новый API явно из `@/components/reui/filters/filters`: одноимённый старый файл имеет приоритет над каталогом. Сохранить AND-семантику старых условий; не применять `flattenFilterConditions` как вычислитель вложенных OR-групп.
|
||||
|
||||
### Проверки и остаток
|
||||
|
||||
| Проверка | Результат |
|
||||
| --- | --- |
|
||||
| `tsc --noEmit --incremental false` | Прошла для всего проекта |
|
||||
| 14 браузерных тестов операций | Прошли после миграции |
|
||||
| Дополнительный тест v9 | Прошёл: 12 строк без потерь, сортировка в обе стороны, раскрытие и закрытие деталей |
|
||||
| Lint адаптированной таблицы, общей оболочки и тестов | Прошёл без замечаний |
|
||||
| `npm run build` | Прошла: contracts, типы и 34 статические страницы |
|
||||
| Lint новых официальных Data Grid / Filters / Cascader | 23 ошибки и 27 предупреждений; [точный список](reui-migration-lint.md). Это незакрытая часть этапа, правила не отключались |
|
||||
|
||||
Следующий запуск: **продолжить этап 2**, не переходить к этапу 3. Проверить лимит и HEAD; разобрать замечания установленного реестра, подготовить и проверить переход старых Filters в FilterQuery на эталоне серверов, выполнить визуальную и клавиатурную проверку эталона и итоговый ReUI audit. Затем завершить этап отдельным локальным коммитом. Текущее сохранение — промежуточный коммит, без push; ветку не выпускать.
|
||||
|
||||
Референсы: [пример пагинации](https://reui.io/preview/base/components/c-data-grid-1?ref=mcp), [PRO-таблица](https://reui.io/preview/base/data-grid-filtering-2?ref=mcp), [Data Grid API](https://reui.io/docs/components/base/data-grid?ref=mcp), [Filters API](https://reui.io/docs/components/base/filters?ref=mcp).
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Серверы: реальные API] --> B[DataGridShell]
|
||||
B --> C[ReUI Data Grid + TanStack v9]
|
||||
D[Остальные таблицы] --> E[Временная оболочка legacy]
|
||||
E --> F[TanStack v8 alias]
|
||||
G[Старые Filters] -. этапы 2–4 .-> H[FilterQuery: AND / OR]
|
||||
```
|
||||
|
||||
## Карта миграции
|
||||
|
||||
Текущая связка: @tanstack/react-table ^8.21.3, @tanstack/react-virtual ^3.14.4, base-nova. Актуальный ReUI MCP ранее подтвердил useTable/dataGridFeatures для Data Grid и дерево FilterQuery вместо filters/onChange для Filters. Перед установкой перепроверить совместимые версии, сохранить семантику существующих фильтров (простые условия → AND) и закрепить lockfile.
|
||||
|
||||
Reference in new issue
Block a user