Skip to content

fix(fs): list files inside untracked directories in git status#2060

Open
chengluyu wants to merge 1 commit into
mainfrom
fix/git-status-untracked-all
Open

fix(fs): list files inside untracked directories in git status#2060
chengluyu wants to merge 1 commit into
mainfrom
fix/git-status-untracked-all

Conversation

@chengluyu

@chengluyu chengluyu commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Problem

git status --porcelain=v1 defaults to untracked-files=normal, which collapses untracked directories to a single ?? dir/ entry. A new file inside an untracked directory (e.g. docs/new.md) never surfaces in the Changes panel — only the collapsed directory row appears, and the actual file is invisible.

Fix

Pass --untracked-files=all to the status command in GitService.status so entries are reported per file. Ignored paths (node_modules, build output) are unaffected — gitignore still applies.

Tests

  • New regression test: lists files inside untracked directories individually (fails without the flag: entries collapse to newdir/).
  • @moonshot-ai/agent-core-v2: 258 files / 3917 tests pass, typecheck + domain lint OK.

Changeset: patch (@moonshot-ai/agent-core-v2).

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 499d031

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/agent-core-v2 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@499d031
npx https://pkg.pr.new/@moonshot-ai/kimi-code@499d031

commit: 499d031

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61260fd92f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/agent-core-v2/src/app/git/gitService.ts Outdated
@chengluyu
chengluyu force-pushed the fix/git-status-untracked-all branch from 61260fd to fccbaa1 Compare July 22, 2026 11:33
git status --porcelain defaults to untracked-files=normal, which collapses
untracked directories to their directory entry — a new file inside an
untracked dir (e.g. docs/new.md) never surfaced in the Changes panel.
Pass --untracked-files=all so entries are reported per file.
@chengluyu
chengluyu force-pushed the fix/git-status-untracked-all branch from fccbaa1 to 499d031 Compare July 22, 2026 12:20
@chengluyu

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 499d031fe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +5 to +7
* the local disk; status passes `--untracked-files=all` so files inside
* untracked directories surface individually instead of collapsing into the
* directory entry. Process spawning goes through the App-scope

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Remove implementation flag detail from header

This new header clause documents the exact git status flag used rather than the module's external role/responsibility, so it violates the v2 comment convention and can drift the next time status spawning changes. Please keep the observable behavior covered by the test/code and avoid naming the implementation flag in the module header.

AGENTS.md reference: packages/agent-core-v2/AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant