Skip to content

Implement auto-open feature for browser launch on server start #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kawakamidev
Copy link

Motivation and Context

This eliminates the manual step of copying URLs and opening browsers, making the development workflow more efficient.

How Has This Been Tested?

Tested on macOS environments with various browsers (Chrome, Firefox, Safari). Verified that the feature respects user configuration and can be disabled via configuration options.

Breaking Changes

No breaking changes. The feature is enabled by default but can be disabled through configuration.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the [MCP Documentation](https://modelcontextprotocol.io)
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Contributor

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

I tested locally on Mac and it works ok, but a few things:

  • There are conflicts to be resolved as the branch is behind.
  • Yours launches with http://localhost rather than http://127.0.0.1 which we're using instead, to comply with OAuth requirements.
  • Along with new config items comes a form field requirement in the sidebar. We need an affordance to turn this feature off.
Screenshot 2025-04-11 at 4 42 34 PM

@cliffhall cliffhall added enhancement New feature or request waiting on submitter Waiting for the submitter to provide more info labels Apr 11, 2025
@kawakamidev
Copy link
Author

@cliffhall I've commited

@cliffhall
Copy link
Contributor

This is a double negative that made me have to think about its validity for a second. Could it instead be "Enable Browser Auto-open" and default to true?

Screenshot 2025-04-14 at 12 53 41 PM

@kawakamidev kawakamidev force-pushed the auto_open branch 3 times, most recently from 77d4050 to b09e982 Compare April 17, 2025 09:13
@kawakamidev
Copy link
Author

@cliffhall Review please

Copy link
Contributor

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

Hey @moekiorg. Looks good, operates perfectly. Need to do npm run prettier-fix though.

@cliffhall
Copy link
Contributor

cliffhall commented Apr 18, 2025

@cliffhall Review please

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

@cliffhall
Copy link
Contributor

cliffhall commented Apr 30, 2025

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

The problem here is that for this to work, the setting can't just be stored in the browser's local storage, it also has to write back to a locally stored configuration that will be consulted before the app launches next time. That's tough, since we don't currently have such a file and plumbing backwards from the client to write it would be a pain.

Perhaps we should trim this back to the place you originally had it. Just the auto-open, no UI affordance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting on submitter Waiting for the submitter to provide more info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants