Skip to content

feat(ui): complete KDS, Server App, and WhatsApp RTL layout for Persian - #339

Merged
khaira777 merged 5 commits into
mainfrom
feat/241-f-kds-server-whatsapp-rtl
Aug 17, 2026
Merged

khaira777 merged 5 commits into
mainfrom
feat/241-f-kds-server-whatsapp-rtl

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Intent

Batch F of the Persian/Farsi fa-IR and Iran RTL umbrella issue #241: finish direction-sensitive UI work for the remaining Persian-facing operational surfaces — the standalone KDS (components, disabled screens, and its existing tenant-language inheritance via /api/kds/info which must be preserved, not replaced by a new store), the tableside Server App standalone (full i18n, language inheritance via /api/server-app/info using the shared useSyncServerLanguage path, dir/lang sync via HtmlLangSync), the WhatsApp setup/status/instructions page, and the Settings Server App pairing URL. Convert all physical left/right direction utilities to logical equivalents, mirror directional chevrons with rtl-flip, and isolate naturally LTR values (QR-adjacent values, URLs, IP addresses, phone numbers, pairing codes, order numbers, elapsed time, money) with the shared Ltr component. Add full en/es/pt/fa i18n key parity, add a Batch F RTL regression test registered in npm test, and run the KDS language metadata path verification. Do NOT expose Persian in normal language selectors, do NOT change money/accounting units, calendar policy, or receipt printing, and do not start any later batch.

What Changed

  • Replaced physical directional CSS utilities with logical equivalents (ms-*, me-*, text-start, rtl-flip) and wrapped naturally LTR values (order numbers, timestamps, phone numbers, pairing codes, URLs, prices) with <Ltr> across KDS, Server App standalone, WhatsApp setup, and Server App pairing settings.
  • Added full en, es, fa, and pt translation coverage for Server App and KDS disabled screens, and extended useSyncServerLanguage and fetchServerInfo to support /api/server-app/info.
  • Added <HtmlLangSync /> to the Server App standalone layout, updated frontend documentation, and registered the test:rtl-kds-server-whatsapp suite under npm test.

Risk Assessment

✅ Low: The changes cleanly complete the RTL/LTR logical utility conversion, LTR value isolation, and i18n key parity across KDS, Server App, and WhatsApp surfaces with executable regression tests.

Testing

Executed targeted automated RTL regression and translation parity test suites along with end-to-end headless Chromium rendering across all Batch F operational surfaces (KDS active/disabled, Server App ordering/disabled, WhatsApp setup/pairing, and Settings LAN pairing cards), capturing 12 visual evidence screenshot and HTML artifact pairs in Persian (RTL) vs English (LTR); all checks passed with clean isolation and zero physical direction utility violations.

  • Evidence: KDS Kanban Board - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/kds-kanban-fa-rtl.png)
  • Evidence: KDS Kanban Board - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/kds-kanban-en-ltr.png)
  • Evidence: KDS Disabled Screen - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/kds-disabled-fa-rtl.png)
  • Evidence: KDS Disabled Screen - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/kds-disabled-en-ltr.png)
  • Evidence: Server App Tableside Ordering - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/server-app-ordering-fa-rtl.png)
  • Evidence: Server App Tableside Ordering - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/server-app-ordering-en-ltr.png)
  • Evidence: Server App Disabled Screen - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/server-app-disabled-fa-rtl.png)
  • Evidence: Server App Disabled Screen - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/server-app-disabled-en-ltr.png)
  • Evidence: WhatsApp Setup & Pairing - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/whatsapp-pairing-fa-rtl.png)
  • Evidence: WhatsApp Setup & Pairing - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/whatsapp-pairing-en-ltr.png)
  • Evidence: Settings Server App Pairing URLs - Persian RTL (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/settings-server-pairing-fa-rtl.png)
  • Evidence: Settings Server App Pairing URLs - English LTR (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M073K5EHJ031MTGR03PPVA9E/settings-server-pairing-en-ltr.png)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ tests/rtl-kds-server-whatsapp.test.ts:157 - Sections 3, 4, and 5 in tests/rtl-kds-server-whatsapp.test.ts assert source-content-only regex matches over implementation files via fs.readFileSync (inspecting raw JSX markup strings such as <Ltr>, <ElapsedTime>, KdsHtmlLang, HtmlLangSync, and t('kds.disabledTitle')), violating the test-quality rule against grepping implementation source code rather than testing observable component behavior or executable interfaces.

🔧 Fix: {"summary": "test executable interfaces in Batch F RTL test"}
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • npm run test:rtl-kds-server-whatsapp
  • npm run test:translations
  • npm run test:rtl-foundation
  • npm run test:rtl-setup-auth-settings
  • npm run test:rtl-dashboard-pos-common
  • node test script generating 12 Playwright visual screenshots and HTML evidence for KDS, Server App, WhatsApp, and Settings screens in Persian (RTL) and English (LTR)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@khaira777
khaira777 requested a review from itsbkm as a code owner August 17, 2026 05:48
…rsian

Localize the remaining Persian-facing operational screens: standalone KDS
(components and disabled states), the tableside Server App (full i18n plus
tenant-language inheritance via /api/server-app/info), WhatsApp setup and
pairing surfaces, and the Settings Server App pairing URL. Convert physical
direction utilities to logical ones, mirror directional chevrons with
rtl-flip, and isolate naturally LTR values (order numbers, elapsed time,
phones, pairing codes, money, LAN URLs) with the shared Ltr component.

Adds a Batch F RTL regression suite registered in npm test. No change to
language selection, accounting units, calendar policy, or receipt printing.

Refs #241
@khaira777
khaira777 force-pushed the feat/241-f-kds-server-whatsapp-rtl branch from b010405 to ba70235 Compare August 17, 2026 08:11
@khaira777
khaira777 enabled auto-merge (squash) August 17, 2026 17:13
@khaira777
khaira777 merged commit 7139602 into main Aug 17, 2026
12 checks passed
@khaira777
khaira777 deleted the feat/241-f-kds-server-whatsapp-rtl branch August 17, 2026 17:15
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