| # | Requirement | Details |
|---|-------------|---------|
| FR‑1 | Dynamic action selection | The client fetches a list of candidate actions for the current route (GET /api/quick‑actions?view=dashboard). The server returns an ordered array based on the scoring algorithm (role + usage + state). |
| FR‑2 | Scoring algorithm | score = w_role * roleWeight + w_usage * usageCount + w_state * stateWeight. The weights (w_*) are configurable via an admin UI. |
| FR‑3 | Overflow handling | If >3 actions are eligible, the 4th+ go into an overflow dropdown (⋯). The overflow is keyboard‑navigable (ARIA‑menu). |
| FR‑4 | Action metadata | Each action definition includes: id, icon (FontAwesome/Material), label, tooltip, url (or client‑side handler), disabledWhen (function or flag). |
| FR‑5 | Permission gating | Server only returns actions the requesting user is allowed to execute. |
| FR‑6 | Telemetry | Each click on a Quick‑Action fires an event (quick_action_clicked) to the analytics pipeline (incl. userId, view, actionId). |
| FR‑7 | Graceful fallback | If the API call fails, the bar falls back to the static default set defined in the client bundle. |
| FR‑8 | Responsive design | Horizontal layout on ≥768 px, collapsible vertical list on smaller screens. |
| FR‑9 | Admin configuration UI | A simple CRUD page under Settings → Quick‑Actions where admins can:
• Add new actions (choose icon, label, URL, required role)
• Re‑order actions (drag‑and‑drop)
• Set weight values for the scoring algorithm |
| Risk | Impact | Mitigation | |------|--------|------------| | Scoring mis‑fires (irrelevant actions shown) | User frustration, lower adoption | Start with conservative weights, give admins ability to manually pin/unpin actions. | | Performance hit (extra API call) | Perceived lag on page load | Cache results per view for 5 minutes; pre‑fetch on route change. | | Permission leakage (action shown but not executable) | Security concern | Server enforces permission; client also double‑checks before rendering. | | Mobile overflow confusion | Users miss actions | Ensure the overflow button is clearly labelled (e.g., “More actions”) and is touch‑target sized. | | Admin UI complexity | Mis‑configuration | Provide sensible defaults, inline help, and a “reset to defaults” button. | SONE-166
| # | As a… | I want to… | So that… | |---|-------|------------|----------| | 1 | Power user | see my most‑used actions instantly on every page | I don’t waste time opening menus | | 2 | New employee | be guided toward the “canonical” actions for a view | I can learn the system faster | | 3 | Admin | configure which actions are eligible for Quick‑Actions per role | I can enforce best‑practice workflows | | 4 | Developer | have a declarative JSON config to register new actions | Adding a new feature never requires UI code changes | | 5 | Mobile user | have the bar collapse cleanly into an overflow menu | My screen stays usable on small devices | | # | Requirement | Details | |---|-------------|---------|