Repository navigation
feat(orders): add quick customer creation - #546
Merged
Merged
Conversation
Contributor
Greptile SummaryThe PR adds quick customer creation and automatic order linking from the Orders page, while improving formatted-phone lookup and updating the application version.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| frontend/src/app/(dashboard)/orders/page.tsx | Adds the quick-create entry point and links the successfully created customer to the selected active order. |
| frontend/src/components/pos/CreateCustomerModal.tsx | Implements customer creation, country-aware phone normalization, validation, and disabled cancellation while saving. |
| main/routes/index.ts | Updates the POS customer-search endpoint to normalize phone-like queries while retaining active-customer and role restrictions. |
| main/routes/customers.ts | Makes customer-list phone filtering tolerant of legacy slash separators. |
| frontend/e2e/orders-quick-customer-creation.spec.ts | Covers customer creation, normalized phone persistence, order linking, and persisted API state using shared test authentication configuration. |
| tests/phone-search-integration.test.ts | Adds regression coverage for digit-equivalent formatted phone queries and legacy separators. |
Sequence Diagram
sequenceDiagram
actor User
participant Orders as Orders page
participant Modal as Create customer modal
participant Customers as Customer API
participant OrdersAPI as Orders API
User->>Orders: Open customer linking
Orders->>Modal: Add customer with search prefill
User->>Modal: Enter name and phone
Modal->>Modal: Normalize phone
Modal->>Customers: POST /api/customers
Customers-->>Modal: Created customer
Modal->>Orders: onCreated(customer)
Orders->>OrdersAPI: PATCH order customer
OrdersAPI-->>Orders: Order linked to customer
Orders-->>User: Display linked customer
Reviews (2): Last reviewed commit: "no-mistakes(review): Harden customer loo..." | Re-trigger Greptile
…the quick-customer fixture phone to +66822345678 and updating its assertion. Verified: interacting tests passed (2/2), full Chromium E2E passed (28/28), and git diff --check passed
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e.
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; tripwire regex hardened after persistSession refactor.
7 of 8 tasks
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures made date-independent (they aged out of the 90-day window on Aug 31); tripwire regex hardened after the persistSession refactor.
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via THEME_REHYDRATION_EVENT, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures made date-independent; tripwire regex hardened after the persistSession refactor. Comment hygiene (FreeOpenSourcePOSgh-513): stripped review-narration prose, duplicated blocks, and 'do not remove'-style workarounds; encoded the theme re-hydration event name and the cancellable-sleep helper so the contracts live in code, not in comments.
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures made date-independent (they aged out of the 90-day window on Aug 31). Comment hygiene: review-narration comments stripped (~200 lines); the flo:auth-changed coupling encoded as THEME_REHYDRATION_EVENT; retry sleep extracted to cancellableSleep; tripwires re-pointed to surviving code.
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - dark-token treatment incl. surfaces from FreeOpenSourcePOS#537 (weighted products, refunds, period toggle); light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) - allowScripts field declares the install scripts local npm runs need Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures made date-independent (they aged out of the 90-day window on Aug 31); comment hygiene (~200 lines of review-narration stripped); test:refunds restored to the test chain.
carvalab
added a commit
to carvalab/FloCafe
that referenced
this pull request
Aug 31, 2026
…ion (FreeOpenSourcePOS#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from FreeOpenSourcePOS#549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - full dark-mode coverage: Settings page and panels, products, customers, tables, staff, addon-groups, POS modals, KDS components, dashboard — light mode pixel-stable; docs amended (title-bar-phase1, platform matrix) Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (FreeOpenSourcePOS#537/FreeOpenSourcePOS#549/FreeOpenSourcePOS#546): tokenize weighted-products/refund/ period-toggle surfaces; fr.json theme-key parity; auth-changed dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures made date-independent (they aged out of the 90-day window on Aug 31); comment hygiene (~200 lines of review-narration stripped); test:refunds restored to the test chain; allowScripts field declared for local npm install scripts.
carvalab
added a commit
that referenced
this pull request
Aug 31, 2026
…ion (#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from #549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - full dark-mode coverage: Settings page and panels, products, customers, tables, staff, addon-groups, POS modals, KDS components, dashboard, loyalty ledger modal — light mode pixel-stable - docs amended (title-bar-phase1, platform matrix); reports-insights fixtures date-independent; allowScripts field for local install scripts Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (#537/#549/#546/#562): tokenize weighted-products/refund/ period-toggle/loyalty-ledger surfaces; fr.json theme-key parity; auth dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; test:refunds restored to the test chain; comment hygiene (~200 lines of review-narration stripped); allowScripts field for local npm install scripts.
carvalab
added a commit
that referenced
this pull request
Aug 31, 2026
…ion (#513) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from #549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - full dark-mode coverage: Settings page and panels, products, customers, tables, staff, addon-groups, POS modals, KDS components, dashboard, loyalty ledger modal — light mode pixel-stable - docs amended (title-bar-phase1, platform matrix); allowScripts field for local npm install scripts Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (#537/#549/#546/#562): tokenize weighted-products/refund/ period-toggle/loyalty-ledger surfaces; fr.json theme-key parity; auth dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures date-independent (upstream #562 fix adopted); test:refunds restored to the test chain; comment hygiene (~200 lines of review-narration stripped); allowScripts field for local npm install scripts.
carvalab
added a commit
that referenced
this pull request
Aug 31, 2026
…ion (#513) (#563) - theme_mode setting (light|dark|system, default system) validated in both write paths (IPC set-setting + HTTP wildcard PUT); no migration, no seeding - useThemeMode store + ThemeSync component: matchMedia resolution, .dark toggle, ownership-gated localStorage mirror, token-gated DB seed for follower windows (DB > param > mirror > OS, bounded retry with real delay + one-shot 60s re-check after transient failure), in-window user-choice guard, server-truth rollback with needsServerTruth hydration delivery, post-login re-hydration via flo:auth-changed, set-theme-effective push - FOUC pre-paint guard (param > mirror > prefers-color-scheme) with vm-based precedence matrix test - main-process wiring: direct getDatabase() initial isDark at window creation, sender-validated set-theme-effective handler (overlay + background color, main window only), effectiveTheme on get-status, ?theme= on the KDS window URL - Appearance settings tab (ownerManager-gated, optimistic + rollback, 5 locales incl. French from #549) - native Electron e2e: dark toggle, nativeTheme.themeSource system sync, relaunch persistence; theme-mode-settings + theme-fouc-script suites; KDS-hardening and renderer-API expectations aligned - full dark-mode coverage: Settings page and panels, products, customers, tables, staff, addon-groups, POS modals, KDS components, dashboard, loyalty ledger modal — light mode pixel-stable - docs amended (title-bar-phase1, platform matrix); allowScripts field for local npm install scripts Review fixes (greptile): in-window user-choice guard; DB fetch before mirror; bounded retry with no stale mirror write-back; server-truth rollback; one-shot follower re-check after transient outage; hydration delivers server truth when a failed save armed it. Ponytail cleanup: shared fetchThemeMode helper (boot + recheck dedup), stdlib asserts in theme-mode-settings, trimmed VM stubs, optional relaunch on relaunched harness, dead refs/conditions/comments removed (-144 lines). Rebase follow-ups (#537/#549/#546/#562): tokenize weighted-products/refund/ period-toggle/loyalty-ledger surfaces; fr.json theme-key parity; auth dispatch guarded for non-browser envs (auth-ui-deterministic); themed order-card selector in quick-customer-creation e2e; dashboard KPI values kept dark on pastel tiles; reports-insights fixtures date-independent (upstream #562 fix adopted); test:refunds restored to the test chain; comment hygiene (~200 lines of review-narration stripped); allowScripts field for local npm install scripts.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Changed
/api/customers-searchcontract.3.3.1-beta.6.Risk Assessment
Testing
Validated formatted customer phone search plus the full authenticated Orders-page flow: open Link Customer, create a customer in the modal, link it to the active order, verify persisted state, and inspect screenshots showing both UI states. No full-suite, lint, or static-analysis commands were run per the targeted test-phase boundary.
~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4/orders-quick-customer-create-modal.png)~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4/orders-quick-customer-linked.png)Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
frontend/src/components/pos/CreateCustomerModal.tsx:75- The modal's close and Cancel controls remain active while the create request is pending. Clicking either unmounts the modal, buthandleSavecontinues and invokesonCreatedwhen the request resolves; the OrdersPage callback then links the newly created customer to the order. Thus a user can cancel yet still create and associate a customer. Disable both close controls while saving, or abort/guard the request callback on close.🔧 Fix: Disable customer modal cancellation during save
1 warning still open:
frontend/src/app/(dashboard)/orders/page.tsx:1192- The new CTA copies the raw search into the create flow, but formatted phone searches are matched against the digit-onlyphone_digitscolumn. For example,+1 (555) 123-4567yields no existing result, then creation normalizes the number and receives a duplicate-phone 409, leaving the user unable to select the existing customer from this flow. Normalize phone-like searches at the shared lookup boundary while preserving raw text for name prefill.🔧 Fix: Normalize formatted phone searches at lookup boundary
✅ Re-checked - no issues remain.
main/routes/index.ts:214- The lookup strips every non-digit from the query, but the generated phone_digits column strips only a limited set of separators. A preserved legacy value such as +91/98765/43210 will not match a differently formatted digit-equivalent query. Align stored and query canonicalization or retain a legacy/raw fallback.frontend/src/app/(dashboard)/orders/page.tsx:1189- The Add Customer CTA remains enabled while an existing customer link request is pending. Selecting customer A, then creating customer B before A's PATCH resolves, sends two competing PATCHes for the same order and makes the final association timing-dependent. Disable the CTA while linking or serialize the operation.frontend/e2e/orders-quick-customer-creation.spec.ts:10- The new E2E spec hardcodes the manager fixture password despite the existing E2E_PASSWORD helper/environment contract, duplicating a committed credential in two login paths. Import and use the shared helper value.frontend/e2e/orders-quick-customer-creation.spec.ts:49- The E2E spec creates a customer with a fixed phone and never removes it. With a CI retry or local reuseExistingServer, a failed attempt that reached POST leaves the phone occupied and the retry receives 409 instead of exercising the flow. Use a unique valid fixture phone per attempt or clean up the created record.🔧 Fix: Harden customer lookup and quick-create E2E coverage
2 warnings still open:
frontend/src/app/(dashboard)/orders/page.tsx:1192- The new Add Customer path can violate phone uniqueness for legacy formatting. A stored+91/987-654-3212hasphone_digits91987/6543212; search now displays it after stripping/, but the normalized create request is checked with exactphone_digits, misses the legacy row, and the unique index permits a duplicate. Other preserved separators also remain unsearchable. Align canonicalization at the shared customer duplicate/storage boundary and reuse it for both search routes.frontend/e2e/orders-quick-customer-creation.spec.ts:39- The fixture phone uses only the last four digits ofDate.now(), giving just 10,000 possible values. A reused E2E server, retry, or run occurring in the same 10-second suffix window can hit the prior customer and receive a duplicate-phone response because the spec does not clean up. Use a genuinely unique valid fixture phone or remove the created record in teardown.🔧 **Test** - 1 issue found ✅
frontend/e2e/orders-quick-customer-creation.spec.ts- new test file written by agent: frontend/e2e/orders-quick-customer-creation.spec.tsnpm run test:phone-search-integrationnpm run buildNEXT_BUILD_MODE=desktop npm --prefix frontend run buildEVIDENCE_DIR=~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4 npm --prefix frontend run test:e2e -- --grep "Orders page creates a customer"✅ No issues found.
npm run test:phone-search-integrationEVIDENCE_DIR=~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4 npm run test:e2e -- e2e/orders-quick-customer-creation.spec.tsVisual inspection of both captured screenshotsgit status --short --untracked-files=all✅ **Document** - passed
✅ No issues found.
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix: Lint and static analysis clean
✅ Re-checked - no issues remain.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.