Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Read(/hyperformula/test-jasmine/**)",
"Read(/hyperformula/typedoc/**)",
"Read(/hyperformula/storage/**)",
"Read(/hyperformula-ui/packages/core/dist/**)",
"Read(/docs/functions/**)",
"Read(/docs/.vuepress/dist/**)",
"Read(/docs/.vuepress/api-sidebar.json)",
Expand Down
15 changes: 10 additions & 5 deletions .claude/skills/hyperformula-code-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: hyperformula-code-review
description: Use when reviewing a diff, a branch, or a pull request in the HyperFormula repository. Covers the review order, correctness and Excel compatibility for a calculation engine, performance on the hot paths, the six places a function change must touch, the public API, what the definition of done requires, and how to report findings.
description: Use when reviewing a diff, a branch, or a pull request in the HyperFormula repository, in the engine or in the hyperformula-ui formula editor. Covers the review order, correctness and Excel compatibility for a calculation engine, performance on the hot paths, the six places a function change must touch, the formula editor's invariants, the public API, what the definition of done requires, and how to report findings.
---

## 1. Read the relevant files from `dev-docs/`
Expand All @@ -10,16 +10,21 @@ Always:
| File | Why |
|---|---|
| [`CODE-REVIEW.md`](../../../dev-docs/CODE-REVIEW.md) | How to review: principles, review order, review-specific checks, reporting |
| [`REVIEWING.md`](../../../hyperformula/dev-docs/REVIEWING.md) | What to look for in each category of an engine change |
| [`DEFINITION-OF-DONE.md`](../../../dev-docs/DEFINITION-OF-DONE.md) | What the change was required to contain |
| [`CODE-STYLE.md`](../../../dev-docs/CODE-STYLE.md) | Style, and which paths are hot enough that complexity matters |
| [`TESTING.md`](../../../dev-docs/TESTING.md#a-test-must-prove-behaviour) | Whether the tests prove anything, or only execute code |

Then the page covering what the diff touches: [`ARCHITECTURE.md`](../../../hyperformula/dev-docs/ARCHITECTURE.md), [`PARSER.md`](../../../hyperformula/dev-docs/PARSER.md), [`INTERPRETER.md`](../../../hyperformula/dev-docs/INTERPRETER.md), [`DEPENDENCY-GRAPH.md`](../../../hyperformula/dev-docs/DEPENDENCY-GRAPH.md), [`FUNCTION-CATALOGUE.md`](../../../hyperformula/dev-docs/FUNCTION-CATALOGUE.md), [`I18N.md`](../../../hyperformula/dev-docs/I18N.md), [`LICENSING.md`](../../../hyperformula/dev-docs/LICENSING.md), [`EXCEL-COMPATIBILITY.md`](../../../hyperformula/dev-docs/EXCEL-COMPATIBILITY.md), [`PUBLIC-API.md`](../../../hyperformula/dev-docs/PUBLIC-API.md).
Then, for each part of the repository the diff touches:

| Diff touches | Read |
|---|---|
| `hyperformula/` | [`REVIEWING.md`](../../../hyperformula/dev-docs/REVIEWING.md) for what to look for in each category, and [`CODE-STYLE.md`](../../../dev-docs/CODE-STYLE.md) for style and the hot paths |
| `hyperformula-ui/` | [`REVIEWING.md`](../../../hyperformula-ui/dev-docs/REVIEWING.md) for what to look for in each category, the editor's invariants among them, and [`CODE-STYLE.md`](../../../hyperformula-ui/dev-docs/CODE-STYLE.md) for its own conventions |

For an engine change, also the page covering what the diff touches: [`ARCHITECTURE.md`](../../../hyperformula/dev-docs/ARCHITECTURE.md), [`PARSER.md`](../../../hyperformula/dev-docs/PARSER.md), [`INTERPRETER.md`](../../../hyperformula/dev-docs/INTERPRETER.md), [`DEPENDENCY-GRAPH.md`](../../../hyperformula/dev-docs/DEPENDENCY-GRAPH.md), [`FUNCTION-CATALOGUE.md`](../../../hyperformula/dev-docs/FUNCTION-CATALOGUE.md), [`I18N.md`](../../../hyperformula/dev-docs/I18N.md), [`LICENSING.md`](../../../hyperformula/dev-docs/LICENSING.md), [`EXCEL-COMPATIBILITY.md`](../../../hyperformula/dev-docs/EXCEL-COMPATIBILITY.md), [`PUBLIC-API.md`](../../../hyperformula/dev-docs/PUBLIC-API.md).

## 2. Work through them in order

1. Review each category in the [review order](../../../dev-docs/CODE-REVIEW.md#review-order), using the checks for it in [`REVIEWING.md`](../../../hyperformula/dev-docs/REVIEWING.md). Stop to report the first serious finding.
1. Review each category in the [review order](../../../dev-docs/CODE-REVIEW.md#review-order), using the checks for it in the `REVIEWING.md` of the part the diff touches. Stop to report the first serious finding.
2. Go through [The change follows our guidelines](../../../dev-docs/CODE-REVIEW.md#the-change-follows-our-guidelines) and the [review-specific checks](../../../dev-docs/CODE-REVIEW.md#review-specific-checks).

## 3. You report; the developer decides
Expand Down
39 changes: 39 additions & 0 deletions .claude/skills/hyperformula-ui-dev/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: hyperformula-ui-dev
description: >
Use for ANY work in `hyperformula-ui/`: the formula editor package (`hyperformula-ui`,
in `hyperformula-ui/packages/core/`), its demo, its end-to-end suite, its build scripts
and its shared configuration. Covers the editor, the formula bar, the lexer, the kernel,
reference highlighting, autocomplete and function help popups, keyboard shortcuts,
`IGridAdapter`, the generated stylesheet and API docs, and releasing the package. Triggers
on file paths under `hyperformula-ui/`, or when the user describes a symptom in the formula
editor without naming a file. Its code style is not the engine's: load this skill instead
of `hyperformula-dev` for anything in this folder.
---

## 1. Read the relevant files from `dev-docs/`

Always:

| File | Why |
|---|---|
| [`ARCHITECTURE.md`](../../../hyperformula-ui/dev-docs/ARCHITECTURE.md) | The components, the data flow, and the invariants every change keeps |
| [`CODE-STYLE.md`](../../../hyperformula-ui/dev-docs/CODE-STYLE.md) | The conventions inside `hyperformula-ui/`, which differ from the engine's |
| [`DEFINITION-OF-DONE.md`](../../../dev-docs/DEFINITION-OF-DONE.md) | What the change must contain before review |

Then the page for what you are changing:

| File | For |
|---|---|
| [`EDITOR-TASKS.md`](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md) | Which files implement tokenization, shortcuts, highlights, popups and the overlay |
| [`KEYBOARD-SHORTCUTS.md`](../../../hyperformula-ui/dev-docs/KEYBOARD-SHORTCUTS.md) | Any change to what a key does |
| [`SPEC.md`](../../../hyperformula-ui/dev-docs/SPEC.md) | The public API, the adapter contract, CSS, and the commands |
| [`TESTING.md`](../../../hyperformula-ui/dev-docs/TESTING.md) | Writing the test the change needs |
| [`RELEASE.md`](../../../hyperformula-ui/dev-docs/RELEASE.md) | Publishing the package — only when asked to release |

## 2. Work through them in order

1. Find the files with [`EDITOR-TASKS.md`](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md), and the invariants they must keep with [Key invariants](../../../hyperformula-ui/dev-docs/ARCHITECTURE.md#key-invariants).
2. Write the failing test first — [New behaviour](../../../hyperformula-ui/dev-docs/TESTING.md#new-behaviour) — with skill `test-writing-discipline`.
3. Change the code, then run the checks in [Checks while you work](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md#checks-while-you-work). Name the workspace by path, as [`SPEC.md`](../../../hyperformula-ui/dev-docs/SPEC.md#12-build--commands) says. Regenerate the stylesheet or the API docs when the change affects them.
4. Add the entry to [`hyperformula-ui/CHANGELOG.md`](../../../hyperformula-ui/CHANGELOG.md) when the change is user-facing, and finish everything in [`DEFINITION-OF-DONE.md`](../../../dev-docs/DEFINITION-OF-DONE.md).
95 changes: 95 additions & 0 deletions .github/workflows/hyperformula-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: HyperFormula UI
permissions:
contents: read

on:
pull_request:
types:
- opened
- reopened
- synchronize # the head branch is updated from the base branch, new commits are pushed to the head branch, or the base branch is changed
push:
branches:
- 'master'
- 'develop'
- 'release/**'

jobs:
verify:
strategy:
matrix:
node-version: [ '22' ]
os: [ 'ubuntu-latest' ]
name: verify
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d # https://github.com/actions/setup-node/releases/tag/v1.4.4
with:
node-version: ${{ matrix.node-version }}

- name: Checkout main repository
uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # https://github.com/actions/checkout/releases/tag/v2.0.0

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build:ui

- name: Check the generated stylesheet is committed
Comment thread
sequba marked this conversation as resolved.
Resolved
run: git diff --exit-code -- 'hyperformula-ui/**/cssText.ts'

- name: Check the generated API docs are committed
run: |
npm run docs --workspace=hyperformula-ui/packages/core
git diff --exit-code -- hyperformula-ui/packages/core/DOCS.md

- name: Lint
run: npm run lint --workspace=hyperformula-ui/packages/core

- name: Typecheck
run: npm run typecheck --workspace=hyperformula-ui/packages/core

- name: Run unit tests
run: npm run test:ui

- name: Check the package contents
run: npm pack --dry-run --workspace=hyperformula-ui/packages/core

- name: Check the published types resolve under every module setting
run: npm run check:types --workspace=hyperformula-ui/packages/core

e2e:
strategy:
matrix:
node-version: [ '22' ]
os: [ 'ubuntu-latest' ]
name: e2e
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d # https://github.com/actions/setup-node/releases/tag/v1.4.4
with:
node-version: ${{ matrix.node-version }}

- name: Checkout main repository
uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # https://github.com/actions/checkout/releases/tag/v2.0.0

- name: Install dependencies
run: npm ci

# The demo resolves hyperformula from this workspace, so the engine's bundles and typings must exist.
- name: Build the engine
run: npm run bundle-all

- name: Lint and typecheck the demo and the suite
run: |
npm run lint --workspace=demo-js --workspace=@hfe-demo/shared --workspace=e2e
npm run typecheck --workspace=demo-js --workspace=@hfe-demo/shared --workspace=e2e

- name: Install Chromium
run: npm exec --workspace=e2e -- playwright install --with-deps chromium

- name: Run end-to-end tests
run: npm run test:e2e
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository holds the engine and everything built around it.
| Directory | What it is | Published as |
|---|---|---|
| [`hyperformula/`](hyperformula/) | The calculation engine. **Start here** — its [README](hyperformula/README.md) is the product documentation. | The [`hyperformula`](https://www.npmjs.com/package/hyperformula) package on npm: ES modules, CommonJS, UMD bundles for the browser (also served by the jsDelivr and unpkg CDNs), and TypeScript typings |
| [`hyperformula-ui/`](hyperformula-ui/) | UI components for working with HyperFormula: a group of packages, with their demos and end-to-end tests. Not imported yet. | Not yet — nothing is published from this directory until the packages are imported |
| [`hyperformula-ui/`](hyperformula-ui/) | UI components for working with HyperFormula: the formula editor package, an editor-only demo, and an end-to-end test. Its [README](hyperformula-ui/README.md) lists what is where. | The `hyperformula-ui` package on npm, once released: ES modules and TypeScript typings |
| [`docs/`](docs/) | The documentation portal. Installed separately; not a workspace member. | Not a package. Built and deployed as the documentation site at [handsontable.com/docs/hyperformula](https://handsontable.com/docs/hyperformula/) |

The engine's history is [`CHANGELOG.md`](CHANGELOG.md) at the root. The UI packages version and release on their own until they are mature, then join the engine's version — see [`dev-docs/STRUCTURE.md`](dev-docs/STRUCTURE.md#what-the-move-decided).
Expand Down
3 changes: 2 additions & 1 deletion dev-docs/AGENT-TOOLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ A skill holds the **steps**: what to do, in what order, and what to check. It do
| Skill | For |
|---|---|
| `hyperformula-dev` | Any work in `hyperformula/src/` — the entry point |
| `hyperformula-ui-dev` | Any work in `hyperformula-ui/` — the entry point for the formula editor |
| `hyperformula-function-dev` | Adding or changing a built-in function |
| `hyperformula-unit-testing` | Writing or modifying tests |
| `test-writing-discipline` | Any red test, and any test that might be going green for the wrong reason |
| `i18n-translations` | Function-name translations |
| `writing-docs-pages` | The documentation portal |
| `changelog-creation` | The changelog entry |
| `pr-creation` | Opening or updating a pull request |
| `hyperformula-code-review` | Reviewing a diff, a branch, or a pull request |
| `hyperformula-code-review` | Reviewing a diff, a branch, or a pull request, in the engine or the UI |
6 changes: 4 additions & 2 deletions dev-docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ Config is [`docs/wrangler.jsonc`](../docs/wrangler.jsonc); the Worker entry poin

## Release and licences

`npm run release` runs `script/release/release.sh`. Releasing is maintainer-owned — do not invent steps around it, and do not run it as part of another task.
`npm run release` runs `script/release/release.sh`, which releases the engine only. Releasing is maintainer-owned — do not invent steps around it, and do not run it as part of another task.

The `hyperformula-ui` package is released by hand, on its own version line: [`hyperformula-ui/dev-docs/RELEASE.md`](../hyperformula-ui/dev-docs/RELEASE.md).

`npm run check:licenses` asserts that every production dependency carries a permissive licence.

## Scripts and CI

Where each script lives and what calls it is in [`STRUCTURE.md`](STRUCTURE.md#scripts-at-three-levels). The release script keeps its own rules in [`script/release/release-README.md`](../script/release/release-README.md).
Where each script lives and what calls it is in [`STRUCTURE.md`](STRUCTURE.md#scripts-at-each-level). The release script keeps its own rules in [`script/release/release-README.md`](../script/release/release-README.md).

- **A step runs in the workflow that needs it.** A step only the tests need belongs to the test workflows, not to `lint`.
- **`pre*` and `post*` scripts run the way the scripts are actually called** — by CI, and on a maintainer's machine. npm skips them when `ignore-scripts` is set, which is why `script/release/release.sh` copies the root files itself before `npm publish` instead of trusting `prepack` alone.
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/CODE-REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Review in this order, and report the first serious finding rather than burying i
5. **Scope** — the pull request holds [one change](DEFINITION-OF-DONE.md#one-pull-request-one-change). Say so when unrelated changes have been folded in, rather than approving them through.
6. **Style, last and briefly** — ESLint owns formatting. Comment only on what it cannot check: a misleading name, a function doing two things, duplicated logic an existing helper already covers.

What to look for in each category in an engine change: [`hyperformula/dev-docs/REVIEWING.md`](../hyperformula/dev-docs/REVIEWING.md).
What to look for in each category in an engine change: [`hyperformula/dev-docs/REVIEWING.md`](../hyperformula/dev-docs/REVIEWING.md). In a `hyperformula-ui` change: [`hyperformula-ui/dev-docs/REVIEWING.md`](../hyperformula-ui/dev-docs/REVIEWING.md).

## The change follows our guidelines

Expand Down
2 changes: 2 additions & 0 deletions dev-docs/CODE-STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

ESLint is the source of truth for formatting and code rules — run `npm run lint` before submitting changes (see [the linter section of the building guide](../docs/guide/building.md#run-the-linter)). Some of what follows it enforces, the `jsdoc` rules among them; the rest is what no linter can check for you.

Code in `hyperformula-ui/` follows its own conventions instead — Biome rather than ESLint, among others: [`hyperformula-ui/dev-docs/CODE-STYLE.md`](../hyperformula-ui/dev-docs/CODE-STYLE.md).

## Style

- Prefer a functional approach where possible (`filter`, `map`, `reduce`).
Expand Down
4 changes: 3 additions & 1 deletion dev-docs/DEFINITION-OF-DONE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ npm run lint
npm run test:jest
```

Add `npm run test` (which includes the browser run) when the change touches bundling, module format, or anything browser-specific. Add `npm run docs:generate-function-docs` when it touches a function or its catalogue entry — from the repository root, after `npm run docs:install`, because the generator runs in the portal's own install.
Add `npm run test` (which includes the browser run) when the change touches bundling, module format, or anything browser-specific.

A change in `hyperformula-ui/` runs its own gate instead, from the repository root: `npm run build:ui`, `npm run typecheck` and `npm run test:ui`, plus `npm run test:e2e` when it changes the demo or how the editor mounts in a page. See [`hyperformula-ui/dev-docs/TESTING.md`](../hyperformula-ui/dev-docs/TESTING.md). Add `npm run docs:generate-function-docs` when it touches a function or its catalogue entry — from the repository root, after `npm run docs:install`, because the generator runs in the portal's own install.

Read the output. Do not open a pull request on a red run and describe it as ready. A green Jest run without the private suite covers only the smoke tests — see [Fetching the private suite](../hyperformula/dev-docs/TESTING.md#fetching-the-private-suite). A red CI job unrelated to the change is explained in the pull request and reported, not ignored.

Expand Down
8 changes: 7 additions & 1 deletion dev-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In every directory, `CLAUDE.md` is a symlink to its sibling `AGENTS.md`. Edit `A

## Where to look

Repository-wide standards and process live here. Each package documents its own internals: the engine's are in [`hyperformula/dev-docs/`](../hyperformula/dev-docs/README.md).
Repository-wide standards and process live here. Each package documents its own internals: the engine's are in [`hyperformula/dev-docs/`](../hyperformula/dev-docs/README.md), the UI's in [`hyperformula-ui/dev-docs/`](../hyperformula-ui/dev-docs/README.md).

| You are working on | Read |
|---|---|
Expand All @@ -42,6 +42,12 @@ Inside the engine — architecture, the parser, the interpreter, the dependency
|---|---|
| Anything in `hyperformula/src/` | [`hyperformula/dev-docs/README.md`](../hyperformula/dev-docs/README.md) |

Inside the UI — the formula editor's architecture, its code style, its suites and its release:

| You are working on | Read |
|---|---|
| Anything in `hyperformula-ui/` | [`hyperformula-ui/dev-docs/README.md`](../hyperformula-ui/dev-docs/README.md) |

Outside both: [`README.md`](../README.md) for what the repository holds, [`hyperformula/README.md`](../hyperformula/README.md) for what the engine is and how to install and use it, [`docs/README.md`](../docs/README.md) for running the documentation portal, [`hyperformula/test/README.md`](../hyperformula/test/README.md) for attaching the private test suite, and [`CONTRIBUTING.md`](../CONTRIBUTING.md) for external contributors.

## Conventions
Expand Down
Loading
Loading