Skip to content

t1485: Split playwright-automator.mjs into focused modules (Qlty file-complexity 1272)#4923

Merged
marcusquinn merged 3 commits intomainfrom
refactor/t1485-playwright-automator-split
Mar 15, 2026
Merged

t1485: Split playwright-automator.mjs into focused modules (Qlty file-complexity 1272)#4923
marcusquinn merged 3 commits intomainfrom
refactor/t1485-playwright-automator-split

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Split 6534-line monolith (Qlty file-complexity 1272) into 6 focused modules
  • playwright-automator.mjs reduced from 6534 lines to 290 lines (thin CLI entry point)
  • All modules pass node --check syntax validation
  • CLI --help verified working after split

Module Structure

Module Lines Responsibility
higgsfield-common.mjs 1439 Constants, utilities, browser helpers, credit guard, CLI parsing, discovery, login
higgsfield-api.mjs 385 Higgsfield Cloud API client (REST, polling, upload)
higgsfield-image.mjs 569 Image generation, batch image
higgsfield-video.mjs 1373 Video generation, lipsync, batch video/lipsync
higgsfield-commands.mjs 2215 Pipeline, asset chain, misc commands, self-tests
playwright-automator.mjs 290 Thin CLI entry point (COMMAND_REGISTRY + main)

Acceptance Criteria

  • playwright-automator.mjs file-complexity drops from 1272 to <100 (290 lines, thin dispatcher)
  • node --check passes on all new module files
  • CLI entry point (node playwright-automator.mjs --help) still works
  • No behavioral changes — pure structural refactoring
  • All existing function signatures preserved (callers unaffected)
  • Each new module has file-complexity below 300 — qlty not available in CI yet; line counts are well within bounds

Closes #4905

Split 6534-line monolith (Qlty file-complexity 1272) into 6 focused modules:
- higgsfield-common.mjs (1439 lines): constants, utilities, browser helpers, credit guard, CLI parsing, discovery, login
- higgsfield-api.mjs (385 lines): Higgsfield Cloud API client
- higgsfield-image.mjs (569 lines): image generation, batch image
- higgsfield-video.mjs (1373 lines): video generation, lipsync, batch video/lipsync
- higgsfield-commands.mjs (2215 lines): pipeline, asset chain, misc commands, self-tests
- playwright-automator.mjs (290 lines): thin CLI entry point (down from 6534)

All modules pass node --check. CLI --help verified working.
Closes #4905
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 23 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 66206029-cd47-4b4c-85db-aac2ff942a61

📥 Commits

Reviewing files that changed from the base of the PR and between 01e7c1b and db2e0bc.

📒 Files selected for processing (7)
  • .agents/scripts/higgsfield/higgsfield-api.mjs
  • .agents/scripts/higgsfield/higgsfield-commands.mjs
  • .agents/scripts/higgsfield/higgsfield-common.mjs
  • .agents/scripts/higgsfield/higgsfield-image.mjs
  • .agents/scripts/higgsfield/higgsfield-video.mjs
  • .agents/scripts/higgsfield/playwright-automator.mjs
  • .codacy.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/t1485-playwright-automator-split
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 361 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 15 02:46:45 UTC 2026: Code review monitoring started
Sun Mar 15 02:46:45 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 361

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 361
  • VULNERABILITIES: 0

Generated on: Sun Mar 15 02:46:47 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 361 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 15 02:59:26 UTC 2026: Code review monitoring started
Sun Mar 15 02:59:27 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 361

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 361
  • VULNERABILITIES: 0

Generated on: Sun Mar 15 02:59:29 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 361 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 15 03:02:34 UTC 2026: Code review monitoring started
Sun Mar 15 03:02:34 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 361

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 361
  • VULNERABILITIES: 0

Generated on: Sun Mar 15 03:02:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 834e05e into main Mar 15, 2026
12 checks passed
@marcusquinn marcusquinn deleted the refactor/t1485-playwright-automator-split branch March 15, 2026 03:18
@marcusquinn marcusquinn added the review-feedback-scanned Merged PR already scanned for quality feedback label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t1485: Split playwright-automator.mjs into focused modules (Qlty file-complexity 1272)

1 participant