dev to main: the two kitchen switches and the packaging completion - #845
Merged
Merged
Conversation
Owner: "we will not bill with 0 for sure. we need to add with amount only. its daily price or market price item. needs to be handled properly." The handset already refused one. _priceOnlineLine answers item_needs_price and will not let an unpriced line through, with a sentence written for whoever is holding the screen and a ceiling for a fat finger. The till had no such gate. Its sale screen reads the catalogue price into the line, a market-price fish has no catalogue price, and the dish went onto the bill at zero. Nothing failed, so nothing was said. Asked when the line is ADDED, not refused when the bill is paid. The waiter is standing at this screen now; the guest is waiting at the counter later. A refusal at payment time would be correct and useless. Same rule as the server so the two doors agree - open_price, or simply no price - and the same ceiling. A return is left alone: that is repricing something already sold, and today's rate is the wrong question for it. An empty or zero answer drops the line rather than adding it at zero, which is the entire point. 8 tests. _needsTodaysPrice is lifted out of sales.js and driven directly, and one of them pins that the gate is actually CALLED - a rule nothing calls is the failure this codebase keeps producing. Checked by deleting the call and watching it fail. One new key, lang_price_today, in all eighteen packs with real translations rather than English copied eighteen times. It is lang_price_today and not lang_todays_price because the sweep cannot see a key whose fallback needs double quotes, and every other call in that file uses single ones.
Owner: "ting sound on/off read it on/off seperately?"
They are different things to a kitchen. The chime says a ticket has
landed and costs a second; the reading says what is on it and costs ten.
A kitchen that knows to look at the printer wants the first and will come
to resent the second, and a kitchen whose printer is across the room
wants both.
One switch would have made somebody choose between hearing nothing and
hearing too much, and they would have chosen nothing - which is how an
announcement feature ends up switched off in week two and blamed for not
working.
posnic.kitchenCall.set({ ting: true }) chime only
posnic.kitchenCall.set({ speak: true }) and read it out
posnic.kitchenCall.get() { ting, speak }
A value left out is left as it was, so turning the reading off does not
silently take the chime with it.
HONOURED BEFORE THE PAYLOAD IS BUILT, not in the page. A machine set to
chime only is sent no words at all: nothing to ignore, nothing to go
wrong in a speech engine, and nothing sitting in the payload that a later
change could decide to speak.
A machine already set up with the single switch keeps both halves. It
meant both, and somebody who turned it on yesterday must not fall silent
because the setting grew a second half overnight.
Nineteen tests, including that one.
src/main.js, src/kot-manager.js and src/order-alert.js all require src/kitchen-announce.js, and order-alert also requires src/kitchen-call.js. Neither was in build.files, so neither was in the installer. main.js requires one of them, so this is not a quiet degradation on a customer machine. It is "Cannot find module" at startup. This is the same failure that took a shop's handsets down this morning - a module written, correct, tested, and packaged where nothing could reach it - and it is the second one today. The check that catches it already exists and already ran: Packaging checks failed on #840 and it was merged anyway. The guard was not missing, it was overruled. Two lines in build.files. Nothing needs an extraResources entry: only main.js, kot-manager.js and order-alert.js require them and all three live in the asar, unlike server.js which runs from the resources root.
…eparate The ting and the voice are separate switches
The kitchen modules are packaged
The till asks for today's price
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotion so the live system matches
develop. Two things, both about the kitchen.#843 - the ting and the reading become separate switches. Right now on
mainthey are one, so a kitchen must choose between hearing nothing and hearing everything. The chime says a ticket landed and costs a second; the reading says what is on it and costs ten, and most kitchens will want only the first after a week.A machine already set up with the single switch keeps both halves, with a test for exactly that.
#844 - the second packaging list.
package.jsoncarries two file lists and the kitchen modules needed to be in both. Together with the earlier fix this is what makes a staged installer safe; without it the app installs, starts, and then fails withCannot find moduleon a customer machine and nowhere else.Verified on
developbefore proposing this: packaging gate green (51 modules), prettier clean, 19 kitchen tests, 91 ticket tests, and the full desktop suite at 2320 pass against a 2269 baseline on this machine - the only failures are missing local dev modules (jsdom,electron), unrelated to any of this.Merge, do not squash - a squashed release PR makes the next promotion conflict against everything it flattened.
After this lands, the kitchen machine still needs its one real test: turn it on there and send a ticket through. Nothing in this repo can prove a speaker makes a sound.