Global Command Line Specification β
Goal: Define the UX, UI, and backend requirements for the Global Command Lineβa spotlight-style search designed to replace complex navigation trees and boost power-user efficiency.
Overview β
The "Global Command Line" (CMD+K or CTRL+K) is an intelligent overlay accessible from anywhere within the Backoffice and Driver App. It acts as a unified entry point for entity resolution (search) and action execution (commands).
UX & UI Behavior β
- Trigger: Omni-present keyboard shortcut (
CMD+K) or clicking the top-bar search input. - Display: Centered, floating modal with a glassmorphic background effect in the Backoffice interface.
- Fuzzy Search: Typo-tolerant matching for passengers, bookings, and destinations.
- Context Awareness: The default prompt prioritizes actions based on the current view. (e.g., CMD+K while viewing a
TourDeparturesuggests "Assign Driver" or "Send Broadcast").
Data Model & Search Index β
To achieve <50ms keystroke response times, the Command Line does not query core Postgres tables directly.
The Search Index (Redis / Meilisearch) β
The system maintains a flattened, denormalized read-model:
- Entity ID: UUID of the target row.
- Entity Type:
passenger,booking,tour_departure,incident,vehicle. - Primary Text: "Klaus MΓΌller", "Booking #INV-2409".
- Deep Link: URI to immediately pop the specific detail view in the router.
- Tags: e.g.,
["VIP", "balance_due"]for rapid filtering.
Command Execution Parameters β
Beyond search, the system supports natural language aliases resolving to parametrized actions.
| User Types... | Resolves to Action | Parameters Required |
|---|---|---|
| "delay tyrol 30m" | TriggerIncidentWorkflow | TourID: latest Tyrol, Delay: 30m |
| "refund MUELLER" | PartialRefundFlow | BookingRef matching "MUELLER" |
| "available drivers" | RouteToDispatchBoard | Filtering by state: IDLE |
Architecture & Flow β
- Client Keystroke: Debounced (150ms).
- Gateway: API routes to the Search Service.
- Resolution: Redis/Meilisearch returns top 10 ranked hits (mixed entities).
- Action Handling: If the user selects an Action, the UI triggers the appropriate Vue router push or dispatches an event to the backend using the Hasura GraphQL mutations.