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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ Versions follow [Semantic Versioning](https://semver.org/) — minor bump per su
`INTEGER`). Declared types are recorded per `(database, table, column)` in
`server/ColumnMetaStore.ts`. (#45)

- `demos/overtime.prg` — an Overtime Tracker example app, and the showcase for this
release's engine work: `TIME(15)` columns validated per-cell as you type in `BROWSE`,
`WEEK()` for the ISO week number, and `DATEADD()` to walk a week's Monday through Friday.
Employees have their own weekly schedule, so standard hours are a real per-employee sum
rather than a flat 40; overtime is banked per week and drawn down as leave, with the
balance computed live from the source rows (no running-total field to drift when a week
is re-edited). Seeds a grouped report (`demos/reports/overtimebyemp.json`) and is
reachable from the splash screen, `HELP`, and the Assistant (Programs → Run Overtime
demo). (#46)

### Fixed
- `CREATE TABLE t (price NUM(8,2))` silently created a **phantom column named `2`** of
type `)`: the parser read the precision, then treated the scale as the next column
Expand Down
12 changes: 8 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ data/
demos/
*.prg Demo programs — single source of truth; seeded into the
program store on every server start (overwrites store copies).
crm.prg + INVENTORY.prg are usable example apps.
crm.prg, INVENTORY.prg + overtime.prg are usable example apps.
reports/*.json Demo report definitions — seeded into the report store at startup
(dealsbystage, lowstock, overtimebyemp)

.devcontainer/
devcontainer.json GitHub Codespaces config — auto npm install + npm run dev
Expand Down Expand Up @@ -322,7 +323,10 @@ line.
- ~~BROWSE per-cell validation~~ — grid rejects invalid edits per column type, validated on both client and server via `src/shared/cellValidation.ts` (#45) ✅
- ~~Test hardening~~ — strict `CREATE TABLE` grammar, golden demo schemas, coverage for every
grid WS message, per-database index/column metadata scoping, `npm run coverage` (#50) ✅
- `demos/overtime.prg` — overtime tracker showcasing all three of the above (#46)
- ~~`demos/overtime.prg`~~ — overtime tracker: per-employee weekly schedules, `TIME(15)`
timesheets edited in the validated grid, `WEEK()`/`DATEADD()`, live overtime balance,
grouped report, CSV export (#46) ✅
- ~~`DATEADD()` built-in~~ — day arithmetic; W3Script had none (#52) ✅

## Boolean literals

Expand All @@ -331,12 +335,12 @@ Both styles accepted: `TRUE`/`FALSE` and `.T.`/`.TRUE.`/`.F.`/`.FALSE.` (dBASE I
## Testing

```bash
npm test # Vitest unit + integration (369 tests)
npm test # Vitest unit + integration (379 tests)
npm run coverage # Vitest + v8 coverage report (reporting only, no thresholds)
npx playwright test # E2E browser tests — requires dev server on :5173/:3000
```

Playwright suites (84 tests): `tests/assistant.spec.ts` (23 tests — sidebar, wizards, report designer, MODIFY STRUCTURE round-trip, `TIME(15)` column + REPLACE validation, `NUM(p,s)` wizard, Browse-action grid validation, program run, CSV/SORT/SUM-AVERAGE/REINDEX/PACK actions, demo launchers), `tests/integration.spec.ts` (20 tests — full REPL scenario), `tests/inventory.spec.ts` (8 tests — INVENTORY.prg menu + valuation/low-stock report/sort/CSV/JOIN), `tests/crm.spec.ts` (6 tests — CRM demo menu, pipeline summary, sort, report, CSV, JOIN), `tests/parity-commands.spec.ts` (6 tests — `?`/`??`, built-in functions, `WEEK()`, `DATEADD()`, `SUM`/`AVERAGE`, `SORT ON … TO`), `tests/multiarea.spec.ts` (4 tests — multi-work-area, relations, alias.field), `tests/demos.spec.ts` (4 tests — demo program + report seeding), `tests/grid-validation.spec.ts` (3 tests — BROWSE per-cell validation: TIME(15), NUM(p,s)/DATE, Esc abandons), `tests/schema-errors.spec.ts` (3 tests — malformed CREATE TABLE errors, NUM(p,s) column count, bare INPUT stores its value), `tests/copycsv.spec.ts` (2 tests — COPY TO download + APPEND FROM upload), `tests/splash.spec.ts` (2 tests — version banner + demo discoverability), `tests/join.spec.ts` (1 test — JOIN materialization), `tests/propagation.spec.ts` (1 test — live multiuser refresh), `tests/program-side-effects.spec.ts` (1 test — CSV/report side-effects fire from inside a program block).
Playwright suites (94 tests): `tests/assistant.spec.ts` (23 tests — sidebar, wizards, report designer, MODIFY STRUCTURE round-trip, `TIME(15)` column + REPLACE validation, `NUM(p,s)` wizard, Browse-action grid validation, program run, CSV/SORT/SUM-AVERAGE/REINDEX/PACK actions, demo launchers), `tests/integration.spec.ts` (20 tests — full REPL scenario), `tests/overtime.spec.ts` (9 tests — overtime.prg: menu, seeding, DATEADD week prep, TIME(15) grid rejection, recalculation, live balance, quarter-hour leave check, report, CSV), `tests/inventory.spec.ts` (8 tests — INVENTORY.prg menu + valuation/low-stock report/sort/CSV/JOIN), `tests/crm.spec.ts` (6 tests — CRM demo menu, pipeline summary, sort, report, CSV, JOIN), `tests/parity-commands.spec.ts` (6 tests — `?`/`??`, built-in functions, `WEEK()`, `DATEADD()`, `SUM`/`AVERAGE`, `SORT ON … TO`), `tests/multiarea.spec.ts` (4 tests — multi-work-area, relations, alias.field), `tests/demos.spec.ts` (4 tests — demo program + report seeding), `tests/grid-validation.spec.ts` (3 tests — BROWSE per-cell validation: TIME(15), NUM(p,s)/DATE, Esc abandons), `tests/schema-errors.spec.ts` (3 tests — malformed CREATE TABLE errors, NUM(p,s) column count, bare INPUT stores its value), `tests/copycsv.spec.ts` (2 tests — COPY TO download + APPEND FROM upload), `tests/splash.spec.ts` (2 tests — version banner + demo discoverability), `tests/join.spec.ts` (1 test — JOIN materialization), `tests/propagation.spec.ts` (1 test — live multiuser refresh), `tests/program-side-effects.spec.ts` (1 test — CSV/report side-effects fire from inside a program block).

## Test discipline

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,17 @@ WebBase-III supports **unlimited work areas** — each independently holding a t
> seeded into the program store on every server start, overwriting any store copy.
> Matching report definitions live in `demos/reports/*.json` and are seeded the same way.
>
> Two of them are **usable example apps** you can build off — run them, then `EDIT` to adapt:
> Three of them are **usable example apps** you can build off — run them, then `EDIT` to adapt:
> - **`DO crm`** — a mini-CRM: companies, contacts, and deals with pipeline totals
> (`SUM … FOR`), top-deals sort, a grouped report, CSV export, and a companies+deals JOIN.
> - **`DO inventory`** — a stock manager: categories, products (with reorder levels), and a
> stock-movements ledger, plus valuation totals, a low-stock report, sort, CSV export, and
> a products+categories JOIN.
> - **`DO overtime`** — an overtime tracker: per-employee weekly schedules, `TIME(15)`
> timesheets you edit in the validated grid, `WEEK()` / `DATEADD()` week handling, a live
> overtime balance (banked minus leave taken), a grouped report, and CSV export.
>
> Both lean on multi-work-area relations (`alias.field`), indexes, and `@ SAY … GET`/`READ`
> They lean on multi-work-area relations (`alias.field`), indexes, and `@ SAY … GET`/`READ`
> forms, and invite you to open a second window to watch live multiuser propagation.

### Variables & I/O
Expand Down
Loading
Loading