Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function FileItem({
return (
<div
className={cn(
"group w-full flex items-stretch gap-1.5 px-2 text-left rounded-sm",
"group w-full flex items-stretch gap-1.5 px-1 text-left rounded-sm",
"hover:bg-accent/50 cursor-pointer transition-colors overflow-hidden",
isSelected && "bg-accent",
)}
Expand All @@ -75,24 +75,25 @@ export function FileItem({
<span className={cn("shrink-0 flex items-center", statusBadgeColor)}>
{statusIndicator}
</span>
<span className="flex-1 min-w-0 text-xs text-start truncate overflow-hidden text-ellipsis">
{fileName}
<span className="flex-1 min-w-0 flex items-center gap-1">
<span className="max-w-[130px] xl:max-w-[150px] text-xs text-start truncate overflow-hidden text-ellipsis">
{fileName}
</span>
Comment on lines +79 to +81

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add tooltip to show full filename on truncation.

The filename is constrained to 130px (150px on xl) and will truncate with ellipsis, but there's no way for users to see the full path. This creates an accessibility and usability gap—users cannot identify files with long names.

Consider wrapping the filename span in a Tooltip component (already imported):

 <span className="flex-1 min-w-0 flex items-center gap-1">
+  <Tooltip>
+    <TooltipTrigger asChild>
       <span className="max-w-[130px] xl:max-w-[150px] text-xs text-start truncate overflow-hidden text-ellipsis">
         {fileName}
       </span>
+    </TooltipTrigger>
+    <TooltipContent side="right">{file.path}</TooltipContent>
+  </Tooltip>
   {showStatsDisplay && (
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<span className="max-w-[130px] xl:max-w-[150px] text-xs text-start truncate overflow-hidden text-ellipsis">
{fileName}
</span>
<span className="flex-1 min-w-0 flex items-center gap-1">
<Tooltip>
<TooltipTrigger asChild>
<span className="max-w-[130px] xl:max-w-[150px] text-xs text-start truncate overflow-hidden text-ellipsis">
{fileName}
</span>
</TooltipTrigger>
<TooltipContent side="right">{file.path}</TooltipContent>
</Tooltip>
{showStatsDisplay && (
🤖 Prompt for AI Agents
In
apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/ChangesView/components/FileItem/FileItem.tsx
around lines 79-81, the truncated filename span lacks a way to reveal the full
name; wrap that span inside the already-imported Tooltip component, pass the
full fileName (or full path) as the tooltip content/label, preserve the existing
span classes and text rendering, and add an accessible attribute (e.g.,
aria-label or title) on the span as a fallback so users can see the complete
filename when it’s truncated.

{showStatsDisplay && (
<span className="flex items-center gap-0.5 text-xs font-mono shrink-0 whitespace-nowrap">
{file.additions > 0 && (
<span className="text-green-600 dark:text-green-400">
+{file.additions}
</span>
)}
{file.deletions > 0 && (
<span className="text-red-600 dark:text-red-400">
-{file.deletions}
</span>
)}
</span>
)}
</span>

{showStatsDisplay && (
<div className="flex items-center gap-0.5 text-xs font-mono shrink-0 whitespace-nowrap">
{file.additions > 0 && (
<span className="text-green-600 dark:text-green-400">
+{file.additions}
</span>
)}
{file.deletions > 0 && (
<span className="text-red-600 dark:text-red-400">
-{file.deletions}
</span>
)}
</div>
)}
</button>

{hasAction && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function Sidebar() {
const modes: SidebarMode[] = [SidebarMode.Tabs, SidebarMode.Changes];

return (
<aside className="h-full flex flex-col overflow-hidden">
<aside className="h-full flex flex-col overflow-hidden max-w-[320px]">
<ModeCarousel
modes={modes}
currentMode={currentMode}
Expand Down