Skip to content

Conversation

@yama
Copy link
Member

@yama yama commented Jan 22, 2026

Motivation

  • MCPUK の File Browser で左上のリソース種別を切り替えてもフォルダーツリーの最上位ラベルが常に Images のまま表示されていたため、選択中のリソース種別に応じて正しいラベルを表示するようにするための修正です。

Description

  • manager/media/browser/mcpuk/frmfolders.htmlRender 処理でルートラベルをハードコードの 'images' から getResourceTypeLabel(oConnector.ResourceType) に置き換え、getResourceTypeLabel ヘルパーを追加して files/media/images に対応する表示名を返すようにしました。

Testing

  • 自動化されたテストは実行しておらず、該当変更に対する自動テストはありません。

Codex Task

Copilot AI review requested due to automatic review settings January 22, 2026 10:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the MCPUK File Browser where the root folder label in the tree view always displayed "Images" regardless of which resource type was selected from the dropdown menu. The fix adds a helper function to dynamically determine the correct label based on the active resource type.

Changes:

  • Added getResourceTypeLabel function to map resource type values ('files', 'media', 'images') to their display labels
  • Updated the root node creation to use the dynamic label instead of the hardcoded 'images' value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants