You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3aa96f2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CLAUDE.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This file is auto-loaded by Claude Code and other AI coding assistants. It provi
14
14
-**Build:**`npm run build:lib` produces the published `dist/opengridx.es.js` / `dist/opengridx.umd.js`. `npm run build` type-checks the lib and builds the **demo site**.
15
15
-**Published:** yes — on npm as `@opencorestack/opengridx` with external consumers. Treat public types and behaviour changes as semver-relevant.
16
16
-**Lint:**`npm run lint` (ESLint). Must pass before every commit.
17
-
-**Current version:** 3.3.0
17
+
-**Current version:** 3.4.0
18
18
19
19
---
20
20
@@ -153,6 +153,17 @@ The GitHub wiki is generated from `docs/` + `wiki/` by `scripts/build-wiki.mjs`
153
153
154
154
---
155
155
156
+
## v3.4.0 — significant changes
157
+
158
+
-**Batch edits**: paste, range clear, undo and redo commit through `useGridBatchEdit.applyEdits` — one `processRowUpdate` per row (rows in parallel, a failing row reported through `onProcessRowUpdateError` without blocking others) and one `REPLACE_ROWS` store update for all successful rows. `getRow` sees rows stored since the last render. Single edits store through `storeRow`. Shared helpers in `lib/utils/editing/commit.ts`; edit targets (rows × range columns, same indices as `cellSelection.getCurrentRange().resolved`) in `lib/utils/editing/targets.ts`
159
+
-**Hook order** (see `docs/architecture/datagrid-orchestration.md`): `useGridEditCommitChannel` (12a) and `useGridBatchEdit` (12b) before `useGridEditing`; `useGridClipboardPaste` (36b) after `useGridCellSelectionApi`, then `useGridUndoRedo` (36c). Commits reach the history through the channel's `emit(changes, source)`; history ignores `'undo'` / `'redo'` sources
160
+
- Paste, Delete/Backspace and Ctrl/Cmd+Z / Shift+Z / Ctrl+Y are **native listeners on the grid root**, gated by `classifyKeyTarget` (`'grid'` / `'control'`) and no open editor, so an editor's own paste and undo keep working
161
+
-**History**: an action is recorded only after `processRowUpdate` succeeds, as `{ id, field, before, after }` with `after` read from the stored row via `getCellValue`. Undo writes `before` expecting `after` (redo the reverse); stale cells are skipped `'changed'`, removed rows `'missing'`; values are compared, not row identity
162
+
-**Parsing**: `lib/utils/parsing.ts` (`parseTsv`, per-type `parse*Text`, `parseValueByType`, `parseCellText` with `valueParser`) is pure and the single parser for paste and `/ai` (`lib/ai/coerce.ts` only adds typed-JSON handling on top). Keep its regexes linear
163
+
-**`/ai` entry point** (`lib/ai/`, no React, no dependencies): ships as `dist/ai.es.js`, `dist/ai.cjs` (`.cjs` because the package is `"type": "module"`) and `dist/ai.d.ts`, built by a second `vite.config.lib.js` run (`--mode ai`). `check-bundle` enforces no imports, no react, ≤ 5 KB gzipped (≈ 4.6 KB now) and that the core bundles don't contain the marker `'OpenGridX grid state'`. Demo, Vitest and tsconfig alias `@opencorestack/opengridx/ai` before the root alias. `lib/ai/columns.ts` is the single source of which columns each part allows; the validator reads own keys only, never `__proto__`, caps lists at 200 and errors at 100, and never throws (fuzz test)
164
+
-**Shared inputs**: `Input` is `forwardRef` with `variant: 'field' | 'cell'` and `inputClassName` (`className` stays on the wrapper); `error` sets `aria-invalid`. Built-in search boxes, the filter value box and text/number/date editors render through `Input`; the boolean editor and list-view checkbox through `Checkbox` (hidden `<input>`: tests click `.ogx-checkbox__box`). The boolean editor needs `preventDefault` on mousedown on the whole `.ogx__edit-boolean` div. Browser tests that click styled controls must import `lib/styles/opengridx.css`
165
+
- Browser paste tests copy from a textarea and press the paste shortcut (`ControlOrMeta+V`); Firefox drops `clipboardData` on a synthetic `ClipboardEvent`
166
+
156
167
## v3.3.0 — significant changes
157
168
158
169
-**Cell range selection** (`cellSelection`, design: `docs/superpowers/specs/2026-10-01-cell-range-selection-design.md`). `useGridCellSelection` runs after `useGridSpanning` and before `useGridKeyboardNavigation` (feeds it `cellSelection.keyboard`); `useGridCellSelectionApi` runs after `useGridPointerFocusHandlers`, keeps the anchor in sync with `focusedCell` and installs the six `apiRef` methods. Pure helpers in `lib/utils/cellSelection.ts`
Copy file name to clipboardExpand all lines: docs/roadmap.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ This document tracks the current status of features in `OpenGridX` and outlines
83
83
| Release | Target | Headline | Also in it |
84
84
| :--- | :--- | :--- | :--- |
85
85
|**3.3.0** ✅ | shipped 7 Oct |**Cell range selection** (opt-in `cellSelection` prop): mouse drag, Shift+click, Shift+arrows; Ctrl+C / Cmd+C copies the block as TSV | Selection status bar (count, sum, average of selected cells); wrapped header text; React Compiler compatibility check |
86
-
|**3.4.0**| 20 Nov |**Paste from Excel / Google Sheets** into the selection, through `processRowUpdate` (values parsed per column type, non-editable cells skipped, `onClipboardPasteError`). **Undo / redo** for cell edits and pastes (Ctrl+Z, Ctrl+Shift+Z / Ctrl+Y, `apiRef.undo()` / `redo()`) |**AI toolkit, part 1** in a new `@opencorestack/opengridx/ai` entry point: `getGridAiSchema(columns)` (JSON Schema of the filter, sort, grouping, aggregation, pivot and visibility models the columns allow) and `validateGridAiState(json, columns)` (drops unknown fields and operators, coerces values, returns errors) |
86
+
|**3.4.0**✅ | shipped 8 Oct |**Paste from Excel / Google Sheets** into the selection, through `processRowUpdate` (values parsed per column type or `valueParser`, non-editable cells skipped, `onClipboardPaste` summary); **Delete clears a range**; built-in inputs and editors use the shared `Input` / `Checkbox` (`Input variant="cell"`). **Undo / redo** for cell edits and pastes (Ctrl+Z, Ctrl+Shift+Z / Ctrl+Y, `apiRef.undo()` / `redo()`) |**AI toolkit, part 1** in a new `@opencorestack/opengridx/ai` entry point: `getGridAiSchema(columns)` (JSON Schema of the filter, sort, grouping, aggregation, pivot and visibility models the columns allow) and `validateGridAiState(json, columns)` (drops unknown fields and operators, coerces values, returns errors) |
87
87
|**3.5.0**| 15 Dec |**AI toolkit, part 2**: `aiAssistant={{ onPrompt }}` prompt panel that calls the app's own model, shows the proposed changes as removable chips and applies them with undo; `createGridAgentTools(apiRef)` (plain tool objects for CopilotKit, the Vercel AI SDK or WebMCP) | Header filter row; **fill handle** as a stretch goal (moves to Q1 2027 if 3.3–3.4 run late) |
0 commit comments