Skip to content

feat(settings): add search index and jump bar - #1528

Merged
khaira777 merged 6 commits into
mainfrom
fm/flocafe-settings-search-and-ux
Nov 8, 2026
Merged

khaira777 merged 6 commits into
mainfrom
fm/flocafe-settings-search-and-ux

Conversation

@khaira777

@khaira777 khaira777 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1520

Intent

Make our settings even more user friendly: add a search bar at the top of the settings so people looking for specific settings can go to them easily, and add specific metadata or relevant keywords or related keywords or synonyms to each of these settings so that even if there's not an exact match for that setting people are still able to find it and in different languages as well.

What Changed

  • Added a settings search catalog and matcher (frontend/src/lib/settings-search.ts) indexing all 21 settings tabs with localized titles, hints, extra translation keys across settings, pos, customerDisplay, tax, qrMenu, update, and productAnalytics namespaces, multilingual synonyms/keywords, diacritic-insensitive normalization, and role/permission filtering.
  • Added a top-level settings search combobox (frontend/src/app/(dashboard)/settings/page.tsx) with / and Ctrl+K/Cmd+K keyboard shortcuts, arrow-key navigation with aria-activedescendant, and tab-switching plus scroll-and-highlight navigation to matching [data-setting-section] anchors across settings tabs and cards.
  • Added unit and E2E test suites (tests/settings-search.test.ts, frontend/e2e/settings-search.spec.ts) covering catalog anchor integrity, localized and synonym matching, permission filtering, and interactive jump-bar navigation.

Risk Assessment

✅ Low: The settings search catalog, combobox UI, section anchors, and permission filtering are well-bounded, client-side additions with thorough unit and E2E test coverage and no regressions to existing settings behavior.

Testing

Ran the settings search unit suite across all 32 locales, test script coverage check, full backend and static frontend build, the Playwright E2E spec frontend/e2e/settings-search.spec.ts, and an isolated live Chromium verification pass across manager, server, and owner sessions in English, Spanish, and Hindi, capturing 7 screenshot artifacts; all checks and live scenarios passed.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
User searches Settings by non-exact synonym or related keyword ('parcel', '58mm', 'footer message') and jumps to the highlighted setting card on the target tab ✅ pass live `cd frontend && E2E_BASE_URL=http://127.0.0.1:43101 E2E_KDS_BASE_URL=http://127.0.0.1:43102 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43103 npx playwright test e2e/settings-search.spec.ts --config=play…
Adversarial keyboard shortcut and combobox boundary: '/' focuses search when outside form inputs, types literally into an active form input without hijacking focus, Ctrl+K focuses search from inside a… ✅ pass live `cd frontend && E2E_BASE_URL=http://127.0.0.1:43101 E2E_KDS_BASE_URL=http://127.0.0.1:43102 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43103 npx playwright test e2e/settings-search.spec.ts --config=play…
User switches UI language (Spanish and Hindi) and finds settings using localized terms, diacritic-stripped queries ('programa de fidelidad'), native non-Latin script ('प्रिंटर'), and universal keyword… ✅ pass live npm run test:settings-search, ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-search-spanish-diacritic-dropdown.png, and ~/.no-mistakes/evidence/0…
Adversarial role-permission boundary: restricted roles (manager and server) cannot find unauthorized owner/admin/database/tax settings in search results, while owner can find and jump to Master PIN on… ✅ pass live ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-search-restricted-role-filtered.png and ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-…

Settings search dropdown matching synonym keyword 'parcel' to Charges & Surcharges
POS Workflow tab navigated to and Charges & Surcharges card highlighted after selecting search result
Diacritic-insensitive Spanish settings search ('programa de fidelidad' -> Programa de Lealtad)
Hindi localized settings search ('प्रिंटर' -> प्रिंटर under सामान्य · प्रिंटर)
Restricted server role filtered from admin-only 'dark mode' setting with empty state shown
Owner role navigating to and highlighting Master PIN card via settings search
No matching results empty state for unmatched settings search query

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
User searches Settings by non-exact synonym or related keyword ('parcel', '58mm', 'footer message') and jumps to the highlighted setting card on the target tab ✅ pass live `cd frontend && E2E_BASE_URL=http://127.0.0.1:43101 E2E_KDS_BASE_URL=http://127.0.0.1:43102 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43103 npx playwright test e2e/settings-search.spec.ts --config=play…
Adversarial keyboard shortcut and combobox boundary: '/' focuses search when outside form inputs, types literally into an active form input without hijacking focus, Ctrl+K focuses search from inside a… ✅ pass live `cd frontend && E2E_BASE_URL=http://127.0.0.1:43101 E2E_KDS_BASE_URL=http://127.0.0.1:43102 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43103 npx playwright test e2e/settings-search.spec.ts --config=play…
User switches UI language (Spanish and Hindi) and finds settings using localized terms, diacritic-stripped queries ('programa de fidelidad'), native non-Latin script ('प्रिंटर'), and universal keyword… ✅ pass live npm run test:settings-search, ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-search-spanish-diacritic-dropdown.png, and ~/.no-mistakes/evidence/0…
Adversarial role-permission boundary: restricted roles (manager and server) cannot find unauthorized owner/admin/database/tax settings in search results, while owner can find and jump to Master PIN on… ✅ pass live ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-search-restricted-role-filtered.png and ~/.no-mistakes/evidence/01M6YM424N6BX59ECR4CDAM3XT/settings-…
  • npm run test:settings-search
  • npm run test:script-coverage
  • npm run build && npm run build:frontend
  • cd frontend && E2E_BASE_URL=http://127.0.0.1:43101 E2E_KDS_BASE_URL=http://127.0.0.1:43102 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:43103 npx playwright test e2e/settings-search.spec.ts --config=playwright.config.ts --project=chromium
  • Live Playwright Chromium verification against node tests/e2e-server.cjs covering synonym search, keyboard shortcut guards (/ vs Ctrl+K), combobox aria-activedescendant scrolling, Spanish (es) and Hindi (hi) localized search, and owner/manager/server permission filtering with screenshot capture
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@coderabbitai

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

ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add searchable settings catalog and jump-to-setting bar

✨ Enhancement 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Index settings across 21 tabs using localized labels, related keywords, relevance ranking, and
 permission filtering.
• Add keyboard-accessible search that switches tabs, scrolls to settings, and briefly highlights
 them.
• Add search tests and section anchors so results lead to the intended controls.
Diagram

graph TD
  A["Settings search"] --> B["Localized catalog"] --> C{"Role permitted?"} --> D["Ranked results"] --> E["Tab navigation"] --> F["Section anchor"] --> G["Scroll and highlight"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Derive results from rendered settings controls
  • ➕ Search targets could follow visible UI changes without a separate catalog.
  • ➖ Inactive tabs and conditional panels may not be rendered.
  • ➖ Synonyms, relevance ranking, and permission-aware discovery would be harder to maintain.

Recommendation: Keep the explicit catalog and section-anchor approach: it supports synonyms and localized discovery across inactive tabs while making result visibility intentional. Maintain the catalog-to-anchor tests as settings change so the two representations do not drift.

Files changed (19) +3887 / -565

Enhancement (16) +3557 / -564
page.tsxAdd Settings search and jump interactions +443/-31

Add Settings search and jump interactions

• Adds the search combobox, keyboard shortcuts and result navigation. It switches tabs, finds section anchors, scrolls to them, and applies a temporary highlight; it also anchors settings rendered directly on the page.

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

AutoUpdateCheckToggle.tsxAnchor the automatic update toggle +1/-0

Anchor the automatic update toggle

• Marks the toggle as a search destination.

frontend/src/components/settings/AutoUpdateCheckToggle.tsx

BetaChannelToggle.tsxAnchor the beta-channel toggle +22/-11

Anchor the beta-channel toggle

• Adds a search destination to the beta-channel card. The remaining changes reformat existing code.

frontend/src/components/settings/BetaChannelToggle.tsx

ChargesSettingsCard.tsxAnchor charges and surcharges +4/-1

Anchor charges and surcharges

• Marks the charges card as the destination for related settings searches.

frontend/src/components/settings/ChargesSettingsCard.tsx

CountersSettingsTab.tsxAnchor counter settings +8/-2

Anchor counter settings

• Adds separate search destinations for multi-counter configuration and named counters.

frontend/src/components/settings/CountersSettingsTab.tsx

CustomerDisplayCard.tsxAnchor customer-display settings +4/-1

Anchor customer-display settings

• Makes the customer-display card a destination for search results.

frontend/src/components/settings/CustomerDisplayCard.tsx

DatabaseSettingsTab.tsxAnchor backup and database tools +36/-9

Anchor backup and database tools

• Adds destinations for export, backup, history, Google Drive, import, database information, health checks, master PIN, and initialization.

frontend/src/components/settings/DatabaseSettingsTab.tsx

GeneralSettingsTab.tsxAnchor store settings and individual fields +22/-7

Anchor store settings and individual fields

• Adds destinations for store details, currency, business-day start, tax ID, logo, order numbering, and subscription.

frontend/src/components/settings/GeneralSettingsTab.tsx

LocalBackupCard.tsxAnchor both local-backup card states +10/-2

Anchor both local-backup card states

• Adds the same local-backup destination whether status has loaded or not.

frontend/src/components/settings/LocalBackupCard.tsx

OfflineModeCard.tsxAnchor the offline-mode card +5/-1

Anchor the offline-mode card

• Makes offline-mode controls reachable from a search result.

frontend/src/components/settings/OfflineModeCard.tsx

PaymentMethodsSettings.tsxAnchor payment and shift controls +20/-5

Anchor payment and shift controls

• Adds destinations for payment methods, split checks, card transaction IDs, open-shift requirements, and per-staff shifts.

frontend/src/components/settings/PaymentMethodsSettings.tsx

PrintersSettingsTab.tsxAnchor printer and receipt controls +32/-8

Anchor printer and receipt controls

• Adds destinations for hardware, printing options, cash drawers, kitchen tickets, receipt languages, bill content, WhatsApp sharing, and bill templates.

frontend/src/components/settings/PrintersSettingsTab.tsx

QrMenuSettingsTab.tsxAnchor QR-menu publishing in both states +8/-2

Anchor QR-menu publishing in both states

• Provides a search destination whether the QR-menu service is connected or awaiting connection.

frontend/src/components/settings/QrMenuSettingsTab.tsx

TaxConfigurationPanel.tsxAnchor tax configuration and advanced tools +819/-483

Anchor tax configuration and advanced tools

• Adds destinations for the tax mode panel and advanced-tools control. Most of the larger diff reformats existing tax configuration code.

frontend/src/components/settings/TaxConfigurationPanel.tsx

WhatsAppEnableCard.tsxAnchor the WhatsApp enable card +1/-1

Anchor the WhatsApp enable card

• Adds the WhatsApp integration destination to the disabled-state card.

frontend/src/components/settings/WhatsAppEnableCard.tsx

settings-search.tsDefine the localized settings search catalog +2122/-0

Define the localized settings search catalog

• Indexes settings across all 21 tabs with translation keys, related keywords, target IDs, and visibility requirements. Implements text normalization and tiered match scoring to return ranked results with navigation metadata.

frontend/src/lib/settings-search.ts

Tests (3) +330 / -1
settings-search.spec.tsExercise search-driven navigation in Playwright +54/-0

Exercise search-driven navigation in Playwright

• Adds a browser test that signs in, searches by printer and surcharge synonyms, switches tabs, and verifies the destination cards are highlighted.

frontend/e2e/settings-search.spec.ts

package.jsonRegister settings search tests +2/-1

Register settings search tests

• Adds a dedicated settings-search test script and includes it in the main test command.

package.json

settings-search.test.tsValidate catalog coverage and search behavior +274/-0

Validate catalog coverage and search behavior

• Tests tab coverage, translation resolution, normalization, ranking, synonyms, and permission filtering. Checks localized printer searches across supported locales and diacritic-insensitive matching.

tests/settings-search.test.ts

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Search shortcut fails in settings forms 🐞 Bug ≡ Correctness
Description
handleGlobalKeyDown applies the editable-element guard to both / and Cmd/Ctrl+K, returning
before it can focus the search input. When someone is editing a settings field, Cmd/Ctrl+K cannot
open search even though the guard needed to protect ordinary typing applies to /.
Code

frontend/src/app/(dashboard)/settings/page.tsx[R652-658]

+      const isEditable =
+        tagName === 'INPUT' ||
+        tagName === 'TEXTAREA' ||
+        tagName === 'SELECT' ||
+        Boolean(activeEl?.isContentEditable);
+
+      if (isEditable) return;
Relevance

●●● Strong

Clear, trivially scoped keyboard bug fix; Cmd/Ctrl+K is an explicit PR intent, and editable-guard
fixes are generally accepted here.

PR-#1507
PR-#1314

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Both shortcuts enter the same handler, and its unconditional editable-element return precedes the
code that focuses search.

frontend/src/app/(dashboard)/settings/page.tsx[641-669]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Cmd/Ctrl+K does not focus settings search while a form field is active.
## Fix Focus Areas
- frontend/src/app/(dashboard)/settings/page.tsx[641-669]
## Recommended Fix
Apply the editable-element guard to `/` only, while allowing Cmd/Ctrl+K to focus and select the search input from settings form fields; retain the dialog guard.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. Subscription searches show Languages 🐞 Bug ≡ Correctness
Description
The subscription catalog entry assigns languages as its title and subscription as its hint,
reversing the label of the section it targets. A search for a subscription or plan therefore offers
a result headed “Languages,” although the destination is headed “Subscription” and languages is only
a field within it.
Code

frontend/src/lib/settings-search.ts[R321-322]

+    titleKey: 'languages',
+    hintKey: 'subscription',
Relevance

●●● Strong

Wrong catalog label on a search result is a simple, deterministic correctness fix matching the
destination heading; no rejection precedent.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The catalog labels this destination Languages, whereas the anchored section renders Subscription as
its heading and Languages as a subordinate field.

frontend/src/lib/settings-search.ts[317-325]
frontend/src/components/settings/GeneralSettingsTab.tsx[872-898]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Subscription-related searches display a result titled Languages rather than the destination section's title.
## Fix Focus Areas
- frontend/src/lib/settings-search.ts[317-323]
## Recommended Fix
Use `subscription` as the entry title and retain languages in the searchable hint, extra keys, or keywords so language searches still reach this section.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


3. Screen readers miss the active result ✓ Resolved

Resolving commit: fbf1ca0

Resolution reason
At PR head, the search input sets aria-activedescendant={activeSearchOptionId} (derived from
searchResults[activeSearchIndex]), and each result button has
id={settings-search-option-${result.id}} with role="option" and aria-selected. The active option
is therefore announced to assistive tech, matching the suggested fix. The listbox also has id
settings-search-listbox referenced by aria-controls.
Description
The search input declares a combobox but has no aria-activedescendant, and its options have no IDs
for that attribute to reference. When arrow keys change selectedSearchIndex, focus remains on the
input, so its newly selected result is not identified to screen-reader users.

View medium (1)
4. Keyboard users lose sight of results ✓ Resolved

Resolving commit: ff9fc8f

Resolution reason
N/A
Description
Arrow-key navigation changes selectedSearchIndex, but it never scrolls the selected option into
the dropdown's visible area. For a broad query with more results than fit in the height-limited
list, the highlighted result moves out of view while Enter still selects it.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #39
  🌐 PR #34
✅ Compliance rules (platform): 5 rules
✅ Cross-repo context — repo relationships
  Explored: repo: FreeOpenSourcePOS/FloAdmin (sha: 8a02fb6f) — View relationship
Review mode: Auto: 🧠 Deep: 110 hunks across 19 files, new catalog logic, permission filtering, and prior review found multiple real defects.

Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread frontend/src/lib/settings-search.ts Resolved
@khaira777 khaira777 changed the title feat(settings): add searchable settings index and jump bar feat(settings): add search index and jump bar Nov 8, 2026
@khaira777
khaira777 force-pushed the fm/flocafe-settings-search-and-ux branch from 8553163 to fbf1ca0 Compare November 8, 2026 22:41
@khaira777 khaira777 changed the title feat(settings): add search index and jump bar feat(settings): add searchable settings index and jump bar Nov 8, 2026
@khaira777 khaira777 changed the title feat(settings): add searchable settings index and jump bar feat(settings): add search index and jump bar Nov 8, 2026
@khaira777
khaira777 merged commit 46767a3 into main Nov 8, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-settings-search-and-ux branch November 8, 2026 23:12
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.

feat(settings): add multi-language synonym search bar and section jump navigation

1 participant