t4916: reduce Qlty smells in playwright-automator.mjs via extract-function refactoring#4926
Conversation
…ction refactoring Extract printUsage, runDiscoveryIfNeeded, guardCredits, buildRetryConfig from main() to reduce function-complexity smells. Add makeFeatureHandler factory to eliminate 5 duplicate inline lambdas in COMMAND_REGISTRY (boolean-logic/return-statements). No behaviour changes — pure structural refactoring. Syntax verified: node --check.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Mar 15 03:24:23 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
Closes #4916
Reduces 16 Qlty smells in
.agents/scripts/higgsfield/playwright-automator.mjsvia pure extract-function refactoring. No behaviour changes.Changes
Extracted from
main()to eliminatefunction-complexitysmells:printUsage()— the full CLI help text blockrunDiscoveryIfNeeded(command, options)— discovery skip-set logicguardCredits(command, options)— credit guard try/catch blockbuildRetryConfig(command, options)— retry configuration constructionAdded
makeFeatureHandler(feature)factory to eliminate 5 duplicate inline lambdas inCOMMAND_REGISTRY(addressesboolean-logicandreturn-statementssmells):Verification
node --check .agents/scripts/higgsfield/playwright-automator.mjs— passes