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 f3d2ff1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CLAUDE.md
+16-1Lines changed: 16 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.4.0
17
+
-**Current version:** 3.5.0
18
18
19
19
---
20
20
@@ -153,6 +153,21 @@ The GitHub wiki is generated from `docs/` + `wiki/` by `scripts/build-wiki.mjs`
-**AI assistant** (`aiAssistant`): core holds the panel (`useGridAiAssistant`, hook 45a, before `useGridToolbarProps`; UI in `lib/components/AiAssistant/`), `/ai` holds model logic (`createGridAiPromptHandler`, `createGridAgentTools`). The core bundle must contain no AI code and `/ai` no React (`check-bundle`; `/ai` budget 8 kB, ≈ 6.7 kB now). `/ai` strings must never contain the word "react" or a lowercase `import`/`require(` (check-bundle regexes)
161
+
-**Brand rule**: `validateGridAiState` brands result and `state` with the non-enumerable `Symbol.for('opengridx.ai.validated')` (`lib/utils/aiBrand.ts`); the grid applies only `isGridAiValidated(result.state)`. Parts the validator emptied are skipped; column visibility is merged; Undo restores a snapshot of touched parts (view undo, separate from `undoRedo`)
162
+
-`GridAiState` / `GridAiPart` / `GridAiValidationError` and assistant types live in `lib/types/index.ts`; all `GridAi*` / `GridAgent*` types are exported from `/ai` only (publicApi rule `/^Grid(?:Ai|Agent)[A-Z]/`)
163
+
-**Agent tools** are all-or-nothing on validation errors and never throw; `get_row_summary` exists only with `allowRowAccess`. They read `apiRef.current` at call time — create them in a handler/effect, not during render (`react-hooks/refs`)
164
+
-`rowGroupingModel` is a controlled/uncontrolled pair (`onRowGroupingModelChange`) in `useGridControlledState`. New `GridApi`: `setSortModel`, `setRowGroupingModel`, `setAggregationModel`, `setColumnVisibilityModel`, `setPivotModel`, `getGridAiState`, `openAiAssistant`, `closeAiAssistant`
165
+
- Two buttons swapped by a ternary inside a `<form>` need distinct `key`s, or the click on the outgoing one submits the form (the Stop button re-sent the prompt)
166
+
-**Header filters** (`headerFilters`): each cell owns only the root `filterModel` item `id: 'header:<field>'` (`lib/utils/headerFilters.ts`: `getHeaderFilterState`, `setHeaderFilterItem`, which returns the same object for a model it can't show). Custom = `'or'` root with items, field inside a group, or an untagged/second root item on the field. Off in pivot mode
167
+
- The filter row renders inside `.ogx__header-wrap` after `.ogx__header`; column cells of both rows must use `getHeaderColumnStyle` (`lib/components/Header/headerColumnStyle.ts`). Focus: `FocusedCell.headerFilter`; column header is row -2 when header filters are on, filter row -1. `useGridAriaRows({ headerFilterRow })`. "Custom filter" opens the panel via `GridToolbarHost.registerFiltersPanel` + `forceFiltersOpen` / `onFiltersPanelClose`
168
+
-**Fill handle**: `useGridFillHandle` (hook 36d, after `useGridUndoRedo`) → `rowRenderProps.fillHandle` → `fillHandleCol` on the handle's row only; `RANGE_FILL_HANDLE` (32) flag; `.ogx__cell-fill-handle` (24 px hit area inside the corner cell). Drags go through `cellSelection.startTrackedDrag` (pointer events, touch, auto-scroll, Escape cancels). Pure fill logic in `lib/utils/editing/fill.ts` (no regexes); commits via `applyEdits(edits, 'fill')`; Ctrl/Cmd+D / R always copy
169
+
- Smoke suites of parallel agents share ports 4318/4319 — never run two at once
170
+
156
171
## v3.4.0 — significant changes
157
172
158
173
-**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`
Copy file name to clipboardExpand all lines: docs/roadmap.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ This document tracks the current status of features in `OpenGridX` and outlines
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
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
-
|**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, columns)` (plain tool objects for CopilotKit, the Vercel AI SDKor WebMCP) | Header filter row; **fill handle**as a stretch goal (moves to Q1 2027 if 3.3–3.4 run late)|
87
+
|**3.5.0**✅ | shipped 9 Oct |**AI toolkit, part 2**: `aiAssistant={{ onPrompt }}`Ask AI panel (chips, Undo, voice) that calls the app's own model through `createGridAiPromptHandler`; only validated replies apply; `createGridAgentTools(apiRef, columns)` (plain tool objects for CopilotKit, the Vercel AI SDK, provider tool calling or WebMCP) |**Header filter row** (`headerFilters`); **fill handle**(series, Alt copy, Ctrl/Cmd+D / R); `rowGroupingModel` controlled/uncontrolled pair|
88
88
| Freeze | 19 Dec – 5 Jan | Bug fixes only | — |
89
89
90
90
### Across the quarter
@@ -118,7 +118,6 @@ This document tracks the current status of features in `OpenGridX` and outlines
118
118
## 🔭 Next (Q1 2027)
119
119
120
120
***Row reordering inside tree data and row groups**, touch-friendly (MUI #4821, 405 👍, not in MUI X).
121
-
***Fill handle**, if it does not make 3.5.0.
122
121
***Find & highlight** (Ctrl+F through cells), **right-click context menu**, **Excel-style value (set) filter**.
123
122
***Calculated columns** (`[price] * [qty]` defined by users).
124
123
***Interactive pivot builder**: drag-and-drop panel for pivot and grouping.
0 commit comments