Auto-generated PR for: smaller-highlights-with-screensize
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Make element highlight labels scale with screen size so they stay
smaller on large screenshots and more consistent across devices. Font
size and padding now derive from image width, with min/max bounds; the
drawing function also accepts device_pixel_ratio for future CSS-pixel
scaling.
- **New Features**
- Added device_pixel_ratio to draw_enhanced_bounding_box_with_text and
passed it through from process_element_highlight.
- Scaled index label font size to ~1% of viewport width, clamped between
10–20px.
- Scaled label padding based on width, clamped between 4–10px.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for branch: new-tab-info
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Detect and report when a click opens a new tab, and make element
highlights clearer and on by default to improve navigation and
screenshot readability.
- **New Features**
- Click results now include new_tab_opened; memory logs reflect it.
while_holding_ctrl is optional and still opens in a background tab.
- Highlights are enabled by default; index labels use fixed sizing,
top-center placement, and show the index when text length < 3. Docs
updated.
- Optional screenshot saving via BROWSER_USE_SCREENSHOT_FILE with async
write; ignore screenshot.png in git.
- Faster new-tab detection with reduced watchdog wait (0.25s) and
automatic tab switch preserved.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for branch: smaller-highlights
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Make highlight index boxes a fixed, smaller size across viewports and
add an opt-in, async screenshot save path.
- New Features
- Save highlighted screenshot when BROWSER_USE_SCREENSHOT_FILE is set;
file write runs off-thread.
- Refactors
- Fixed font size (20) and padding (10) for index overlays for a
consistent look.
- Add *.png to .gitignore and update example task text.
<!-- End of auto-generated description by cubic. -->
- Reduced sleep duration in the watchdog from 0.5s to 0.25s for efficiency.
- Added logic to track if a new tab was opened and included this information in the returned click metadata.
- Updated ClickElementAction to handle optional Ctrl key behavior and reflect new tab opening in memory logging.
- Revised system prompt descriptions to clarify the provision of screenshots and bounding boxes for interactive elements.
- Enhanced bounding box positioning logic in `python_highlights.py` to improve visibility and avoid content blocking.
- Updated screenshot logging to reflect dynamic filename usage.
- Updated .gitignore to exclude PNG files.
- Refactored the screenshot saving logic in `python_highlights.py` to use an environment variable for the filename and added async file writing for improved performance.
- Adjusted font size and padding to fixed values for consistent appearance across different screen sizes.
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Disable element highlights by default to reduce visual noise and make
the UI cleaner. Updated BrowserProfile.highlight_elements default to
False and synced the docs.
- **Migration**
- If you relied on highlights, explicitly set highlight_elements=True in
BrowserProfile or your config.
- No other changes required.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for branch: remove-efficiency-rules
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Streamlined efficiency guidelines and action docs to make multi‑action
steps safer and clearer. Fixed URL detection by stripping emails before
matching, and improved scroll guidance to prefer larger jumps and omit
index for full‑page scrolling.
- **Bug Fixes**
- Remove emails from task text before URL matching to prevent false
positives.
- **Refactors**
- Simplified efficiency_guidelines in all prompts; added clear do/don’t
for chaining and updated recommended combos (including scroll +
extract).
- Clarified click_element_by_index and input_text descriptions to only
allow indices from the current browser_state.
- Updated scroll action docs to favor high num_pages (e.g., 10) and to
omit index when scrolling the entire page.
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Improves the extract_structured_data tool to return cleaner, more
accurate results by normalizing page markdown, enforcing input limits,
and using a clearer system+user prompt. This makes extractions more
consistent and reduces noisy or invented outputs.
- **Refactors**
- Normalizes markdown: removes artifacts, demarkdowns inline links,
compresses excessive newlines, and trims whitespace.
- Enforces size limits: truncates content at MAX_CHAR_LIMIT and
annotates when truncated.
- Uses structured prompting: sends SystemMessage + UserMessage with
strict rules (page-only facts, list all items, non-conversational
output, note if data is missing).
- Clarifies tool usage: updated action description to discourage using
it for interactive elements and to gate link extraction via
extract_links.
- Simplifies memory handling: only stores small results
(MAX_MEMORY_LENGTH).
<!-- End of auto-generated description by cubic. -->
Minor documentation changes for consistency according to issue :
https://github.com/browser-use/browser-use/issues/2810 @sauravpanda
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Standardized the max_steps description across the server schema and docs
with consistent wording and punctuation. Cleaned up the real-browser
guide by merging duplicate notes and clarifying that we use DuckDuckGo
because Google blocks this approach.
<!-- End of auto-generated description by cubic. -->
fixes os related font error at gif creation
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes GIF creation crashes on some OSes by adding a safe fallback when
loading fonts. If loading a TrueType font fails, we now use the existing
regular font.
- **Bug Fixes**
- Catch OSError/AttributeError from ImageFont.truetype and fall back to
regular_font.
- Prevents failures when regular_font has no .path or the font cannot be
loaded.
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Introduce BrowserError with short- and long-term memory to carry
structured context from browser events to the LLM, replacing brittle
string parsing. Improves guidance after failures (clicks, dropdowns,
uploads) and makes errors more actionable.
- **New Features**
- Added BrowserError with short_term_memory (one-shot guidance) and
long_term_memory (persistent context).
- Dropdown actions return structured memory; on selection failure,
return available options for the LLM to choose from.
- Tools map BrowserError to ActionResult via handle_browser_error,
setting include_extracted_content_only_once when needed.
- **Refactors**
- Replaced <llm_error_msg>-based parsing with structured errors across
click, input, upload, navigation, tabs, scroll, and send keys.
- Standardized error messages and improved timeout handling; registry
now surfaces TimeoutError as a clear RuntimeError.
- Safer file upload validation; common invalid path and missing element
cases return ActionResult instead of crashing.
- Removed automatic get_dropdown_options during click failures to avoid
hidden side effects.
- Updated dependency: bubus >= 1.5.6.
<!-- End of auto-generated description by cubic. -->