Skip to content

v1.2.0 — TIME columns, WEEK()/DATEADD(), BROWSE cell validation, Overtime demo

Choose a tag to compare

@DDecoene DDecoene released this 10 Jul 12:51
· 36 commits to main since this release
532799d

Highlights

TIME columns — TIME / TIME(n) storing canonical HH:MM. The TIME(15) qualifier requires quarter-hour minutes and is enforced on write, with no silent coercion. (#43)

WEEK() and DATEADD() — ISO-8601 week numbers, and the day arithmetic W3Script simply didn't have. Both computed in UTC, so month, year and leap-day boundaries are exact. (#44, #52)

BROWSE per-cell validation — an invalid edit keeps the cell in edit mode, outlined red, explaining why; the error clears as soon as you fix it. The rules live in one shared module and run on the client for instant feedback and on the server as the authoritative check. DATE, TIME(n), NUM(p,s), INT and LOGICAL are validated. (#45)

BROWSE rejecting an invalid TIME(15) cell edit

DO overtime — a new Overtime Tracker example app that exercises all of the above: per-employee weekly schedules, TIME(15) timesheets edited in the validated grid, WEEK()/DATEADD() week handling, a live overtime balance (banked minus leave taken), a grouped report and CSV export. (#46)

Test hardening — after two bugs shipped through a 283-test suite, this release closes the blind spots that let them through: a strict CREATE TABLE grammar, golden pins on the demo schemas, coverage for every grid WebSocket message, and npm run coverage. (#50)

Fixed

Several of these were pre-existing and user-visible:

  • NUM(8,2) created a phantom column literally named 2. The parser read the precision, then treated the scale as the next column definition. The shipped PRODUCTS, DEALS and SALES demo tables all carried the stray column. Tables created before this fix keep it until recreated.
  • Index metadata leaked across databases. Opening PEOPLE in one database silently activated an index defined on a different database's PEOPLE, pointing the record order at a column that need not even exist there. Index definitions are now keyed by (database, table, tag); existing definitions are adopted into the database that owns the table on first run.
  • grid-edit wrote to SQLite with no validation at all, bypassing the Executor entirely.
  • A bare INPUT "…" TO var at the REPL silently discarded the typed value. It only worked inside a program, where a following statement happened to create the continuation the handler depended on.
  • The BROWSE validation message was clipped away by the cell's overflow: hidden — users saw a red border and no reason. The tests passed because toContainText/toBeVisible don't account for clipping by an ancestor's overflow.

Upgrade note

Index definitions saved before this release are migrated automatically into whichever database owns the table. Where the owner is ambiguous — the same table name exists in two databases — the definition is dropped and must be recreated with INDEX ON. The underlying SQLite indexes are untouched.

Verification

379 vitest tests (up from 265) and 94 Playwright end-to-end tests (up from 73), CI-gated on unit + e2e.

Full detail in CHANGELOG.md.