Skip to content

Commit 9c6663c

Browse files
add label to configItem, use that in UI
1 parent cf20fe9 commit 9c6663c

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

client/src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ const App = () => {
105105
Object.entries(mergedConfig).forEach(([key, value]) => {
106106
mergedConfig[key as keyof InspectorConfig] = {
107107
...value,
108-
description:
109-
DEFAULT_INSPECTOR_CONFIG[key as keyof InspectorConfig].description,
108+
label: DEFAULT_INSPECTOR_CONFIG[key as keyof InspectorConfig].label,
110109
};
111110
});
112111

client/src/components/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ const Sidebar = ({
326326
<div key={key} className="space-y-2">
327327
<div className="flex items-center gap-1">
328328
<label className="text-sm font-medium text-green-600 break-all">
329-
{configItem.description}
329+
{configItem.label}
330330
</label>
331331
<Tooltip>
332332
<TooltipTrigger asChild>

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ describe("Sidebar Environment Variables", () => {
343343
expect(setConfig).toHaveBeenCalledWith(
344344
expect.objectContaining({
345345
MCP_SERVER_REQUEST_TIMEOUT: {
346-
description: "Request Timeout",
346+
label: "Request Timeout",
347+
description: "Timeout for requests to the MCP server (ms)",
347348
value: 5000,
348349
},
349350
}),
@@ -366,7 +367,9 @@ describe("Sidebar Environment Variables", () => {
366367
expect(setConfig).toHaveBeenCalledWith(
367368
expect.objectContaining({
368369
MCP_PROXY_FULL_ADDRESS: {
369-
description: "Inspector Proxy Address",
370+
label: "Inspector Proxy Address",
371+
description:
372+
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
370373
value: "http://localhost:8080",
371374
},
372375
}),
@@ -389,7 +392,9 @@ describe("Sidebar Environment Variables", () => {
389392
expect(setConfig).toHaveBeenCalledWith(
390393
expect.objectContaining({
391394
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
392-
description: "Maximum Total Timeout",
395+
label: "Maximum Total Timeout",
396+
description:
397+
"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",
393398
value: 10000,
394399
},
395400
}),
@@ -410,7 +415,8 @@ describe("Sidebar Environment Variables", () => {
410415
expect(setConfig).toHaveBeenCalledWith(
411416
expect.objectContaining({
412417
MCP_SERVER_REQUEST_TIMEOUT: {
413-
description: "Request Timeout",
418+
label: "Request Timeout",
419+
description: "Timeout for requests to the MCP server (ms)",
414420
value: 0,
415421
},
416422
}),
@@ -455,7 +461,8 @@ describe("Sidebar Environment Variables", () => {
455461
expect(setConfig).toHaveBeenLastCalledWith(
456462
expect.objectContaining({
457463
MCP_SERVER_REQUEST_TIMEOUT: {
458-
description: "Request Timeout",
464+
label: "Request Timeout",
465+
description: "Timeout for requests to the MCP server (ms)",
459466
value: 3000,
460467
},
461468
}),

client/src/lib/configurationTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export type ConfigItem = {
2+
label: string;
23
description: string;
34
value: string | number | boolean;
45
};

client/src/lib/constants.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,25 @@ export const DEFAULT_MCP_PROXY_LISTEN_PORT = "6277";
2222
**/
2323
export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
2424
MCP_SERVER_REQUEST_TIMEOUT: {
25-
description: "Request Timeout",
25+
label: "Request Timeout",
26+
description: "Timeout for requests to the MCP server (ms)",
2627
value: 10000,
2728
},
2829
MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS: {
29-
description: "Reset Timeout on Progress",
30+
label: "Reset Timeout on Progress",
31+
description: "Reset timeout on progress notifications",
3032
value: true,
3133
},
3234
MCP_REQUEST_MAX_TOTAL_TIMEOUT: {
33-
description: "Maximum Total Timeout",
35+
label: "Maximum Total Timeout",
36+
description:
37+
"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",
3438
value: 60000,
3539
},
3640
MCP_PROXY_FULL_ADDRESS: {
37-
description: "Inspector Proxy Address",
41+
label: "Inspector Proxy Address",
42+
description:
43+
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
3844
value: "",
3945
},
4046
} as const;

0 commit comments

Comments
 (0)