Skip to content

fix(frontend): resolve POS drawer close hit-target, cart layout, and dashboard search alignment - #1454

Merged
khaira777 merged 5 commits into
mainfrom
fm/flocafe-drawer-close-hit-target-r1
Nov 4, 2026
Merged

khaira777 merged 5 commits into
mainfrom
fm/flocafe-drawer-close-hit-target-r1

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Intent

  1. When opening the scheduled orders sidebar/popup on the POS page in FloCafe, the X close button only works sometimes and part of its activation/clickable area does not register clicks. Check why the X close button activation area is unreliable and fix it.
  2. In the cart area of the POS page, the Place Order button (with the 'Space' shortcut badge) overflows horizontally outside of the cart area; check, review, and fix it.
  3. Move the delete/trash button on each cart item to the inline-start (left in LTR) side of the actual cart item name (keeping the same compact size and inline with the cart item name so it is not accidentally clicked next to the quantity controls), and make the trash/delete button red.
  4. On the POS page, when a customer is entered/selected, the Top Items bubbles are touching the blue linked customer name/phone bar; add a small, slight gap between them.
  5. On the POS main page, make the customer search field ("search by name or phone") wider so the placeholder/helper text is properly visible.
  6. The search field on the Products page looks sleek and narrow (sm:max-w-xs, py-2, text-sm, size={16} icon), whereas the search field on the Inventory page (and other dashboard pages like Customers/Orders) looks fat/bloated; make all dashboard search fields the same sleek size as the Products page.
  7. On the Inventory page, the Supplies and Recipes tabs have a Plus/Add button in the top header row (h-9 = 36px), while the Movements tab does not have an Add button, causing the header row height to shrink from 36px to 32px (text-2xl line-height) and shifting the tabs, search bar, and table vertically when switching to Movements; fix the header row so switching tabs never shifts page content.

What Changed

  • Offset ScheduledOrdersDrawer, PaymentQueueDrawer, SheetContent, and DrawerContent below --flo-sidebar-block-start and mark drawer/sheet/dialog overlays as app-region: no-drag so the desktop titlebar drag strip does not intercept drawer close button clicks.
  • Move each cart item's delete button in CartPanel to the inline-start of the item name with red styling, allow cart footer action buttons to wrap and truncate (min-w-0, truncate, shrink-0 badges) so the Place Order button never overflows horizontally, add vertical spacing (gap-1.5) in PosTopbar above customer favorites, and widen the topbar CustomerSearch input (sm:max-w-72 md:max-w-80).
  • Standardize dashboard search inputs on the Customers, Orders, and Inventory pages (sm:max-w-xs, py-2, text-sm, size={16} icon) and enforce min-h-9 on the Inventory header row so switching to the Movements tab does not shift page content vertically.

Risk Assessment

✅ Low: The UI layout adjustments and Electron titlebar offset/no-drag fixes are well-bounded, match all seven user intent requirements, and the regression tests now verify rendered component markup and parsed CSS rules rather than raw source regexes.

Testing

Built the backend and static frontend, fixed SSR module resolution in tests/ui-regressions-621-623-626.test.ts so npm run test:ui-regressions-621-623-626 passes, and drove all 7 user-intent scenarios live in Chromium against an isolated FloCafe server instance on ports 4301-4303 with visual screenshot evidence captured for every scenario.

  • Live validation: ✅ go - 7 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Cashier opens the Scheduled Orders drawer on POS with the desktop titlebar active and clicks across the X close button (including top-edge and inscribed perimeter points) to close the drawer reliably ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/01-scheduled-orders-drawer-close-btn.png
Cashier views the POS cart footer with both Hold (F8) and Place Order (Space) buttons visible and verifies neither button overflows the cart panel horizontally ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/02-03-pos-cart-item-and-footer.png
Cashier adds an item to the POS cart and verifies the compact red trash/delete button is positioned at the inline-start (left in LTR) of the item name on row 1, separate from the row 2 quantity steppe… ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/02-03-pos-cart-item-and-footer.png
Cashier selects a customer with purchase history on POS and verifies a clean vertical gap separates the blue linked customer bar from the Top Items bubbles row beneath it ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/04-pos-customer-top-items-gap.png
Cashier views the POS main topbar customer search input and verifies it is widened so the "Search by phone or name…" placeholder text is fully visible without clipping ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/05-pos-customer-search-width.png
User navigates across Products, Inventory (Supplies, Recipes, Movements), Customers, and Orders dashboard pages and verifies all search fields share the same sleek dimensions and styling ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/06a-products-search.png
User switches between Supplies, Recipes, and Movements tabs on the Inventory page and verifies the header row height (36px), tabs list position, and search bar position never shift vertically ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/07c-inventory-movements-tab.png

Scheduled Orders Drawer offset below 40px desktop titlebar with clickable X close button
POS CartPanel with inline-start red trash button and non-overflowing Hold and Place Order (Space) buttons
POS Topbar with 6px vertical gap between linked customer bar and Top Items bubbles
POS Topbar widened customer search input (320px wrapper) showing full placeholder text
Products page sleek search input (320px width, 38px height, 16px icon)
Customers page sleek search input matching Products page dimensions
Orders page sleek search input matching Products page dimensions
Inventory page Supplies tab header (36px height) and sleek search input
Inventory page Recipes tab header (36px height) and sleek search input
Inventory page Movements tab header (36px height preserved without Add button) and unshifted tabs/search input

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • 🚨 tests/ui-regressions-621-623-626.test.ts:146 - New regression checks in tests/ui-regressions-621-623-626.test.ts (lines 146-269) read component and stylesheet source files via readFileSync and assert raw regex substring matches (assert.match(scheduledDrawer, ...), assert.match(paymentQueueDrawer, ...), assert.match(sheetUi, ...), assert.match(drawerUi, ...), assert.match(globalsCss, ...), assert.match(cartPanel, ...), assert.match(posTopbar, ...), assert.match(customerSearch, ...), assert.match(inventoryPage, ...), assert.match(customers, ...), assert.match(ordersPage, ...)). Under the repository's Test-quality rule, newly added tests must not rely on grepping or regex-matching implementation source code; instead, remove the source-regex assertions and test observable rendered output or behavior through executable component rendering (extending the ReactDOMServer.renderToStaticMarkup / DOM evaluation harness at lines 271-349) or parsed CSS rules.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Cashier opens the Scheduled Orders drawer on POS with the desktop titlebar active and clicks across the X close button (including top-edge and inscribed perimeter points) to close the drawer reliably ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/01-scheduled-orders-drawer-close-btn.png
Cashier views the POS cart footer with both Hold (F8) and Place Order (Space) buttons visible and verifies neither button overflows the cart panel horizontally ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/02-03-pos-cart-item-and-footer.png
Cashier adds an item to the POS cart and verifies the compact red trash/delete button is positioned at the inline-start (left in LTR) of the item name on row 1, separate from the row 2 quantity steppe… ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/02-03-pos-cart-item-and-footer.png
Cashier selects a customer with purchase history on POS and verifies a clean vertical gap separates the blue linked customer bar from the Top Items bubbles row beneath it ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/04-pos-customer-top-items-gap.png
Cashier views the POS main topbar customer search input and verifies it is widened so the "Search by phone or name…" placeholder text is fully visible without clipping ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/05-pos-customer-search-width.png
User navigates across Products, Inventory (Supplies, Recipes, Movements), Customers, and Orders dashboard pages and verifies all search fields share the same sleek dimensions and styling ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/06a-products-search.png
User switches between Supplies, Recipes, and Movements tabs on the Inventory page and verifies the header row height (36px), tabs list position, and search bar position never shift vertically ✅ pass live ~/.no-mistakes/evidence/01M6HT4MC2NQT6YWF5KG1SE4Z5/07c-inventory-movements-tab.png
  • npm run test:ui-regressions-621-623-626
  • npm run build && npm run build:frontend
  • 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/tmp-validate-1453.spec.ts --config=playwright.config.ts --project=chromium
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@coderabbitai

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

Fix POS drawer hit targets and align cart and dashboard layouts

🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Keep POS drawer close controls clickable below the desktop titlebar.
• Prevent cart action overflow and improve item removal, customer search, and topbar spacing.
• Standardize dashboard searches, stabilize Inventory tabs, and add rendered UI regression checks.
Diagram

graph TD
  A["Desktop titlebar"] --> B["Global styles"] --> C["POS drawers"]
  B --> D["Sheet and drawer"]
  E["POS layout"] --> F["Regression tests"]
  G["Dashboard pages"] --> F
  C --> F
  D --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Shared dashboard search component
  • ➕ Keeps search dimensions and icon styling consistent by construction.
  • ➖ Adds a component abstraction and migration scope to a targeted layout fix.

Recommendation: Keep the targeted page changes for this fix: they standardize the affected searches without changing their filtering behavior. Consider a shared search component if more dashboard pages adopt the same pattern.

Files changed (12) +540 / -158

Bug fix (11) +167 / -157
page.tsxCompact the Customers search field +6/-3

Compact the Customers search field

• Constrains search width on larger screens and aligns its input padding, text size, and icon with the Products search style.

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

page.tsxStabilize the Inventory header and compact tab searches +18/-12

Stabilize the Inventory header and compact tab searches

• Sets a minimum header height so the Movements tab does not shift page content. Aligns Supplies, Recipes, and Movements search fields with the compact dashboard style.

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

page.tsxAlign the Orders search field with dashboard styling +6/-3

Align the Orders search field with dashboard styling

• Replaces the expanding search width with a responsive maximum and applies the compact input and icon styling.

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

globals.cssExclude overlays and dialogs from the titlebar drag region +11/-0

Exclude overlays and dialogs from the titlebar drag region

• Applies no-drag styling to POS drawers, shared sheet and drawer overlays and content, and dialogs so desktop window dragging does not intercept their controls.

frontend/src/app/globals.css

CartPanel.tsxMove cart removal away from quantity controls and contain footer actions +43/-37

Move cart removal away from quantity controls and contain footer actions

• Places a red remove control before each item name. Allows footer buttons to wrap and their labels to truncate while retaining shortcut badges, preventing horizontal overflow.

frontend/src/components/pos/CartPanel.tsx

CustomerSearch.tsxWiden POS topbar customer search +1/-1

Widen POS topbar customer search

• Increases the responsive width of the topbar search wrapper so its name-or-phone helper text has more room.

frontend/src/components/pos/CustomerSearch.tsx

PaymentQueueDrawer.tsxKeep the payment queue drawer below the desktop titlebar +2/-2

Keep the payment queue drawer below the desktop titlebar

• Offsets the drawer backdrop beneath the titlebar and keeps its close button compact and visibly clickable.

frontend/src/components/pos/PaymentQueueDrawer.tsx

PosTopbar.tsxSeparate customer favorites from the topbar row +1/-1

Separate customer favorites from the topbar row

• Adds a small vertical gap between the identity and action row and the Top Items row.

frontend/src/components/pos/PosTopbar.tsx

ScheduledOrdersDrawer.tsxRestore the scheduled drawer close hit target +3/-2

Restore the scheduled drawer close hit target

• Starts the drawer below the desktop titlebar and keeps the close button from shrinking. Adds a test identifier for the close control.

frontend/src/components/pos/ScheduledOrdersDrawer.tsx

drawer.tsxOffset shared drawer content below the titlebar +35/-46

Offset shared drawer content below the titlebar

• Adjusts top and side drawer positioning to respect the desktop titlebar offset. The remaining diff reformats the file.

frontend/src/components/ui/drawer.tsx

sheet.tsxOffset shared sheet content below the titlebar +41/-50

Offset shared sheet content below the titlebar

• Moves top and side sheets below the titlebar and adjusts side-sheet height to fit the remaining viewport. The remaining diff reformats the file.

frontend/src/components/ui/sheet.tsx

Tests (1) +373 / -1
ui-regressions-621-623-626.test.tsAdd rendered UI and parsed CSS regression checks +373/-1

Add rendered UI and parsed CSS regression checks

• Renders the affected drawers, shared primitives, POS components, and dashboard pages to assert their markup. Parses global CSS to verify no-drag declarations for overlay selectors.

tests/ui-regressions-621-623-626.test.ts

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Cart delete button is harder to tap on touch screens ✓ Resolved

Resolving commit: 33f1fe6

Resolution reason
Added an absolutely positioned pseudo-element with an expanded -inset-1.5 area to the cart item
remove button, enlarging its effective touch target while preserving the compact icon button.
Description
The relocated remove button in CartPanel retains its 24×24px h-6 w-6 box but loses the
after:content-[''] after:absolute after:-inset-2 pseudo-element that expanded its tap area. On
touch-screen POS terminals, taps beside the red trash icon can miss while the adjacent edit and
price-override buttons retain enlarged targets.


Informational

2. Search boxes reserve space for a clear button that isn't there ✓ Resolved

Resolving commit: 33f1fe6

Resolution reason
The search inputs now use reduced end padding when empty and render conditional X clear buttons when
populated across Customers, Orders, and all relevant Inventory searches.
Description
The Customers, Orders and Inventory search inputs copied pe-9 from the Products search. On
Products that padding leaves room for the conditional clear (X) button, but none of these pages
renders that button. Each input therefore keeps about 36px of empty space at the end, which cuts off
longer placeholders such as the Orders "order number, customer name, or phone" hint once the field
is capped at sm:max-w-xs.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #34
  🌐 PR #39
✅ Compliance rules (platform): 5 rules
✅ Cross-repo context — repo relationships
Review mode: Auto: 🧠 Deep: Multiple independent UI paths and subtle layout, interaction, and regression risks.

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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