wenay-react2 1.0.40 → 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 +971 -0
- package/doc/PROJECT_FUNCTIONALITY.md +405 -0
- package/doc/PROJECT_RULES.md +80 -0
- package/doc/WENAY_REACT2_RENAMES.md +177 -0
- package/doc/changes/v1.0.35.md +26 -0
- package/doc/changes/v1.0.37.md +13 -0
- package/doc/changes/v1.0.38.md +48 -0
- package/doc/changes/v1.0.39.md +35 -0
- package/doc/changes/v1.0.40.md +15 -0
- package/doc/changes/v1.0.41.md +36 -0
- package/doc/changes/v1.0.42.md +26 -0
- package/doc/progress/README.md +14 -0
- package/doc/progress/architecture-fix-queue.md +74 -0
- package/doc/progress/hook-controller-opportunities.md +367 -0
- package/doc/progress/hook-extraction-audit.md +195 -0
- package/doc/progress/public-surface-normalization.md +368 -0
- package/doc/progress/style-system-normalization.md +121 -0
- package/doc/target/README.md +33 -0
- package/doc/target/my.md +81 -0
- package/doc/wenay-react2-1.0.8.tgz +0 -0
- package/doc/wenay-react2-rare.md +807 -0
- package/doc/wenay-react2.md +539 -0
- 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 +123 -5
- package/lib/common/src/logs/logs.js +218 -130
- package/lib/common/src/logs/logsController.d.ts +3 -0
- package/lib/common/src/styles/tokens.d.ts +7 -6
- package/lib/common/src/styles/tokens.js +8 -5
- 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/menuRight.css +29 -23
- package/lib/style/style.css +73 -10
- package/lib/style/tokens.css +8 -4
- package/package.json +3 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# v1.0.37
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-08
|
|
4
|
+
|
|
5
|
+
- Changed: Refactored `Menu` active/open handling so it no longer mutates `item.status`; `status` remains an initial hint and custom-renderer compatibility field.
|
|
6
|
+
- Changed: Routed mouse context-menu item colors, active state, and separators through the existing `--menu-*` tokens while preserving `MenuR` / `toButton` class compatibility.
|
|
7
|
+
- Changed: Added the shared logger style contract in `src/common/src/logs/logStyles.ts` and wired global/context logger chrome to `--logs-*` tokens.
|
|
8
|
+
- Changed: Tokenized `OutlineDragDemo` outline color as `--menu-outline-color` and reused `--dlg-scrim` in `ModalProvider`.
|
|
9
|
+
- Changed: Added project rules and `doc/progress/README.md` for temporary task progress files during active non-trivial work.
|
|
10
|
+
- Changed: Added `doc/target/README.md` and clarified that `doc/target/my.md` is the durable task queue while `doc/progress` is temporary; target tasks now pass through a `Verify` status before removal.
|
|
11
|
+
- Changed: Added `common2` shorthand rules for checking `wenay-common2` updates from the installed package changelog.
|
|
12
|
+
- Reason: Reduce hidden state mutation and hardcoded shared styling while preserving the existing public API; make agent working notes and common2 update checks explicit.
|
|
13
|
+
- Verification: `npm run build`; `npm run testjest -- --runInBand`; QA stand `http://127.0.0.1:3002/` returns HTTP 200; documentation-only policy reviewed in `doc/PROJECT_RULES.md`, `doc/progress/README.md`, and `node_modules/wenay-common2/doc/changes/README.md`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# v1.0.38
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-09
|
|
4
|
+
|
|
5
|
+
- Changed: Redesigned `SettingsDialog` from a flat section list into a searchable settings tree while preserving flat `{key, name, render}` sections.
|
|
6
|
+
- Changed: Extended `SettingsSection` with optional `children`, `parentKey`, `searchText`, and `keywords` for nested settings pages and content-aware search.
|
|
7
|
+
- Changed: Added SettingsDialog tree/search styles and widened the default `--dlg-nav-width` token to `220px` with the TypeScript token mirror updated.
|
|
8
|
+
- Changed: Updated the QA stand SettingsDialog card and public docs for tree structure, registry `parentKey`, and search behavior.
|
|
9
|
+
- Reason: Let client apps present larger settings surfaces in a JetBrains-style tree without moving hierarchy/search logic into each app.
|
|
10
|
+
- Verification: `npm run build`; `npm run testjest -- --runInBand`; QA stand `http://127.0.0.1:3002/` returns HTTP 200.
|
|
11
|
+
- Changed: Extended `createToolbar` with focused API writes (`setOrder`, `show`, `setDensity`, `showSettings`, `showReset`), `sourceMode:"order"`, and a default-hidden reset pseudo-control (`resetItem`, `Bar reset`).
|
|
12
|
+
- Changed: Updated QA card 30 to use `createToolbar({source: columnState.api.listSource, sourceMode:"order"})` instead of a manual order bridge.
|
|
13
|
+
- Reason: Let table/grid layers own icon-menu order directly while toolbar membership, density, pseudo-controls, and extra non-source items stay local; give users a built-in reset-to-default control that starts hidden while Settings stays visible by default.
|
|
14
|
+
- Verification: `.\node_modules\.bin\tsc -p tsconfig.qa-check.json --noEmit`; `npm run build`; `npm run testjest -- --runInBand`; QA stand `http://127.0.0.1:3002/` returns HTTP 200.
|
|
15
|
+
- Changed: Added runtime `columnState.api.setPresentGate(...)` and switched QA card 30 to stable grouped `columnDefs` plus a 3-letter vertical-dot mode button in the upper toolbar; removed the old lower menu from this demo.
|
|
16
|
+
- Reason: Demonstrate the app-owned multi-state layer above MenuStrip without rebuilding the grid schema on each mode click: presentGate decides which leaf columns are available while persisted user visibility stays separate.
|
|
17
|
+
- Verification: `.\node_modules\.bin\tsc -p tsconfig.qa-check.json --noEmit`; `npm run build`; `npm run testjest -- --runInBand`; QA stand `http://127.0.0.1:3002/` returns HTTP 200.
|
|
18
|
+
- Changed: Updated `wenay-common2` from `^1.0.64` to `^1.0.65` and recorded a target backlog item for React route hand-off hooks over `Replay.replayRouteSubscribe` / `Observe.syncStoreReplayRoute`.
|
|
19
|
+
- Reason: common2 1.0.65 adds replay route hand-off for relay/direct promotion; using it in this package needs an explicit React controller surface rather than changing existing replay hooks implicitly.
|
|
20
|
+
- Verification: `tsc -p tsconfig.qa-check.json --noEmit`; `npm run build`; `npm run testjest -- --runInBand`.
|
|
21
|
+
- Changed: Added route hand-off React hooks: `useReplayRouteSubscribe`, `useStoreReplayRouteSync`, and `useStoreReplayRouteMirror`.
|
|
22
|
+
- Changed: Added unit coverage and QA card 26 with a canvas video route switch demo for relay/direct/failure fallback.
|
|
23
|
+
- Changed: Updated Replay docs with the explicit `switchRoute(...)` contract and the current no-`stale`/`lastTs()` limitation of common2 route handles.
|
|
24
|
+
- Reason: Let React consumers use `wenay-common2@1.0.65` replay route replacement without changing existing non-route hook semantics.
|
|
25
|
+
- Verification: `npm run testjest -- --runInBand`; `tsc -p tsconfig.qa-check.json --noEmit`; `npm run build`; QA stand `http://127.0.0.1:3004/` returns HTTP 200.
|
|
26
|
+
- Changed: Added `doc/PROJECT_FUNCTIONALITY.md` and `doc/EXAMPLE_USAGE.md`, and linked both from `README.md` and `doc/PROJECT_RULES.md`.
|
|
27
|
+
- Reason: Separate project purpose/feature boundaries and example usage standards from the API cheat sheet, including guidance to prefer current controller primitives over legacy low-level stand examples.
|
|
28
|
+
- Verification: Documentation-only review against `doc/wenay-react2.md`, `doc/wenay-react2-rare.md`, `src/common/api.tsx`, and the QA stand.
|
|
29
|
+
- Changed: Added reusable `createSearchHistory({key,max?})`, wired `SettingsDialog` search to persisted history, and replaced three tree tool buttons with one compact dotted cycle control in the search row.
|
|
30
|
+
- Changed: Moved `ColumnDots` and `CardList` visual styling from inline/raw styles into shared `.wenayColDots*` and `.wenayCardList*` CSS classes while preserving runtime geometry inline.
|
|
31
|
+
- Reason: Apply the newly documented usage standards inside the library itself: reuse persistence helpers for search history and keep public primitives styleable through shared CSS contracts.
|
|
32
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `git diff --check -- src/common/src/components/Settings/SettingsDialog.tsx src/common/src/utils/searchHistory.ts src/common/src/utils/index.ts src/common/src/grid/columnState/ColumnDots.tsx src/common/src/grid/columnState/CardList.tsx src/style/style.css`.
|
|
33
|
+
- Changed: Documented the hook/controller-first architecture rule for shared functionality and added a target audit for converting component-owned behavior into headless APIs where appropriate.
|
|
34
|
+
- Reason: Keep reusable behavior available to apps, visual components, and QA stand layers without copying component internals.
|
|
35
|
+
- Verification: Documentation-only scoped review; `git diff --check` on touched docs.
|
|
36
|
+
- Changed: Recorded the compatibility policy for old public APIs and added a backlog item for local menu/context-menu usage statistics.
|
|
37
|
+
- Reason: New hook/controller APIs should not break existing consumers, and risky menu migrations need usage signal before deprecation/removal.
|
|
38
|
+
- Verification: Documentation-only scoped review; git diff --check on touched docs.
|
|
39
|
+
- Changed: Refined compatibility guidance to allow explicit aggressive migrations while treating removed default styles as compatibility breaks unless a replacement class/token path is shipped.
|
|
40
|
+
- Changed: Added a style-system normalization target for default primitive styles and CSS variable contracts.
|
|
41
|
+
- Reason: API migrations can be explained in changelog, but broken default visuals make shared primitives hard to use and override safely.
|
|
42
|
+
- Verification: Documentation-only scoped review; git diff --check on touched docs.
|
|
43
|
+
- Changed: Added a persisted SettingsDialog tree/content width divider with mouse drag, keyboard arrows, and double-click/Enter reset to the default width.
|
|
44
|
+
- Changed: Tightened the SettingsDialog tree/search layout so the search row, dotted tree-cycle control, toggles, and rows use less horizontal and vertical space.
|
|
45
|
+
- Changed: Restored the card 29 `ColumnDots` / `CardList` default visual shape after CSS extraction: the primitive remains class-styleable, but the QA/default look matches the original compact track, dark dots, selected blue dot, and clean white cards.
|
|
46
|
+
- Changed: Added click-only FLIP movement animation to the card 30 horizontal toolbar menu when order or density changes elsewhere; the menu itself does not gain drag reorder behavior.
|
|
47
|
+
- Reason: Finish the settings usability pass without treating demo-only sketches as global style standards, and keep column-state demos visually usable while preserving the new CSS override contracts.
|
|
48
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand`; `git diff --check`; `npm run build`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# v1.0.39
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-09
|
|
4
|
+
|
|
5
|
+
- Changed: Added local in-memory `contextMenu.stats` diagnostics with `getSnapshot()`, `reset()`, and `onChange(cb)`.
|
|
6
|
+
- Changed: Counted direct `openAt`, `openAtPoint`, legacy Layer queued opens, empty opens, close/replace, and source/layer usage without storing menu labels.
|
|
7
|
+
- Changed: Added explicit `MenuItemStrict.actionKey` and action-level `contextMenu.stats` counters: aggregate `actionTotals` plus keyed `actions[actionKey]` for click/ok/error/task/submenu/func/focus outcomes.
|
|
8
|
+
- Changed: Added focused tests for direct stats, reset/onChange, the legacy `contextMenu.map` Layer path, keyed actions, unkeyed action totals, and keyed submenu stats.
|
|
9
|
+
- Changed: Clarified the columnState menu guidance: `createToolbar({source: cs.api.listSource})` is the richer Settings-integrated surface; `ColumnsMenu` remains the compact presentation menu.
|
|
10
|
+
- Changed: Extracted card 27 `BoardDemo` stand-only inline styles into local style helpers without changing `useReorderBoard` behavior.
|
|
11
|
+
- Changed: Recorded the style-system default contract inventory and corrected the style source-of-truth paths for the next token migration.
|
|
12
|
+
- Changed: Moved `ColumnsMenu/MenuStrip` visual button styles into `.wenayColsMenu*` classes and `--cols-menu-*` tokens while leaving runtime reorder transforms inline.
|
|
13
|
+
- Changed: Tokenized `ColumnDots` / `CardList` restored defaults through `--cols-dots-*` and `--cols-card-*` without changing component runtime geometry.
|
|
14
|
+
- Changed: Added headless `useTextInputPanel` and `useFileInputPanel` hooks while keeping the old input panel/modal components as compatible visual wrappers.
|
|
15
|
+
- Changed: Increased `ColumnDots` default max visible dots from 4 to 8 and updated QA card 29 to show 8 fields with the dots control overlaid on the bottom card.
|
|
16
|
+
- Changed: Split `MiniLogs` into hook/controller-first layers: `useMiniLogsTable`, `MiniLogsView`, `MiniLogsTable`, with `MiniLogs` kept as the compatibility wrapper.
|
|
17
|
+
- Changed: Added MiniLogs hook tests and updated QA card 9 plus usage docs for the compact log table flow.
|
|
18
|
+
- Changed: Added `useRightMenuController` as the hook/controller layer behind `DropdownMenu`; kept `DropdownMenu` and `createRightMenuController().Render` compatible.
|
|
19
|
+
- Changed: Added RightMenu tests for mounted controller rerender, direct hook state, hover submenu, and fixed toggle compatibility.
|
|
20
|
+
- Changed: Added `useParamsEditorController` as the first controller layer for `ParamsEditor` draft clone, immediate/delayed notify, expand callback, and timer cleanup.
|
|
21
|
+
- Changed: Added ParamsEditor controller tests for clone isolation, delayed notify cleanup, and current expand callbacks.
|
|
22
|
+
- Changed: Moved context logger `LogsTable` from raw `AgGridReact` to shared `AgGridTable` defaults and added `logs.copyCell` action stats key to `PageLogs` copy menu.
|
|
23
|
+
- Changed: Added headless `createLogsController` / `createLogsControllerState` for log append, limits, latest rows, settings, and update emitters while keeping `getLogsApi` as the compatibility entrypoint.
|
|
24
|
+
- Changed: Added Logs controller tests for append order, `num`, mini/per-id limits, fresh latest, and settings emitters.
|
|
25
|
+
- Changed: Added `useSettingsDialogController` as the first controller layer for `SettingsDialog` open/search/history/tree-cycle/nav-resize/Escape actions while keeping the visual wrapper compatible.
|
|
26
|
+
- Changed: Added a SettingsDialog controller test for headless open/search/current-section/tree-cycle state.
|
|
27
|
+
- Changed: Added context logger hooks `useLogsTableController` and `useLogsNotificationsController` while keeping `LogsTable` and `LogsNotifications` as visual wrappers.
|
|
28
|
+
- Changed: Added context logger hook tests for table rows/defaults/filter state and notification gate/show state.
|
|
29
|
+
- Changed: Added `useFloatingWindowController` plus public geometry/controller types as the first controller layer for `FloatingWindow` saved geometry, z-index stack, drag state, resize callbacks, and viewport clamp.
|
|
30
|
+
- Changed: Kept `FloatingWindowBase` as a compatibility visual wrapper over the same `Rnd` DOM/classes/gesture behavior; `DragBox` and `FResizableReact` were not rewritten.
|
|
31
|
+
- Changed: Added FloatingWindow controller tests for saved geometry restore, resize-stop commit, drag clamp/persistence touch, and live resize `onUpdate` forwarding.
|
|
32
|
+
- Changed: Updated QA card 25 toolbar subscription to use `useListenEffect(tb.api.onChange, ...)` instead of a manual `useEffect(() => listen.on(...))` cleanup.
|
|
33
|
+
- Fixed: `SettingsDialog` search history now closes when focus leaves the search box; added a regression test.
|
|
34
|
+
- Reason: Start the menu compatibility/statistics target with a safe diagnostics layer while keeping old public context-menu paths working.
|
|
35
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand logsController.test.ts miniLogs.test.tsx`; `npm run testjest -- --runInBand logsContextControllers.test.tsx`; `npm run testjest -- --runInBand contextMenuStats.test.tsx`; `npm run testjest -- --runInBand createRightMenuController.test.tsx`; `npm run testjest -- --runInBand paramsEditorController.test.tsx`; `npm run testjest -- --runInBand floatingWindowController.test.tsx`; `npm run testjest -- --runInBand createToolbar.test.ts`; `npm run testjest -- --runInBand __test/inputPanelHooks.test.tsx`; `npm run testjest -- --runInBand __test/settingsDialog.test.tsx`; `npm run testjest -- --runInBand`; `npm run build`; `git diff --check`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# v1.0.40
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-09
|
|
4
|
+
|
|
5
|
+
- Changed: Added FLIP-style item movement animation to the standard `createToolbar().Bar`, matching the card 30 behavior for horizontal toolbar menus.
|
|
6
|
+
- Changed: QA cards 25 and 31 now receive toolbar item glide animation through the shared `Toolbar.Bar`; card 30 remains the stand-only visual reference.
|
|
7
|
+
- Changed: Added `useFloatingWindowController` plus public geometry/controller types as the first controller layer for `FloatingWindow` saved geometry, z-index stack, drag state, resize callbacks, and viewport clamp.
|
|
8
|
+
- Changed: Added controller-first layers for MiniLogs, RightMenu, ParamsEditor, Logs, SettingsDialog, and context logger UI wrappers while keeping compatibility components.
|
|
9
|
+
- Changed: Added explicit `MenuItemStrict.actionKey` and action-level `contextMenu.stats` counters.
|
|
10
|
+
- Changed: Moved log tables and context log table to shared `AgGridTable` primitives where behavior was safe to preserve.
|
|
11
|
+
- Changed: Updated QA card 25 toolbar subscription to use `useListenEffect(tb.api.onChange, ...)` instead of a manual `useEffect(() => listen.on(...))` cleanup.
|
|
12
|
+
- Fixed: `SettingsDialog` search history closes when focus leaves the search box.
|
|
13
|
+
- Skipped: `FResizableReact` hook, `memoryStore` core rewrite, broad `DragBox` rewrite, `PageVisibilityProvider` adoption, and `logsContext` persistence migration until a real consumer/test scenario exists.
|
|
14
|
+
- Note: The QA stand mounts log tables in card 9; top-right log notification layers exist in the library but are not mounted globally in the stand.
|
|
15
|
+
- Verification: `npx tsc -p tsconfig.qa-check.json --noEmit`; `npm run testjest -- --runInBand`; `npm run build`; `git diff --check`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# v1.0.41
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-09
|
|
4
|
+
|
|
5
|
+
Status: released.
|
|
6
|
+
|
|
7
|
+
- Changed: Split global log notifications into `useMessageEventLogsController`, `MessageEventLogsView`, and `MessageEventLogCard`; `MessageEventLogs` and `logsApi.React.Message` remain compatibility wrappers.
|
|
8
|
+
- Changed: QA card 9 now mounts the global log notification layer, so the corner popups can be checked from the stand with the existing `add log` button.
|
|
9
|
+
- Changed: Added usage docs for the hook/controller notification layer and recorded follow-up hook/controller split candidates with effectiveness/simplicity estimates.
|
|
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
|
+
- 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
|
+
- 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.
|
|
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,14 @@
|
|
|
1
|
+
# Task progress
|
|
2
|
+
|
|
3
|
+
This directory is for short-lived checkpoint files during active non-trivial tasks.
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- create one file per task, named `doc/progress/<task>.md`;
|
|
7
|
+
- keep it short: goal, checkpoints, decisions, blockers, and verification;
|
|
8
|
+
- update it when checkpoints are completed or before switching context;
|
|
9
|
+
- delete it when the task is finished;
|
|
10
|
+
- keep durable history elsewhere: changelog/release notes for publishable changes,
|
|
11
|
+
roadmap/recommendations/target docs for long-lived project direction,
|
|
12
|
+
and the commit message or final response for the immediate summary.
|
|
13
|
+
|
|
14
|
+
Progress files are working notes, not API docs, release notes, or the durable target queue. When a task comes from `doc/target/my.md`, update that file before deleting the progress file: move completed work to `Verify` until checks pass, or remove it only after verification is recorded.
|
|
@@ -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).
|