wenay-react2 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/doc/EXAMPLE_USAGE.md +58 -2
- package/doc/PROJECT_FUNCTIONALITY.md +5 -1
- package/doc/changes/v1.0.41.md +23 -0
- package/doc/changes/v1.0.42.md +26 -0
- package/doc/progress/architecture-fix-queue.md +74 -0
- package/doc/progress/style-system-normalization.md +5 -5
- package/doc/target/my.md +39 -67
- package/doc/wenay-react2-rare.md +118 -13
- package/doc/wenay-react2.md +75 -11
- package/lib/common/api.d.ts +1 -0
- package/lib/common/api.js +8 -4
- package/lib/common/src/components/Dnd/DragArea.d.ts +5 -0
- package/lib/common/src/components/Dnd/DragArea.js +5 -1
- package/lib/common/src/components/Dnd/FloatingWindow.d.ts +9 -5
- package/lib/common/src/components/Dnd/FloatingWindow.js +39 -97
- package/lib/common/src/components/Dnd/Resizable.d.ts +3 -7
- package/lib/common/src/components/Dnd/Resizable.js +4 -3
- package/lib/common/src/components/Menu/RightMenu.js +8 -4
- package/lib/common/src/components/Menu/RightMenuStore.d.ts +2 -2
- package/lib/common/src/components/Menu/RightMenuStore.js +5 -3
- package/lib/common/src/components/Modal/LeftModal.js +4 -2
- package/lib/common/src/components/Modal/ModalContextProvider.js +5 -16
- package/lib/common/src/components/MyResizeObserver.d.ts +24 -0
- package/lib/common/src/components/MyResizeObserver.js +49 -0
- package/lib/common/src/components/Overlay.d.ts +24 -0
- package/lib/common/src/components/Overlay.js +28 -0
- package/lib/common/src/components/Settings/SettingsDialog.js +21 -22
- package/lib/common/src/components/Toolbar/Toolbar.d.ts +1 -0
- package/lib/common/src/components/Toolbar/Toolbar.js +16 -23
- package/lib/common/src/grid/columnState/ColumnsMenu.js +4 -13
- package/lib/common/src/grid/columnState/columnGrid.d.ts +103 -0
- package/lib/common/src/grid/columnState/columnGrid.js +231 -0
- package/lib/common/src/grid/columnState/columnState.js +10 -9
- package/lib/common/src/grid/columnState/index.js +3 -0
- package/lib/common/src/hooks/useDraggable.d.ts +8 -0
- package/lib/common/src/hooks/useDraggable.js +13 -4
- package/lib/common/src/hooks/useOutside.d.ts +4 -1
- package/lib/common/src/hooks/useOutside.js +2 -1
- package/lib/common/src/logs/logs.d.ts +96 -5
- package/lib/common/src/logs/logs.js +147 -108
- package/lib/common/src/logs/logsController.d.ts +3 -0
- package/lib/common/src/utils/cache.d.ts +12 -0
- package/lib/common/src/utils/cache.js +0 -0
- package/lib/common/src/utils/fixedOrder.d.ts +15 -0
- package/lib/common/src/utils/fixedOrder.js +30 -0
- package/lib/common/src/utils/index.d.ts +2 -0
- package/lib/common/src/utils/index.js +2 -0
- package/lib/common/src/utils/memoryStore.d.ts +3 -6
- package/lib/common/src/utils/memoryStore.js +1 -3
- package/lib/common/src/utils/persistedMaps.d.ts +16 -0
- package/lib/common/src/utils/persistedMaps.js +5 -0
- package/lib/common/src/utils/searchHistory.js +7 -6
- package/lib/common/src/utils/structEqual.d.ts +12 -0
- package/lib/common/src/utils/structEqual.js +40 -0
- package/lib/common/updateBy.d.ts +3 -0
- package/lib/common/updateBy.js +57 -22
- package/lib/style/style.css +58 -1
- package/package.json +2 -2
package/doc/EXAMPLE_USAGE.md
CHANGED
|
@@ -411,6 +411,62 @@ Standard:
|
|
|
411
411
|
- Use `sourceMode: "order"` when toolbar membership and extra toolbar-only
|
|
412
412
|
buttons must stay local while column order comes from `columnState`.
|
|
413
413
|
|
|
414
|
+
## Default Column Grid Wrapper
|
|
415
|
+
|
|
416
|
+
Use when a normal grid should get the standard column menu, toolbar settings,
|
|
417
|
+
and mobile card/table representation without hand-wiring every surface.
|
|
418
|
+
|
|
419
|
+
```tsx
|
|
420
|
+
import { createColumnGrid } from "wenay-react2"
|
|
421
|
+
import type { ColDef } from "ag-grid-community"
|
|
422
|
+
|
|
423
|
+
type Row = { id: string; name: string; price: number; qty: number; note: string }
|
|
424
|
+
|
|
425
|
+
const columnDefs: ColDef<Row>[] = [
|
|
426
|
+
{ colId: "name", field: "name" },
|
|
427
|
+
{ colId: "price", field: "price" },
|
|
428
|
+
{ colId: "qty", field: "qty", headerName: "Qty" },
|
|
429
|
+
{ colId: "note", field: "note" },
|
|
430
|
+
]
|
|
431
|
+
|
|
432
|
+
const ordersGrid = createColumnGrid<Row>({
|
|
433
|
+
key: "orders.columns",
|
|
434
|
+
columnDefs,
|
|
435
|
+
getId: row => row.id,
|
|
436
|
+
autoSizeOnColumnCountChange: true,
|
|
437
|
+
columns: [
|
|
438
|
+
{ key: "name", fixed: true, cardRole: "title" },
|
|
439
|
+
{ key: "note", defaultVisible: false },
|
|
440
|
+
],
|
|
441
|
+
})
|
|
442
|
+
|
|
443
|
+
export function OrdersView({ rows, mobile }: { rows: Row[]; mobile?: boolean }) {
|
|
444
|
+
return (
|
|
445
|
+
<ordersGrid.View
|
|
446
|
+
mode={mobile ? "cards" : "table"}
|
|
447
|
+
data={rows}
|
|
448
|
+
table={{ getRowId: p => p.data.id }}
|
|
449
|
+
/>
|
|
450
|
+
)
|
|
451
|
+
}
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Standard:
|
|
455
|
+
|
|
456
|
+
- `createColumnGrid` infers column metadata from `colId`, `field`, and
|
|
457
|
+
`headerName`; pass `columns` only for overrides like `fixed`, `icon`,
|
|
458
|
+
`defaultVisible`, and `cardRole`.
|
|
459
|
+
- The returned `Table` and `View` attach/detach `columnState` automatically and
|
|
460
|
+
default `autoSizeColumns` to `false` so restored widths survive remounts.
|
|
461
|
+
- `View` defaults to the dots overlay (`controls="auto"`) for both table and cards;
|
|
462
|
+
pass `controls="menu"`, `controls="toolbar"`, or `controls={false}` only when needed.
|
|
463
|
+
- `Dots` can drive a table too; it is a column selector over the shared config,
|
|
464
|
+
not a card-only control, and the wrapper defaults its max to all columns.
|
|
465
|
+
- `autoSizeOnColumnCountChange` is optional and separate from `autoSizeColumns`;
|
|
466
|
+
it fits once when the number of visible columns changes.
|
|
467
|
+
- Drop to raw `createColumnState` when a product needs custom grouping, runtime
|
|
468
|
+
presence gates, or a fully custom toolbar skin.
|
|
469
|
+
|
|
414
470
|
## Toolbar With Local Commands
|
|
415
471
|
|
|
416
472
|
Use when a command strip has its own commands and user-configurable layout.
|
|
@@ -866,7 +922,7 @@ Current strong examples:
|
|
|
866
922
|
- `qa.tsx` card 20 for `SettingsDialog` search/tree registry behavior.
|
|
867
923
|
- `qa.tsx` card 21 for `createUiSlot` persisted placement behavior.
|
|
868
924
|
- `qa.tsx` card 25 for local `createToolbar` config/settings behavior.
|
|
869
|
-
- `qa.tsx` cards 28-
|
|
925
|
+
- `qa.tsx` cards 28-32 for `columnState`, `createColumnGrid`, `ColumnsMenu`, `ColumnDots`,
|
|
870
926
|
`CardList`, and `createToolbar({source})`.
|
|
871
927
|
- `qa.tsx` cards 23-26 for Replay hooks.
|
|
872
928
|
- `src/common/src/grid/agGrid4/example.tsx` for `useAgGrid` / `AgGridTable` controller examples.
|
|
@@ -912,4 +968,4 @@ When a new public usage pattern is introduced:
|
|
|
912
968
|
- Put purpose and standards in this file.
|
|
913
969
|
- Put broad project role changes in `doc/PROJECT_FUNCTIONALITY.md`.
|
|
914
970
|
- Link new durable docs from `README.md`.
|
|
915
|
-
- Add a changelog note in `doc/changes/`.
|
|
971
|
+
- Add a changelog note in `doc/changes/`.
|
|
@@ -225,6 +225,7 @@ toolbars, and mobile card views.
|
|
|
225
225
|
|
|
226
226
|
Main APIs:
|
|
227
227
|
|
|
228
|
+
- `createColumnGrid`, `useColumnGrid`
|
|
228
229
|
- `createColumnState`
|
|
229
230
|
- `ColumnsMenu`, `MenuStrip`
|
|
230
231
|
- `ColumnDots`
|
|
@@ -232,7 +233,9 @@ Main APIs:
|
|
|
232
233
|
- `columnState.grid.attach(api)` and `detach()`
|
|
233
234
|
- `columnState.api.listSource`
|
|
234
235
|
|
|
235
|
-
Use
|
|
236
|
+
Use `createColumnGrid` by default when a normal ag-grid table should get the standard dots overlay, menu, toolbar settings, cards, and table/card `View` without custom wiring. It accepts default `data`/`getId`, and can optionally fit columns when the visible column count changes. Use raw `createColumnState` when the product needs custom grouped modes, runtime presence gates, or a bespoke toolbar skin.
|
|
237
|
+
|
|
238
|
+
Use this area when the user can change column order, visibility, width, sort,
|
|
236
239
|
filter, or mobile field selection.
|
|
237
240
|
|
|
238
241
|
Key idea: column config is independent from ag-grid. ag-grid is one adapter
|
|
@@ -365,6 +368,7 @@ Important current cards:
|
|
|
365
368
|
- 29: mobile `ColumnDots` + `CardList`.
|
|
366
369
|
- 30: grouped sub-column mode above toolbar/columnState.
|
|
367
370
|
- 31: `createToolbar` over `columnState.api.listSource`.
|
|
371
|
+
- 32: `createColumnGrid` wrapper with built-in dots overlay driving table/cards.
|
|
368
372
|
|
|
369
373
|
Known audit note: archive card 5 and `src/common/testUseReact/useGrid.tsx`
|
|
370
374
|
still demonstrate direct `applyGridRows`. That is useful as a regression
|
package/doc/changes/v1.0.41.md
CHANGED
|
@@ -10,4 +10,27 @@ Status: released.
|
|
|
10
10
|
- Fixed: npm package assembly now copies `doc/` into `dist` and allows `doc/**/*` in package `files`; pack verification confirms `doc/changes/v1.0.41.md`, `doc/wenay-react2.md`, and `doc/wenay-react2-rare.md` are included.
|
|
11
11
|
- Fixed: Restored opaque dark default styling for mouse/right-click menus; hover is white with dark text, active stays dark, and pressed state has a separate contrast token.
|
|
12
12
|
- Changed: Polished the log notification toggle in card 9 / `MessageEventLogsView` from a large text `X` into a compact close button.
|
|
13
|
+
- Added: `createColumnGrid` / `useColumnGrid`, a high-level column kit that infers `ColumnMeta` from ag-grid `columnDefs`, accepts optional default `data`/`getId`, and returns ready table, menu, dots, cards, toolbar, settings, and view surfaces.
|
|
14
|
+
- Changed: Added QA card 32 for the default grid-menu wrapper, including the built-in dots overlay driving both table and card representations.
|
|
15
|
+
- Changed: `createColumnGrid.View` now defaults `controls="auto"` to the dots overlay; `Dots` defaults to all columns, default toolbar items toggle column visibility, and `autoSizeOnColumnCountChange` optionally fits only when visible column count changes.
|
|
16
|
+
- Changed: Updated `wenay-common2` from `^1.0.65` to `^1.0.70`.
|
|
17
|
+
- Reason: common2 1.0.66 adds the `Media` namespace (browser mic/camera capture as binary `Listen` sources, fixed-header media frames via `encodeMediaFrame`/`decodeMediaFrame`, `replay:true` media mode in `createRpcServerAuto`, `wenay-common2/media` export). Media lines are ordinary Listen/replay lines, so existing `useListen*`/`useReplay*` hooks consume them without new React surface; the brief/rare replay docs now record this instead of adding hooks.
|
|
18
|
+
- Reason: common2 1.0.67 adds `Replay.createRouteCoordinator` (policy-gated relay<->direct routing over pure `RouteConnector` transports; data continuity via `replayRouteSubscribe`). Coordinator `link.subscribe` returns the same handle shape as our route hooks (`ready, seq(), label(), active()`); a React adapter for coordinator links is recorded as a target goal, existing route hooks stay the manual `switchRoute` surface.
|
|
19
|
+
- Reason: common2 1.0.68 completes the direct path: `Replay.createSignalHub` (WebRTC signaling over the existing socket/RPC control channel), `Replay.createWebRtcConnector` (the direct `RouteConnector`; `rtc` is an injected runtime factory — in the browser `() => new RTCPeerConnection(cfg)`, which is exactly this library's environment), `acceptWebRtcDirect`, and `serveReplayChannel`/`channelReplayRemote` (replay wire over any ordered channel). Together 1.0.66-1.0.68 form the media -> replay line -> policy-routed relay/direct stack; React-side adoption goals are recorded in `doc/target/my.md`.
|
|
20
|
+
- Reason: common2 1.0.69 adds the `Peer` namespace (`wenay-common2/peer`) — the one-call SDK over rpc + store + replay + route coordinator (`createPeerHost` / `createPeerClient` / `createPatchRelayJournal`; per-peer mirrored stores survive relay<->direct hand-offs in one seq space) and fixes real-browser ICE candidate serialization. This reframes our coordinator-adapter target goal: the React surface should sit on `Peer` (peer store mirror + route control), not on raw coordinator links. 1.0.70 ships oracle suites and the demo stand inside the npm package as living examples.
|
|
21
|
+
- Added: `useCacheMapPersistence(cache, delay?)` in `utils/cache.ts` (+ exported `CacheMap` type) - the documented load + onDirty->saveDebounced app contract as one hook returning `{isDirty, flush, save, reload}`; the three duplicated effects in QA cards 20/21/25 now use it.
|
|
22
|
+
- Added: `useResizeObserver(onResize)` / `useElementSize()` in `components/MyResizeObserver.tsx` - hook-shaped entry over the existing `CResizeObserver` singleton (callback ref, cb through a ref, rounded equality-guarded width/height state + live `getSize()`); `setResizeableElement` path untouched; QA card 19 migrated off its manual `ResizeObserver`+rAF wiring.
|
|
23
|
+
- Added: `useLogsPageTable()` -> `LogsPageTableController` in `logs/logs.tsx` - the full-page logs table moved to the controller pattern (mount-time row snapshot, `applyTransactionAsync` appends, importance filter deduplicated into one `applyImportanceFilter` method); `PageLogs` is now a thin wrapper over `table.gridProps`.
|
|
24
|
+
- Reason: the three do-now candidates from the hook-extraction audit (`doc/progress/hook-extraction-audit.md`): each removes real imperative duplication and has a live QA consumer; old names stay compatibility wrappers, public API unchanged.
|
|
25
|
+
- Changed: Architecture audit (2026-07-09, 4 subsystem readers + core reading) recorded: fix queue in `doc/target/my.md` (A1-A10: memoryStore layering inversion, getLogsApi shared state, dead menuR, columnState barrel pulling ag-grid runtime, quadruplicated pinFixed idiom, updateBy resubscribe/ordering, drag primitive x4, undisposed onChange subscriptions, triple modal systems, naming/SSR pack); dead/suspicious surfaces added to the rare-doc Cleanup Inventory. No code changed by the audit itself.
|
|
26
|
+
- Changed (A1): persisted maps (`floatingWindowMap`, `mapResiReact`, `mapRightMenu`) moved to the new utils leaf `utils/persistedMaps.ts`; FloatingWindow/Resizable/RightMenuStore now import and re-export them (public surface unchanged), `memoryStore` no longer imports the component layer - the utils->components backward edge is gone; `api.tsx` layer comments corrected.
|
|
27
|
+
- Changed (A4): `columnState/index.ts` barrel is ag-grid-free again - `createColumnGrid` (AgGridTable + createToolbar runtime) is exported from the root api via its own module, grid-less consumers can import the columnState barrel directly.
|
|
28
|
+
- Changed (A2): `getLogsApi<T>()` builds fresh per-call state (own map/mini/settings; optional `settingsKey` in `LogsApiOptions` persists instance settings); the global `logsApi` explicitly injects the legacy shared module state, so all existing consumers and QA card 9 are behavior-identical; React views bound per instance via optional state props defaulting to the legacy state.
|
|
29
|
+
- Changed (A5): the quadruplicated `filter(!fixed)`+pinFixed idiom (columnState.normalize, ColumnsMenu.movedOrder, Toolbar.normalize, Toolbar.Settings.movedOrder) now shares `utils/fixedOrder.ts` (`pinFixedOrder`, `movedOrderWithFixed`), exported from the utils barrel; dead `renderBy`/`updateBy` imports dropped from columnState.
|
|
30
|
+
- Changed (A6): `updateBy` - imperative `f` goes through a ref (inline callbacks no longer resubscribe every render); React notifiers and imperative callbacks live in separate sets, so `renderByLast`/`renderByRevers` affect ONLY React subscribers while `f` callbacks always run in subscription order (before React notifiers), matching the documented contract; reentrant `renderBy` on the same object coalesces (bounded passes).
|
|
31
|
+
- Changed (A8): `createToolbar().api.dispose()` and `createColumnGrid().dispose()` release factory-lifetime subscriptions (external-source onChange, config onChange, pending fit RAF) - repeated factories over one key no longer accumulate permanent listeners; `createColumnGrid` re-seeds `visibleCount` on grid re-attach so the auto-fit is not mis-skipped after a remount.
|
|
32
|
+
- Changed (A10, safe part): `searchHistory.items`/`use()` no longer mutate persisted state on read (normalization moved to the write path); `window` reads guarded in `RightMenu` render clamp, `LeftModal.useViewport`, and `ApiLeftMenu`'s import-time default element (SSR/tests).
|
|
33
|
+
- Verification (architecture pass): `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (45/45); `npm run build`; QA stand 3010 fresh load with zero console errors; spot checks - card 21 place persisted across reload (persistedMaps path), card 25 toolbar click updates last action (fixedOrder + updateBy path), card 32 table/cards switch + dots overlay, card 9 add-log appends rows (isolated getLogsApi, global path).
|
|
34
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (45/45); `npm run build`; QA stand 3010: card 21 place switch survives F5 (hook persistence), card 19 fixed-parent 150->240px updates select 92->180px and container 150x51->240x51 via `useElementSize`, card 9 add-log appends rows through the controller.
|
|
35
|
+
- Verification: `npx tsc --noEmit`; `npm run build`; QA stand `http://127.0.0.1:3010/` and `/src/testReact.tsx` return HTTP 200.
|
|
13
36
|
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand`; `npm run build`; `npm pack .\dist --json` confirmed `doc/changes/v1.0.41.md`, `doc/wenay-react2.md`, `doc/wenay-react2-rare.md`, `doc/EXAMPLE_USAGE.md`, and `doc/target/my.md`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# v1.0.42
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-10
|
|
4
|
+
|
|
5
|
+
Status: released.
|
|
6
|
+
|
|
7
|
+
- Added: `onClickClose` prop on `FloatingWindow`/`FloatingWindowBase`; the historical `onCLickClose` typo prop stays as a deprecated compatibility alias (`onClickClose` wins when both are set). Internal `SettingsDialog` usage migrated. (A10)
|
|
8
|
+
- Added: `keyForSave` prop on `useOutside`'s `Button` (same persist-key naming as `FloatingWindow`/`Resizable`/`RightMenu`); the old `keySave` stays as a deprecated compatibility alias. Factory-option `key` names (`createToolbar`, `staticGetAdd`, `createUiSlot`) are not React props and stay as is. (A10)
|
|
9
|
+
- Fixed: duplicate QA card numbering - Replay per-key feed and route hand-off cards renumbered 25→33 and 26→34; card 25 (createToolbar) and 26 (useReorder) keep their numbers. (A10)
|
|
10
|
+
- Added: `__test/tokens.test.ts` - permanent jest guarantee that `tokens.ts` mirrors `tokens.css` in both directions (CSS `var()` references resolved before compare). Chosen instead of codegen so the build pipeline stays untouched. (A10)
|
|
11
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (47/47).
|
|
12
|
+
- Added: `structEqual` in `utils/structEqual.ts` (exported from the utils barrel) - structural deep equality with the `JSON.stringify` idiom's tolerances (undefined props absent, NaN==NaN) but without its key-order sensitivity. (A10)
|
|
13
|
+
- Changed: `columnState.readFromGrid` change/loop guards use `structEqual` instead of `JSON.stringify` - the grid's `getFilterModel()` key order no longer counts as a change (false-positive commits gone). The order-SENSITIVE `sameMap` presence guard is intentionally untouched: its order sensitivity re-imposes the stored order when columnDefs reset the grid's order. (A10)
|
|
14
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (53/53, incl. new `structEqual` suite).
|
|
15
|
+
- Added (A7): `useDraggableApi` options `onMove` (imperative per-move-tick callback through a ref; not fired on setPosition/reset/cancel or release) and `trackState: false` (position lives only in `positionRef`/`onMove`, no re-render per move tick; start/end re-renders remain). Both additive, defaults unchanged.
|
|
16
|
+
- Changed (A7): `DragBox` is now a thin adapter over `useDraggableApi` (holdMs 0, trackState false, onMove) instead of its own document-listener loop. Contract preserved and pinned by the new permanent `__test/dragBox.test.tsx`: immediate start, per-tick imperative `onX`/`onY` with the delta from the press point, mouse `preventDefault` / touch none, touch identifier tracking, no re-render per move tick, `onStop` (no args) only after a real gesture, `last` ref shares the live position object, per-gesture delta reset. The unused `dragging` prop stays accepted.
|
|
17
|
+
- Changed (A7): `DragArea` marked `@deprecated` (no consumers; unique semantics - `document.body` listeners, `stopPropagation` per move tick, ABSOLUTE coords, no preventDefault - re-basing would change observable behavior). Removal only in a deliberate breaking version.
|
|
18
|
+
- Decided (A7): `useFloatingWindowController`'s header loop and `StickerMenu` stay on their own loops - their unique behavior is load-bearing (viewport clamp + `e.buttons===1` release recovery + persist/z-stack; mount-lifetime listeners + click-vs-drag suppression respectively).
|
|
19
|
+
- Changed: QA card 35 added - DragBox delta drag with starts/stops/renders counters (renders must NOT grow per move pixel).
|
|
20
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (58/58); stand 3010 fresh load zero console errors, card 35 two consecutive drags (commit without jump-back, renders 1+2 per gesture), card 26 reorder drag commits once (`B C A D E F G H`, commits 1).
|
|
21
|
+
- Added (A9): internal `components/Overlay.tsx` - the one portal+scrim+outside-click+Escape composition for scrim-based modal systems. Deliberately NOT exported from public barrels; outside-click delegates to `OutsideClickArea` (mousedown+touchstart semantics preserved); the Escape listener attaches only when `onEscape` is passed; callbacks go through refs. Also the DOM seam for a future react-native view layer.
|
|
22
|
+
- Changed (A9): `ModalProvider` composes `Overlay` (inline token scrim + flex centering, `tokens.zIndex.modal`, Escape gated by `closeOnEscape`, outside by `closeOnOutsideClick`) - public API and observable behavior unchanged; pinned by new permanent `__test/modalProvider.test.tsx`.
|
|
23
|
+
- Changed (A9): `SettingsDialog` composes `Overlay` (`wenayDlgScrim`/`wenayDlgOutside` classes, window zIndex 10000 over the 9999 scrim); NO `onEscape` - the controller keeps its two-stage Escape (clear search, then close).
|
|
24
|
+
- Decided (A9): `createModalElementStore` (render-slot store, not chrome), `LeftModal`/`Modal2` drawer (gesture-driven, scrim-less), and `ModalWrapper`/Input helpers (backdrop-less by design, hosted inside another modal slot) are NOT overlays and stay separate.
|
|
25
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand` (62/62); stand 3010 fresh load zero console errors; card 13 - open, Escape, outside click, close button (scrim dims, token z-index); card 20 - open, two-stage Escape (clear -> close), outside click, window x.
|
|
26
|
+
- Changed: docs updated for the whole pass - `wenay-react2.md` (useDraggableApi `onMove`/`trackState`, `onClickClose` in the FloatingWindow example, `Button` `keyForSave`), `wenay-react2-rare.md` (internal Overlay note in Modal Low Level, A7 drag-primitives outcome in Drag/Resize Low Level, `structEqual` in utilities, Cleanup Inventory refreshed: getLogsApi/onCLickClose marked fixed/aliased, DragArea and keySave added as deprecated); session note in `doc/progress/architecture-fix-queue.md`.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Architecture fix queue (A1-A10) — progress
|
|
2
|
+
|
|
3
|
+
Status: in progress (session 2026-07-10). Queue source: `doc/target/my.md` (audit 2026-07-09).
|
|
4
|
+
Durable per-change record: `doc/changes/v1.0.41.md` (shipped part), `doc/changes/v1.0.42.md` (current).
|
|
5
|
+
|
|
6
|
+
## Session 2026-07-10 — recovery + tail of the queue
|
|
7
|
+
|
|
8
|
+
Context: the machine rebooted; recovered from docs. Discovered and fixed first:
|
|
9
|
+
the 1.0.41 release commit did NOT contain `columnGrid.tsx`, `fixedOrder.ts`,
|
|
10
|
+
`persistedMaps.ts` and the whole architecture pass (npm had them, git did not —
|
|
11
|
+
same failure mode as the earlier eb4e9b3 fix). Also `.npmrc` with a live npm
|
|
12
|
+
auth token was sitting untracked — now gitignored (`/.npmrc`, `.vite-*.log`);
|
|
13
|
+
the token itself should probably be rotated since it was on disk in the repo dir.
|
|
14
|
+
|
|
15
|
+
Commits this session (chronological):
|
|
16
|
+
|
|
17
|
+
1. **Post-release commit of the 1.0.41 working tree** — createColumnGrid sources,
|
|
18
|
+
A1/A2/A4/A5/A6/A8/A10-safe, hook-extraction do-now trio, common2 ^1.0.70,
|
|
19
|
+
changelog/docs; .gitignore hardening.
|
|
20
|
+
2. **A10 safe part 2** — `onClickClose` alias (+deprecated `onCLickClose`),
|
|
21
|
+
`keyForSave` alias on `Button` (+deprecated `keySave`), QA card dup fix
|
|
22
|
+
(Replay 25→33, 26→34), `__test/tokens.test.ts` (two-way tokens.ts↔tokens.css).
|
|
23
|
+
Verify: tsc qa-check, jest 47/47.
|
|
24
|
+
3. **A10 loop-guard** — `utils/structEqual.ts` (+barrel export, permanent test);
|
|
25
|
+
`columnState.readFromGrid` guards off `JSON.stringify`; order-sensitive
|
|
26
|
+
`sameMap` deliberately untouched (its sensitivity re-imposes stored order on
|
|
27
|
+
columnDefs reset). Verify: tsc, jest 53/53.
|
|
28
|
+
4. **A7** — `DragBox` → thin adapter over `useDraggableApi` (+additive
|
|
29
|
+
`onMove`/`trackState:false` on the hook); `DragArea` @deprecated as-is;
|
|
30
|
+
`useFloatingWindowController`/`StickerMenu` deliberately stay bespoke
|
|
31
|
+
(recon: clamp, `buttons===1` recovery, persist, z-stack / mount-lifetime
|
|
32
|
+
listeners, click-suppression are load-bearing). `__test/dragBox.test.tsx`,
|
|
33
|
+
QA card 35. Verify: tsc, jest 58/58, stand: card 35 two drags commit without
|
|
34
|
+
jump-back (renders 1+2/gesture), card 26 reorder commits once, zero console
|
|
35
|
+
errors on fresh load.
|
|
36
|
+
|
|
37
|
+
## A9 — DONE (committed 2026-07-10, 5th commit of the session; build OK)
|
|
38
|
+
|
|
39
|
+
Done:
|
|
40
|
+
|
|
41
|
+
- `components/Overlay.tsx` — INTERNAL (not exported) portal+scrim+outside+Escape
|
|
42
|
+
composition; outside-click delegates to `OutsideClickArea`; Escape listener only
|
|
43
|
+
when `onEscape` given; callbacks through refs. Doubles as the DOM seam for the
|
|
44
|
+
future react-native view layer (headless state stays in hosts).
|
|
45
|
+
- `ModalProvider` → Overlay (inline token scrim + flex centering, Escape gated by
|
|
46
|
+
`closeOnEscape`, outside by `closeOnOutsideClick`) — public API untouched.
|
|
47
|
+
- `SettingsDialog` → Overlay (`wenayDlgScrim`/`wenayDlgOutside` classes,
|
|
48
|
+
NO onEscape — the controller keeps the two-stage Escape: clear search, then close).
|
|
49
|
+
- New permanent `__test/modalProvider.test.tsx` (portal/scrim/Escape/outside gates).
|
|
50
|
+
|
|
51
|
+
Verified so far: tsc qa-check OK; jest 62/62; stand card 13 — open, Escape,
|
|
52
|
+
outside click, close button all work (scrim dims, token z-index); card 20 —
|
|
53
|
+
open, two-stage Escape (clear → close), outside click, window x. Console clean
|
|
54
|
+
on fresh load (the ReferenceError seen mid-session was a vite HMR intermediate
|
|
55
|
+
between two sequential edits, gone after reload).
|
|
56
|
+
|
|
57
|
+
Deliberately NOT overlaid (recorded in changelog): `createModalElementStore`
|
|
58
|
+
(render-slot store, not chrome), `LeftModal`/`Modal2` drawer (gesture-driven,
|
|
59
|
+
no scrim), `ModalWrapper`/Input helpers (backdrop-less by design, hosted inside
|
|
60
|
+
another modal slot).
|
|
61
|
+
|
|
62
|
+
Close-out complete: fresh-page card-13/20 spot checks passed, changelog +
|
|
63
|
+
my.md updated, `npm run build` OK, committed.
|
|
64
|
+
|
|
65
|
+
## Queue after this session
|
|
66
|
+
|
|
67
|
+
- **A3 (BREAKING)** dead `menuR.tsx` removal — only in a deliberate breaking version.
|
|
68
|
+
- **A10 breaking leftovers** — raw `ListenApi` narrowing; removal of deprecated
|
|
69
|
+
`onCLickClose`/`keySave`/`DragArea`.
|
|
70
|
+
- Then Ready queue: common2 1.0.66-1.0.70 adoption (useMediaSource, Peer SDK
|
|
71
|
+
adapter, WebRTC recipe), context-menu controller split, chart canvas wrapper.
|
|
72
|
+
- New Inbox item 2026-07-10: React Native / mobile version of the library's
|
|
73
|
+
functionality (see `doc/target/my.md` Inbox + verbatim dictation) — A9 Overlay
|
|
74
|
+
was already shaped with that in mind (DOM isolated in one leaf).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Style system normalization
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: done/released (v1.0.38, v1.0.39, v1.0.41); default inventory and column-state scoped token fixes implemented and shipped.
|
|
4
4
|
|
|
5
5
|
## Source
|
|
6
6
|
|
|
@@ -30,9 +30,9 @@ Current prefixes are a good start:
|
|
|
30
30
|
- `--wnd-*`
|
|
31
31
|
- `--dlg-*`
|
|
32
32
|
- `--tb-*`
|
|
33
|
-
- `--logs-*`
|
|
34
|
-
- `--cols-menu-*` for compact `ColumnsMenu/MenuStrip` visuals.
|
|
35
|
-
- `--cols-dots-*` for `ColumnDots` visuals.
|
|
33
|
+
- `--logs-*`
|
|
34
|
+
- `--cols-menu-*` for compact `ColumnsMenu/MenuStrip` visuals.
|
|
35
|
+
- `--cols-dots-*` for `ColumnDots` visuals.
|
|
36
36
|
- `--cols-card-*` for `CardList` visuals.
|
|
37
37
|
|
|
38
38
|
Likely next prefixes:
|
|
@@ -118,4 +118,4 @@ Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest --
|
|
|
118
118
|
- `MenuR` / mouse context menu and `RightMenu` CSS получили hard fallbacks: default dark background, white text, hover white with dark text, pressed yellow-ish contrast state;
|
|
119
119
|
- причина: рабочие проекты могут ещё не переопределять новые CSS variables, поэтому дефолт не должен становиться glass/transparent.
|
|
120
120
|
|
|
121
|
-
Проверка: CSS-only visual contract; прогнать `tsc`/`build`, card 4 вручную открыть правой кнопкой.
|
|
121
|
+
Проверка: CSS-only visual contract; прогнать `tsc`/`build`, card 4 вручную открыть правой кнопкой.
|
package/doc/target/my.md
CHANGED
|
@@ -4,44 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
## In Progress
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Hook/controller-first стандарт: новый reusable функционал проектировать через `use*` hook или `create*` controller с API управления; визуальный компонент делать тонким слоем сверху, старое имя оставлять compatibility wrapper, если это не ломает код.
|
|
11
|
-
- Оценка задач: эффективность high/medium/low, простота simple/medium/hard, риск low/medium/high. Low-effectiveness или hard/high-risk без явного выигрыша пропускать и помечать причиной.
|
|
12
|
-
- Сделано: `useKeyboard.ts` переведён с прямого `renderBy(keyboardState)` на `createUpdateApi(keyboardState)`; публичный `keyboard` / `useKeyboard` API не менялся.
|
|
13
|
-
- Сделано: `MiniLogs` / `PageLogs` используют `colDefCentered` + локальный `wrapText: true` вместо ручного `defaultColDef`.
|
|
14
|
-
- Сделано: `MiniLogs` / `PageLogs` переведены с raw `AgGridReact` на `AgGridTable` без переписывания logger state/timing; card 9 готова для ручной проверки.
|
|
15
|
-
- Сделано: `createModalElementStore` / `createModalRenderStore` переведены с прямого `renderBy/updateBy(data)` на `createUpdateApi(data)` без изменения публичного compatibility API.
|
|
16
|
-
- Сделано: `createUiSlot` переведён с прямого `renderBy/updateBy(st)` на `createUpdateApi(st)`; card 21 проверена как usage-пример, менять не нужно.
|
|
17
|
-
- Сделано: `Toolbar.tsx` density registry переведён с прямого `renderBy/updateBy(densities)` на `createUpdateApi(densities)`; card 25 проверена как usage-пример, менять не нужно.
|
|
18
|
-
- Сделано: `SettingsDialog.tsx` section registry переведён с прямого `renderBy/updateBy(registry)` на `createUpdateApi(registry)`; card 20 проверена как usage-пример, менять не нужно; layout-store пропущен как low-effectiveness без явного consumer.
|
|
19
|
-
- Сделано: `columnState.ts` runtime `rt` (`present/presentGate`) и persisted `st` переведены на `createUpdateApi`; cards 28-31 проверены как usage-примеры, менять не нужно.
|
|
20
|
-
- Сделано: `createSearchHistory` переведён на `createUpdateApi`; публичный API истории поиска не менялся.
|
|
21
|
-
- Сделано: `createToolbar` local persisted store `st` переведён на `createUpdateApi`; `sourceMode`, external source hook и memory dirty flow не менялись.
|
|
22
|
-
- Сделано: `FloatingWindow.tsx` open-window z-index registry переведён на `createUpdateApi`; drag/resize geometry не менялась.
|
|
23
|
-
- Сделано: `LeftModal.tsx` menuStore переведён на `createUpdateApi`; compatibility `ApiLeftMenu.renderBy()` сохранён.
|
|
24
|
-
- Сделано: отдельный audit-pass по hook/controller-first кандидатам записан в [../progress/hook-controller-opportunities.md](../progress/hook-controller-opportunities.md); в очередь попали только задачи с понятной пользой/риском, сомнительные отмечены как skip.
|
|
25
|
-
- Сделано: `MiniLogs` layered redesign — добавлены `useMiniLogsTable`, `MiniLogsView`, `MiniLogsTable`, старый `MiniLogs` оставлен compatibility wrapper; store/history намеренно не добавлялись без consumer.
|
|
26
|
-
- Сделано: `Menu` action-level stats — добавлен явный `actionKey`, `actionTotals`/`actions` counters, focused tests и QA card 4; полный `useMenuActionController` split отложен как отдельный более крупный pass.
|
|
27
|
-
- Сделано: `RightMenu` cleanup — добавлен `useRightMenuController`, `DropdownMenu` оставлен compatibility wrapper, `createRightMenuController().Render` сохранён; registry rewrite пропущен как низкоэффективный без нового consumer.
|
|
28
|
-
- Сделано: `ParamsEditor` first controller layer — добавлен `useParamsEditorController` для draft clone / immediate+delayed notify / expand / cleanup; full renderer/view split и `ParamsEdit` async-save hook отложены как hard/high-risk без отдельного pass.
|
|
29
|
-
- Сделано: Logs inventory + low-risk primitive reuse — `logsContext.LogsTable` переведён на `AgGridTable`/`colDefCentered`, `PageLogs` copy action получил `actionKey: "logs.copyCell"`.
|
|
30
|
-
- Сделано: Logs headless controller — добавлен `createLogsController` / `createLogsControllerState` для append/limits/latest/settings emitters; `getLogsApi` оставлен compatibility wrapper, UI/timers/tabs не переписывались.
|
|
31
|
-
- Сделано: `SettingsDialog` first controller layer — добавлен `useSettingsDialogController` для open/search/history/tree-cycle/nav-resize/Escape actions; JSX/portal/FloatingWindow/classes не переписывались.
|
|
32
|
-
- Сделано: context logger UI hooks — добавлены `useLogsTableController` и `useLogsNotificationsController`; `LogsTable`/`LogsNotifications` оставлены compatibility wrappers.
|
|
33
|
-
- Сделано: `FloatingWindow` first controller layer — добавлен `useFloatingWindowController` для saved geometry / update counter / z-index stack / drag state / resize callbacks / viewport clamp; `FloatingWindowBase` оставлен compatibility wrapper над тем же `Rnd` и DOM/classes.
|
|
34
|
-
- Пропущено: `FResizableReact` hook — в `src`/`__test` нет render-consumers, только export/docs и `mapResiReact` persistence wiring; без consumer это low-effectiveness speculative refactor.
|
|
35
|
-
- Hook/controller-first backlog обновлён: low-effectiveness пункты не делать без отдельного consumer/test, а новые осмысленные split passes вынесены в `Ready`.
|
|
36
|
-
- Сделано: final primitive-reuse inventory — raw `AgGridReact` / `useGrid.tsx`, `logsContext.localStorage`, PageVisibility/replay/chart timers, Settings/Toolbar registries and ModalProvider paths проверены; оставшиеся места помечены как low-effectiveness/high-risk без отдельного consumer/test.
|
|
37
|
-
- Сделано: QA card 25 toolbar `tb.api.onChange` переведён с ручного `useEffect(() => listen.on(...))` на `useListenEffect(tb.api.onChange, ...)` как canonical listen-hook usage.
|
|
38
|
-
- Сделано: `Toolbar.Bar` получил FLIP-анимацию перемещения элементов; cards 25 и 31 теперь ведут себя как card 30-эталон, card 30 не переписывался.
|
|
39
|
-
- Сделано: `MessageEventLogs` / `logsApi.React.Message` разбит на `useMessageEventLogsController` + `MessageEventLogsView` + `MessageEventLogCard`; card 9 теперь реально показывает corner notification layer.
|
|
40
|
-
- Записано: дополнительные hook/controller split candidates с оценкой эффективности/простоты/риска в [../progress/hook-controller-opportunities.md](../progress/hook-controller-opportunities.md); low-effectiveness пункты оставлены parked.
|
|
41
|
-
- Сделано: default правой/контекстной менюшки снова непрозрачный тёмный (`--menu-bg-color: #0c0c0c`), hover белый/чёрный, active/pressed вынесены в отдельные `--menu-item-*` tokens; card 9 close toggle сделан компактной кнопкой.
|
|
7
|
+
_Пусто._ «Hook extraction — do-now кандидаты (3)» выполнен 2026-07-09: `useCacheMapPersistence` (cache.ts), `useResizeObserver`/`useElementSize` (MyResizeObserver.tsx), `useLogsPageTable` (logs.tsx); старые имена — compatibility wrappers, card 25 не тронута. Проверено: tsc qa-check, jest 45/45, build, стенд 3010 (карточки 21 F5-persistence / 19 resize / 9 logs). Durable-запись: `doc/changes/v1.0.41.md`; parked/отклонённые кандидаты остаются в `doc/progress/hook-extraction-audit.md`.
|
|
8
|
+
|
|
9
|
+
(Предыдущий проход «Нормализация внутренних слоёв библиотеки» проверен multi-agent-верификацией и отгружен в v1.0.40/v1.0.41; durable-запись: `doc/progress/public-surface-normalization.md`, `doc/progress/hook-controller-opportunities.md`, `doc/changes/v1.0.38–v1.0.41.md`.)
|
|
42
10
|
|
|
43
11
|
## Ready
|
|
44
12
|
|
|
13
|
+
- **API-витрина: ярусы канон/compat + quickstart** (из оценки юзабельности 2026-07-10, надиктовка в конце файла).
|
|
14
|
+
- Проблема: вызовы лаконичные, но ИЗУЧЕНИЕ — нет. Рядом с каноном на одной поверхности торчит легаси (3 публичных способа модалки, 2 стека логов, `Get*`/`*2`/`*3`-имена, demo-экспорты типа `MyChartEngine`); новичок не отличит канон от compat без rare-дока; `updateBy`-модель — налог на вход.
|
|
15
|
+
- Задача (без breaking, чисто витрина): 1) **README/quickstart** — 5 главных примитивов с примерами (toolbar+columnState, SettingsDialog, FloatingWindow, replay-хуки, memoryCache-контракт), «начни отсюда»; 2) **явные ярусы** — либо отдельный «modern» entrypoint (реэкспорт только канона, старый корень не трогаем), либо чёткая namespace-разметка в api.tsx + в brief-доке бейджи канон/compat/deprecated; 3) размеченный список compat-поверхности синхронизировать с Cleanup Inventory (rare-док) — он же план breaking-версии.
|
|
16
|
+
- Оценка: эффективность high (самый дешёвый рост юзабельности), простота easy/medium (докосновно + один реэкспорт-модуль), риск low (аддитивно, публичный API не меняется).
|
|
17
|
+
- Связка: breaking-версия (A3 + снос deprecated `onCLickClose`/`keySave`/`DragArea`/`menuR`, сужение `ListenApi`) идёт ПОСЛЕ витрины — витрина и есть список того, что сносим.
|
|
18
|
+
|
|
19
|
+
- **common2 1.0.66–1.0.68 adoption: Media + route coordinator/WebRTC React surface** (из надиктовки №4 «посмотри, что нового, создай цели использовать»).
|
|
20
|
+
- Контекст: 1.0.66 = `Media` (захват мик/камера как бинарные Listen/replay-источники, `decodeMediaFrame`), 1.0.67 = `Replay.createRouteCoordinator` (policy-gated relay↔direct, link.subscribe без switchRoute), 1.0.68 = WebRTC direct-путь (`createSignalHub` по существующему RPC-сокету, `createWebRtcConnector` с инжектируемой `rtc`-фабрикой — инжекция `() => new RTCPeerConnection(cfg)` живёт на браузерной/React-стороне, `acceptWebRtcDirect`, `serveReplayChannel`). Вместе: media → replay line → policy-маршрутизация relay/direct.
|
|
21
|
+
- **1. `useMediaSource` (capture-control hook)** — пересмотр прежнего решения «Media-хуков намеренно нет»: consumption по-прежнему через существующие `useReplay*`-хуки, но capture `control` (`start()` → `'idle'|'requesting'|'live'|'denied'|'no-device'|'error'`, `stop()`, `setDevice`, `listDevices`, stats) — это permission/device/lifecycle state machine, hook-shaped. Хук: state как React state, `listen` наружу как есть, stop() на unmount. QA card: камера → `replay:true` линия → canvas через `useReplaySubscribe`+`decodeMediaFrame`; deny/no-device видимы на стенде.
|
|
22
|
+
- **2. Peer SDK adapter (supersedes the raw coordinator-link idea, common2 1.0.69)** — React surface over `Peer.createPeerClient`: `usePeer(client, account)` -> peer's mirrored store (plugs into existing `useStoreNode`/`useStoreKeys`) + route state/controls (`promoteDirect` result-object, `reinterposeRelay`, `route()`, `ready`, `seq()`). Do NOT bend existing route hooks; mirrors survive route changes by design. QA card modeled on oracle `replay/peer-sdk.test.ts` (fake in-proc RTC runtime); common2 1.0.70 ships the oracles + `demo/` stand in the package as living examples to crib from.
|
|
23
|
+
- **3. WebRTC recipe (docs/example, not a hook)** — how the app injects the `rtc` factory (`() => new RTCPeerConnection(cfg)`) and wires the signal port from `createRpcServerAuto`; combine with a Media source (call/stream demo) over Peer. Real-browser ICE serialization is fixed in 1.0.69 (`toJSON()` on the wire), so a live two-tab demo is feasible — see common2 `demo/` shared-cursors stand.
|
|
24
|
+
- Оценка: 1 — simple/low-risk (аддитивно); 2 — medium (in-proc fake стенд, по образцу peer-sdk oracle); 3 — docs-first. Приоритет: после architecture-fix очереди A1-A10.
|
|
25
|
+
|
|
45
26
|
- **Context menu / Menu: controller-first split**.
|
|
46
27
|
- Прогресс/оценка: [../progress/hook-controller-opportunities.md](../progress/hook-controller-opportunities.md)
|
|
47
28
|
- Смысл: выделить `createContextMenuController` / `useMenuLayer` + `MenuView` и action-layer для async/progress/submenu flow, не ломая `contextMenu.openAt`, `contextMenu.Layer` и `contextMenu.stats`.
|
|
@@ -51,43 +32,28 @@
|
|
|
51
32
|
- Смысл: вынести canvas lifecycle, `ResizeObserver`, event attach/destroy and RAF bridge из `MyChartEngine` wrapper.
|
|
52
33
|
- Оценка: эффективность medium; простота medium; риск medium. Брать, если будет stand/test на chart lifecycle.
|
|
53
34
|
|
|
54
|
-
- **
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- **
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
35
|
+
- **Architecture audit 2026-07-09 — fix queue** (4 subsystem readers + core reading; suspicious surfaces recorded in rare-doc Cleanup Inventory).
|
|
36
|
+
- DONE 2026-07-09/10 (details + verification in `doc/changes/v1.0.41.md`): **A1** memoryStore layering inverted (`utils/persistedMaps.ts`, components re-export their maps); **A2** `getLogsApi` per-call state isolation (+`settingsKey`), global `logsApi` keeps legacy shared state; **A4** columnState barrel is ag-grid-free again (columnGrid ships from its own module via root api); **A5** shared `utils/fixedOrder.ts` replaced 4 inline pinFixed copies; **A6** updateBy: f-through-ref, separate React/imperative listener sets (renderByLast/Revers touch only React subscribers), bounded reentrancy coalescing; **A8** `dispose()` on createToolbar/createColumnGrid + `visibleCount` re-seed on re-attach; **A10-safe** searchHistory read purity, window guards (RightMenu render clamp, LeftModal useViewport, ApiLeftMenu default element), dead imports dropped.
|
|
37
|
+
- **A3 (high, BREAKING)** `menuR.tsx` is dead public code + duplicates menuMouse gesture logic (menuMouse.tsx:342-380). Remove in a deliberate breaking version (recorded in Cleanup Inventory).
|
|
38
|
+
- DONE 2026-07-10 (**A7**, details in `doc/changes/v1.0.42.md`): DragBox → адаптер над useDraggableApi (+аддитивные `onMove`/`trackState` в хук, `__test/dragBox.test.tsx`, QA card 35); DragArea @deprecated as-is (уникальная семантика, потребителей нет — снос только в breaking); useFloatingWindowController/StickerMenu остаются на своих loop'ах осознанно (clamp/buttons-recovery/persist/z-stack и mount-lifetime listeners/click-suppression — load-bearing).
|
|
39
|
+
- DONE 2026-07-10 (**A9**, details in `doc/changes/v1.0.42.md`): внутренний `components/Overlay.tsx` (portal+scrim+outside+Escape, НЕ экспортирован); ModalProvider и SettingsDialog — адаптеры над ним (публичный API/поведение 1:1, включая двухступенчатый Escape SettingsDialog); createModalElementStore/LeftModal-drawer/ModalWrapper — осознанно не overlay'и. `__test/modalProvider.test.tsx`. Overlay = DOM-шов для будущего RN-слоя.
|
|
40
|
+
- DONE 2026-07-10 (**A10 safe part 2**, details in `doc/changes/v1.0.42.md`): `onClickClose` additive alias (+deprecated `onCLickClose`); `keyForSave` alias on useOutside `Button` (+deprecated `keySave`); QA card dup fixed (Replay 25→33, 26→34; toolbar 25 / useReorder 26 keep numbers); `__test/tokens.test.ts` two-way tokens.ts↔tokens.css guarantee (codegen отклонён — сборку не трогаем).
|
|
41
|
+
- DONE 2026-07-10 (**A10 loop-guard**, details in `doc/changes/v1.0.42.md`): `readFromGrid` guards на `structEqual` (utils/structEqual.ts, экспортирован из barrel); порядок-чувствительный `sameMap` НЕ тронут осознанно (его чувствительность реимпозит stored order при сбросе columnDefs).
|
|
42
|
+
- **A10 remaining (breaking only)**: raw `ListenApi` (emit/close) exposed from columnState/Toolbar onChange (narrowing is breaking); removal of deprecated `onCLickClose`/`keySave` — breaking pass only.
|
|
43
|
+
- Rule: each fix is its own focused pass with verify (tsc+jest+build+stand); breaking removals only in a deliberate breaking version.
|
|
44
|
+
|
|
45
|
+
- **Hook extraction — parked кандидаты** (do-now 1-3 выполнены и отгружены, см. In Progress выше / `doc/changes/v1.0.41.md`). Остались условные: `useChartCanvas` (ждёт ChartDemo в карточке/тесте), `useContextMenuGesture` (ждёт оживления menuR или live touch-consumer), `columnState.api.reorderPreview` (ждёт общего reorder-контракта), `useResizeableFit` (маленький shared bind callback-ref, отдельный микро-pass). Полные причины/условия возврата: [../progress/hook-extraction-audit.md](../progress/hook-extraction-audit.md).
|
|
61
46
|
|
|
62
47
|
## Inbox
|
|
63
48
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
- Grid helpers: искать локальные `comparator`, `cellStyle`, `wrapText`, theme/defaultColDef и заменять на `numericComparator`, `colDefCentered`, `colDefWrap`, `useAgGridTheme` / `buildAgTheme`, когда это не меняет UX.
|
|
69
|
-
- `AgGridTable`: искать голый `AgGridReact` и ручное lifecycle/resize/getRowId wiring; переводить на `AgGridTable` / `useAgGrid` только там, где можно сохранить текущую тему, selection, events и row identity.
|
|
70
|
-
- `createColumnBuffer`: проверить места с динамическими колонками и ручным хранением набора имён; использовать буфер, если нужен reusable lifecycle exact-set/apply/detach.
|
|
71
|
-
- Store/listen hooks: заменить ручные `listen.on(...) + useEffect/useState` и чтение `Observe.Store` на `useListenEffect`, `useListenValue`, `useListenArgs`, `useStoreNode`, `useStoreSelect`, `useStoreEach`, `useStoreMirror`, где есть явный `wenay-common2` store/listen source.
|
|
72
|
-
- Settings/Toolbar registries: активнее использовать `registerSettingsSection` для саморегистрации настроек и `registerToolbarDensity` для стандартных режимов плотности вместо локальных вариантов кнопок.
|
|
73
|
-
- Modal layer: для новых модалок использовать `ModalProvider` + `useModal`; старые imperative modal stores оставлять только как compatibility path.
|
|
74
|
-
- Replay hooks: применять `useReplaySubscribe`, route-варианты, `useStoreReplayEach`, `useReplayFrame`, `useReplayHistory` только в местах с реальным streaming/history/replay сценарием; не внедрять в обычный UI ради переиспользования.
|
|
75
|
-
- Page visibility: проверить polling, анимации, replay/canvas и тяжёлые обновления; если поведение должно паузиться в скрытой вкладке, использовать `PageVisibilityProvider` / `PageVisibilityContext`.
|
|
76
|
-
- Статус текущего repo-pass: выполнено в рамках [../progress/public-surface-normalization.md](../progress/public-surface-normalization.md); новые пункты добавлять сюда только при появлении реального consumer/test сценария.
|
|
77
|
-
- **Hook/controller-first backlog после audit-pass**.
|
|
78
|
-
- Прогресс/детали: [../progress/hook-controller-opportunities.md](../progress/hook-controller-opportunities.md)
|
|
79
|
-
- Новое: `MessageEventLogs` split выполнен; две следующие осмысленные задачи вынесены в `Ready` (`Menu/contextMenu`, `Chart canvas wrapper`).
|
|
80
|
-
- Не делать сейчас без отдельного consumer/test: `memoryStore` core rewrite, `PageVisibilityProvider` в обычный UI, `StickerMenu` как shared primitive, broad rewrite `DragBox`, `FResizableReact` hook.
|
|
81
|
-
- Оценка: дальнейшие hard/high-risk пункты (`ParamsEditor` full renderer split, `logsContext` migration, `SettingsDialog` full view split, `LeftModal`) брать только отдельным focused pass с ручной/тестовой приёмкой.
|
|
49
|
+
- **React Native / мобильная версия функционала** (надиктовка 2026-07-10, дословно в конце файла).
|
|
50
|
+
- Суть: библиотеку планируют использовать и в мобильном (React Native), где DOM недоступен (нет `document`/`window`/`createPortal`/CSS-классов).
|
|
51
|
+
- Первичная оценка: слоистость уже движется в нужную сторону — headless/controller-слой (updateBy/renderBy, columnState config, createToolbar config+Settings-модель, callbackHub, observableMap/memoryCache, replay-хуки) в основном DOM-free и потенциально переносим; DOM живёт во view-слое (FloatingWindow/Rnd, порталы/скримы, CSS-токены, ag-grid). Направление: (1) аудит `document`/`window`/`createPortal`/CSS-зависимостей по модулям; (2) выделить/закрепить platform-neutral core (возможно отдельный entrypoint без DOM-импортов); (3) RN-view-адаптеры — отдельный пакет/подпапка, не в этом проходе. ag-grid в RN не живёт — мобильные представления уже есть (ColumnDots/CardList) как модель. Персист: storage-слой абстрагировать (localStorage → AsyncStorage).
|
|
52
|
+
- Статус: требует отдельного скоупинга после A-очереди; A9 Overlay-примитив планировать сразу с учётом этого (ядро без DOM, портал/скрим — в web-адаптере). Стоявшие здесь specs («Недоиспользуемые методы: primitive-reuse pass» и «Hook/controller-first backlog») проверены multi-agent-верификацией: оба `doneInCode=fully`, отгружены в v1.0.39–v1.0.41, конкретные изменения записаны в changelog (MiniLogs/AgGridTable/`useListenEffect`/стиль-токены — v1.0.39/40; MessageEventLogs split — v1.0.41). Удалены из очереди; durable-запись — в `doc/progress/public-surface-normalization.md` и `doc/progress/hook-controller-opportunities.md`. Внутренний `createUpdateApi`-pass намеренно только в progress (публичный API не менялся).
|
|
82
53
|
|
|
83
54
|
## Verify
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- Сделано: зафиксирована карта style source-of-truth (`src/style/tokens.css`, `src/common/src/styles/tokens.ts`, `src/style/style.css`, `src/style/menuRight.css`) и default visual contracts по публичным primitive groups.
|
|
87
|
-
- Сделано: `ColumnsMenu/MenuStrip` переведён на `.wenayColsMenu*` + `--cols-menu-*`; runtime reorder transform/drag geometry оставлен inline.
|
|
88
|
-
- Сделано: `ColumnDots/CardList` восстановленный card-29 baseline переведён на `--cols-dots-*` / `--cols-card-*` с теми же fallback-значениями; component runtime geometry не менялась.
|
|
89
|
-
- Проверено: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand`; `npm run build`; `git diff --check`.
|
|
90
|
-
- Не сделано: `ParamsEditor` / `Input` broad visual migration отложен до hook-first/API решения; там нельзя безопасно менять только CSS без риска зацепить поведение.
|
|
55
|
+
|
|
56
|
+
_Пусто._ «Система стилей и CSS variables» проверена: `doneInCode=fully`, `.wenayColsMenu*`/`--cols-menu-*` и `--cols-dots-*`/`--cols-card-*` в коде, changelog v1.0.38/v1.0.39/v1.0.41, отгружено в релизах. Удалено; durable-запись — `doc/progress/style-system-normalization.md`.
|
|
91
57
|
|
|
92
58
|
## Blocked — уровень приложения (не эта React-библиотека)
|
|
93
59
|
|
|
@@ -107,3 +73,9 @@ _Actionable задач по текущему repo-pass нет; пункты ни
|
|
|
107
73
|
> Смотри, нам, короче, нужно как-то брать. У нас есть, короче, супер-админка, и его-- и ее IP-шник, как правило, пока что статичен. Можно хардкодить временно, ну, либо использовать как через переменную, хардкодить через переменную статическую, чтобы было-- ну, не через ENW, а в коде прям, короче. Вот. И просто у нас есть некоторые моменты, которые требуются только для определенных вещей, и нам бы узнавать уровень пользователя. Типа, ну, есть ли права, а-а-а, в клиентской системе, э-э-э, типа для такого-то режима. А узнать уровень пользователя мы можем только через супер-админку. Вот. Как это правильнее сделать? Я пока не понимаю. Ну, типа, к примеру, вот мы на фронте показываем APK. Пока что понятно для отладки, у нас пока так и оставляем. Ну, это больше задачааа, которая требует, наверное, комплексного решения. Скорее всего, нам нужно просто открывать клиентскую страницу через суперадминку. Кстати, мы так и делаем. Все клиентские страницы мы открываем через суперадминку.
|
|
108
74
|
|
|
109
75
|
> wenay-common2 Обнови эту библиотеку на последней версии. Посмотри, что там есть новое, можем ли это использовать. Если можем, тооо создай в таргете цели использовать это. И что необходимо сделать в качестве задач.
|
|
76
|
+
|
|
77
|
+
> у нас еще планируется мобильные устройства - там говорят нет каких то элементов. и что то скорее всего надо продублировать
|
|
78
|
+
|
|
79
|
+
> да мы еще планиурем использовать библиотеку и для мобильного использования , а там дум обьекты вроде не потдерживаются.... ну ты сам знаешь что надо для реакт нативу - может сделать мобильную версию этого функционала
|
|
80
|
+
|
|
81
|
+
> вопрос насоклько этот код вобще лакнчиный и юзабельный?ты бы сам ег остал использовать [оценка 2026-07-10: вызовы лаконичны, изучение — нет; задача «API-витрина» в Ready] да оформи задачу в my.md но текущий релиз запуш
|