Skip to content

Refactor webui.py to remove main function and add dependencies#717

Open
lucasviera9991-dev wants to merge 1 commit intobrowser-use:mainfrom
lucasviera9991-dev:patch-1
Open

Refactor webui.py to remove main function and add dependencies#717
lucasviera9991-dev wants to merge 1 commit intobrowser-use:mainfrom
lucasviera9991-dev:patch-1

Conversation

@lucasviera9991-dev
Copy link

@lucasviera9991-dev lucasviera9991-dev commented Feb 15, 2026

Removed main function and related argument parsing for the Gradio WebUI. Added installation instructions for required packages.


Summary by cubic

Removed the Gradio WebUI entrypoint and CLI flags, replacing webui.py with install instructions for required packages. This removes runtime options (ip, port, theme) and focuses the file on setup.

  • Refactors

    • Deleted main() and argparse-based CLI (ip, port, theme).
    • Removed Gradio launch code (create_ui, queue().launch).
  • Dependencies

    • Added install steps for: browser-use, Playwright (chromium --with-deps), python-dotenv, gradio, lxml[html_clean].

Written for commit 3c67af0. Summary will update on new commits.

Removed main function and related argument parsing for the Gradio WebUI. Added installation instructions for required packages.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="webui.py">

<violation number="1" location="webui.py:2">
P1: webui.py is now raw shell commands, not valid Python, so importing/executing it will raise a SyntaxError and break the WebUI entry point.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

import argparse
from src.webui.interface import theme_map, create_ui
# Instalar o browser-use
pip install browser-use
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 15, 2026

Choose a reason for hiding this comment

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

P1: webui.py is now raw shell commands, not valid Python, so importing/executing it will raise a SyntaxError and break the WebUI entry point.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At webui.py, line 2:

<comment>webui.py is now raw shell commands, not valid Python, so importing/executing it will raise a SyntaxError and break the WebUI entry point.</comment>

<file context>
@@ -1,19 +1,8 @@
-import argparse
-from src.webui.interface import theme_map, create_ui
+# Instalar o browser-use
+pip install browser-use
 
+# Instalar o Playwright (o "navegador controlado")
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants