Skip to content

Configure OpenCode browser-harness to default to existing ULAA browser session with active visible tab #166

Description

@DiazOlveraCo

Summary

Configure the OpenCode browser-harness skill to strictly connect to the user's existing running ULAA browser (CDP at http://localhost:9222) and by default attach to/activate the currently active visible tab — matching BrowserCode's default behavior.

Current Behavior

  • browser-harness requires explicit BU_CDP_URL=http://localhost:9222 env var
  • new_tab() creates background tabs that aren't visually activated
  • switch_tab() attaches CDP but doesn't call Target.activateTarget by default
  • User must manually call activate_tab() to see actions

Desired Behavior (matching bcode)

  • Default to existing ULAA browser on port 9222 (no env var needed)
  • Automatically attach to current_tab() (the active visible tab)
  • Automatically call Target.activateTarget so actions are visible
  • new_tab() should activate the new tab by default
  • Zero-config: works out of the box with running ULAA

Technical Approach

  1. Modify ~/.config/opencode/skills/browser-harness/tool.py to inject BU_CDP_URL=http://localhost:9222 by default
  2. Update skill to auto-attach to active tab on first command
  3. Make activate_tab() the default for navigation actions
  4. Test end-to-end on running ULAA instance

Acceptance Criteria

  • No export BU_CDP_URL needed - works automatically
  • First command attaches to currently active ULAA tab
  • Navigation (goto_url) happens in the visible tab
  • Click/type actions are visibly performed in ULAA
  • new_tab() creates and activates a new visible tab

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions