Skip to content

fix: correct MCP shared badges and workflow labels - #8209

Merged
wangdan-fit2cloud merged 1 commit into
v3from
pr@v3@fix_mcp_setting
Nov 27, 2026
Merged

wangdan-fit2cloud merged 1 commit into
v3from
pr@v3@fix_mcp_setting

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: correct MCP shared badges and workflow labels

<el-tag v-if="option.scope === TOOL_SCOPE.SHARED" size="small" type="info">{{ t('resource.shared') }}</el-tag>
</div>
</el-option>
</el-select>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The diff is small and generally reasonable, but there are a few things to verify:

  1. Confirm the field rename source → scope is correct

    • The template now checks option.scope === TOOL_SCOPE.SHARED.
    • Make sure every object in mcpOptions actually has a scope property.
    • If the API/type still exposes source, this will silently never show the shared tag, or cause a TypeScript error.
    • Search the codebase for other .source === 'shared' usages and update them consistently if this was a data-model change.
  2. Verify TOOL_SCOPE.SHARED matches the backend value

    • For example, if the enum is defined as SHARED = 'SHARED' but the backend returns 'shared', the condition will fail.
    • Ensure the enum value is exactly the same string as the runtime data.
  3. Check semantic correctness of using TOOL_SCOPE here

    • The option appears to represent an MCP source/setting. If “shared” here is an MCP-source concept, using TOOL_SCOPE may be semantically wrong. Prefer the matching enum such as MCP_SOURCE.SHARED if one exists.
    • If scope is intentionally the shared scope of the tool, then this is fine.
  4. Truncation styling is okay, but layout can be improved

    • min-w-0 truncate on the <span> is correct for allowing truncation inside a flex container.
    • To make truncation more reliable and prevent the tag from shrinking, consider:
    <span class="min-w-0 flex-1 truncate" :title="option.name">{{ option.name }}</span>
    <el-tag class="flex-shrink-0" ...>
    • flex-1 is optional; it makes the text consume available space and pushes the tag to the right. Without it, truncation still works as long as the parent width is constrained.
  5. Minor lint/type checks

    • Ensure TOOL_TYPE is still used in the file; otherwise it becomes an unused import.
    • :title="option.name" is fine, but if option.name can be undefined, the tooltip will simply be empty.

Overall: no obvious syntax problem, but the main risk is the source → scope change and whether TOOL_SCOPE.SHARED matches the actual data/enum.

@wangdan-fit2cloud
wangdan-fit2cloud merged commit eb488f0 into v3 Nov 27, 2026
3 of 4 checks passed
@wangdan-fit2cloud
wangdan-fit2cloud deleted the pr@v3@fix_mcp_setting branch November 27, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants