diff --git a/REFDB_FORMAT.txt b/REFDB_FORMAT.txt index 9dfea64..24a2a94 100644 --- a/REFDB_FORMAT.txt +++ b/REFDB_FORMAT.txt @@ -4210,7 +4210,7 @@ LEVEL 3: NICE-TO-HAVE (Quality improvements) QA ENFORCEMENT: ================================================================================ -CHECK 32 in toolkit-qa-check.sh validates menu standards: +LEGACY CHECK 32 in toolkit-qa-check.sh validates menu standards: 1. Back Button Check: - Finds all show_*_menu() and handle_*_menu() functions @@ -4227,6 +4227,56 @@ CHECK 32 in toolkit-qa-check.sh validates menu standards: - Reports LOW issue if inline domain selection found Status: ✅ ACTIVE (commit 201dc3c) + +NEW MENU UNIFORMITY CHECKS (Phase 11 - 2026-02-11): +==================================================== + +CHECK 104: Menu Input Validation (MEDIUM) + Purpose: Detect menu inputs without proper range validation + Pattern: Finds read -p "Select option" without [[ validation ]] + Detects: read statements for menu input lacking numeric range checks + Impact: Scripts crash or behave unpredictably with invalid input + Fix: Add validation like: [[ "$choice" =~ ^[1-5]$ ]] + Status: ✅ ACTIVE (commit fc5dc18) + +CHECK 105: Menu Color Code Consistency (LOW) + Purpose: Enforce consistent menu color styling + Pattern: Finds echo " 1) Option" without ${CYAN}1)${NC} + Detects: Menu options missing color codes + Impact: Visual inconsistency, poor UX + Fix: Use ${CYAN}1)${NC} format for consistency + Status: ✅ ACTIVE (commit fc5dc18) + +CHECK 106: Menu Retry Loop Implementation (LOW) + Purpose: Ensure users can retry after invalid input + Pattern: Finds input validation without 'while true' loops + Detects: Invalid input handling without retry mechanism + Impact: Bad UX - users must restart script on invalid input + Fix: Wrap validation in: while true; do ... [[ valid ]] && break; done + Status: ✅ ACTIVE (commit fc5dc18) + +CHECK 107: Standardized Yes/No Prompts (LOW) + Purpose: Standardize confirmation prompts across scripts + Pattern: Finds read -p "... (yes/no):" instead of confirm() + Detects: Manual yes/no prompts instead of library function + Impact: Inconsistent UX - different prompt styles + Fix: Replace with: if ! confirm "Continue?"; then return; fi + Status: ✅ ACTIVE (commit fc5dc18) + +USAGE EXAMPLES: + # Scan a specific script for menu uniformity: + bash toolkit-qa-check.sh --file /path/to/script.sh + + # View all menu uniformity issues: + grep 'MENU-VALIDATION\|MENU-COLORS\|MENU-RETRY\|PROMPT-STYLE' /tmp/qa-report.txt + + # Check if script passes menu standards: + if ! grep -q 'MENU-VALIDATION\|MENU-COLORS\|MENU-RETRY' /tmp/qa-report.txt; then + echo "Script passes menu uniformity checks!" + fi + + # Run full QA with menu checks included: + bash toolkit-qa-check.sh /root/server-toolkit 2>&1 | grep -E "104:|105:|106:|107:" Location: tools/toolkit-qa-check.sh:957-1012 FUTURE TODO (Enhancements based on this analysis):