Skip to content

feat: add Higgsfield UI automation subagent for subscription credit usage#797

Merged
marcusquinn merged 10 commits intomainfrom
feature/higgsfield-subagent
Feb 10, 2026
Merged

feat: add Higgsfield UI automation subagent for subscription credit usage#797
marcusquinn merged 10 commits intomainfrom
feature/higgsfield-subagent

Conversation

@marcusquinn
Copy link
Copy Markdown
Owner

@marcusquinn marcusquinn commented Feb 9, 2026

Summary

Adds a complete Higgsfield UI automation subagent that drives the web UI via Playwright to generate images, videos, lipsync, and effects using subscription credits (not available through the API).

Key Features

Playwright Automator (playwright-automator.mjs, ~3400 lines)

  • Image generation with 10+ models (Soul, Nano Banana Pro, Seedream 4.5, GPT Image, Flux, etc.)
  • Video generation with parallel submission (all scenes submitted at once, polled simultaneously)
  • Lipsync generation with 10+ voice models
  • 86+ apps/effects (face-swap, 3D render, transitions, etc.)
  • Seed bracketing for finding optimal seeds
  • Full production pipeline (image -> video -> lipsync -> assembly)
  • Persistent auth via Playwright storageState
  • Site discovery with route caching (481 paths)
  • Comprehensive interruption handling (modals, toasts, overlays, cookie banners)

Remotion Post-Production Pipeline (11 files)

  • Animated captions with 5 preset styles (bold-white, minimal, impact, typewriter, highlight)
  • Scene transitions (fade, slide, wipe) via @remotion/transitions
  • Title cards and static graphics
  • Dynamic duration/dimensions via calculateMetadata
  • Falls back to ffmpeg concat if Remotion not installed

Unlimited Model Routing

  • Routes Nano Banana Pro to /nano-banana-pro feature page (has Unlimited switch)
  • Routes Seedream 4.5 to /seedream-4-5 feature page (has Unlimited switch)
  • Auto-enables Unlimited mode toggle on both image and video pages
  • Verified: NBP generates in 20s, Seedream 4.5 in 5s, both zero credit cost

Video Download Reliability

  • Primary: API response interception on page reload
  • Fallback: Direct fetch to fnf.higgsfield.ai/project using page auth cookies
  • Exclusive jobSet claiming prevents same video downloaded for multiple scenes
  • Character-by-character prefix scoring (min 20 chars) for prompt matching

Brief JSON with imagePrompts[]

  • Separate imagePrompts[] for start frame generation vs scenes[].prompt for video animation
  • captions[] for Remotion overlay with per-caption styling
  • transitionStyle and transitionDuration for scene transitions

Verified E2E

  • 3-scene test: 420 frames, 1080x1920, 14.1s, 12.8MB
  • 4-scene Notion ad: 555 frames, 1080x1920, 18.6s, 14.3MB
  • Nano Banana Pro unlimited: 2 images in 20s
  • Seedream 4.5 unlimited: 1 image in 5s
  • Video download via direct API fetch: 6.0MB in <5s

Files Changed

  • .agents/scripts/higgsfield/playwright-automator.mjs — Main automator
  • .agents/scripts/higgsfield/remotion/ — 11 Remotion files (pipeline)
  • .agents/scripts/higgsfield-helper.sh — Shell wrapper
  • .agents/tools/video/higgsfield-ui.md — Subagent documentation
  • .agents/tools/video/higgsfield.md — API subagent reference

…sage

Playwright-based browser automation that drives the Higgsfield web UI to
generate images, videos, and apply effects using subscription credits
(not available via API). Includes persistent auth, modal dismissal,
site discovery, and full-quality PNG download via asset dialog.

Tested end-to-end: prompt entry -> generation -> download (4x 1536x2048 PNGs).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 9, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 41 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.

Walkthrough

Adds a new Higgsfield UI automation tool: a Bash CLI (higgsfield-helper.sh) that orchestrates Playwright-based browser automation, plus supporting package/config, route mappings, and documentation for UI-driven image/video/lipsync generation and pipeline workflows. (49 words)

Changes

Cohort / File(s) Summary
Higgsfield CLI & runtime
.agents/scripts/higgsfield-helper.sh, .agents/scripts/higgsfield/.gitignore, .agents/scripts/higgsfield/package.json
New Bash CLI (≈321 lines) implementing setup, login, image, video, lipsync, pipeline, seed-bracket, app, assets, credits, screenshot, download, status, and show_help. Adds Node/Bun detection, Playwright install/runtime selection, state/auth file handling, and robust input/credential validation. Package manifest and gitignore added for the automator.
Route manifest
.agents/scripts/higgsfield/routes.json
New static JSON mapping UI route endpoints across categories (image, video, edit, features, account, apps, mixed_media_presets) for navigational/automator use.
UI automation docs
.agents/tools/video/higgsfield-ui.md, .agents/tools/video/video-director.md, .agents/tools/video/higgsfield.md
New comprehensive Higgsfield UI automator guide and AI Video Director doc; updated video docs to reference UI automator and API-vs-UI comparison. Includes usage examples, pipeline schemas, credentials and troubleshooting guidance.

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as higgsfield-helper.sh
    participant Setup as setup()
    participant Runtime as Node/Bun
    participant Automator as playwright-automator.mjs
    participant Browser as Higgsfield UI

    User->>CLI: invoke command (e.g., image "prompt")
    CLI->>Setup: ensure deps, Playwright, state, credentials
    Setup-->>CLI: deps & auth OK / error
    CLI->>Runtime: run `playwright-automator.mjs` via node/bun
    Runtime->>Automator: execute automation script
    Automator->>Browser: launch & navigate to routes
    Automator->>Browser: interact (fill, click, submit)
    Browser-->>Automator: page responses / assets
    Automator-->>Runtime: save outputs / state
    Runtime-->>CLI: exit status / results
    CLI-->>User: print result or error
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🌟 A tiny shell wakes, Playwright in tow,
Routes mapped, secrets guarded, outputs in a row,
Prompts become pixels, videos hum and dance,
Automation sings—give Higgsfield a chance! 🎞️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main addition: a Higgsfield UI automation subagent for subscription credit usage, which aligns with the core purpose of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 80.95% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/higgsfield-subagent

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.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates a new subagent designed to automate interactions with the Higgsfield AI web interface. The primary goal is to enable the use of subscription credits for image and video generation, and access to UI-specific features like various apps and effects, which are not available through the existing API. This enhancement provides a robust and flexible way to leverage Higgsfield's full capabilities programmatically, ensuring seamless operation even with dynamic UI elements and offering high-quality output downloads.

Highlights

  • New Higgsfield UI Automation Subagent: Introduces a Playwright-based browser automation subagent that interacts with the Higgsfield web UI to generate images, videos, and apply effects, specifically utilizing subscription credits which are UI-exclusive.
  • Robust UI Interaction: The subagent features persistent authentication state, comprehensive dismissal of various modals and popups (e.g., cookie banners, notification toasts, upgrade nags), and automatic site discovery to adapt to UI changes.
  • Full-Quality Downloads and New Image Detection: It ensures the download of full-quality PNGs via the asset showcase dialog and includes logic to detect and download only newly generated images after a creation task.
  • Shell Wrapper and Documentation: A shell wrapper (higgsfield-helper.sh) is provided for easy command-line interaction, alongside detailed documentation (higgsfield-ui.md) covering usage, setup, available models, and troubleshooting.
Changelog
  • .agents/scripts/higgsfield-helper.sh
    • Added a new shell script to act as a wrapper for the Playwright automator, simplifying command-line execution for various Higgsfield UI tasks (login, image/video generation, app usage, credit checks, etc.).
  • .agents/scripts/higgsfield/.gitignore
    • Added a .gitignore file to exclude the 'node_modules/' directory from version control within the Higgsfield Playwright project.
  • .agents/scripts/higgsfield/package.json
    • Added a new package.json file to define the Node.js project for the Playwright automator, specifying 'playwright' as a core dependency.
  • .agents/scripts/higgsfield/playwright-automator.mjs
    • Added the core Playwright script responsible for browser automation on the Higgsfield website, including functions for login, site discovery, image/video generation, app usage, asset listing, credit checking, screenshot capture, and a comprehensive modal dismissal mechanism.
  • .agents/scripts/higgsfield/routes.json
    • Added a static JSON file containing a cached map of Higgsfield UI routes, categorized by image models, video tools, apps, and account management features, used for site discovery.
  • .agents/tools/video/higgsfield-ui.md
    • Added comprehensive documentation for the new Higgsfield UI automator subagent, detailing its purpose, usage instructions, architectural overview, setup prerequisites, command examples, available UI-exclusive models and features, prompt engineering tips, and troubleshooting guide.
  • .agents/tools/video/higgsfield.md
    • Modified the existing Higgsfield API documentation to include a cross-reference to the new UI automation subagent (higgsfield-ui.md) and added a comparison table highlighting the differences and use cases between the API-based and UI-based Higgsfield tools.
Activity
  • No specific human activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 9, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 9 18:50:57 UTC 2026: Code review monitoring started
Mon Feb 9 18:50:58 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 60

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 60
  • VULNERABILITIES: 0

Generated on: Mon Feb 9 18:51:01 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…e UI options

- Rewrite generateVideo() with History tab polling and direct CDN download
- Add downloadVideoFromHistory() for reliable video extraction
- Add generateLipsync() for lipsync studio automation
- Fix image generation detection: track queue items instead of image count
- Fix start frame upload: use Promise.all with filechooser event
- Fix credits pagination: set rows-per-page to 50 to show all 19 models
- Add Unlimited mode switch toggle (ARIA role-based)
- Add configureImageOptions() for aspect, quality, enhance, batch, preset
- Expand model URL mapping to all 10 discovered image models
- Add CLI options: --quality, --enhance, --sound, --batch, --unlimited, --preset
- Update higgsfield-ui.md with complete capability map from UI exploration
- Prompt input: try ARIA textbox, textarea, contenteditable (3 strategies)
- Video completion: detect video src in newest History item, not just item count
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 9 20:58:55 UTC 2026: Code review monitoring started
Mon Feb 9 20:58:56 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Mon Feb 9 20:58:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…ality and image detection

- Add production pipeline: image -> video -> lipsync -> ffmpeg assembly
- Add seed bracketing for systematic prompt testing (cost reduction)
- Add Video Director subagent (compressed 14 tutorial PDFs into agent)
- Fix video download: use dialog Download button for full-quality 1080p
  instead of CDN preview thumbnail from <video src>
- Fix image generation detection: verify Generate click registered with
  retry logic, add 30s safety retry if no activity detected
- Fix batch size control: use minus/plus counter pattern (— N/4 +)
  instead of non-existent numbered buttons
- Update helper shell script with pipeline/seed-bracket/credits commands
- Update higgsfield-ui.md with pipeline and video-director documentation
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 9 22:48:27 UTC 2026: Code review monitoring started
Mon Feb 9 22:48:27 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Mon Feb 9 22:48:29 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Fix all issues with AI agents
In @.agents/scripts/higgsfield-helper.sh:
- Around line 96-100: Several shell functions (cmd_login, cmd_assets,
cmd_credits, cmd_screenshot, cmd_download, cmd_status) lack explicit returns on
their success path; update each function to include an explicit return (e.g.,
return 0) at the end of the successful execution path. Locate the bodies of
cmd_login, cmd_assets, cmd_credits, cmd_screenshot, cmd_download and cmd_status
and add a terminal "return 0" (or appropriate non-zero where failure is already
handled) so every execution path ends with an explicit return.
- Around line 52-59: The run_automator function currently picks the runner (node
or bun) and invokes "${AUTOMATOR}" but does not change directory, causing Node
module resolution (e.g., playwright) to fail; modify run_automator to cd into
HIGGSFIELD_DIR before executing the automator (use a subshell or pushd/popd to
avoid changing the caller's PWD), e.g., enter HIGGSFIELD_DIR, run "${runner}"
"${AUTOMATOR}" "$@", and then return to the original directory so module
resolution finds node_modules local to HIGGSFIELD_DIR.
- Around line 39-48: The Playwright presence check and installs should be
performed inside ${HIGGSFIELD_DIR} and failures must increment the missing
counter; update the node/bun checks to change into HIGGSFIELD_DIR (e.g. use node
-e "process.chdir('${HIGGSFIELD_DIR}'); require('playwright')" and bun -e
"process.chdir('${HIGGSFIELD_DIR}'); import 'playwright'") or wrap installs with
(cd "${HIGGSFIELD_DIR}" && ...), run bun/npm installs from that directory (use
bun install playwright || npm install playwright) without swallowing errors so
you can test their exit status, and if both install attempts fail increment the
missing variable (missing=$((missing+1))) before returning missing to ensure
check_deps reflects failure.
- Around line 62-76: In the setup() function the Playwright presence check and
install commands (the node -e "require('playwright')" check, bun install/npm
install playwright, and npx playwright install chromium) run in the caller's
current directory instead of in ${HIGGSFIELD_DIR}; change the block to cd into
${HIGGSFIELD_DIR} before running those commands (and restore the original
working directory afterwards or use a subshell) so installs and checks happen in
HIGGSFIELD_DIR, referencing setup(), the node -e "require('playwright')" check,
bun install playwright / npm install playwright, and npx playwright install
chromium to locate the code to modify.

In @.agents/scripts/higgsfield/routes.json:
- Around line 3-11: The route entry "seedream_4_5" in routes.json is
inconsistent with the other image routes and appears unused; either remove the
"seedream_4_5" key entirely from the JSON or correct its value to follow the
established pattern by changing its path to "/image/seedream-4-5"; after the
change, run a repo-wide search for "seedream_4_5" to confirm no code references
remain and update any callers to the corrected "/image/seedream-4-5" if needed.

In @.agents/tools/video/higgsfield-ui.md:
- Around line 58-65: Update the architecture note that currently says
"Playwright automation, ~2000 lines" to reflect the correct size or remove the
approximate line count: open the doc entry mentioning
higgsfield/playwright-automator.mjs (and the higgsfield-helper.sh wrapper) and
either change "~2000 lines" to the accurate "~1300+ lines" from the PR summary
or delete the line-count entirely so the description doesn't become stale.

In @.agents/tools/video/video-director.md:
- Around line 171-175: Add a blank line before the fenced code block that begins
with "```text" under the "Emotional Block Cues" heading so the block is preceded
by an empty line (fixing MD031). Locate the fenced block labeled ```text and
insert one blank line immediately above it to ensure the code block is properly
separated from the preceding paragraph/header.
🧹 Nitpick comments (2)
.agents/tools/video/higgsfield-ui.md (1)

80-84: Credentials stored as plaintext environment variables.

The credentials.sh pattern with HIGGSFIELD_USER and HIGGSFIELD_PASS in plaintext is consistent with the existing framework convention. However, for a file containing a password, ensure credentials.sh has restrictive permissions (chmod 600). Consider documenting this requirement.

.agents/scripts/higgsfield/package.json (1)

7-9: Consider pinning the Playwright dependency to improve build reproducibility in this DevOps automation context.

The ^1.58.2 caret range is standard npm practice, but for CI/CD automation where consistent browser behavior is critical, pinning to an exact version (1.58.2 — currently valid as of Feb 2026) eliminates risk of subtle breakage from patch-level Playwright updates.

♻️ Optional: pin the version
   "dependencies": {
-    "playwright": "^1.58.2"
+    "playwright": "1.58.2"
   }

Since this is a private internal tool where reproducibility directly impacts automation reliability, pinning aligns with DevOps best practices for zero technical debt.

Comment on lines +39 to +48
if ! node -e "require('playwright')" 2>/dev/null && ! bun -e "import 'playwright'" 2>/dev/null; then
print_warning "Playwright not found, installing..."
if command -v bun &>/dev/null; then
bun install playwright 2>/dev/null || npm install playwright 2>/dev/null
else
npm install playwright 2>/dev/null
fi
fi

return "${missing}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Playwright install runs in the wrong working directory.

npm install playwright and bun install playwright execute in the caller's $PWD, not in ${HIGGSFIELD_DIR} where package.json lives. The installed node_modules will land in the wrong place, and the subsequent require('playwright') check (also not scoped to HIGGSFIELD_DIR) may pass or fail unpredictably.

Additionally, if both install commands fail (suppressed by 2>/dev/null), missing is never incremented, so check_deps returns 0 (success) even though Playwright is absent.

🔧 Proposed fix
-    if ! node -e "require('playwright')" 2>/dev/null && ! bun -e "import 'playwright'" 2>/dev/null; then
+    if ! (cd "${HIGGSFIELD_DIR}" && node -e "require('playwright')" 2>/dev/null) \
+       && ! (cd "${HIGGSFIELD_DIR}" && bun -e "import 'playwright'" 2>/dev/null); then
         print_warning "Playwright not found, installing..."
-        if command -v bun &>/dev/null; then
-            bun install playwright 2>/dev/null || npm install playwright 2>/dev/null
-        else
-            npm install playwright 2>/dev/null
-        fi
+        (
+            cd "${HIGGSFIELD_DIR}" || exit 1
+            if command -v bun &>/dev/null; then
+                bun install || npm install
+            else
+                npm install
+            fi
+        ) || { print_error "Failed to install Playwright"; missing=1; }
     fi
 
     return "${missing}"
🤖 Prompt for AI Agents
In @.agents/scripts/higgsfield-helper.sh around lines 39 - 48, The Playwright
presence check and installs should be performed inside ${HIGGSFIELD_DIR} and
failures must increment the missing counter; update the node/bun checks to
change into HIGGSFIELD_DIR (e.g. use node -e
"process.chdir('${HIGGSFIELD_DIR}'); require('playwright')" and bun -e
"process.chdir('${HIGGSFIELD_DIR}'); import 'playwright'") or wrap installs with
(cd "${HIGGSFIELD_DIR}" && ...), run bun/npm installs from that directory (use
bun install playwright || npm install playwright) without swallowing errors so
you can test their exit status, and if both install attempts fail increment the
missing variable (missing=$((missing+1))) before returning missing to ensure
check_deps reflects failure.

Comment on lines +3 to +11
"soul": "/image/soul",
"nano_banana": "/image/nano_banana",
"nano_banana_pro": "/image/nano_banana_2",
"seedream": "/image/seedream",
"seedream_4_5": "/seedream-4-5",
"wan2": "/image/wan2",
"gpt": "/image/gpt",
"kontext": "/image/kontext",
"nano_banana_inpaint": "/image/nano_banana?image-inpaint=true"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, verify the file exists and check the content around the flagged lines
if [ -f ".agents/scripts/higgsfield/routes.json" ]; then
  echo "=== File exists, checking content ===" 
  head -15 .agents/scripts/higgsfield/routes.json | cat -n
  echo ""
  echo "=== Checking for seedream entries ===" 
  rg -n "seedream" .agents/scripts/higgsfield/routes.json
else
  echo "File not found at .agents/scripts/higgsfield/routes.json"
fi

Repository: marcusquinn/aidevops

Length of output: 770


🏁 Script executed:

# Search for references to seedream_4_5 or seedream-4-5 in the codebase
echo "=== Searching for seedream_4_5 route references ===" 
rg -n "seedream.4.5|seedream-4-5" --type=js --type=json --type=py --type=ts

echo ""
echo "=== Also check for seedream route references in general ===" 
rg -n "seedream" --type=js --type=ts --max-count=20

Repository: marcusquinn/aidevops

Length of output: 254


🏁 Script executed:

# Check the structure of the routes.json to understand the pattern better
echo "=== Checking routes.json structure ===" 
wc -l .agents/scripts/higgsfield/routes.json

echo ""
echo "=== Sample of image routes to confirm pattern ===" 
rg -n "image" .agents/scripts/higgsfield/routes.json | head -15

Repository: marcusquinn/aidevops

Length of output: 574


Remove or correct dead route seedream_4_5 — inconsistent path prefix and unused.

The route at line 7 breaks the established /image/ prefix pattern (maps to /seedream-4-5 instead of /image/seedream-4-5). More critically, no code in the repository references this route—searches across .js, .ts, .py, and .json files yield no hits. Either remove it if it's obsolete, or correct it to /image/seedream-4-5 if it should match the image routes convention. Leaving it as-is introduces configuration drift and technical debt.

🤖 Prompt for AI Agents
In @.agents/scripts/higgsfield/routes.json around lines 3 - 11, The route entry
"seedream_4_5" in routes.json is inconsistent with the other image routes and
appears unused; either remove the "seedream_4_5" key entirely from the JSON or
correct its value to follow the established pattern by changing its path to
"/image/seedream-4-5"; after the change, run a repo-wide search for
"seedream_4_5" to confirm no code references remain and update any callers to
the corrected "/image/seedream-4-5" if needed.

Comment on lines +58 to +65
```text
higgsfield-helper.sh (shell wrapper)
└── higgsfield/playwright-automator.mjs (Playwright automation, ~2000 lines)
├── Persistent auth state (~/.aidevops/.agent-workspace/work/higgsfield/auth-state.json)
├── Site discovery cache (~/.aidevops/.agent-workspace/work/higgsfield/routes-cache.json)
├── Credentials from ~/.config/aidevops/credentials.sh
└── Downloads to ~/Downloads/ (descriptive filenames: hf_{model}_{quality}_{prompt}_{ts}.ext)
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor: Architecture diagram states ~2000 lines but PR summary mentions ~1300+ lines.

Keep the line count accurate or remove the approximation to avoid stale documentation. These numbers drift quickly.

🤖 Prompt for AI Agents
In @.agents/tools/video/higgsfield-ui.md around lines 58 - 65, Update the
architecture note that currently says "Playwright automation, ~2000 lines" to
reflect the correct size or remove the approximate line count: open the doc
entry mentioning higgsfield/playwright-automator.mjs (and the
higgsfield-helper.sh wrapper) and either change "~2000 lines" to the accurate
"~1300+ lines" from the PR summary or delete the line-count entirely so the
description doesn't become stale.

Comment on lines +171 to +175
**Emotional Block Cues** for dialogue:
```text
"[Happy] Hello, [surprised] my [excited] name is Sarah!"
"[Concerned] Have you ever [frustrated] struggled with this?"
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing blank line before fenced code block (MD031).

Per markdownlint, fenced code blocks should be surrounded by blank lines. There's a missing blank line before the code block on line 172.

♻️ Fix
 **Emotional Block Cues** for dialogue:
+
 ```text
 "[Happy] Hello, [surprised] my [excited] name is Sarah!"
 "[Concerned] Have you ever [frustrated] struggled with this?"
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.20.0)</summary>

[warning] 172-172: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @.agents/tools/video/video-director.md around lines 171 - 175, Add a blank
line before the fenced code block that begins with "text" under the "Emotional Block Cues" heading so the block is preceded by an empty line (fixing MD031). Locate the fenced block labeled text and insert one blank line
immediately above it to ensure the code block is properly separated from the
preceding paragraph/header.


</details>

<!-- fingerprinting:phantom:poseidon:phoenix -->

<!-- This is an auto-generated comment by CodeRabbit -->

…PI-based download

- Model dropdown: filter buttons by x-position (<800) to exclude History sidebar matches
- Model name mapping: CLI names (kling-2.6) to UI text (Kling 2.6) with search fallback
- Unlimited mode: use getByRole('switch') for reliable ARIA matching
- Video detection: use item count + processing text instead of <video src> comparison
  (all History items share the same CDN motion template URL)
- Video download: intercept fnf.higgsfield.ai/project API for CloudFront URLs (1080p)
  with HTTP status validation and file size sanity checks
- Batch size: use getByRole('button', { name: 'Decrement', exact: true }) for inner button
- Start frame upload: 4-strategy approach (Upload button, Start frame area, hidden input, coordinates)
- Ensure output directory exists before download attempts
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 01:06:55 UTC 2026: Code review monitoring started
Tue Feb 10 01:06:55 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 01:06:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…lient error handling

- Video detection: use prompt matching instead of item count increase
  (History tab has fixed display limit ~12 items, count doesn't increase)
- Image generation: initialize peakQueue from Phase 1 detection
  (fixes 300s timeout when queue resolves before first poll)
- Image download fallback: limit to batch size instead of downloading all
  (batch=1 downloads 1 image, not all 24 on page)
- Error handlers: wrap screenshot/browser.close in try/catch
  (prevents cascading errors when browser is already closed)
- Video polling: refresh History tab when stuck, with progressive escalation
  (tab re-click at 30s, full page reload at 180s)
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 02:27:34 UTC 2026: Code review monitoring started
Tue Feb 10 02:27:34 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 02:27:36 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…oll simultaneously

- Add submitVideoJobOnPage(): submit a video job on an already-open page
- Add pollAndDownloadVideos(): poll History for multiple prompts, download via API
- Pipeline Step 3 now submits all scene videos first, then polls for all at once
- Cuts N-scene video generation from N*4min to ~4min (3-scene test: 252s total)
- Update higgsfield-ui.md with parallel pipeline docs and performance table
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 03:00:34 UTC 2026: Code review monitoring started
Tue Feb 10 03:00:35 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 29

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 29
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 03:00:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…nterception

- Add complete Remotion project (11 files) for animated captions, scene
  transitions, title cards, and multi-scene video assembly
- Fix video download matching with exclusive jobSet claiming and
  character-by-character prefix scoring (min 20 chars)
- Fix API interception in pollAndDownloadVideos: navigate to /create/video
  + click History tab instead of unreliable page.reload()
- Add imagePrompts[] support for separate image vs video prompts
- Fix missing fs imports (symlinkSync/unlinkSync -> copyFileSync)
- Fix Remotion staticFile() usage (copies instead of symlinks)
- Add calculateMetadata for dynamic duration/dimensions from props
- Verified: 3-scene test (14.1s) and 4-scene Notion ad (18.6s) rendered
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 05:10:03 UTC 2026: Code review monitoring started
Tue Feb 10 05:10:04 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 33

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 33
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 05:10:06 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 10, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @remotion/google-fonts is 98.0% likely obfuscated

Confidence: 0.98

Location: Package overview

From: .agents/scripts/higgsfield/remotion/package.jsonnpm/@remotion/google-fonts@4.0.420

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@remotion/google-fonts@4.0.420. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

- Route nano-banana-pro to /nano-banana-pro feature page (has Unlimited switch)
- Route seedream-4.5 to /seedream-4-5 feature page (has Unlimited switch)
- Add Unlimited mode switch detection and toggle in generateImage()
- Add direct API fetch fallback in pollAndDownloadVideos() and
  downloadVideoFromHistory() for when response interception misses
- Verified: NBP generates 2 images in 20s, Seedream 4.5 in 5s, both unlimited
- Verified: video download works with direct fetch fallback
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 05:17:25 UTC 2026: Code review monitoring started
Tue Feb 10 05:17:25 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 33

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 33
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 05:17:28 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…ng, imagePrompts

- Document Remotion post-production pipeline (captions, transitions, title cards)
- Document imagePrompts[] for separate image vs video prompts
- Update model table with correct unlimited routes (/nano-banana-pro, /seedream-4-5)
- Document Unlimited mode switch on feature pages
- Document direct API fetch fallback for video downloads
- Add captions[], transitionStyle, transitionDuration to brief JSON format
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 05:18:44 UTC 2026: Code review monitoring started
Tue Feb 10 05:18:44 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 33

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 33
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 05:18:46 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

… line count

- Fix npm install/require running in wrong directory (cd into HIGGSFIELD_DIR)
- Fix run_automator to cd into HIGGSFIELD_DIR for correct module resolution
- Add explicit return statements to all shell functions (cmd_login, cmd_assets,
  cmd_credits, cmd_screenshot, cmd_download, cmd_status)
- Update architecture diagram line count from ~2000 to ~3400
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Code Quality Report

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

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

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 05:21:06 UTC 2026: Code review monitoring started
Tue Feb 10 05:21:06 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 33

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 33
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 05:21:09 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots

See analysis details on SonarQube Cloud

@marcusquinn marcusquinn deleted the feature/higgsfield-subagent branch February 21, 2026 01:59
@marcusquinn marcusquinn added the code-reviews-actioned All review feedback has been actioned label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-reviews-actioned All review feedback has been actioned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant