Skip to content

Commit 60ffece

Browse files
committed
Revert UI for MCP_AUTO_OPEN_ENABLED option
1 parent 42e6f0a commit 60ffece

File tree

4 files changed

+4
-53
lines changed

4 files changed

+4
-53
lines changed

client/src/components/Sidebar.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ const Sidebar = ({
405405
/>
406406
) : typeof configItem.value === "boolean" ? (
407407
<Select
408+
data-testid={`${configKey}-select`}
408409
value={configItem.value.toString()}
409410
onValueChange={(val) => {
410411
const newConfig = { ...config };
@@ -415,25 +416,12 @@ const Sidebar = ({
415416
setConfig(newConfig);
416417
}}
417418
>
418-
<SelectTrigger
419-
id={`${configKey}-input`}
420-
data-testid={`${configKey}-input`}
421-
>
419+
<SelectTrigger id={`${configKey}-input`}>
422420
<SelectValue />
423421
</SelectTrigger>
424422
<SelectContent>
425-
<SelectItem
426-
data-testid={`${configKey}-input-true`}
427-
value="true"
428-
>
429-
True
430-
</SelectItem>
431-
<SelectItem
432-
data-testid={`${configKey}-input-false`}
433-
value="false"
434-
>
435-
False
436-
</SelectItem>
423+
<SelectItem value="true">True</SelectItem>
424+
<SelectItem value="false">False</SelectItem>
437425
</SelectContent>
438426
</Select>
439427
) : (

client/src/components/__tests__/Sidebar.test.tsx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -576,33 +576,6 @@ describe("Sidebar Environment Variables", () => {
576576
);
577577
});
578578

579-
it("should update auto browser open disabled", () => {
580-
const setConfig = jest.fn();
581-
renderSidebar({ config: DEFAULT_INSPECTOR_CONFIG, setConfig });
582-
583-
openConfigSection();
584-
585-
const autoOpenDisabledInput = screen.getByTestId(
586-
"MCP_AUTO_OPEN_ENABLED-input",
587-
);
588-
fireEvent.click(autoOpenDisabledInput);
589-
const falseOption = screen.getByTestId(
590-
"MCP_AUTO_OPEN_ENABLED-input-false",
591-
);
592-
fireEvent.click(falseOption);
593-
594-
expect(setConfig).toHaveBeenCalledWith(
595-
expect.objectContaining({
596-
MCP_AUTO_OPEN_ENABLED: {
597-
label: "Auto Browser Open Enabled",
598-
description:
599-
"Enable automatic browser opening when inspector starts",
600-
value: false,
601-
},
602-
}),
603-
);
604-
});
605-
606579
it("should maintain configuration state after multiple updates", () => {
607580
const setConfig = jest.fn();
608581
const { rerender } = renderSidebar({

client/src/lib/configurationTypes.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,4 @@ export type InspectorConfig = {
3333
* The full address of the MCP Proxy Server, in case it is running on a non-default address. Example: http://10.1.1.22:5577
3434
*/
3535
MCP_PROXY_FULL_ADDRESS: ConfigItem;
36-
37-
/**
38-
* Disable automatic browser opening when inspector starts.
39-
*/
40-
MCP_AUTO_OPEN_ENABLED: ConfigItem;
4136
};

client/src/lib/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,4 @@ export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
5252
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
5353
value: "",
5454
},
55-
MCP_AUTO_OPEN_ENABLED: {
56-
label: "Auto Browser Open Enabled",
57-
description: "Enable automatic browser opening when inspector starts",
58-
value: true,
59-
},
6055
} as const;

0 commit comments

Comments
 (0)