WFDASH-WEBAPP/src/lib/release-notes.ts
Dave e12a5ccb32 refactor(release-notes): drop the date field from the release registry
The date was kept in the registry as an authoring reference and never
rendered, but it was still a date sitting in the notes file, and a
date-shaped value can always find its way to a screen. The ReleaseNote
type has no date field at all now, so one cannot be added without a
deliberate change to the contract.

A test walks the registry and fails on any date — a stray property, a
headline or a line of copy — so the popup carries a release number and
a commit and nothing else.

Release 6 also says what it is: Payments and Approvals is in beta. The
schema and the enforcement hooks are live on the PocketBase, but the
backend behind the queue is still being worked on.
2026-11-05 01:19:50 +02:00

104 lines
5.2 KiB
TypeScript

/**
* What's New — the release-note registry behind the sidebar popup.
*
* A plain data file, newest first. There's no changelog table and no
* fetch: the notes are written by hand when a release goes out, and the
* popup renders whatever is in here. That keeps the whole feature
* client-side (it opens instantly, works offline) and means the copy
* stays deliberate rather than being generated from commit messages.
*
* A release is identified by its number and by the commit it went out
* with. There are no dates anywhere — not on screen, and not in this
* file either. A date would tell the office what day work was done, and
* that is not this popup's job. The `ReleaseNote` type has no date field,
* so a date cannot be added without a deliberate change to the contract.
*
* To publish a release:
* 1. merge the work, then take the short SHA — `git log --oneline -1`
* 2. add an entry at the top of the array with the next release number
* 3. the release number is the "seen" marker, so bumping it is what
* makes the What's New button light up for every operator again
*/
export interface ReleaseNote {
/** Release number. 1 = the first release. Also the "seen" marker. */
release: number;
/** Short SHA of the commit this release went out with. */
commit: string;
/** One-line headline for the release. */
title: string;
/** The changes, one sentence each. */
items: string[];
}
export const RELEASE_NOTES: ReleaseNote[] = [
{
release: 6,
commit: "4eb6ebf",
title: "Supplier payments and approvals, and a theme picker that tells the truth",
items: [
"Payments and Approvals is in beta. The backend behind it is still being worked on, so expect it to change shape as we go.",
"Payments and Approvals — a new page under Orders. Flag an order item that needs paying and it lands in one queue with the customer, the supplier and the items it covers.",
"Attach the supplier's invoice or pro forma to the request. The buyer's purchase order is linked for you, so nothing gets downloaded and uploaded twice.",
"Mark it paid with a proof of payment attached. Until it is paid, that item cannot be marked ready for collection or go out with a driver.",
"Approvals live on the same page. Items waiting on a markup decision show the cost, the selling price and the markup, with a link straight to the item.",
"The theme picker now previews the colours the app actually uses, so a palette card cannot promise a colour the product does not paint. Every palette has a proper dark surface, and a retired theme falls back to the default instead of an unstyled page.",
"This popup now carries a release number and the commit it shipped with, and no dates.",
],
},
{
release: 5,
commit: "139ea25",
title: "Delivery Pool, letterhead lock and a dark mode section",
items: [
"Delivery Pool: invoiced lines waiting to go out, one card per customer invoice. Assign a driver, upload the signed copy, and the delivery closes.",
"Quote letterheads are locked to the customer's company — one letterhead per company, so quotes always go out on the right paper.",
"The counter never sells at R0. Items without a price stay off the till, and customer lines go to the price list instead.",
"The sidebar now has a Dark Mode section with a light/dark switch. Theme colours live in Settings → Appearance.",
"This What's New popup — press it in the sidebar to see what changed.",
],
},
{
release: 4,
commit: "83aec14",
title: "Collection Confirm gets a second pair of eyes",
items: [
"Collection Confirm: a Notes button on each PO card, so the driver photos can be checked against the PO before you confirm.",
"The AI never changes a price. A different cost on the invoice is flagged as a red Price tick for a person to settle.",
"Collection Pool: stock lines can go back to pending and be marked ready again.",
"Quotes now record who they were sent to.",
],
},
{
release: 3,
commit: "3eea87e",
title: "Auto-push and a shortcut to AI settings",
items: [
"Collection Confirm can auto-push purple cards straight on to invoicing, with a two-day log of everything it moved.",
"The Settings page links straight to AI settings.",
],
},
{
release: 2,
commit: "b212d0f",
title: "A phone board for the managers",
items: [
"/manager is a mobile board for the managers: every order and where it is, on a phone.",
"The preview popup is the same one the desk uses on /search.",
],
},
{
release: 1,
commit: "55cc7fa",
title: "One POS matcher, AI-only quote matching",
items: [
"One size-aware matcher now drives the quote assistant, the order fill and the blue price check — so they can't disagree about an item.",
"The quote assistant prices only an exact match and shows the closest one instead when it isn't sure.",
"Quote matching is AI-only. The old rule-based scorer is retired; the AI links an order when it's sure and suggests otherwise.",
"The blue price check badge appears on both Process pages.",
],
},
];
/** The newest entry — the one the "New" dot on the button points at. */
export const LATEST_RELEASE: ReleaseNote = RELEASE_NOTES[0];