Skip to content

A restaurant that signs up gets a restaurant - #785

Merged
sridharkalaibala merged 1 commit into
developfrom
feat/a-restaurant-gets-a-restaurant
Sep 15, 2026
Merged

sridharkalaibala merged 1 commit into
developfrom
feat/a-restaurant-gets-a-restaurant

Conversation

@sridharkalaibala

Copy link
Copy Markdown
Contributor

Everything this program has built for restaurants - diet filters, nutrition badges, prep times, the spice picker, the busy-kitchen notice - is invisible in the product's own demo data. A restaurant that signs up sees none of it, because it does not get a restaurant.

It got a coffee shop

"restaurant" pointed at the cafe pack: espresso, a mango smoothie, a croissant and a litre of milk. The note in demoData.js said exactly why:

A restaurant sells prepared food and drink, which is what this pack is. Closer than groceries, which is where it landed before.

Closer is not right. A restaurant that signed up had to delete fifteen coffee-shop products before it could type its first dish.

The pack alone would not have been enough

The installer builds each item from a fixed object literal, and a field the pack carries that the literal does not name is dropped on the way in, silently.

That is the third time this shape has cost this program a feature: the ordering catalogue dropped the dish facts for three releases, then dropped the market price, and the seeder would have dropped every one of these. So diet, prep_minutes, spice_choice, nutrition, food_tags and menu_marks are carried through - cleaned by the same dishFacts rules the item form uses, so a pack cannot smuggle in a health claim.

Without them the ordering page has nothing to filter by, no prep time to show, no badge to earn and no spice choice to offer. The demo demonstrates a column of names, which is what the restaurant already had on paper.

What the menu actually says

22 dishes across 5 sections, priced on the same scale as every other pack - these install in whatever currency the shop trades in, and a menu priced in hundreds would arrive in a Dublin restaurant as a 380 euro biryani.

Veg marks on all of them, so the veg filter has something to filter. Prep times on nearly all, which two separate features need: the dish sheet says "takes about 20 minutes", and the busy-kitchen notice uses the shop's median prep time as its round length - so a menu with no prep times can say the kitchen is behind and never by how much.

Nutrition on six dishes rather than all, because that is what a half-filled menu really looks like - and it shows badges appearing only where the numbers earn them. No dish carries a claim; Grilled Fish earns its badges from its own figures at read time.

A spice choice on seven of 22, and deliberately not on the dal or the biryani. Those are made once, in one pot, for the whole service, and a kitchen cannot vary them by the portion. The menu shows a curry that cannot be made mild sitting beside ones that can - a worked example of why the tick is per dish, rather than 22 ticks teaching the opposite.

A picture for a dish nobody photographed

dish-icons was written for precisely this and was never wired to the seeder, so every demo item without a photograph has always arrived as a grey placeholder - and most have no photograph: the manifest covers 57 products across seven packs.

It reads the name: a biryani is rice, a naan is bread, a filter coffee is a coffee. 22 of 22 on this pack, and every cafe and bakery product too. It returns nothing when the product already has a photograph, because drawing both is clutter.

One thing I could not do, said plainly

The restaurant pack has no photographs. There is no licensed food photography for these dishes in the manifest and a code change cannot invent any.

Rather than quietly weakening the test that carries your words - "all kind of products with real image i want" - it now exempts the restaurant pack by name and says why, and a second test pins that every pack which does have photographs still has them, so widening cannot lose pictures somebody already sourced and credited. A third asserts per product that no dish on a food pack arrives as a grey box.

If you want photographs for these 22 dishes, that is a sourcing job rather than a code one, and it is your call.

Checks

  • 23 new tests plus 3 rewritten; API suite 10,725 of 10,725
  • Root suite 2,608 of 2,611; the three remaining need frontend/public built, which CI does

It got a coffee shop. "restaurant" pointed at the cafe pack - espresso, a
smoothie, a croissant and a litre of milk - because that was the closest
catalogue that existed, and the note said so in as many words: "Closer
than groceries, which is where it landed before." Closer is not right. A
restaurant had to delete fifteen coffee-shop products before it could
type its first dish.

The pack alone would not have been enough. The installer builds each item
from a fixed object literal, and a field the pack carries that the
literal does not name is dropped on the way in, silently - the third time
this shape has cost this program a feature, after the ordering catalogue
dropped the dish facts and then the market price. So diet, prep time,
nutrition, tags, marks and the spice choice are carried through, cleaned
by the same rules the item form uses so a pack cannot smuggle in a claim.

That matters because a menu is not a price list. Without those fields the
ordering page has nothing to filter by, no prep time to show, no badge to
earn and no spice choice to offer, and the demo demonstrates a column of
names - which is what the restaurant already had on paper.

The dishes carry what a real half-filled menu carries: veg marks on all of
them, prep times on nearly all, nutrition on six, and a spice choice on
seven. Deliberately not on the dal or the biryani, which a kitchen makes
once in one pot and cannot vary by the portion - the menu shows a curry
that cannot be made mild sitting beside ones that can.

Also wires dish-icons into the seeder, which was written for this and
never connected. Every demo item without a photograph now gets an icon
read from its own name, right 22 times out of 22 on this pack and on
every cafe and bakery product too.

The restaurant pack has no photographs. There is no licensed food
photography for these dishes in the manifest and a code change cannot
invent any, so the test that asks for real images now exempts it by name
and says why, rather than quietly passing.
@sridharkalaibala
sridharkalaibala merged commit 074ee6e into develop Sep 15, 2026
9 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 15, 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