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
14 changes: 7 additions & 7 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,11 +1295,7 @@ pub struct GitStatus {
#[tauri::command]
fn fetch_git_status(file_path: String) -> Option<GitStatus> {
let path = Path::new(&file_path);
let current_dir = if path.is_file() {
path.parent()?
} else {
path
};
let current_dir = if path.is_file() { path.parent()? } else { path };

let mut repo_root = None;
for curr in current_dir.ancestors() {
Expand All @@ -1323,7 +1319,9 @@ fn fetch_git_status(file_path: String) -> Option<GitStatus> {
return None;
}

let mut branch_name = String::from_utf8_lossy(&branch_output.stdout).trim().to_string();
let mut branch_name = String::from_utf8_lossy(&branch_output.stdout)
.trim()
.to_string();

if branch_name == "HEAD" {
// detached HEAD, get short hash
Expand All @@ -1335,7 +1333,9 @@ fn fetch_git_status(file_path: String) -> Option<GitStatus> {
.output()
.ok()?;
if hash_output.status.success() {
let short_hash = String::from_utf8_lossy(&hash_output.stdout).trim().to_string();
let short_hash = String::from_utf8_lossy(&hash_output.stdout)
.trim()
.to_string();
branch_name = format!("detached: {}", short_hash);
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/components/file-list/FileList.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@
display: flex;
align-items: center;
gap: var(--space-sm);
min-width: 0;
}

.file-list-title {
font-size: var(--font-size-md);
font-weight: var(--font-weight-semibold);
color: var(--color-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}

.file-list-count {
Expand All @@ -46,6 +51,7 @@
background: var(--color-surface-elevated);
padding: 2px 8px;
border-radius: var(--radius-pill);
flex-shrink: 0;
}

.file-list-sort {
Expand All @@ -61,6 +67,7 @@
background: none;
border: none;
font-family: var(--font-ui);
flex-shrink: 0;
}

.file-list-sort:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/components/file-list/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const FileList: React.FC<FileListProps> = React.memo(({
{/* Header */}
<div className="file-list-header">
<div className="file-list-header-left">
<span className="file-list-title">{title}</span>
<span className="file-list-title" title={title}>{title}</span>
<span className="file-list-count">{files.length}</span>
</div>
<div className="file-list-sort-container">
Expand Down
2 changes: 2 additions & 0 deletions src/components/sidebar/Sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}

.sidebar-item-count {
Expand Down Expand Up @@ -283,6 +284,7 @@
overflow: hidden;
text-overflow: ellipsis;
font-weight: var(--font-weight-medium);
min-width: 0;
}

.workspace-item-chevron {
Expand Down
4 changes: 2 additions & 2 deletions src/components/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const SmartViewItem: React.FC<SmartViewItemProps> = ({
onClick={onClick}
>
<span className="sidebar-item-icon">{icon}</span>
<span className="sidebar-item-label">{label}</span>
<span className="sidebar-item-label" title={label}>{label}</span>
<span className="sidebar-item-count">{count}</span>
</div>
);
Expand Down Expand Up @@ -179,7 +179,7 @@ const WorkspaceItem: React.FC<WorkspaceItemProps> = ({
<span className="workspace-item-icon">
{getWorkspaceIcon(detectedIcon)}
</span>
<span className="workspace-item-name">{name}</span>
<span className="workspace-item-name" title={name}>{name}</span>
<span className="workspace-item-chevron">
<ChevronRightIcon size={12} />
</span>
Expand Down
Loading