Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 762e7741db | |||
| 201dc3cf4b |
+21
-1
@@ -2,7 +2,7 @@
|
|||||||
# SERVER TOOLKIT - DEVELOPER CONTEXT DATABASE
|
# SERVER TOOLKIT - DEVELOPER CONTEXT DATABASE
|
||||||
################################################################################
|
################################################################################
|
||||||
# OPTIMIZED FOR: Fast context loading and code navigation
|
# OPTIMIZED FOR: Fast context loading and code navigation
|
||||||
# LAST UPDATED: 2025-12-15 (Hardware Health Check Enhancements)
|
# LAST UPDATED: 2025-12-16 (Menu Standards QA CHECK 32)
|
||||||
# VERSION: 2.5.1
|
# VERSION: 2.5.1
|
||||||
# FORMAT: Structured key-value with hierarchical sections
|
# FORMAT: Structured key-value with hierarchical sections
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -3652,3 +3652,23 @@ FUTURE IMPROVEMENTS:
|
|||||||
3. Audit all modules for menu consistency
|
3. Audit all modules for menu consistency
|
||||||
4. Document module menu patterns in this section
|
4. Document module menu patterns in this section
|
||||||
|
|
||||||
|
QA ENFORCEMENT:
|
||||||
|
CHECK 32 in toolkit-qa-check.sh validates menu standards:
|
||||||
|
|
||||||
|
1. Back Button Check:
|
||||||
|
- Finds all show_*_menu() and handle_*_menu() functions
|
||||||
|
- Scans next 100 lines for: ${RED}0)${NC} (Back to Main Menu|Exit)
|
||||||
|
- Reports LOW issue if missing
|
||||||
|
|
||||||
|
2. Separator Check:
|
||||||
|
- Flags plain dashes: echo "----------" (10+ dashes)
|
||||||
|
- Should use: ── or ══ (Unicode box drawing)
|
||||||
|
|
||||||
|
3. Duplicate Domain Selection:
|
||||||
|
- Finds: read -p "Enter domain" or similar
|
||||||
|
- Checks if file sources lib/domain-selector.sh
|
||||||
|
- Reports LOW issue if inline domain selection found
|
||||||
|
|
||||||
|
Status: ✅ ACTIVE (commit 201dc3c)
|
||||||
|
Location: tools/toolkit-qa-check.sh:957-1012
|
||||||
|
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ echo ""
|
|||||||
#==============================================================================
|
#==============================================================================
|
||||||
# CHECK 31: local keyword outside functions (CRITICAL - script fails)
|
# CHECK 31: local keyword outside functions (CRITICAL - script fails)
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
echo "[31/31] Checking: 'local' outside functions..."
|
echo "[31/32] Checking: 'local' outside functions..."
|
||||||
{
|
{
|
||||||
echo "## CHECK 31: 'local' keyword outside function context"
|
echo "## CHECK 31: 'local' keyword outside function context"
|
||||||
echo "Severity: CRITICAL"
|
echo "Severity: CRITICAL"
|
||||||
@@ -954,6 +954,63 @@ done < <(find "$TOOLKIT_PATH" -name "*.sh" -type f 2>/dev/null)
|
|||||||
echo ""
|
echo ""
|
||||||
} >> "$REPORT"
|
} >> "$REPORT"
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# CHECK 32: Menu standards compliance (LOW - UX consistency)
|
||||||
|
#==============================================================================
|
||||||
|
echo "[32/32] Checking: Menu standards compliance..."
|
||||||
|
{
|
||||||
|
echo "## CHECK 32: Menu standards compliance"
|
||||||
|
echo "Severity: LOW"
|
||||||
|
echo "Issue: Menus should follow standard format for consistent UX"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check for menus with inconsistent back buttons
|
||||||
|
while IFS=: read -r file line_num line_content; do
|
||||||
|
# Look for menu functions (show_*_menu)
|
||||||
|
if echo "$line_content" | grep -qE 'show_.*_menu\(\)|handle_.*_menu\(\)'; then
|
||||||
|
menu_file="$file"
|
||||||
|
|
||||||
|
# Check if this file has proper back button (within next 100 lines)
|
||||||
|
has_back=0
|
||||||
|
line_count=0
|
||||||
|
while IFS= read -r check_line && [ "$line_count" -lt 100 ]; do
|
||||||
|
if echo "$check_line" | grep -qE '\$\{RED\}0\)\$\{NC\}.*(Back to Main Menu|Exit)'; then
|
||||||
|
has_back=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
line_count=$((line_count + 1))
|
||||||
|
done < <(tail -n +$line_num "$file")
|
||||||
|
|
||||||
|
if [ "$has_back" -eq 0 ]; then
|
||||||
|
echo "LOW|$file|$line_num|Menu missing standard back button (RED 0)"
|
||||||
|
count_issue "LOW"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < <(grep -rn 'show_.*_menu()\|handle_.*_menu()' "$TOOLKIT_PATH" --include="*.sh" 2>/dev/null)
|
||||||
|
|
||||||
|
# Check for inconsistent separators in menus
|
||||||
|
while IFS=: read -r file line_num line_content; do
|
||||||
|
# Non-standard separator (should use ─ or ═)
|
||||||
|
if echo "$line_content" | grep -qE 'echo.*"[-]{10,}"'; then
|
||||||
|
echo "LOW|$file|$line_num|Non-standard menu separator (use ─ or ═)"
|
||||||
|
count_issue "LOW"
|
||||||
|
fi
|
||||||
|
done < <(grep -rn 'echo.*"[-]\{10,\}"' "$TOOLKIT_PATH" --include="*.sh" --exclude="toolkit-qa-check.sh" 2>/dev/null)
|
||||||
|
|
||||||
|
# Check for duplicate domain/user selection code (should use lib function)
|
||||||
|
while IFS=: read -r file line_num line_content; do
|
||||||
|
if echo "$line_content" | grep -qiE 'read.*-p.*"Enter domain|read -p.*domain.*:'; then
|
||||||
|
# Check if this file sources domain-selector.sh
|
||||||
|
if ! grep -q 'source.*domain-selector.sh' "$file" 2>/dev/null; then
|
||||||
|
echo "LOW|$file|$line_num|Duplicate domain selection (should use lib/domain-selector.sh)"
|
||||||
|
count_issue "LOW"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < <(grep -rin 'read.*-p.*domain' "$TOOLKIT_PATH/modules" --include="*.sh" 2>/dev/null)
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
} >> "$REPORT"
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# PERFORMANCE CHECKS (INFO level - not counted as issues)
|
# PERFORMANCE CHECKS (INFO level - not counted as issues)
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user