Revert UI for MCP_AUTO_OPEN_ENABLED option

This commit is contained in:
KAWAKAMI Moeki
2025-05-04 19:50:05 +09:00
parent 42e6f0afe1
commit 60ffece84b
4 changed files with 4 additions and 53 deletions

View File

@@ -405,6 +405,7 @@ const Sidebar = ({
/>
) : typeof configItem.value === "boolean" ? (
<Select
data-testid={`${configKey}-select`}
value={configItem.value.toString()}
onValueChange={(val) => {
const newConfig = { ...config };
@@ -415,25 +416,12 @@ const Sidebar = ({
setConfig(newConfig);
}}
>
<SelectTrigger
id={`${configKey}-input`}
data-testid={`${configKey}-input`}
>
<SelectTrigger id={`${configKey}-input`}>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem
data-testid={`${configKey}-input-true`}
value="true"
>
True
</SelectItem>
<SelectItem
data-testid={`${configKey}-input-false`}
value="false"
>
False
</SelectItem>
<SelectItem value="true">True</SelectItem>
<SelectItem value="false">False</SelectItem>
</SelectContent>
</Select>
) : (

View File

@@ -576,33 +576,6 @@ describe("Sidebar Environment Variables", () => {
);
});
it("should update auto browser open disabled", () => {
const setConfig = jest.fn();
renderSidebar({ config: DEFAULT_INSPECTOR_CONFIG, setConfig });
openConfigSection();
const autoOpenDisabledInput = screen.getByTestId(
"MCP_AUTO_OPEN_ENABLED-input",
);
fireEvent.click(autoOpenDisabledInput);
const falseOption = screen.getByTestId(
"MCP_AUTO_OPEN_ENABLED-input-false",
);
fireEvent.click(falseOption);
expect(setConfig).toHaveBeenCalledWith(
expect.objectContaining({
MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Enabled",
description:
"Enable automatic browser opening when inspector starts",
value: false,
},
}),
);
});
it("should maintain configuration state after multiple updates", () => {
const setConfig = jest.fn();
const { rerender } = renderSidebar({

View File

@@ -33,9 +33,4 @@ export type InspectorConfig = {
* 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
*/
MCP_PROXY_FULL_ADDRESS: ConfigItem;
/**
* Disable automatic browser opening when inspector starts.
*/
MCP_AUTO_OPEN_ENABLED: ConfigItem;
};

View File

@@ -52,9 +52,4 @@ export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
value: "",
},
MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Enabled",
description: "Enable automatic browser opening when inspector starts",
value: true,
},
} as const;