webficial / launcher-advanced
Indexed Magento Admin entity and navigation command palette
Package info
github.com/webficial/launcher-advanced
Type:magento2-module
pkg:composer/webficial/launcher-advanced
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- magento/framework: ^103.0
- magento/module-backend: ^102.0
- magento/module-catalog: ^104.0
- magento/module-cms: ^104.0
- magento/module-config: ^101.2
- magento/module-customer: ^103.0
- magento/module-eav: ^102.1
- magento/module-sales: ^103.0
- magento/module-store: ^101.1
- magento/module-ui: ^101.2
- psr/log: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
- jsutariya/launcher: *
- jsutariya/launcher-advanced: *
- webficial/launcher: *
Replaces
None
README
Vendor: Webficial Technologies.
Standalone Magento Admin command palette with all Basic features and an index-aware entity search. MIT licensed; based on Jaimin Sutariya's original JS_Launcher module.
Requirements and installation
The Composer package accepts PHP 8.2–8.5. Use a PHP version supported by your Magento release and its supported MySQL or MariaDB version. Dependency injection compilation and XML schema validation passed on Magento Open Source 2.4.7-p10 with PHP 8.3. Browser, database and performance checks require a running staging installation.
Install the contents at app/code/Webficial/LauncherAdvanced/ (registration.php must be directly inside the directory), or install the extracted package through your normal Composer workflow. Install only one edition. Disable/remove any old JS_Launcher or JS_LauncherAdvanced package, or Webficial Basic, before enabling Advanced; Composer packages declare a mutual conflict. Existing old configuration values are not migrated to the separate js_launcher_advanced configuration namespace. Back up the old package.
# Disable only the modules that are actually installed, before removing their files: # bin/magento module:disable JS_LauncherAdvanced # bin/magento module:disable JS_Launcher # bin/magento module:disable Webficial_Launcher # Then: bin/magento module:enable Webficial_LauncherAdvanced bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy -f bin/magento cache:clean
Use the normal deployment user/process. Re-login after ACL changes. Configure under Stores > Configuration > General > Webficial Advanced Launcher. No mandatory additional table, database index, search engine, cron, queue or initial index build is created. Missing indexes are reported, never silently replaced with a full-table scan.
Navigation and UI
Open the launcher using Ctrl+M (configurable) or the header button. Type a name, order number, SKU, email, menu or configuration label. Menu/configuration results appear immediately once the navigation metadata has loaded. Entity results appear automatically after the configured typing delay (300 ms by default). Use Up/Down and Enter to open a result; Ctrl/Command+Enter opens a new tab. Escape closes. No search button is required. The optional filter narrows results and automatically reruns the current query. Reopening resets the filter to All entities. Results are grouped, ranked and deduplicated by entity group and ID; selection is preserved when remote results arrive if that record is still in the list. The earlier header integration remains unchanged.
Configure search scope
Stores > Configuration > General > Webficial Advanced Launcher > Search Settings. The settings apply to the entire installation, not an individual store view. Existing Options settings and paths are retained.
| Setting | Default / meaning |
|---|---|
| Automatic Entity Search | Yes. If No, All entities searches navigation only; explicit filters and prefixes still search records automatically. |
| Orders, Customers, Products, Categories, CMS Pages | Automatic |
| Invoices, Shipments, Credit Memos, CMS Blocks, Returns (RMA) | On demand |
| B2B Companies | Automatic when available |
| Include related Invoices, Shipments, Credit Memos, Returns | Yes, independently configurable; only a unique exact order can expand. |
| Search Delay (ms) | 300; bounded to 200–1000 |
| Minimum Text Length | 3; bounded to 3–8 |
Automatic: eligible providers participate in All entities search. On demand: search with a specific filter or prefix; related order lookup can still include this entity when enabled. Disabled: not shown in filters, not searched even via a manually submitted request, not returned as a related record. The two Commerce configuration groups appear only when their modules are enabled. ACL and Commerce restrictions are checked server-side before data retrieval. The system configuration cannot grant access to records. An orders-only user never queries customer, product or other denied providers. The existing restricted-role opt-in is still required.
Examples: type John Smith, Shoes or shipping without a filter. customer:John searches the customer group, product:ABC the product group, category:Shoes the category group, email:guest@example.com orders by exact email, invoice:123456 invoices (even on demand). Group aliases include o:, p:, c:, cfg:. Specific search modes remain available in the filter and by prefix; customer-name: and customer-id: still work. A complete email in All entities searches eligible automatic order/customer email providers. Numeric input prioritizes identifiers and IDs. General text prioritizes name/title providers and tries eligible exact identifiers. Unavailable modes remain safely skipped; All entities is not a promise of exhaustive results. A request has a soft 1.5-second provider scheduling budget, at most 20 remote results and 25 combined results; a slow query can exceed the budget, and later groups may be omitted. Narrow the filter when necessary. The browser invalidates stale requests and does not persist order or customer records.
Menu and config section/group/field search uses stable IDs and default-scope deep links. Standard group/field highlighting is best effort for Magento's standard form DOM; hidden/cloned/custom-rendered fields may land at the section. Website/store-view-only settings are not indexed.
Search capabilities and index requirements
| Prefix/type | Lookup | Availability |
|---|---|---|
order:000012345 |
Source sales order increment ID | Standard index |
invoice:000012345 |
Source invoice increment ID | Standard index |
shipment:000012345 |
Source shipment increment ID | Standard index |
creditmemo:000012345 |
Source credit memo increment ID | Standard index |
sku:ABC-123 |
Product SKU | Standard index |
product-id:123 |
Product entity ID | Primary key |
customer:john@example.com (or Customers filter) |
Exact customer email | Requires email-leading index (standard Magento normally has one) |
customer-id:123 |
Customer entity ID | Primary key |
email:john@example.com |
Order customer email (guest or registered), highest ID first | Email-only or (customer_email, entity_id) B-tree index |
track:AWB123456 |
Exact tracking number, links to shipment | Optional index on sales_shipment_track.track_number |
external-order:ERP123 |
External order ID | Standard index on sales_order.ext_order_id |
category:12 |
Category entity ID | Primary key |
page:shipping-returns |
CMS page identifier | Index required |
block:footer |
CMS block identifier | Index required |
page-id:12, block-id:12 |
CMS entity IDs | Primary key |
page-title:Shipping Returns, block-title:Footer |
Indexed title prefix or native full-text search | Existing matching index required |
customer-name:John Smith |
Customer grid name prefix or native full-text search | Existing matching index required |
product-name:Classic Shirt |
Default-scope name word search | FULLTEXT(value), bounded native-key lookup, or prefix-only fallback |
category-name:Shoes |
Default-scope name word search | FULLTEXT(value), bounded native-key lookup, or prefix-only fallback |
Text modes now run automatically after the typing delay when their group is enabled. Native CMS/customer full-text indexes can include other fields, so a hit may match CMS content or another indexed field; stopwords/token length/language affect recall. Product and category name search matches words anywhere in the default admin store (store ID 0) name, including Running short → Erika Running Short. A single-column FULLTEXT(value) index is preferred when available; all query terms are required as word prefixes, subject to database tokenization and stopwords. Otherwise native unique (entity_id, attribute_id, store_id) keys are used to retrieve at most 5,000 product or 1,000 category names, after checking the entity count using a bounded primary-key query (cap + 1). All words must match at word starts, in any order; exact names and contiguous phrases rank higher. Larger catalogs retain indexed prefix-only search if available, with a visible limitation notice, or skip the provider if no suitable index exists. No unrestricted wildcard scan is used. This fallback reads names per search and should be benchmarked on staging. Optional FULLTEXT indexes cover all values in the EAV varchar table, not only names, so they may be expensive to build and maintain. No schema changes are automatic. Customer-grid name search may lag the source table. No arbitrary substring search or external search-engine integration is included in this release.
Search architecture and scaling
- Direct bounded queries select only result metadata from native tables; no sales repository hydration, total counts, deep offsets or independent copy of all sales records. Source sales tables allow immediately saved records to be found without waiting for asynchronous grid refresh.
- Exact match first; optional literal, escaped prefix fallback only for selected entity types. Identifier strings keep leading zeros. Table names use ResourceConnection (table prefixes supported), columns/routes are allowlisted, user values are bound parameters.
- Magento adapter index metadata is checked before searching. A leading BTREE index is required for identifiers, or an appropriate native FULLTEXT/composite index for text modes. The chosen BTREE is forced. Index inspection uses Magento's native DDL metadata cache when available. The code requests MySQL optimizer statement limits (750 ms identifier / 1000 ms text); these hints are not guaranteed to apply on MariaDB or all configurations.
LIMITbounds returned rows, not necessarily rows examined, so verify with EXPLAIN and load tests. - All entities selects automatic groups only, then routes numeric, email and general text queries to relevant authorized providers. Name/title searches are now included in general-text routing. Each exact provider returns at most 5 rows (Orders by email: 10); selected prefix/text search at most 10. A single exact order match expands up to 3 invoices, 3 shipments, 3 credit memos and, when eligible, 3 RMAs using the indexed internal order ID. Ambiguous orders across stores are not expanded automatically. Results are intentionally capped, not exhaustive.
- Search is a read-only Admin POST endpoint with form key and non-cacheable responses. Current-session Admin URLs are generated on demand. Per-provider failures are isolated. No external AI, Redis, OpenSearch or customer-data export. Keep debug SQL/request-body logging disabled or appropriately redacted.
Optional database indexes
See docs/index-checks.sql for read-only index checks and commented examples of optional DDL. Never run DDL blindly on large live tables. Inspect existing indexes, collations, key lengths, table prefixes, replication and disk capacity. Deploy missing indexes through a separate reviewed migration or declarative-schema companion module according to your site's deployment practices. No DDL is executed by this package. An index added externally may require cleaning Magento's DDL cache before it is recognized.
For high-concurrency or fuzzy/multiword catalog searches, a separate optional OpenSearch adapter is a sensible future extension. It is not implemented here. The current architecture deliberately prioritizes reliable structured lookups rather than an eventually consistent duplicate index.
Security / Commerce limitations
Entity search defaults to full-access Admin roles only. Restricted roles can be explicitly enabled in settings on Open Source, but must also have Webficial_LauncherAdvanced::use, Webficial_LauncherAdvanced::entity_search and each target entity ACL. CMS page searches require the native CMS page edit permission. Direct SQL bypasses repository/collection plugins. Do not enable restricted-role search if any third-party record-level or store restrictions apply unless a suitable authorization adapter has been implemented and validated. Commerce GWS-restricted roles are blocked even if the opt-in is enabled. When Magento_Staging is active, direct catalog/CMS entity searches are disabled to avoid returning versioned records incorrectly. Commerce-specific archives and custom storage adapters are not covered. Basic navigation remains available to authorized users. Test role behavior independently before production.
Tests included
node Test/search.test.cjs php Test/indexed-lookup.test.php
The Node test covers 12 local and combined ranking/deduplication cases. The PHP CLI harness uses isolated test doubles (no Magento bootstrap, no database) and covers 60 checks: exact lookup, leading zeros, index metadata, wildcard escaping, caps, missing indexes, related records, full-text term sanitization and ACL handling. Do not load the standalone test PHP file via Magento; execute directly from CLI. The PHP, PHTML and JavaScript files pass syntax checks. Check Admin AJAX, browser behavior, database query plans and performance on staging.
Staging acceptance checklist
- Install and compile. Verify both normal navigation and config deep links; ensure only one edition is enabled.
- Test the module enable flag and restricted-role options, distinct sales ACLs, custom admin routes and secret keys. A denied provider must not return data.
- Search a newly created order before asynchronous grid update. Test same increment ID across stores, exact SKU, related records and entity routes.
- Test literal
%,_,!, alphanumeric increment IDs, short queries, pasted values, malformed request params, rapid typing and closing during requests. Verify no stale response or unintended save. - Inspect SQL using EXPLAIN on production-like data; confirm leading indexes and bounded rows examined, especially miss and prefix cases. Test unavailable indexes, full-text searches and DB timeouts. Verify no slow-query regression to storefront/checkout.
- Benchmark p50/p95/p99 under realistic concurrency at representative table sizes (1M and 10M records), with cold/warm caches and simultaneous order placement. Measure entire Magento request latency, not just SQL.
Rollback
Disable Webficial_LauncherAdvanced, enable only the previous edition as needed, then run the normal deployment and clean caches. Optional indexes installed separately must be managed separately. This package does not create custom application database tables or indexes.
2.0.2 ACL hardening
Entity search requires both launcher permissions and the corresponding native entity ACL at the service boundary. Explicit unauthorized search modes return HTTP 403 before querying. The dropdown continues to use the same server-side allowlist; related sales records are checked individually. An orders-only role sees only the Orders group and its permitted specific search modes (plus navigation and All entities), provided Orders is not disabled. Optional indexes still apply. Restricted-role search remains opt-in; never enable it where custom row-level restrictions are not covered. Re-login after role changes. Added orders-only tests for dropdown, automatic and explicit searches, and denied modes.
2.0.3 Header trigger
The fixed bottom-right trigger has been removed. A separate ACL-gated trigger block is rendered in the native theme’s header.inner.right action container, after the existing controls; the modal remains in before.body.end. The trigger uses normal document flow, a neutral border, a local SVG icon and the configured shortcut. It is compact on smaller viewports. The shortcut and click action avoid opening a second launcher over an existing visible Magento popup or slide modal.
In Stores > Configuration > General > Webficial Advanced Launcher > Options, set Launcher Button Placement to Admin Header (default) or Keyboard Shortcut Only. Native Global Search is intentionally retained in both modes; replacement is deferred. Custom Admin themes may need layout or CSS adjustments. If a theme omits the header container, use the keyboard shortcut. Verify header alignment, focus restoration, modal stacking, restricted roles and placement settings in staging. No search backend or ACL changes are included.
2.0.4 — optional Adobe Commerce entity adapters (staging validation required)
No Adobe Commerce package is required by Composer. On Magento Open Source these modes are hidden. On traditional Adobe Commerce (on-premises or Cloud infrastructure), the launcher checks that the corresponding module is enabled and its destination controller exists with a module-specific ADMIN_RESOURCE constant, then checks that resource using Magento authorization. The optional modes are deliberately limited to full-access administrators until record-level restrictions are supported. A missing controller or unexpected ACL hides the mode. The existing GWS and Content Staging guards remain in place.
| Mode | Example | Source | Lookup |
|---|---|---|---|
| Returns (RMA) | rma:000000089 |
magento_rma | increment_id, exact then explicit prefix |
| RMA ID | rma-id:89 |
magento_rma | entity_id, exact |
| Company ID | company-id:77 |
company | entity_id, exact |
| Company Name | company-name:Example |
company | company_name, exact then explicit prefix |
RMA participates in automatic identifier search if its group is set to Automatic, and in related records of a uniquely matched order when enabled. Related RMA queries use order_id and have a three-result limit, subject to the common global cap and time budget. Company name and RMA identifiers/order relationships require suitable existing leading indexes; no schema changes or unindexed fallback are performed. Test on the exact installed Commerce/B2B version: the proprietary source was not supplied, so route parameters, table columns, controller ACLs, query plans and live UI remain unverified. The tests use simulated controller classes, not Adobe code. If a mode is unavailable, inspect module status and the destination controller ACL before enabling or modifying anything. Do not relax the full-access or staging guards to work around compatibility issues.
Negotiable quotes, purchase orders, shared catalogs, gift cards, reward history and staged catalog/CMS entity searches are not implemented by this release. Gift card codes should not be returned as search result labels. Additional providers need verified admin routes, permissions, schema and record-level restrictions. Navigation to permitted Commerce menus/configuration is still available independently. Adobe Commerce as a Cloud Service (SaaS) is not supported by this PHP module.
Staging acceptance: confirm each dropdown mode with B2B/RMA enabled and disabled; compare routes with native Admin links; search exact RMA and company IDs; test indexed related returns; deny destination ACL and test direct requests; confirm GWS restricted roles cannot retrieve rows; inspect EXPLAIN and confirm Open Source installation and DI compilation.
2.0.5 — Guest and registered order email search
Select Orders by email under Specific searches (or select Orders), or enter email:guest@example.com. Guest orders have no customer entity ID, but their order still stores sales_order.customer_email. Both guest and registered orders use the same exact bound lookup, without joining customer_entity or requiring Customer ACL. The Orders ACL and both launcher ACLs are required. A bare complete email in All entities checks orders first, then customer email only if authorized and the corresponding groups are Automatic; explicit Orders by email runs just the order lookup and never expands related sales records. Results show order status, stored placement time (UTC), store/internal ID and Guest/Registered flag. Up to 10 results are sorted by descending entity ID, usually newest first (not guaranteed chronological for imported data). No partial email wildcard is used.
Required index: existing full-column B-tree on (customer_email) (InnoDB primary key extension) or (customer_email, entity_id, ...) is reused, preferring the explicit composite. Other email-leading composites with intervening columns are refused because sorting them can be costly. Verify SHOW INDEX and EXPLAIN in staging: the adapter metadata does not expose all physical index properties, and index presence alone does not guarantee a cheap plan. Use docs/index-checks.sql. An unavailable index now gives a specific actionable message; database errors get a separate message.
Enable the search if the index is missing: deploy an approved migration adding SALES_ORDER_CUSTOMER_EMAIL_ENTITY_ID (customer_email, entity_id) or use the separately supplied optional Webficial_LauncherEmailIndex declarative-schema companion. Do not install the companion if an equivalent usable index already exists. Never run the DDL blindly on a large live table. Use the site's approved deployment process, especially Commerce Cloud. After manual DDL, refresh Magento database metadata (bin/magento cache:clean db_ddl if present; otherwise bin/magento cache:clean) and retry. The main package creates no indexes automatically. No OpenSearch, cron or reindex is required.
Staging checks: guest and registered orders, changed historical email, deleted customer, no matches, latest ID ordering, ACL with order-only roles, missing-index notice, EXPLAIN with existing and proposed indexes, and concurrent checkout. The included PHP and Node checks are isolated, not live database tests.
Vendor rename and upgrade
The previous JS module is a different Magento module identity. Back up code, database and deployment configuration. Disable the old JS_Launcher or JS_LauncherAdvanced (only those installed), remove its old package/directory, and enable the corresponding Webficial_ module before normal deployment. Do not run both old and new editions. Existing js_launcher / js_launcher_advanced configuration paths are intentionally preserved; recreate ACL grants for the new Webficial_ resource IDs and log in again. Update any custom layout/DI references. The original MIT copyright notice remains intact.
The launcher trigger is a direct child of Magento’s header.inner.right (.page-header-actions) container, not the outer header. This puts it in the same float formatting context as native search, notifications and the account menu. It uses the native action height, without fixed positioning. The shortcut is hidden at widths up to 1600px, and the label at widths up to 1300px; the accessible name and tooltip remain. Customized themes that omit this container can still use the keyboard shortcut. Choose Admin Header or Keyboard Shortcut Only in configuration. Test alignment at normal and compact widths, including with native Global Search disabled by ACL.
2.0.7 — Header alignment correction
The previous version placed the trigger outside the native right-hand header column. This release corrects the layout container and reserves more space for native controls at narrower viewport widths. No search, ACL, database schema or configuration path changes. After updating, redeploy Admin static assets and hard-refresh the browser.
2.1.0 — Automatic search and entity configuration
Adds group-level merchant controls, automatic text search, automatic filter changes, grouped results, combined ranking, stable selection, duplicate removal, and a bounded small-category fallback. No new database schema or mandatory indexes. Native Magento DDL metadata caching is retained; a separate readiness dashboard, persistent capability cache, profile presets, recent items/favorites and staging-aware Commerce catalog adapters remain future improvements.
Acceptance checks for this release
- All entities + customer name, category name, SKU, order number and guest email; no button click.
- Change filter after typing and confirm search runs automatically; close/reopen and confirm All entities.
- Set Customers to On demand: bare names should not query Customers; explicit customer filter should. Disable Customers: neither filter nor direct AJAX should work.
- Configure only Orders and test an orders-only user; confirm no other entity data queries, even for related records.
- Disable Include related Invoices and confirm no invoice query. Set Invoices Disabled and confirm the related checkbox cannot override it.
- Test category fallback on small tree, larger tree and missing native unique key. Check EXPLAIN and load impact.
- Test rapid typing and navigation arrival while remote results are pending; verify old results cannot overwrite new ones.
- Verify keyboard selection stays on the same record when remote results arrive, if still present; verify tab/new-tab actions and modal focus.
- Test real Magento DI compilation, XML validation, Admin ACL, Commerce restrictions, UI and production-size database latency before release.
2.1.1 — Product and category word search
Search for Running short, short run or category:Shoes without needing the beginning of the name. Existing ACL, staging restrictions, result limits and automatic entity settings remain unchanged. See docs/index-checks.sql for optional full-text index examples. Test on staging with the actual database engine and catalog size.
2.1.2 — Menu-first search ranking
Matching menu entries always rank first, followed by configuration entries and matching entity records. Text relevance remains the ordering rule within each tier. Explicit filters still restrict the search. Priority is applied before result limits and again when asynchronous entity results merge. No database or ACL changes.