Skip to content

The bells, the pickers, and the note that was never the menu - #852

Merged
sridharkalaibala merged 3 commits into
developfrom
fix/the-bells-and-the-kitchen-note
Sep 17, 2026
Merged

sridharkalaibala merged 3 commits into
developfrom
fix/the-bells-and-the-kitchen-note

Conversation

@sridharkalaibala

Copy link
Copy Markdown
Contributor

These two commits were on #848 when it was opened but not in what it merged: GitHub's PR head was still reporting aaaa5e18 when the merge button was pressed, so f5a6d022 and 8ce3c47b were left behind. Nothing here is new work, it is the tail of that PR.

Verified against origin/develop rather than against the PR: ARRIVAL_BELLS is absent there, and item.item_description || item.description is still present.

1. The bells

The old tone was two pure sine waves. A pure sine contains nothing but its fundamental, which is what a beep is, and at 1568 and 2093 Hz it was closer to a smoke alarm than a chime. Owner: "beep sound is not good. i want like new order came. make it good. not beep."

The new ones are struck notes: partials above the fundamental, each with its own decay, and an envelope that starts instantly and fades. The 3ms attack is not decoration, a waveform starting at full height clicks and a click sounds like a fault on a till speaker.

One bell for the order, one tap before each dish. Owner: "First bell is we got new order. I want one bell for each line item before read it." The opening and the plate count are about the ticket; everything after is a dish. Where that boundary falls is decided beside the words and travels with them as head, so the page never guesses by counting sentences.

2. The shop picks

Owner: "how about user picks the bell sound as choice how you gave me. also give choice voice also."

Three arrival bells, three taps, and the voices the machine has, each with its own Play button on Core Settings, because nobody can choose a sound from its name. A kitchen with a fryer roaring needs a different bell from a quiet dining room, and that is not a decision to make once in one file for every shop.

Owner: "different countries might need different voice and accent." The voice is stored by name, and an empty name means the best voice on this machine, so a till that lacks the chosen voice falls back rather than going silent. A downloaded voice pack later adds another name to the same list.

Everything merges onto what is stored, so turning the reading off never loses the bell somebody spent five minutes choosing.

3. The note is never the menu

Owner, looking at a live ticket: "i see active kot i see some descirption details inside the line items. actually we need to show only item name if any customization note delibertly captain entered. otherwise dont show any other details. dont confuse captain."

Two server paths treated a line with no note as one that should borrow the menu copy:

  • sale.repository.js add-item path: item.item_description || itemDoc.description where itemDoc is the catalogue document
  • sales.helper.js formatSaleListEntry(): item.item_description || item.description

A sale line has no description field and never has, so that second fallback could only ever pick up catalogue copy. A note on a kitchen ticket is an instruction and a cook assumes somebody asked for it, so menu copy in that position is an instruction nobody gave, in the one place where the sane response is to obey it.

Open orders keep what was already stored. New lines are clean.

Tests

  • tests/one-bell-for-each-dish.test.js (13): where the food starts, both bells sent, the chosen bell is the one used, an unknown name falls back rather than going silent, every offered bell actually plays, a tap is smaller than a bell, a struck note decays where a beep does not, and choosing a bell does not turn a switch off
  • api/tests/unit/helpers/the-ticket-carries-the-note-not-the-menu.test.js (5): verified failing on the parent commit
  • Existing kitchen suites updated for the async sequencing and the wider settings shape

Locally: 1614 repository tests and 38 helper tests pass, desktop suite has zero assertion failures.

Owner: "beep sound is not good. i want like new order came. make it good.
not beep." He was right, and the reason was in the generator: a plain
sine contains nothing but its fundamental, which is what a beep is. Two
things make a struck object sound struck and that tone had neither. The
new one carries partials above the note and an envelope that decays from
the instant it is hit.

Owner: "First bell is we got new order. I want one bell for each line
item before read it." The opening and the plate count are about the
ticket; everything after is a dish and gets a smaller tap in front of it.
Where that boundary falls is decided beside the words and travels with
them, so the page never guesses by counting sentences - a guess that
breaks the first time the wording moves.

Owner: "how about user picks the bell sound as choice how you gave me.
also give choice voice also." Three arrival bells, three taps, and the
voices the machine has, each with its own Play button, because nobody
can choose a sound from its name. A kitchen with a fryer roaring needs a
different bell from a quiet dining room and that is not a decision to
make once, in one file, for every shop.

Owner: "different countries might need different voice and accent." The
voice is stored by name and an empty name means the best one here, so a
machine that lacks the chosen voice falls back rather than going silent.
A downloaded voice pack later adds another name to the same list.

Everything merges onto what is stored: turning the reading off must not
lose the bell somebody spent five minutes choosing.
Owner, looking at a live ticket on the handset: "i see active kot i see
some descirption details inside the line items. actually we need to show
only item name if any customization note delibertly captain entered.
otherwise dont show any other details. dont confuse captain."

Two server paths treated a line with no note as a line that ought to
borrow one. Adding a dish to an open order stamped the catalogue's
description onto the sale line, and the ticket view model fell back to a
`description` key that a sale line has never had in its schema, so it
could only ever pick up menu copy from something catalogue-shaped
passing through.

Worth being blunt about why that is a fault and not clutter. A note on a
kitchen ticket is an INSTRUCTION, and a cook reading one assumes somebody
at the table asked for it. Menu copy in that position is an instruction
nobody gave, in the one place where the sane response is to obey it, and
it buries the line somebody did ask for.

A blank note means nothing was asked for. Blank is the honest answer.
The description still belongs to the item and is one lookup away for
anything that genuinely wants it.

Open orders created before this keep whatever was already stored; new
lines are clean.
@sridharkalaibala
sridharkalaibala merged commit 552e8e2 into develop Sep 17, 2026
10 checks passed
@github-actions github-actions Bot added the ready for QA Merged to develop and live on develop.posnic.io - anyone can test it label Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merged to develop. Anyone can test this - you do not need write access.

Try it at https://develop.posnic.io, or run it yourself:

git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev   # then http://localhost:3000

When you have tested it, say what you did and what happened, and set
QA passed or QA failed. If you cannot set labels, just comment -
a maintainer will.

Reporting that something is broken is as useful as fixing it. It is
better found here than by a shopkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for QA Merged to develop and live on develop.posnic.io - anyone can test it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant