Skip to content

fix(kds): inherit subcategory station routing - #1508

Merged
khaira777 merged 4 commits into
mainfrom
fm/flocafe-kds-station-category-routing
Nov 7, 2026
Merged

khaira777 merged 4 commits into
mainfrom
fm/flocafe-kds-station-category-routing

Conversation

@khaira777

@khaira777 khaira777 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fix the two Kitchen Station and subcategory KDS/KOT routing gaps identified when investigating why newly created categories or subcategories fail to appear on Kitchen Display (KDS):

  1. Inherit parent category station and chef routing for subcategories (categories.parent_id): when a parent category is assigned to a Kitchen Station (kitchen_stations.category_ids) or a chef (users.category_ids), items in its child subcategories must automatically route to that station on KDS (getKdsStationCategoryIds and getKdsStationRoutingScope in main/db.ts, plus chef userCategoryIds filtering) and to that station's KOT printer (routeItemsToStations in main/routes/printers.ts), while letting an explicit subcategory assignment on another station take precedence in routeItemsToStations.
  2. Clarify the unrestricted "All categories (including new ones)" Kitchen Station state in frontend/src/app/(dashboard)/settings/page.tsx: in the backend (getKdsStationRoutingScope), leaving category_ids empty ([]) on a station makes it unrestricted (routing all current and future categories to that station), whereas the Settings UI currently labels an empty selection as stationNoCategories ("No categories assigned"), tricking single-station owners into checking every existing category and accidentally hiding any category they create later. Make the unrestricted/all-categories state explicit in the Kitchen Station card and modal (including a clear 1-click "All categories" / clear-selection toggle in the station dialog so operators know that leaving specific categories unchecked routes all current and future categories).

What Changed

  • Expanded KDS station and chef category scoping (expandCategoryIdsWithSubcategories, getKdsStationCategoryIds, getKdsStationRoutingScope, and KDS/kitchen/order-item routes) so non-deleted child subcategories inherit parent category routing unless explicitly assigned to another active kitchen station.
  • Updated routeItemsToStations in main/routes/printers.ts to match explicit category stations first, parent category stations second, and active unrestricted stations (category_ids: []) with a configured non-WebUSB printer third before falling back to the default kitchen printer.
  • Relabeled empty station category selection (stationNoCategories) across all locales to represent all current and new categories, and added an explicit "All categories (including new ones)" toggle and clear action to the Kitchen Station settings form.

Risk Assessment

✅ Low: The changes cleanly implement parent-to-subcategory inheritance with explicit child-station override precedence and unrestricted station routing across KDS and KOT printing paths, matching all requirements in the user intent.

Testing

Ran focused backend routing, KDS integration, and 30-locale translation checks (test:issue-134-routing, test:issue-134-mgmt, test:server-app-station-routing, test:kds-integration, test:kds-broadcast-grouping, i18n:check), built the backend and static frontend (npm run build && npm run build:frontend), and drove all four live scenarios against the running Main API, standalone KDS server, and Chromium UI with visual screenshots and ESC/POS KOT capture; all checks and live scenarios passed.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Operator configures a Kitchen Station in Settings > Kitchen Stations, toggles the 1-click "All categories (including new ones)" option to clear selected categories, and saves an unrestricted station c… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-station-dialog-all-categories.png, ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-stati…
When a new child subcategory ("Hot Beverages") is created under a parent category ("Beverages") assigned to a Kitchen Station ("Bar") and chef ("Bar Chef"), an order item in the child subcategory ("Es… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/kds-subcategory-inheritance.png, ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-…
Adversarial override boundary: when Station B ("Coffee Bar") explicitly claims a child subcategory ("Hot Beverages") whose parent ("Beverages") is assigned to Station A ("Bar"), an order with both par… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-verification.json, npm run test:issue-134-routing
When an active unrestricted Kitchen Station ("Main Line", category_ids: []) has a configured printer, items in categories not claimed by any restricted station route to that unrestricted station's pri… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-verification.json, npm run test:issue-134-routing

Settings Kitchen Station modal with specific category selected and Clear button visible
Settings Kitchen Station modal with All categories (including new ones) toggle active
Settings Kitchen Stations card showing All categories (including new ones) for unrestricted station
Live Kitchen Display (KDS) for Bar Chef showing Espresso routed via inherited child subcategory Hot Beverages

Evidence: Live KDS and KOT station routing verification report

{ "scenario1_settingsUiAllCategories": { "stationName": "Main Line", "persistedCategoryIds": [] }, "scenario2_subcategoryInheritance": { "parentCategoryId": "cat-bev", "childSubcategoryId": "5wox4o", "childProductName": "Espresso", "barChefKitchenOrdersItems": ["Espresso"], "barStationDisplayItems": ["Espresso"], "chefAdvanceEspressoStatus": 200, "chefAdvanceBurgerStatusBlocked": 403, "barPrinterKotText": "KITCHEN ORDER TICKET\n\nStation: Bar\nOrder #ORD-20261107-0001\nType: Dine in\nTime: 4:04:28 PM\n \n\n1x Espresso\n\n " }, "scenario3_explicitSubcategoryOverride": { "stationA_BarItemsOnKds": ["Cola"], "stationB_CoffeeBarItemsOnKds": ["Espresso"] }, "scenario4_unrestrictedStationPrinterRouting": { "barPrinterDispatches": 1, "coffeePrinterDispatches": 1, "mainLineUnrestrictedPrinterDispatches": 1, "defaultFallbackPrinterDispatches": 0 } }

{
  "timestamp": "2026-11-07T21:04:29.504Z",
  "scenarios": {
    "scenario1_settingsUiAllCategories": {
      "stationName": "Main Line",
      "persistedCategoryIds": [],
      "screenshots": [
        "~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-station-dialog-specific-category.png",
        "~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-station-dialog-all-categories.png",
        "~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-station-card-all-categories.png"
      ]
    },
    "scenario2_subcategoryInheritance": {
      "parentCategoryId": "cat-bev",
      "childSubcategoryId": "5wox4o",
      "childProductName": "Espresso",
      "barChefKitchenOrdersItems": [
        "Espresso"
      ],
      "barStationDisplayItems": [
        "Espresso"
      ],
      "chefAdvanceEspressoStatus": 200,
      "chefAdvanceBurgerStatusBlocked": 403,
      "barPrinterKotText": "KITCHEN ORDER TICKET\n\nStation: Bar\nOrder #ORD-20261107-0001\nType: Dine in\nTime: 4:04:28 PM\n==========================================\n\n1x  Espresso\n\n==========================================",
      "screenshot": "~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/kds-subcategory-inheritance.png"
    },
    "scenario3_explicitSubcategoryOverride": {
      "stationA_BarItemsOnKds": [
        "Cola"
      ],
      "stationB_CoffeeBarItemsOnKds": [
        "Espresso"
      ],
      "stationA_BarKotText": "KITCHEN ORDER TICKET\n\nStation: Bar\nOrder #ORD-20261107-0002\nType: Dine in\nTime: 4:04:29 PM\n==========================================\n\n1x  Cola\n\n==========================================",
      "stationB_CoffeeBarKotText": "KITCHEN ORDER TICKET\n\nStation: Coffee Bar\nOrder #ORD-20261107-0002\nType: Dine in\nTime: 4:04:29 PM\n==========================================\n\n1x  Espresso\n\n=========================================="
    },
    "scenario4_unrestrictedStationPrinterRouting": {
      "barPrinterDispatches": 1,
      "coffeePrinterDispatches": 1,
      "mainLineUnrestrictedPrinterDispatches": 1,
      "defaultFallbackPrinterDispatches": 0,
      "mainLineKotText": "KITCHEN ORDER TICKET\n\nStation: Main Line\nOrder #ORD-20261107-0003\nType: Dine in\nTime: 4:04:29 PM\n==========================================\n\n1x  Brownie\n\n=========================================="
    }
  }
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Operator configures a Kitchen Station in Settings > Kitchen Stations, toggles the 1-click "All categories (including new ones)" option to clear selected categories, and saves an unrestricted station c… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-station-dialog-all-categories.png, ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/settings-stati…
When a new child subcategory ("Hot Beverages") is created under a parent category ("Beverages") assigned to a Kitchen Station ("Bar") and chef ("Bar Chef"), an order item in the child subcategory ("Es… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/kds-subcategory-inheritance.png, ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-…
Adversarial override boundary: when Station B ("Coffee Bar") explicitly claims a child subcategory ("Hot Beverages") whose parent ("Beverages") is assigned to Station A ("Bar"), an order with both par… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-verification.json, npm run test:issue-134-routing
When an active unrestricted Kitchen Station ("Main Line", category_ids: []) has a configured printer, items in categories not claimed by any restricted station route to that unrestricted station's pri… ✅ pass live ~/.no-mistakes/evidence/01M6VVPXR25BHAWF59D7PY8RVW/live-kds-station-routing-verification.json, npm run test:issue-134-routing
  • npm run test:issue-134-routing
  • npm run test:issue-134-mgmt
  • npm run test:server-app-station-routing
  • npm run test:kds-integration
  • npm run test:kds-broadcast-grouping
  • npm run i18n:check
  • npm run build && npm run build:frontend
  • node tests/run-electron-node-test.cjs /tmp/validate-kds-station-routing.cjs
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Expand parent category assignments on kitchen stations and chef accounts to include active child subcategories across KDS and KOT printer routing, while preserving explicit subcategory overrides on other stations.

Clarify the unrestricted all-categories state in Kitchen Station settings cards and dialogs, and add a 1-click toggle to clear specific category restrictions.
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Inherit subcategory kitchen routing and clarify all-category stations

🐞 Bug fix ✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Route child subcategories through parent station and chef assignments on KDS, and parent station
 assignments on KOT.
• Preserve explicit subcategory station precedence for KOT printing.
• Clarify that an empty station category selection includes future categories; document and test the
 behavior.
Diagram

graph TD
  UI["Station settings"] --> Stations["Station assignments"] --> Expansion["Category expansion"] --> KDS["KDS scope"]
  Categories["Category hierarchy"] --> Expansion
  Chefs["Chef assignments"] --> Expansion
  Stations --> KOT["KOT routing"]
  Categories --> KOT
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Batch-resolve KOT destinations
  • ➕ Could avoid a category and parent lookup for every order item on large tickets.
  • ➖ Adds query and mapping complexity to a focused routing fix; explicit child precedence still needs careful handling.

Recommendation: Keep the shared, read-time category expansion for KDS and the direct-child-then-parent lookup for KOT: both accommodate newly created subcategories without rewriting assignments. Consider batched KOT lookups separately if ticket sizes make per-item queries costly.

Files changed (41) +364 / -94

Enhancement (30) +60 / -32
page.tsxExpose unrestricted station category selection +31/-3

Expose unrestricted station category selection

• Adds an all-categories checkbox and a clear-selection action to the station editor, making the empty category selection explicit.

frontend/src/app/(dashboard)/settings/page.tsx

ar.jsonClarify all-category selection in Arabic +1/-1

Clarify all-category selection in Arabic

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ar.json

bn.jsonClarify all-category selection in Bengali +1/-1

Clarify all-category selection in Bengali

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/bn.json

de.jsonClarify all-category selection in German +1/-1

Clarify all-category selection in German

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/de.json

en.jsonClarify all-category selection in English +1/-1

Clarify all-category selection in English

• Replaces “No categories assigned” with “All categories (including new ones).”

frontend/src/lib/i18n/messages/en.json

es.jsonClarify all-category selection in Spanish +1/-1

Clarify all-category selection in Spanish

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/es.json

fa.jsonClarify all-category selection in Persian +1/-1

Clarify all-category selection in Persian

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/fa.json

fil.jsonClarify all-category selection in Filipino +1/-1

Clarify all-category selection in Filipino

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/fil.json

fr.jsonClarify all-category selection in French +1/-1

Clarify all-category selection in French

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/fr.json

ha.jsonClarify all-category selection in Hausa +1/-1

Clarify all-category selection in Hausa

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ha.json

hi.jsonClarify all-category selection in Hindi +1/-1

Clarify all-category selection in Hindi

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/hi.json

id.jsonClarify all-category selection in Indonesian +1/-1

Clarify all-category selection in Indonesian

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/id.json

it.jsonClarify all-category selection in Italian +1/-1

Clarify all-category selection in Italian

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/it.json

ja.jsonClarify all-category selection in Japanese +1/-1

Clarify all-category selection in Japanese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ja.json

jv.jsonClarify all-category selection in Javanese +1/-1

Clarify all-category selection in Javanese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/jv.json

ko.jsonClarify all-category selection in Korean +1/-1

Clarify all-category selection in Korean

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ko.json

mr.jsonClarify all-category selection in Marathi +1/-1

Clarify all-category selection in Marathi

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/mr.json

ne.jsonClarify all-category selection in Nepali +1/-1

Clarify all-category selection in Nepali

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ne.json

nl.jsonClarify all-category selection in Dutch +1/-1

Clarify all-category selection in Dutch

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/nl.json

pa.jsonClarify all-category selection in Punjabi +1/-1

Clarify all-category selection in Punjabi

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/pa.json

pt.jsonClarify all-category selection in Portuguese +1/-1

Clarify all-category selection in Portuguese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/pt.json

ru.jsonClarify all-category selection in Russian +1/-1

Clarify all-category selection in Russian

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ru.json

sq.jsonClarify all-category selection in Albanian +1/-1

Clarify all-category selection in Albanian

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/sq.json

sw.jsonClarify all-category selection in Swahili +1/-1

Clarify all-category selection in Swahili

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/sw.json

th.jsonClarify all-category selection in Thai +1/-1

Clarify all-category selection in Thai

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/th.json

tr.jsonClarify all-category selection in Turkish +1/-1

Clarify all-category selection in Turkish

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/tr.json

ur.jsonClarify all-category selection in Urdu +1/-1

Clarify all-category selection in Urdu

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/ur.json

vi.jsonClarify all-category selection in Vietnamese +1/-1

Clarify all-category selection in Vietnamese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/vi.json

zh-tw.jsonClarify all-category selection in Traditional Chinese +1/-1

Clarify all-category selection in Traditional Chinese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/zh-tw.json

zh.jsonClarify all-category selection in Simplified Chinese +1/-1

Clarify all-category selection in Simplified Chinese

• Changes the empty station category label to include new categories.

frontend/src/lib/i18n/messages/zh.json

Bug fix (7) +78 / -25
db.tsExpand assigned categories in KDS station scopes +34/-5

Expand assigned categories in KDS station scopes

• Adds a helper that includes non-deleted child subcategories and applies it to station category IDs and station/chef routing scopes.

main/db.ts

kds-server.tsExpand KDS server user category restrictions +4/-1

Expand KDS server user category restrictions

• Includes child subcategories when deriving non-owner KDS category access.

main/kds-server.ts

kds.tsApply inherited categories to KDS routes +12/-3

Apply inherited categories to KDS routes

• Expands chef categories for route authorization and station categories for pairing and display responses.

main/routes/kds.ts

kitchen.tsInclude child categories in kitchen orders +2/-1

Include child categories in kitchen orders

• Expands non-owner user category restrictions before scoping kitchen orders.

main/routes/kitchen.ts

order-items.tsHonor inherited categories on item status writes +3/-2

Honor inherited categories on item status writes

• Expands user categories during both initial and transactional authorization checks for KDS item updates.

main/routes/order-items.ts

printers.tsRoute child-category KOT items by parent station +9/-4

Route child-category KOT items by parent station

• Looks up a product category's parent and falls back to its station only when no station explicitly claims the child category.

main/routes/printers.ts

kds.tsApply inherited categories throughout KDS snapshots +14/-9

Apply inherited categories throughout KDS snapshots

• Expands categories for WebSocket authentication, reauthorization, snapshot item filtering, and status counts.

main/services/kds.ts

Tests (1) +197 / -17
issue-134-station-routing.test.tsTest inherited routing and explicit KOT overrides +197/-17

Test inherited routing and explicit KOT overrides

• Adds integration scenarios for newly created child categories in KDS station/chef scopes and KOT printer routing, including explicit child-station precedence.

tests/issue-134-station-routing.test.ts

Documentation (3) +29 / -20
authentication-and-authorization.mdClarify chef KDS category inheritance +5/-4

Clarify chef KDS category inheritance

• Explains that chef category restrictions include child subcategories, while owners and managers remain unrestricted.

docs/architecture/authentication-and-authorization.md

printers.mdDocument station category and printer routing +15/-10

Document station category and printer routing

• Describes unrestricted empty station selections, parent-to-child KOT routing, explicit subcategory precedence, and default printer fallback.

docs/printers.md

api.mdUpdate category and KDS scope reference +9/-6

Update category and KDS scope reference

• Documents subcategory inheritance for KDS station and chef scopes and links to the kitchen-printing behavior.

docs/reference/api.md

@khaira777 khaira777 changed the title fix: inherit subcategory station routing and clarify unrestricted station categories fix(kds): inherit subcategory station routing Nov 7, 2026
@qodo-code-review

qodo-code-review Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. All-category stations miss their printer ✓ Resolved

Resolving commit: 1e7c6c7

Resolution reason
routeItemsToStations now includes stations with empty category_ids that have a printer, and routes
unmatched items to the first such unrestricted station after explicit category and parent-category
matches, instead of falling back to the default kitchen printer. The docs and a new test were
updated to match.
Description
The new all-categories control saves category_ids: [], but routeItemsToStations excludes
stations with an empty category list before matching any items. When an owner selects this state on
a station with its own printer, KDS treats the station as unrestricted while its KOT tickets fall
back to the default kitchen printer.


Remediation recommended

2. Telugu owners see the old station label ✓ Resolved

Resolving commit: 1e7c6c7

Resolution reason
Replaced the Telugu stationNoCategories value with a translation meaning "All categories (including
new ones)", so the Telugu station card and all-categories control now describe unrestricted routing
instead of the misleading "no categories assigned" message.
Description
The stationNoCategories value is changed to describe unrestricted routing in the other locale
files but remains the old “no categories assigned” message in te.json. When a Telugu-speaking
owner opens the station card or new all-categories control, the same empty selection still appears
to mean that no categories will route.

3. Child items appear on both KDS boards ✓ Resolved

Resolving commit: 1e7c6c7

Resolution reason
expandCategoryIdsWithSubcategories gained an excludedChildCategoryIds parameter that skips children
explicitly claimed by other active stations. A new helper getOtherActiveStationExplicitCategories
collects those claimed categories. getKdsStationRoutingScope now passes this exclusion set when
expanding a station's categories, and getKdsStationCategoryIds applies the same exclusion. The KDS
display and pairing routes in kds.ts now call getKdsStationCategoryIds, so they share the same
precedence logic. Station A's scope no longer includes a child claimed by Station B, which is the
finding's premise.
Description
getKdsStationRoutingScope expands a station's parent assignment to every child without excluding
children explicitly assigned to another station. With a parent on Bar and its child on Coffee Bar, a
tableless child-category order appears on both stations' KDS boards even though the new KOT
precedence sends its ticket only to Coffee Bar.

4. Chef access guide omits subcategories ✓ Resolved

Resolving commit: 1e7c6c7

Resolution reason
Updated docs/reference/api.md to describe that each assigned station's category_ids are expanded
with non-deleted child subcategories (excluding those explicitly claimed by another active station),
and updated docs/printers.md routing description. This documents the subcategory inheritance the
finding flagged as undocumented.
Description
categoryIdsForRole now expands a chef’s assigned category IDs to include child subcategories, but
docs.flopos.com still says chefs are limited to the categories in category_ids. Developers using
that guide to assess KDS visibility or status-update authorization may incorrectly treat inherited
child access as unauthorized; update the guide to explain chef and station inheritance.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #39
✅ Compliance rules (platform): 5 rules
✅ Cross-repo context — repo relationships
  Explored: repo: FreeOpenSourcePOS/docs.flopos.com (sha: abe7cff3) — View relationship
Review mode: Auto: ⚖️ Balanced: Authorization-scoped KDS category logic changed across many call sites; needs full review.

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread main/db.ts Resolved
Comment thread frontend/src/lib/i18n/messages/en.json Resolved
Comment thread main/kds-server.ts Resolved
Route unmatched KOT items to the first active unrestricted station with a configured printer before falling back to the default kitchen printer.

Exclude child subcategories explicitly claimed by another active kitchen station when expanding a station's parent category on KDS, and update Telugu stationNoCategories.
@khaira777 khaira777 changed the title fix(kds): inherit subcategory station routing fix: inherit subcategory KDS/KOT routing and clarify unrestricted station categories Nov 7, 2026
@khaira777 khaira777 changed the title fix: inherit subcategory KDS/KOT routing and clarify unrestricted station categories fix(kds): inherit subcategory station routing Nov 7, 2026
@khaira777
khaira777 enabled auto-merge (squash) November 7, 2026 21:19
@khaira777
khaira777 merged commit 83d77da into main Nov 7, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-kds-station-category-routing branch November 7, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant