Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Oct 15, 2025

Reduces console noise from background git status polling by increasing the bash truncate limit.

Changes

Increase bash truncate limit to 80 lines

Changed from 50 β†’ 80 lines for the truncate overflow policy. This provides better debugging context for git status output while still preventing excessive spam.

Before (50 lines):

  • Too restrictive for useful debugging
  • Git status output often cut off mid-info

After (80 lines):

  • Provides better context for git operations
  • Still prevents console flooding
  • Only affects IPC bash calls (background operations)

Note on SHOW_BRANCH truncation

Initially considered truncating git show-branch output before parsing, but this would break ahead/behind counting in parseGitShowBranchForStatus which iterates all commit lines. The 80-line truncate limit is sufficient for most cases, and the truncate overflow policy ensures we don't spam temp files.

Dependencies

Built on top of #256 which adds the overflow_policy feature.

Generated with cmux

Copy link

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

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.

ℹ️ 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 πŸ‘.

@ammar-agent ammar-agent force-pushed the limit-git-status-output branch from ab27a9e to c4183fc Compare October 15, 2025 00:44
Base automatically changed from git-status to main October 15, 2025 00:48
Two improvements to reduce noise from background git status operations:

1. **Limit SHOW_BRANCH output to 20 lines**
   - Git repos with long histories can have hundreds of commits
   - Now truncates to 20 lines with "... (N more commits omitted)" message
   - Prevents console from being flooded with commit history

2. **Increase bash truncate output from 50 to 80 lines**
   - 50 lines was too restrictive for useful debugging
   - 80 lines provides better context while still preventing spam
   - Only affects IPC bash calls (background operations)

These changes make git status polling less noisy while still providing
useful information for debugging.

_Generated with `cmux`_
Add --more=50 flag to git show-branch in GitStatusIndicator popover
to prevent overflow when branches have many commits.

50 commits is more than enough for the hover preview while preventing
console spam from the truncate policy.

_Generated with `cmux`_
@ammar-agent ammar-agent force-pushed the limit-git-status-output branch from f66a72f to ba34c91 Compare October 15, 2025 00:50
@ammario ammario added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 3145824 Oct 15, 2025
7 checks passed
@ammario ammario deleted the limit-git-status-output branch October 15, 2025 01:14
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