fix(cc-config): read .claude.json from the same root the CLI writes it to
getClaudeJsonPath() was the only one of cc-discovery's 20 read paths not derived from getClaudeHome(), so a CLAUDE_HOME install read one file while the CLI wrote another. The default case was fixed by dropping the CLAUDE_CONFIG_DIR pin; this closes the mirrored half. Also replaces the Remove button's display-string comparison with a removable flag from the reader: rewording the source label silently resurrected a button that always fails.
This commit is contained in:
@@ -2651,6 +2651,11 @@ export interface CcMcpServer {
|
||||
name: string;
|
||||
/** Which config file this entry came from (e.g. a `.mcp.json` path). */
|
||||
source: string;
|
||||
/**
|
||||
* False when no `claude mcp` scope can address this entry, so the dashboard
|
||||
* cannot remove it. Absent means removable — only the reader sets it.
|
||||
*/
|
||||
removable?: boolean;
|
||||
/** Transport: local subprocess ("stdio"), remote HTTP, or undetermined. */
|
||||
kind: "stdio" | "http" | "unknown";
|
||||
/** Launch command, for `kind === "stdio"`. */
|
||||
|
||||
@@ -2022,10 +2022,11 @@ function McpCard({
|
||||
}) {
|
||||
const [confirmRemove, setConfirmRemove] = useState(false);
|
||||
const busyId = `${scope}:${server.name}`;
|
||||
// Entries from ~/.claude/settings.json have no CLI scope that addresses
|
||||
// them (`claude mcp remove` only ever touches ~/.claude.json / .mcp.json)
|
||||
// — a Remove button here would look live and never work.
|
||||
const removable = server.source !== "~/.claude/settings.json";
|
||||
// The reader decides this: entries from ~/.claude/settings.json have no CLI
|
||||
// scope that addresses them, so a Remove button would look live and never
|
||||
// work. Reading it off a flag rather than matching `source` keeps a reworded
|
||||
// display string from silently bringing that button back.
|
||||
const removable = server.removable !== false;
|
||||
return (
|
||||
<div className="rounded-lg border border-border bg-surface-2 px-4 py-3">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
|
||||
Reference in New Issue
Block a user