You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(frontend): resolve POS drawer close hit-target, cart layout, and dashboard search alignment - #1454
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.
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.
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.
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.
On the POS main page, make the customer search field ("search by name or phone") wider so the placeholder/helper text is properly visible.
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.
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
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
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…
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
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
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
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
🚨 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
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
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…
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
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
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
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
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.
Fix POS drawer hit targets and align cart and dashboard layouts
🐞 Bug fix🧪 Tests🕐 40+ Minutes
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.
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.
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.
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.
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.
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.
2. Search boxes reserve space for a clear button that isn't there✓ Resolved
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
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.h-9=36px), while the Movements tab does not have an Add button, causing the header row height to shrink from36pxto32px(text-2xlline-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
ScheduledOrdersDrawer,PaymentQueueDrawer,SheetContent, andDrawerContentbelow--flo-sidebar-block-startand mark drawer/sheet/dialog overlays asapp-region: no-dragso the desktop titlebar drag strip does not intercept drawer close button clicks.CartPanelto the inline-start of the item name with red styling, allow cart footer action buttons to wrap and truncate (min-w-0,truncate,shrink-0badges) so the Place Order button never overflows horizontally, add vertical spacing (gap-1.5) inPosTopbarabove customer favorites, and widen the topbarCustomerSearchinput (sm:max-w-72 md:max-w-80).sm:max-w-xs,py-2,text-sm,size={16}icon) and enforcemin-h-9on 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.tssonpm run test:ui-regressions-621-623-626passes, 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.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 intests/ui-regressions-621-623-626.test.ts(lines 146-269) read component and stylesheet source files viareadFileSyncand 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 theReactDOMServer.renderToStaticMarkup/ DOM evaluation harness at lines 271-349) or parsed CSS rules.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
npm run test:ui-regressions-621-623-626npm run build && npm run build:frontendcd 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.