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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ PAYKIT_KIT_SECRET=
MERQO_BASE_URL=
MERQO_CUSTOMER_SECRET=

# Optional "your order is ready" email, sent through Resend's REST API when a
# customer ticked the opt-in box at checkout. RESEND_FROM is the sender, for
# example "Merqo <noreply@mail.merqo.io>" (mail.merqo.io is verified in Resend).
# Server-only. If either is unset the send is skipped and everything else works.
RESEND_API_KEY=
RESEND_FROM=

# Bearer secret for POST /api/printkit/print-status — printkit calling INTO
# qkit with a print job's terminal status. A plain shared secret (no
# kit_slug prefix): this endpoint has exactly one caller (printkit), unlike
Expand Down
45 changes: 43 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@ All notable changes to this project are documented here. The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.10.0] - 2026-12-02

### Changed

- Discount codes: cancelling an order now gives the use back to the exact code it redeemed (matched by id), so deleting a code and creating a new one with the same text no longer lets old cancelled orders reduce the new code's uses.

## [0.9.0] - 2026-12-02

### Changed

- Account menu: Text size is now a submenu under a Preferences label ("Text size · 100%") with a preset list from 75% to 200%, replacing the inline A-/100%/A+ buttons. Re-pins `@merqo/ui` to v0.68.0.

## [0.8.0] - 2026-12-02

### Added

- Order-ready email: at checkout a customer can tick "Email me when my order is ready" and give an address. When the vendor marks the order Ready they get one email with the booth name, order number and a link to their order page. The address is kept only for that, in a table no customer or board view can read, and is deleted once the email is sent or the order completes or is cancelled. Available on every plan; needs `RESEND_API_KEY` and `RESEND_FROM` (skipped when unset) and migration 0131. Walk-up orders never get it.

### Changed

- Live board: defaults to two columns, Incoming and Preparing. Ready orders sit at the bottom of Preparing with their Picked up action until collected, and the phone switcher drops its Ready tab. Vendors can bring the Ready column back with "Show a Ready column" in Settings. The Settings "Unpaid orders" card is now "Board display" with both switches and a colour key for the two blues. Needs migration `0133_board_settings_show_ready_column.sql` applied to save the new setting; until then the board stays on two columns.

## [0.7.1] - 2026-12-02

### Changed

- Sales and menu CSV downloads use the shared `downloadCsv`, so the files now start with a UTF-8 BOM and Excel reads non-ASCII text correctly. The menu CSV and recent-orders list use the shared `csvCell`, `readStored` and `writeStored` instead of local copies.

## [0.7.0] - 2026-12-01

### Added

- Minimum order quantity: vendors can set a minimum per menu item ("Minimum per order" in the menu editor, any plan). Customers adding the item start at the minimum, going below it removes the item, and the order is refused below it on the server. The minimum can be at most 20. An item whose minimum is above its stock or the per-order limit shows as unavailable, and the editor will not save such a minimum. Migration 0130 adds the check (apply before deploying).

## [0.6.2] - 2026-12-01

### Changed

- FAQ: the cost section is now "Cost and plans" and says qkit finished its pilot in Sep 2026 and is open for founding vendors, with charging from 1 January 2027. Paykit answers now say it is deployed and in early access instead of "still in build".

## [0.6.1] - 2026-12-01

### Security
Expand All @@ -12,15 +54,14 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.0] - 2026-12-01

## [0.6.0] - 2026-12-01

### Added

- Discount codes: paid vendors (Pro or a running Event Pass) create, switch off and delete percent or fixed codes with an optional last day and use cap at Dashboard > Codes. Customers enter a code at checkout; the order total, the order page and the live board card show the discount, and the server re-checks the code when the order is placed. Free vendors see an upgrade prompt. A cancelled order (including an unpaid one swept after its payment window) gives its code use back. Adds a service-role-only `issue_reward_code` function for other kits (migration 0129, apply before deploying).
- Live board: an open order the customer has not paid for now gets a blue border, and an order the customer says they paid gets a blue background wash (overdue red and aging amber still outrank the says-paid wash). Vendors can turn the unpaid border off with "Highlight unpaid orders" in Settings; the says-paid wash is always on. Needs migration `0128_board_settings_show_unpaid_border.sql` applied before the app ships.

### Changed

- Booth edit: More settings is now two balanced columns, with Order flow, Limits, Printing and Pickup on the left and Menu, Payment and Social links on the right, instead of a short left column and a long right one.
- The account menu now has a Text size row (A-, 100%, A+) and the text size control comes from `@merqo/ui` v0.67.0 instead of a local copy. It shares the board's saved value, so every vendor's existing text size is kept.
- Demo recorder `options` scene now replaces the onboarding sample menu with the Milk and Sugar items, so the clip shows the option choices (scripts only, no app change).
- Live board: the ticket is now compact at the default text size (smaller order number, tighter padding and gaps, 44px buttons kept), and on wide screens each status column fits more than one ticket per row. The A-/A+ text size control is unchanged.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Next.js 16 App Router, React 19, strict TypeScript, Tailwind v4, shadcn/Radix,
React Hook Form, Zod, Supabase Auth/Postgres/Realtime, and the shared `@merqo/ui` (pinned at v0.65.1)
package. Use `package.json` and `pnpm-lock.yaml` for exact versions.
The app runs Next.js 16.4.6, which clears GHSA-mfr8-8qww-v76h.
CSV exports go through the shared `downloadCsv`/`csvCell`, and the recent-orders list uses the shared `readStored`/`writeStored`.
Loading states use the shared `Skeleton` primitive and `ListSkeleton` from `@merqo/ui`, and every vendor-facing control grows to a 44px hit area under `pointer-coarse`.

The shared UI dependency is pinned to a reviewed immutable Git commit. Its
exact archive identity is approved for package preparation in
`pnpm-workspace.yaml`; update that permission alongside the dependency and
lockfile when adopting a new shared UI revision. The current revision is the
commit `8d2da3abcb4e5c3bab2b3a3482c740797e2d5c03` (`v0.67.0`), which supplies the `ScreenSizeControl` (the board and queue display text size, also the account menu's Text size row), the `PageHeader` (the dashboard page titles, including Live orders, Menu, the booth forms and the User guide), `useLeaveGuard` (the unsaved-changes prompt), the `RadioGroup` behind the customer screen's booth picker, `SegmentedControl`, `StatTile card`, `ConfirmDialog` and `TierChip` that qkit now uses in place of local copies, on top of the User guide nav icon and `tierLabel` (the stored `qkit` tier reads "Pro") from `v0.41.0`. Since `v0.39.0` it has the `PricingLadder` the plan page renders.
commit `5a08fd875ad6c96f096fbcb4d56ed50eb238f33e` (`v0.68.0`), which supplies the `ScreenSizeControl` (the board and queue display text size, also the account menu Text size submenu), the `PageHeader` (the dashboard page titles, including Live orders, Menu, the booth forms and the User guide), `useLeaveGuard` (the unsaved-changes prompt), the `RadioGroup` behind the customer screen's booth picker, `SegmentedControl`, `StatTile card`, `ConfirmDialog` and `TierChip` that qkit now uses in place of local copies, on top of the User guide nav icon and `tierLabel` (the stored `qkit` tier reads "Pro") from `v0.41.0`. Since `v0.39.0` it has the `PricingLadder` the plan page renders.
Since `v0.34.2` it treats a Next.js `redirect()` from a server
action as navigation, so the dashboard's Sign out no longer flashes
"NEXT_REDIRECT". Since `v0.34.0` it has `DataCollectionNotice`, the PDPA
Expand Down
12 changes: 12 additions & 0 deletions e2e/vendor-fulfillment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ test("vendor starts, readies and hands over a customer's order", async ({
await expect(markReady).toBeVisible({ timeout: 20_000 });
await markReady.click();

// The board defaults to two columns: the ready order waits at the bottom of
// Preparing, still offering its Picked up action, and no Ready column exists.
await expect(board.getByRole("heading", { name: /^Ready \(/ })).toHaveCount(
0,
);
await expect(
board
.locator("section")
.filter({ has: board.getByRole("heading", { name: /^Preparing \(/ }) })
.getByRole("button", { name: `More actions for order #${number}` }),
).toBeVisible({ timeout: 20_000 });

// The customer's page polls; it turns to ready on its own.
await expect(customer.getByText("It's ready").first()).toBeVisible({
timeout: 30_000,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qkit",
"version": "0.6.1",
"version": "0.10.0",
"private": true,
"packageManager": "pnpm@11.28.5",
"engines": {
Expand Down Expand Up @@ -29,7 +29,7 @@
"@dnd-kit/sortable": "10.0.0",
"@dnd-kit/utilities": "3.2.2",
"@hookform/resolvers": "5.2.2",
"@merqo/ui": "github:merqo-io/merqo-ui#8d2da3abcb4e5c3bab2b3a3482c740797e2d5c03",
"@merqo/ui": "github:merqo-io/merqo-ui#5a08fd875ad6c96f096fbcb4d56ed50eb238f33e",
"@supabase/ssr": "^0.10.3",
"@supabase/supabase-js": "2.107.0",
"class-variance-authority": "^0.7.1",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ allowBuilds:
sharp: true
supabase: true
unrs-resolver: true
"@merqo/ui@https://codeload.github.com/merqo-io/merqo-ui/tar.gz/8d2da3abcb4e5c3bab2b3a3482c740797e2d5c03": true
"@merqo/ui@https://codeload.github.com/merqo-io/merqo-ui/tar.gz/5a08fd875ad6c96f096fbcb4d56ed50eb238f33e": true

# Scoped overrides retain patched floors and compatible major versions.
overrides:
Expand Down
Loading
Loading