# AquaLedger Changelog

## v0.18.0 - 2026-07-04

### Added
- Pool and hot tub facility cards now expose per-facility pH and sanitiser target ranges, so mixed chlorine/bromine sites can keep different operating defaults while still inheriting site defaults when fields are left blank.
- Hot tub facility cards can now override volume, operating times, retest wait, temperature target/tolerance, filter names, filter intervals, and whether a second filter is fitted; multiple facilities now start collapsed so each card is easier to scan.
- The global pool and hot tub defaults cards are now labelled as defaults for new facilities, so their fallback role is clearer.

### Fixed
- Changing a facility sanitiser or feeder setting no longer jumps the setup screen away from the card being edited.

## v0.17.1 - 2026-07-04

### Fixed
- Hosted sites no longer flash the configured fallback organisation name while the signed-in user's selected site is loading.
- Pending offline entries and setup history are now kept tied to their original hosted site so they cannot be carried into another selected site after refresh.

## v0.17.0 - 2026-07-04

### Added
- Lab assurance result entries can now capture structured microbiological and legionella result details, including ACC/colony count, coliforms, E coli, Pseudomonas aeruginosa, legionella result, and legionella count fields.
- Lab result details now appear in the saved entry text alongside the outcome, action/retest status, evidence reference, and notes.

### Fixed
- Lab assurance expected-result and follow-up/retest dates can no longer be saved before today's date.
- Staff-role prompts now use the correct "a" or "an" wording for custom labels such as attendant.
- Lab result-sheet upload wording now makes clear that image and PDF files are accepted, with the existing 5 MB limit shown in the form.

## v0.16.0 - 2026-07-03

### Changed
- Setup admin tools are now split into clearer Site, Pools, Hot tubs, Chemistry, Treatments, Reminders, Reports, Access, and Data sections.
- Facility weather prompts and setup helper text now point managers to the new Pools and Hot tubs sections instead of the previous catch-all Facilities section.

## v0.15.1 - 2026-07-03

### Changed
- Setup now separates pool facilities and hot tub facilities into their own sections, with separate add controls and collapsible per-facility settings cards.
- Empty setup states now show whether no pools or no hot tubs are configured, reducing noise for sites that only operate one facility type.

## v0.15.0 - 2026-07-03

### Added
- Facilities can now enable microbiological and legionella lab assurance tracking with per-facility intervals.
- Pool and hot tub tabs now show a Lab assurance card when enabled, allowing wardens/managers to record samples taken, lab results received, result references, result-sheet notes/photos, closure status, and retest dates.
- Added a private Supabase Storage migration for lab result-sheet evidence so hosted sites can keep the original source document alongside the structured lab record.
- Added a Supabase event-type migration so lab sample/result records can sync to hosted `water_entries`.
- Lab assurance records now appear in Latest checks, logs, analysis markers, CSV exports, and emailed report assurance summaries.
- A prominent facility banner now shows when a pool or hot tub is closed pending lab action/retest, and a satisfactory follow-up result clears the closed status.
- The Lab assurance card now summarises all enabled sample types awaiting results or due for sampling, rather than only describing the selected sample type.

## v0.14.1 - 2026-07-02

### Fixed
- Pool and hot tub analysis charts no longer plot blank maintenance-event readings as zero pH, zero sanitiser, or zero temperature.
- Analysis charts now leave visible line gaps where readings are missing, and analysis/report insights count entries that have no pH, sanitiser, or temperature reading.
- The Analysis tab now uses the same compact category markers as emailed reports, with separate counts for chemical doses, shock/oxidiser, feeder checks, filter care, water changes, and season events where present.
- Analysis tab markers now sit in consistent category lanes, and chemical-dose markers use a distinct neutral colour so they are not confused with the temperature trend.
- The Analysis tab legend now separates reading trend lines from operational event markers, and marker dots stay round by avoiding chart-scaled SVG circles.
- Emailed report charts now use compact category markers with counted legends instead of repeated labels, and facility insight boxes have more room to prevent overflow.
- Emailed report marker legends now use the same coloured marker symbol shown on charts, and dense markers are staggered inside the plot area to avoid overlapping titles and date labels.
- Report markers now distinguish chemical doses, shock/oxidiser treatments, feeder checks, filter care, and water changes where those event types are present.

## v0.14.0 - 2026-07-02

### Added
- Emailed report PDFs now include a final assurance-notes page for hot tub facilities, highlighting useful missing measurements such as TDS, alkalinity, and chlorine-only combined chlorine where relevant.
- The assurance notes now flag that microbiological lab-test records are not yet captured in AquaLedger, with UK HSG282-style context for routine bacterial and legionella testing.
- Assurance notes now use facility coordinates to apply UK/HSG282-specific prompts only when a hot tub appears to be UK-based, and otherwise show neutral local-guidance wording.
- The assurance page now includes a compact HSG282 check summary table showing what is recorded, what is a gap, and the next practical step.
- The HSG282 check summary now shows free chlorine/bromine residual explicitly, includes a simple priority column, and uses device-neutral TDS wording.

## v0.13.0 - 2026-07-01

### Added
- Emailed report PDFs now include an audit scorecard summary covering flagged checks, scheduled-check compliance, treatment follow-through, maintenance events, unresolved feeder checks, and unusual readings saved without retest.
- Emailed facility report pages now summarise reminder compliance, product traceability, data quality, and learning quality for the selected report period.
- Monthly and one-off emailed reports now fetch active reminder schedules so missed, late, on-time, and pending check windows can be included in the PDF.

## v0.12.0 - 2026-07-01

### Added
- Managers can now send a one-off emailed report for a chosen date range to a specific address without adding that address to the monthly recipient list.
- Emailed monthly reports now include a compact operational exceptions summary covering unapplied treatments, skipped or unresolved feeder checks, unusual readings saved without retest, incomplete filter procedures, and water changes.
- Emailed facility report pages now include a learning-quality insight for the selected period, showing treatment follow-up evidence, confidence, target-hit rate, repeat-treatment rate, and ignored outliers where available.

### Changed
- Optional chemistry readings in reports now follow the facility configuration, so a disabled check such as calcium hardness is not analysed for a facility that does not use it.
- Emailed report summary cards now say "flagged checks in period" instead of the unclear "warnings in range", and report charts no longer draw impossible negative axes for pH or sanitiser readings.

## v0.11.0 - 2026-06-30

### Added
- Chlorine and bromine feeder checks can now have a per-facility check interval, with the Pool/Hot Tub tab showing whether the check is due, overdue, unresolved, or next due later.
- Feeder checks now record as standalone operational events, including hopper status, amount added, and dose setting where entered.
- Feeder checks now appear in Latest checks with clear status text.

### Changed
- The feeder card now uses clearer sanitiser-specific wording, such as "Chlorine feeder" or "Bromine feeder," instead of "Base-load dosing."
- Setup sanitiser-delivery labels have been simplified, including "Feeder plus manual top-ups" for sites that use a feeder plus manual corrective dosing.
- The feeder card copy has been shortened to focus on the action wardens need to take.
- Empty, blocked, off, or not-checked feeder records keep the feeder prompt open instead of resetting the check timer.
- Due or unresolved feeder checks must now be recorded or skipped with a reason before a normal reading can be saved.
- Feeder records no longer copy pH, sanitiser, or temperature readings from the measurement form.
- Feeder-check validation now shows missing-warden messages inside the feeder card instead of moving focus to the top of the page.

## v0.10.1 - 2026-06-28

### Fixed
- Save buttons now stay greyed out when a retest prompt is active until wardens choose retested/confirmed or not retested, with a reason required when not retested is selected.

## v0.10.0 - 2026-06-28

### Added
- Pool and hot tub entries now flag unusually large pH, sanitiser, or temperature readings and ask wardens to retest or confirm before saving.
- Unusual readings saved without a retest now require a reason and record the outcome in the entry history.

### Improved
- The retest prompt now appears directly below the measurement card and uses stronger warning styling so potential measurement errors are harder to miss.
- Entry-page layout now keeps measurement/retest and treatment/maintenance panels in separate desktop columns, preventing large treatment cards from pushing retest prompts down the page.

### Fixed
- Blank measurement fields no longer trigger false retest prompts.
- Removed smooth-scroll races from maintenance confirmation flows that could make rapid button clicks unreliable in Firefox.

## v0.9.2 - 2026-06-28

### Fixed
- Sanitiser trend charts no longer draw axis values below 0 ppm.

## v0.9.1 - 2026-06-28

### Fixed
- pH trend charts no longer draw axis values below 0 or above 14.

## v0.9.0 - 2026-06-28

### Added
- Water changes now require wardens to confirm whether filters were changed.
- When filters are confirmed during a water change, both filter counters reset.
- Latest checks now show water changes as their own entry.
- After a water change is recorded, AquaLedger reminds wardens that fresh hot tub chemical readings are still required.

### Changed
- Water-change entries no longer reuse previous pH, sanitiser, or temperature readings.
- Filter changes now use an Applied / Not applied confirmation card.
- Filter-care records now keep incomplete filter changes visible in history without resetting the due date.

### Fixed
- Empty maintenance readings no longer display as zero values.
- Filter confirmation buttons now show a clear selected state.
- The filter-change card no longer causes the page to jump after recording.
