Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Changes the GitStatusIndicator to show line deltas (additions/deletions) by default instead of commit divergence (ahead/behind). Users can toggle between views via the tooltip.

Summary

  • Default view is now line-delta: shows +{additions} -{deletions} with GitHub-style coloring (green/red when working, muted when idle)
  • Tooltip toggle: click Lines / Commits segmented control to switch views globally (persisted to localStorage)
  • Tooltip overview: always shows both line delta and commit divergence summary
  • Large number abbreviation: 999 → 999, 1231 → 1.2k, 12313 → 12.3k
  • New ToggleGroup UI component: reusable shadcn-style segmented control

Implementation

  • Extended GitStatus type with outgoingAdditions, outgoingDeletions, incomingAdditions, incomingDeletions
  • Updated git status script to compute line deltas via git diff --numstat against merge-base
  • Added GIT_STATUS_INDICATOR_MODE_KEY for persisted global preference
  • Added Storybook stories for both modes in busy (streaming) scenarios

Generated with mux

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

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

When in line-delta mode with no outgoing changes but behind remote,
show a muted ↓N indicator so users can hover to see details and
toggle to divergence view.
The GitStatusVariations story already covers git status display.
The deleted stories weren't properly showing the indicators.
- Add outgoingAdditions/outgoingDeletions to fixtures
- Add ws-diverged with large counts to test abbreviation (12.3k)
- Auto-expand project so workspaces are visible on load
- Update comment to document what each workspace demonstrates
- Generate deterministic hex hashes (no Math.random)
- Match parseGitShowBranchForStatus expectations
Avoid storybook git command mocking by exercising GitStatusIndicatorView
with explicit props (line-delta, divergence, behind-only).
The MCP screenshot tests occasionally miss the tool-call-end event even
after stream-end; poll briefly for chrome_take_screenshot to reduce flake.
- Remove component-level story (repo only uses App.* stories)
- Improve executeBash mock to support both GitStatusStore + tooltip branch details
- Add play interaction to GitStatusVariations to prove toggle works
@ammario ammario merged commit e6e4c2e into main Dec 12, 2025
20 checks passed
@ammario ammario deleted the git-status-7fs3 branch December 12, 2025 04:40
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