Skip to content

ux: surface a '+200…' indicator when untracked-file count hits the iteration cap #563

@Axelj00

Description

@Axelj00

Problem

`compute_diff_stats` in `src-tauri/src/git_info.rs:277` enforces `MAX_UNTRACKED_FILES = 200` so a misconfigured repo (fresh `node_modules`, `dist/` not gitignored, large generated asset directory) can't pin a Tauri worker by making the badge sum thousands of files.

The cap is silent — the badge just reports the count for the first 200 untracked files. A user with 5,000 untracked files in a borked checkout sees "+12k" instead of "+300k" without any indication that the number is truncated.

Fix

Bubble a `untracked_truncated: bool` flag back from `compute_diff_stats` to `GitStatus`. Frontend (`src/pane.ts` footer render) appends a "…" or "+" suffix when truthy:

```
+12k+ (instead of +12k)
```

Matches htop / Activity Monitor convention for "more than this fits".

Why this matters

The cap exists for safety, but silently truncating UX signal is the kind of small lie that erodes trust in the rest of the badge over time. "This number is probably wrong" is more useful than a wrong number.

Files

  • `src-tauri/src/git_info.rs:277-345` (compute_diff_stats — return truncated flag)
  • `src-tauri/src/git_info.rs:80` (GitStatus struct — new field)
  • `src/tab-state.ts` (GitStatusInfo interface)
  • `src/pane.ts` (footer badge render)

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowuxUser experience and interaction quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions