Skip to content

fix(init): truncate uncommitted file list to first 5 entries#381

Merged
MathurAditya724 merged 1 commit intomainfrom
fix/quick-git-fix
Mar 10, 2026
Merged

fix(init): truncate uncommitted file list to first 5 entries#381
MathurAditya724 merged 1 commit intomainfrom
fix/quick-git-fix

Conversation

@MathurAditya724
Copy link
Member

Summary

  • Truncates the uncommitted/untracked file list in the init git safety check to show only the first 5 files
  • Appends a summary line (e.g. + 12 more uncommitted files) when there are more than 5
  • Prevents terminal flooding in repos with many dirty files while still communicating the situation clearly

Changes

src/lib/init/git.ts — In checkGitStatus, instead of joining all files into the warning message, slice to MAX_DISPLAYED_FILES (5) and append a remainder count if truncated. Both the --yes auto-proceed and interactive prompt paths benefit from this.

When a git working tree has many uncommitted files, the full list
can flood the terminal. Show only the first 5 files and append a
summary line (e.g. '+ 12 more uncommitted files') for the rest.
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Init

  • Add git safety checks before wizard modifies files by betegon in #379
  • Add experimental warning before wizard runs by betegon in #378
  • Add init command for guided Sentry project setup by betegon in #283

Other

  • (issue-list) Redesign table to match Sentry web UI by BYK in #372
  • Return-based output with OutputConfig on buildCommand by BYK in #380
  • Add --fields flag for context-window-friendly JSON output by BYK in #373
  • Magic @ selectors (@latest, @most_frequent) for issue commands by BYK in #371
  • Input hardening against agent hallucinations by BYK in #370
  • Add response caching for read-only API calls by BYK in #330

Bug Fixes 🐛

  • (docs) Remove double borders and fix column alignment on landing page tables by betegon in #369
  • (init) Truncate uncommitted file list to first 5 entries by MathurAditya724 in #381
  • Add trace ID validation to trace view + UUID dash-stripping by BYK in #375

Internal Changes 🔧

Init

  • Remove --force flag by betegon in #377
  • Remove dead determine-pm step label by betegon in #374

Other

  • Converge Tier 1 commands to writeOutput helper by BYK in #376

🤖 This preview updates automatically when you update the PR.

@MathurAditya724 MathurAditya724 requested a review from betegon March 10, 2026 16:45
@github-actions
Copy link
Contributor

Codecov Results 📊

104 passed | Total: 104 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 899 uncovered lines.
✅ Project coverage is 95.48%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.48%    95.48%        —%
==========================================
  Files          142       142         —
  Lines        19893     19898        +5
  Branches         0         0         —
==========================================
+ Hits         18994     18999        +5
- Misses         899       899         —
- Partials         0         0         —

Generated by Codecov Action

@MathurAditya724 MathurAditya724 requested a review from BYK March 10, 2026 17:02
@MathurAditya724 MathurAditya724 enabled auto-merge (squash) March 10, 2026 17:03
@MathurAditya724 MathurAditya724 merged commit a908c17 into main Mar 10, 2026
17 checks passed
@MathurAditya724 MathurAditya724 deleted the fix/quick-git-fix branch March 10, 2026 17:04
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.

2 participants