Skip to content

feat(orders): add quick customer creation - #546

Merged
khaira777 merged 7 commits into
mainfrom
feat/orders-quick-customer-creation
Aug 30, 2026
Merged

khaira777 merged 7 commits into
mainfrom
feat/orders-quick-customer-creation

Conversation

@khaira777

@khaira777 khaira777 commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

  • Added an Orders-page quick customer creation modal that pre-fills name or phone input, creates the customer, and links it to the active order.
  • Updated customer searches to match phone-like queries by normalized digits, including legacy separators, and documented the authenticated /api/customers-search contract.
  • Added Playwright and integration coverage for customer creation/linking and formatted phone matching, and bumped the app version to 3.3.1-beta.6.

Risk Assessment

⚠️ Medium: The feature is bounded, but legacy phone states can create duplicate customers and the new E2E fixture is not reliably repeatable.

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.

  • Evidence: Add Customer modal (local file: ~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4/orders-quick-customer-create-modal.png)
  • Evidence: Customer linked to order (local file: ~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4/orders-quick-customer-linked.png)
  • Outcome: 🔧 1 issue found ✅ across 2 runs (10m7s)

Pipeline

Updates from git push no-mistakes

⏭️ **intent** - skipped

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 warnings
  • ⚠️ 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, but handleSave continues and invokes onCreated when 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-only phone_digits column. For example, +1 (555) 123-4567 yields 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-3212 has phone_digits 91987/6543212; search now displays it after stripping /, but the normalized create request is checked with exact phone_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 of Date.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.ts
  • npm run test:phone-search-integration
  • npm run build
  • NEXT_BUILD_MODE=desktop npm --prefix frontend run build
  • EVIDENCE_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-integration
  • EVIDENCE_DIR=~/.no-mistakes/evidence/01M189MCK81C1NRC8SAMN29TP4 npm run test:e2e -- e2e/orders-quick-customer-creation.spec.ts
  • Visual inspection of both captured screenshots
  • git status --short --untracked-files=all
✅ **Document** - passed

✅ No issues found.

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ Configured ESLint could not run because root dependencies cannot resolve @typescript-eslint/eslint-plugin and frontend dependencies have no eslint executable.

🔧 Fix: Lint and static analysis clean
✅ Re-checked - no issues remain.

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds quick customer creation and automatic order linking from the Orders page, while improving formatted-phone lookup and updating the application version.

  • Adds a customer-creation modal with phone normalization and request-state safeguards.
  • Extends customer search to compare digit-equivalent formatted phone numbers.
  • Adds API integration and browser coverage for creation, lookup, linking, and persistence.
  • Updates customer API documentation and bumps the version to 3.3.1-beta.6.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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
Loading

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
@khaira777 khaira777 changed the title feat: add quick customer creation to orders feat(orders): add quick customer creation Aug 30, 2026
@khaira777
khaira777 merged commit e041bd2 into main Aug 30, 2026
15 checks passed
@khaira777
khaira777 deleted the feat/orders-quick-customer-creation branch August 30, 2026 05:21
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.
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.
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