/diff: stage untracked files from inside the diff view

Resolved 💬 1 comment Opened May 19, 2026 by 0xnfrith Closed Jun 18, 2026

Feature request

When /diff lists an untracked file/directory, it shows:

New file not yet staged. Run git add <path> to see line counts.

The instruction is correct but the friction is real — to see what's actually in the file, I have to leave the /diff UI, run git add in a separate shell, then re-open /diff. For a review-and-stage flow this is several extra steps per untracked path.

Request

Add an inline action (key binding + visible footer hint) to run git add <path> on the highlighted untracked entry without leaving the view. After staging, /diff should re-render with the now-visible line counts.

Bonus (not blocking)

  • git add -p style hunk staging from inside the diff.
  • Unstage action for already-staged paths.

Repro

  1. Create a new untracked file/directory in the repo.
  2. Run /diff.
  3. See the "New file not yet staged" message (see screenshot).
  4. Currently: must drop to a shell to stage, then re-run /diff.

<img width="2000" height="549" alt="Image" src="https://github.com/user-attachments/assets/7ff7dc1e-b24a-411c-8c3b-c5e95e665b87" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗