What to look for in each category of the review order when a diff touches hyperformula-ui/. Label and report findings as Reporting findings says.
A broken invariant is blocking:. The canonical statement of each is in ARCHITECTURE.md.
- Comment policy. No inline
//or explanatory/* */in a changed.tsfile, apart frombiome-ignoredirectives and the generatedcssText.ts. No JSDoc on a symbol thatpackages/core/src/index.tsdoes not re-export. A new or changed public export without JSDoc is not blocking;npm run docs --workspace=hyperformula-ui/packages/corefails on it anyway. - The
commentsToN/nToCommentsboundary.FormulaEditor.setValuestill callsnToComments, andFormulaEditor.getValuestill callscommentsToN. Nothing else reads the kernel's text and hands it to the host as a cell value without going throughcommentsToN. See The commentsToN / nToComments boundary. IGridAdapterfirst. A method an adapter needs is added topackages/core/src/adapter/types.ts, then toNullAdapter, and only then used. See Adding a new public API.- Errors stay in the host. The core renders no formula errors itself: no error text set through
innerHTML, no new error classes, noconsole.errorinformulaEditor/orui/triggered by a parse error. See Error display policy. Kernelstays DOM-free, and rawHyperFormulaLikeis touched only insidesrc/engine/.- No HTML sinks. No
innerHTML,outerHTMLorinsertAdjacentHTMLinsrc/: under a host's Trusted Types policy (require-trusted-types-for 'script') the assignment throws and the grid does not render. SeeCODE-STYLE.md. - A URL from engine metadata is checked before it becomes a link. A custom function's
docUrlcan carry any scheme; onlyhttp:andhttps:are rendered. - Every regex run on editor text is linear. The lexer runs on every keystroke, over text a user can paste. A pattern with overlapping quantifiers (
\d+\.?\d*, a lazy group followed by\s*), or a scan that restarts from many positions, is quadratic on long input.
- Tests. A behaviour change in
packages/core/src/has a test in the matching file underpackages/core/tests/— seeTESTING.md. A changed demo page that the e2e suite covers has its spec ande2e/COVERAGE.mdupdated in the same change. - Generated files. A change to
src/styles/regeneratessrc/theme/cssText.ts; CI fails if it is stale. A change to public JSDoc regeneratespackages/core/DOCS.md. - The pages that name things. A diff that renames, moves, adds or removes a file, export,
IGridAdaptermethod or key binding updates the page that names it:ARCHITECTURE.md,SPEC.md(§2 lists the file tree, §3 the public API, §8 the adapter contract),KEYBOARD-SHORTCUTS.md,EDITOR-TASKS.md, or anAGENTS.md. - The changelog entry goes in
hyperformula-ui/CHANGELOG.md, not the engine's.
The keystroke path: FormulaEditor input, Kernel.applyEdit, the lexer, renderOverlay() and pushHighlights(). Watch for work done on every keystroke that could run once, and for DOM reads that force a layout inside a loop.
The contract is what packages/core/src/index.ts re-exports, plus three things outside the TypeScript surface:
- The
.hfe-*CSS classes and--hfe-*variables. Integrations select on and set them; the Handsontable plugin's tests rely on.hfe-formula-barand.hfe-editor__input. Renaming one is a breaking change. See CSS names. - The
peerDependenciesrange onhyperformula. Calling an engine method newer than its lower bound needs the range raised. - The
exportsmap. The source stays under the privatehyperformula-ui-sourcecondition. Never export it underdevelopment, which other projects' bundlers enable in dev mode — seeSPEC.md.
The package versions on its own 0.x line, where a minor release may break; a breaking change still needs its changelog entry. See RELEASE.md.
Biome owns formatting and its rules. What it cannot check is in CODE-STYLE.md: naming, blank lines, member order, arrow-function fields, non-null assertions.