Semantic Diff

#9430 DEMO: verify a ReScript React Todo app and @tscert.noMutation reducer with TScert

3 commits

d5158ff0ac33987b4d141c6ce06372b7b5807de8..pr-9430

9ea68c0f4 · cristianoc · Nov 26, 2026, 03:28 UTC

Support @tscert.noMutation and callback/JSX types under -bs-emit-ts

Why

TScert verification of React components and reducers under -bs-emit-ts needs explicit parameter types on local/callback functions and JSX wrappers, a mapping for JsxEvent.Mouse.t, and a way to emit an empty write-footprint claim (Modifies<{}, T>) on functions marked @tscert.noMutation without eta-reducing forwarding wrappers.

modifiedJS @tscert.noMutation

@tscert.noMutationlet increment = n => Forwarded.increment(n)
js
Before
After
export const increment = Forwarded.increment; /// <reference types="@cristianoc/tscert/effects" />…export function increment(n: number): Modifies<{}, number> { return Forwarded.increment(n);}

modifiedJS callback parameters

let squares = xs => Array.map(xs, x => x * x)
js
Before
After
export function squares(xs: number[]): number[] {export function squares(xs: number[]): number[] { return xs.map(x => x * x | 0); return xs.map((x: number) => x * x | 0);}}
3bbb51fb8 · cristianoc · Nov 26, 2026, 03:28 UTC

Add TScert-verified React Todo app build test

Add tests/build_tests/emit_ts_react, a multi-module ReScript React Todo app (TodoModel, TodoReact, TodoRow, TodoLabel) mounted by a thin trusted React host (src/trusted/TodoHost.ts) with @tscert.noMutation on TodoModel.reduce. The test suite verifies the emitted app modules and cross-module forwarding cases (Forwarding / ForwardingMutation) with TScert against contracts/jsx-runtime.d.ts, checks negative controls (ForgedElement, InvalidProps, ImpureReducer, ConditionalHook), and checks hook placement with Biome.

998c71ee1 · cristianoc · Nov 26, 2026, 03:46 UTC

Polish React Todo app UI and keyboard ergonomics

Upgrade tests/build_tests/emit_ts_react to a clean, usable Todo UI: add Enter-to-submit, placeholder and aria-label support on TodoInput, live task counts (TodoModel.countTodos) in the header, segmented filter tabs, and footer, circular completion toggles, color-coded clickable priority pills, an empty state, and refined card styling while keeping all 4 app modules (29/29 units) verified by TScert.