show individual untracked files in git changes widget (#8574)

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
This commit is contained in:
morgmart
2026-04-15 17:57:58 -07:00
committed by GitHub
parent d627a6556f
commit 19ce336a36
2 changed files with 6 additions and 3 deletions
@@ -20,7 +20,10 @@ pub fn get_changed_files(path: String) -> Result<Vec<ChangedFile>, String> {
return Ok(Vec::new());
}
let status_output = run_git_success(&repo_path, &["status", "--porcelain"])?;
let status_output = run_git_success(
&repo_path,
&["status", "--porcelain", "--untracked-files=all"],
)?;
if status_output.trim().is_empty() {
return Ok(Vec::new());
}
@@ -11,12 +11,12 @@ interface WidgetProps {
export function Widget({ title, icon, action, flush, children }: WidgetProps) {
return (
<div className="overflow-hidden rounded-md border border-border">
<div className="flex h-8 items-center justify-between bg-background-alt px-3">
<div className="flex h-8 items-center justify-between gap-2 bg-background-alt px-3">
<div className="flex min-w-0 items-center gap-2 text-xs font-medium text-foreground">
{icon}
{title}
</div>
{action}
{action && <div className="shrink-0">{action}</div>}
</div>
{flush ? (
children