Skip to content

Commit 1497dbd

Browse files
committed
handle long resource names in UI
1 parent 2e939ba commit 1497dbd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

client/src/components/ResourcesTab.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@ const ResourcesTab = ({
3434
readResource(resource.uri);
3535
}}
3636
renderItem={(resource) => (
37-
<>
38-
<FileText className="w-4 h-4 mr-2 text-gray-500" />
39-
<span className="flex-1">{resource.uri}</span>
40-
<ChevronRight className="w-4 h-4 text-gray-400" />
41-
</>
37+
<div className="flex items-center w-full">
38+
<FileText className="w-4 h-4 mr-2 flex-shrink-0 text-gray-500" />
39+
<span className="flex-1 truncate" title={resource.uri}>
40+
{resource.uri}
41+
</span>
42+
<ChevronRight className="w-4 h-4 flex-shrink-0 text-gray-400" />
43+
</div>
4244
)}
4345
title="Resources"
4446
buttonText="List Resources"
4547
/>
4648

4749
<div className="bg-white rounded-lg shadow">
4850
<div className="p-4 border-b border-gray-200 flex justify-between items-center">
49-
<h3 className="font-semibold">
51+
<h3 className="font-semibold truncate" title={selectedResource?.uri}>
5052
{selectedResource ? selectedResource.uri : "Select a resource"}
5153
</h3>
5254
{selectedResource && (

0 commit comments

Comments
 (0)