Skip to content

refactor: decouple browser identifiers, add --browser-mode CLI flag#26249

Merged
noanflaherty merged 2 commits into
mainfrom
do/browser-cli-review-feedback
Apr 17, 2026
Merged

refactor: decouple browser identifiers, add --browser-mode CLI flag#26249
noanflaherty merged 2 commits into
mainfrom
do/browser-cli-review-feedback

Conversation

@noanflaherty
Copy link
Copy Markdown
Contributor

@noanflaherty noanflaherty commented Apr 17, 2026

Summary

  • Extracts BROWSER_TOOL_NAMES and bidirectional name-mapping helpers into a lightweight browser/identifiers.ts module that only depends on browser/types.ts. Policy and classification modules (permissions/defaults, workspace-policy, tools/side-effects) now import from there instead of browser/operations.ts, avoiding eager import of the browser execution stack in non-browser codepaths.
  • Adds a shared --browser-mode <mode> option (with auto | extension | cdp-inspect | local enum validation) at the assistant browser command level, passing it through as browser_mode in the IPC input. This restores parity with existing browser_* tools that support backend pinning for debugging/recovery.
  • browser/operations.ts re-exports the identifier symbols for backwards compatibility with callers that haven't migrated.

Original prompt

address the feedback left in #26235 (comment)


Open with Devin

…de CLI flag

- Extract BROWSER_TOOL_NAMES and name-mapping helpers into a lightweight
  browser/identifiers.ts module so policy/classification consumers
  (permissions/defaults, workspace-policy, side-effects) no longer pull
  in the browser execution stack at import time.

- Add shared --browser-mode <mode> option to the `assistant browser`
  command with enum validation (auto, extension, cdp-inspect, local),
  restoring parity with existing browser_* tool capabilities.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

The backend's normalizeBrowserMode already accepts these compatibility
aliases. Restricting the CLI to canonical values only would break parity
for scripts migrating from tool-level browser_mode inputs.
@noanflaherty
Copy link
Copy Markdown
Contributor Author

@codex review 875dd6f

@noanflaherty
Copy link
Copy Markdown
Contributor Author

@devin review 875dd6f

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

1 similar comment
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@noanflaherty noanflaherty merged commit 02709a3 into main Apr 17, 2026
12 checks passed
@noanflaherty noanflaherty deleted the do/browser-cli-review-feedback branch April 17, 2026 23:12
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.

1 participant