# Changelog

## v20

- Corrected `BlendingHeader` so blend-line columns no longer appear in the header.
- Kept `product_name`, `c_e_number`, `%`, `QTY`, `KG`, and `K - NO` only in `BlendLine`, where they belong.
- Updated BlendingInstructions examples to match the corrected schema.
- Regenerated `src/generated_models.py`, `web/data/compiled-models.json`, and `web/data/examples.json`.
- Updated the visible build badge to v20.

## v19

- Added `examples/<FormName>/*.json` directories next to `form-schema.json` for per-form sample payloads.
- Updated `compile.py` to validate examples against the generated Pydantic models and package them into `web/data/examples.json`.
- Added numbered example buttons to form pages so sample JSON can populate the active form and JSON output.
- Updated the compiler version to 1.4.0 and the visible build badge to v19.

## v18

- Removed the unused `source-csvs/` directory from the package so the archive only contains files that participate in or document the active build flow.
- Clarified that `form-schema.json` is the editable source of truth; source CSVs were reference material only and are not read by the compiler.
- Updated the compiler version to 1.3.0 and the visible build badge to v18.

## v17

- Spread the form-page header controls across the top bar so the Back button/title, Form/JSON/Model tabs, and build badge no longer crowd into the top-left corner.
- Added a top-level `CHANGELOG.md` if absent and packaged a `web/CHANGELOG.md` copy for static download.
- Added a Changelog button to the splash/index page alongside the input schema documentation and `form-schema.json` download links.
- Updated the compiler version to 1.2.0 and the visible build badge to v17.

## v16

- Removed the Form/JSON/Model view tabs from the splash/index page; they now appear only after a generated form has been selected.
- Hid the Input schema docs and form-schema.json links on individual form pages so the form workspace header stays focused on Back, the form title, build version, and the view switcher.
- Added an explicit hidden-state CSS rule so hidden toolbar rows cannot be overridden by layout display rules.
- Updated the compiler version to 1.1.0 and the visible build badge to v16.

## v14

- Replaced the carousel/walkthrough website with a splash/index page that links directly to every compiled form.
- Added a Back button on form pages and removed Previous/Next/progress controls.
- Kept Form, JSON, and Model views on each form page.
- Removed the old hand-written `src/business_models.py` file from the package so the build cannot accidentally pick it up.
- Finalised the active flow as `form-schema.json -> src/generated_models.py -> web/data/compiled-models.json -> website`.
- Updated the compiler version to 1.0.0 and the visible build badge to v14.

## v13

- Added `form-schema.json` as the editable input schema for document definitions.
- Added `src/schema_codegen.py` to generate Pydantic classes from the input schema.
- Updated `compile.py` so the build flow is `form-schema.json -> generated Pydantic models -> compiled form artifact -> website`.
- Added `input-schema.md` with a description of the schema format and an example.
- Added a splash-page link to download the input schema documentation.
- Updated the compiler version to 0.9.0 and the visible build badge to v13.


## v12

- Reworked the inspection website from a card-based walkthrough into a page-style form workspace.
- Moved the document title, step position, progress dots, Previous/Next navigation, build badge, and Form/JSON/Model tabs into a fixed two-row header.
- Removed the inner card heading, card border, separate step row, and bottom navigation so the active document view renders directly below the header.
- Kept Previous/Next navigation and keyboard arrow navigation.
- Made the document area the scrolling region while the header stays fixed.
- Updated the compiler version to 0.8.0 and the visible build badge to v12.

## v11

- Added CSV-derived Pydantic models for `purchases.csv`, `goods_in.csv`, `orders.csv`, `purchase_orders.csv`, `quotes.csv`, and `stock_master.csv`.
- Treated `purchases.csv`, `goods_in.csv`, `quotes.csv`, and `stock_master.csv` as flat record/product forms.
- Reconstructed `orders.csv` as `CsvSalesOrder`, grouped by `order_number`, with shared header fields and repeated `order_lines`.
- Reconstructed `purchase_orders.csv` as `PurchaseOrder`, grouped by `purchase_order_number`, with shared header fields and repeated `purchase_order_lines`.
- Mapped the blank purchases column to `description` and ignored empty `Unnamed` spreadsheet debris columns.
- Updated the walkthrough to list compiled models dynamically from the artifact.
- Updated the compiler version to 0.7.0 and the visible build badge to v11.

## v10

- Added a strict `SalesOrderForm` model based on the uploaded Sales Order Form document.
- Represented the sales order as `header`, `order_lines`, and `footer`, matching the document structure without copying the visual design.
- Added `SalesOrderLine` columns for Product, Cust Code/ B/no., Qty, Pckg, H & Co B/no., H & Co R.M Code, R10, Comment, H&Co K No., and INT.
- Added footer fields for Organic Cleaning Procedure Followed, Food Allergens Cleaning Procedure Followed, Comments, and document control.
- Compiled both `BlendingInstructions` and `SalesOrderForm` into the inspection walkthrough.
- Updated the compiler version to 0.6.0 and the visible build badge to v10.

## v09

- Reorganized the strict PDF-derived model into `header`, `blend_lines`, and `footer` sections.
- Moved the top product row fields into the compact header section so they no longer appear as a separate vertical line-item-like block.
- Kept `blend_lines` as the dominant body of the form and rendered every blend line consistently in the same horizontal row grid.
- Added convention-based compact-section presentation for `header`, `footer`, `final_check`, `testing_results`, and `document_footer`.
- Updated the compiler version to 0.5.0 and the visible build badge to v09.

## v08

- Audited the `BlendingInstructions` model against the uploaded PDF and removed speculative fields.
- Renamed fields to follow the printed labels more closely, including `C E number`, `K - NO`, `S Y N`, `Customer order no`, `SG`, `RI`, `OR`, and `Ph`.
- Represented the top product row, repeated blend lines, final-check cells, comments box, testing-results row, and footer as the model structure.
- Kept the generic convention-based line-item rendering for `blend_lines`.
- Updated the compiler version to 0.4.0 and the visible build badge to v08.

## v07

- Added convention-based line-item detection in the compiler for array fields named like `blend_lines`, `_lines`, `_items`, or `_entries` when their item model is a compact scalar object.
- Emitted `presentation: "line_items"` in the compiled form artifact for inferred line-item collections.
- Updated the browser renderer to display line-item collections as aligned horizontal rows with column headings and an `Add line` control.
- Kept this behavior generic so future fields such as `invoice_lines`, `order_items`, or `stock_entries` can use the same rendering path.
- Updated the compiler version to 0.3.0 and the visible build badge to v07.

## v06

- Replaced the Quote, Order, and Invoice demo models with a realistic `BlendingInstruction` model based on the fields of a scanned blending instruction sheet.
- Kept the focus on field capture rather than visual recreation of the source paper form.
- Updated the walkthrough copy to explain the core workflow: document structure to Pydantic model to compiled form to JSON output.
- Updated the compiler version to 0.2.0 and compiled a fresh `web/data/compiled-models.json` artifact.
- Updated the visible build badge to v06.

## v05

- Added a Model view to each generated Quote, Order, and Invoice card.
- Updated the compiler artifact to include Pydantic source metadata for each compiled model.
- Displayed the source code for the relevant Pydantic model and supporting shared classes in a read-only code panel.
- Kept the fixed-height walkthrough layout from v04.
- Updated the visible build badge to v05.

## v04

- Changed the walkthrough shell to use a viewport-height layout rather than page-height scrolling.
- Made splash and call-to-action slides fill the available fixed card area.
- Made generated form and JSON content scroll inside the fixed-height card when it overflows.
- Updated the visible build badge to v04.
- Kept the compiler and compiled model artifact unchanged from v03.

## v03

- Made the website version number more visible by replacing the discreet header pill with a prominent Build v03 badge.
- Kept the compiler, generated model artifact, and linear walkthrough behavior unchanged from v02.

## v02

- Changed the inspection website from a dashboard into a linear walkthrough.
- Added a plain-English splash screen before the generated document forms.
- Ordered the generated model cards as Quote, Order, and Invoice.
- Added previous/next navigation, keyboard arrow navigation, and progress dots.
- Added a final call-to-action page explaining the intended compile-and-inspect workflow.
- Kept the compiler and compiled model artifact format unchanged.

## v01

- Added Pydantic models for Quote, Order, and Invoice.
- Added a compiler that emits a deterministic form intermediate representation.
- Added a generated `web/data/compiled-models.json` artifact.
- Added a static inspection website with generated form and JSON views.
