Skip to content

fix(kds): show item add-ons on kanban cards - #1517

Merged
khaira777 merged 1 commit into
mainfrom
fm/flocafe-kds-kanban-addons
Nov 8, 2026
Merged

khaira777 merged 1 commit into
mainfrom
fm/flocafe-kds-kanban-addons

Conversation

@khaira777

@khaira777 khaira777 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Check the KDS display (frontend/src/components/kds/KdsKanbanBoard.tsx) and fix it so item add-ons are shown directly on the KDS screen alongside item notes, instead of only showing notes (item.special_instructions) and a +{item.addons.length} count badge that requires the chef to click on the item to see what add-ons were added.

Fixes #1513

What Changed

  • Replace the +{item.addons.length} count badge on KdsKanbanBoard order cards with inline add-on pills (+ {addon.name} and ×{addon.quantity} when quantity exceeds 1) rendered alongside item.special_instructions.
  • Render inline add-on pills and item.special_instructions on cards in the KdsKanbanBoard voided column as well.
  • Expand tests/kds-frontend-conflict.test.ts and frontend/e2e/kds-kanban-skip-confirm.spec.ts to assert inline add-on and special instruction rendering on active and voided KDS Kanban cards.

Risk Assessment

✅ Low: The change cleanly replaces the +count add-on badge in KdsKanbanBoard with inline add-on pills matching KdsTabsView and covers the behavior in both SSR component and Playwright E2E tests.

Testing

Ran targeted KDS regression and RTL checks (npm run test:kds-frontend-conflict, npm run test:rtl-kds-server-whatsapp, npm run test:script-coverage), built the backend and static frontend (npm run build && npm run build:frontend), ran the Playwright E2E test (e2e/kds-kanban-skip-confirm.spec.ts), and drove three live scenarios against the standalone KDS server (tests/e2e-server.cjs) in Chromium—capturing screenshots of inline add-on pills and item notes in the Waiting, Preparing, and Voided Kanban columns as well as boundary rendering for items without add-ons. All checks and live scenarios passed.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Chef views an active order on the KDS Kanban board and sees single-quantity (+ Bacon) and multi-quantity (+ Extra Cheese ×2) add-on pills directly alongside item notes ("No onions") without a +count b… ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-active-addons.png
Chef views a voided item in the KDS Kanban Voided column and sees inline add-on pills (+ Oat Milk ×2, + Cinnamon) and special instructions ("Extra hot") beneath the struck-through item name ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-voided-addons.png
Item ordered without add-ons renders cleanly on the KDS Kanban card with no empty add-on pill container or +0 badge, while dragging the order across Kanban stages (Waiting to Preparing) preserves inli… ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-stage-transition-and-no-addons.png

KDS Kanban Waiting column showing inline single and multi-quantity add-on pills alongside item notes without +count badge
KDS Kanban Voided column showing inline add-on pills and item special instructions on a voided order item
KDS Kanban Preparing column after drag-and-drop showing preserved add-on pills and clean rendering for an item without add-ons

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 - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Chef views an active order on the KDS Kanban board and sees single-quantity (+ Bacon) and multi-quantity (+ Extra Cheese ×2) add-on pills directly alongside item notes ("No onions") without a +count b… ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-active-addons.png
Chef views a voided item in the KDS Kanban Voided column and sees inline add-on pills (+ Oat Milk ×2, + Cinnamon) and special instructions ("Extra hot") beneath the struck-through item name ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-voided-addons.png
Item ordered without add-ons renders cleanly on the KDS Kanban card with no empty add-on pill container or +0 badge, while dragging the order across Kanban stages (Waiting to Preparing) preserves inli… ✅ pass live ~/.no-mistakes/evidence/01M6YD6A23X3HN0X30GGHQ3K2J/kds-kanban-stage-transition-and-no-addons.png
  • npm run test:kds-frontend-conflict
  • npm run test:rtl-kds-server-whatsapp
  • npm run test:script-coverage
  • cd frontend && E2E_BASE_URL=http://127.0.0.1:4301 E2E_KDS_BASE_URL=http://127.0.0.1:4302 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:4303 npx playwright test e2e/kds-kanban-skip-confirm.spec.ts --config=playwright.config.ts --project=chromium
  • Live Playwright Chromium verification against tests/e2e-server.cjs on :4401/:4402/:4403 capturing kds-kanban-active-addons.png, kds-kanban-voided-addons.png, and kds-kanban-stage-transition-and-no-addons.png
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Render each item add-on name and multi-quantity suffix inline as a pill on KdsKanbanBoard order cards and voided cards alongside special_instructions instead of only displaying a +count badge.

Fixes #1513
@qodo-code-review

Copy link
Copy Markdown

ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 8, 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

Show add-ons and notes inline on KDS Kanban cards

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Replace add-on count badges with named pills, showing quantities above one without opening an
 item.
• Show add-ons and special instructions on voided cards too.
• Cover active and voided rendering with component regression tests and a Kanban E2E assertion.
Diagram

graph TD
  Orders["KDS orders"] --> Status{"Item status"} --> Active["Active cards"] --> Details["Inline details"]
  Status --> Voided["Voided cards"] --> Details
Loading
High-Level Assessment

Keep the localized card changes. A shared detail component could reduce duplicated markup, but it would add an abstraction for a small presentation fix without changing the behavior.

Files changed (3) +265 / -22

Bug fix (1) +31 / -3
KdsKanbanBoard.tsxShow item details directly on active and voided cards +31/-3

Show item details directly on active and voided cards

• Replaces the active card’s add-on count badge with named pills and a quantity suffix when applicable. Adds the same pills and item special instructions beneath voided item names.

frontend/src/components/kds/KdsKanbanBoard.tsx

Tests (2) +234 / -19
kds-kanban-skip-confirm.spec.tsVerify inline details on a live Kanban order +88/-15

Verify inline details on a live Kanban order

• Creates an add-on group and product for the existing drag-and-drop scenario, then orders an item with single- and multi-quantity add-ons and a note. Asserts those details appear on the Waiting card and that the old count badge does not.

frontend/e2e/kds-kanban-skip-confirm.spec.ts

kds-frontend-conflict.test.tsAdd server-rendered Kanban detail assertions +146/-4

Add server-rendered Kanban detail assertions

• Extends the existing conflict regression script with an SSR render of active and voided items. Checks add-on names, quantity formatting, notes, and removal of the count badge.

tests/kds-frontend-conflict.test.ts

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Informational

1. Add-on pill markup is copied three times 🐞 Bug ⚙ Maintainability
Description
The inline add-on pill block is pasted verbatim into the active card and the voided column of
KdsKanbanBoard, and is a third copy of the same markup in KdsTabsView. Any future change to the pill
styling, the ×quantity rule, or the key scheme has to be made in three places, and the regex-based
SSR test only guards the output strings, not the duplication.
Code

frontend/src/components/kds/KdsKanbanBoard.tsx[R300-312]

+              {item.addons && item.addons.length > 0 && (
+                <div className="ms-[26px] flex flex-wrap gap-1 mt-1">
+                  {item.addons.map((addon, i) => (
+                    <span
+                      key={`${addon.id ?? addon.name}-${i}`}
+                      className="text-[10px] bg-card/70 text-blue-600 px-1.5 py-0.5 rounded border border-blue-200"
+                    >
+                      + {addon.name}
+                      {(addon.quantity || 1) > 1 ? ` ×${addon.quantity}` : ''}
+                    </span>
+                  ))}
+                </div>
+              )}
Relevance

●● Moderate

Duplication refactor is subjective; no matching accepted, rejected, or dismissed precedent for
duplicated-markup extraction in KDS. Only loosely related KDS Kanban feedback exists.

PR-#118

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The same JSX and class strings appear in three locations across two components, with no shared
helper or component.

frontend/src/components/kds/KdsKanbanBoard.tsx[300-312]
frontend/src/components/kds/KdsKanbanBoard.tsx[382-394]
frontend/src/components/kds/KdsTabsView.tsx[137-147]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The inline add-on pill markup (the `item.addons.map` block with `+ {addon.name}` and the `×{addon.quantity}` suffix) is duplicated in KdsKanbanBoard's active card, KdsKanbanBoard's VoidedColumn, and KdsTabsView.

## Fix Focus Areas
- frontend/src/components/kds/KdsKanbanBoard.tsx[300-312]
- frontend/src/components/kds/KdsKanbanBoard.tsx[382-394]
- frontend/src/components/kds/KdsTabsView.tsx[137-147]

## Recommended Fix
Create a small `KdsAddonPills({ addons })` component (for example in frontend/src/components/kds/) that returns null for empty arrays and otherwise renders the `ms-[26px] flex flex-wrap gap-1 mt-1` container with the pills. Replace the three inline blocks with `<KdsAddonPills addons={item.addons} />`. Keep the existing key and quantity rules unchanged.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. Voided cards nest block elements inside a button 🐞 Bug ≡ Correctness
Description
The new voided-column special-instructions <p> and the add-on <div> are placed inside a
<button>, which only permits phrasing content, so the markup is invalid HTML. The same pattern is
used by the active card, so the new voided copy extends an existing structural issue rather than
introducing a new kind of one.
Code

frontend/src/components/kds/KdsKanbanBoard.tsx[R382-385]

+                  {item.addons && item.addons.length > 0 && (
+                    <div className="ms-[26px] flex flex-wrap gap-1 mt-1">
+                      {item.addons.map((addon, i) => (
+                        <span
Relevance

●● Moderate

Valid HTML nesting issue, but the same button pattern already exists in the active card and no
rejection precedent matches. Fixing it means restructuring the button, so it is not a trivial
change.

PR-#118

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Block-level children inside a button violate the HTML content model, and browsers may repair the DOM
differently across engines.

frontend/src/components/kds/KdsKanbanBoard.tsx[382-400]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The voided-column item is rendered as a `<button>` that contains a `<div>` (add-on pills) and a `<p>` (special instructions). Block elements are not allowed in phrasing-only button content.

## Fix Focus Areas
- frontend/src/components/kds/KdsKanbanBoard.tsx[382-400]

## Recommended Fix
Change the wrapper to a `<div role="button">` with keyboard handlers, or keep the `<button>` and change the inner `<div>` to `<span className="block ...">` and the `<p>` to `<span className="block ...">`. Apply the same change to the active card for consistency.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #34
✅ Compliance rules (platform): 5 rules
✅ Cross-repo context — repo relationships
✅ REVIEW.md
Review mode: Auto: 🚀 Fast: Display-only add-on rendering in one component; low risk, localized.

Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@khaira777 khaira777 changed the title fix(kds): render item add-ons inline on KDS Kanban cards fix(kds): show item add-ons on kanban cards Nov 8, 2026
@khaira777
khaira777 merged commit dbd2ca2 into main Nov 8, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-kds-kanban-addons branch November 8, 2026 20:52
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.

fix(kds): show item add-ons inline on kanban board

1 participant