feat: add git status, git remote, worktree, and custom symbol widgets#257
Merged
sirmalloc merged 6 commits intosirmalloc:mainfrom Apr 8, 2026
Merged
Conversation
Add 19 new widgets split out from PR sirmalloc#255 per reviewer request: - Git status widgets (addresses sirmalloc#20): git-status, git-staged, git-unstaged, git-untracked, git-ahead-behind, git-conflicts, git-sha - Git remote widgets: git-origin-owner, git-origin-repo, git-origin-owner-repo, git-upstream-owner, git-upstream-repo, git-upstream-owner-repo, git-is-fork - Worktree widgets: worktree-mode, worktree-name, worktree-branch, worktree-original-branch - Custom symbol widget Supporting changes: - Add git command cache and status functions to git.ts - Add git-remote utilities for fork detection and URL parsing - Add customSymbol, hide, getNumericValue to Widget types - Add worktree field to StatusJSON - Add gitData field to RenderContext Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 23, 2026
…licts Fixed three issues in git status parsing: 1. Unstaged pattern was incomplete - only detected M/D, missed merge conflicts (UU, AU, DU, AA, UA, UD) and other status codes (R, C, T) 2. Added -z flag for NUL-terminated output to properly handle filenames with special characters 3. Changed trim() to trimEnd() to preserve significant leading spaces in git porcelain format (e.g., ' M file.txt' for unstaged modifications) Added comprehensive test coverage with 20 new test cases covering all merge conflict scenarios, rename/copy/type-change detection, and edge cases. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added '!' indicator to GitStatus widget to show merge conflicts with priority ordering: !+*? (conflicts, staged, unstaged, untracked). Conflicts are shown first as they're blocking - work cannot proceed until resolved. The priority ordering reflects urgency: blocking issues, intentional work, unsaved changes, then undecided files. Added conflict detection for all merge conflict states: DD, AU, UD, UA, DU, AA, UU Added test coverage for DD (both deleted) case and mixed status with conflicts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
Git Status Detection Fixes AppliedAdded two commits to fix git status detection issues: Commit 1: Fix git status detection for unstaged changes and merge conflicts (
|
Tighten the git widget plumbing and align the new worktree widgets with the Git naming scheme. - parse nested namespace remotes correctly for both SCP-style and URL-based git remotes - ignore rename and copy source-path entries when reading porcelain -z status output - keep the git utility regression coverage aligned with the parser changes - rename Worktree* widget files and classes to GitWorktree* and update display names - preserve the existing worktree widget type ids while rewiring exports and manifest entries
# Conflicts: # src/types/RenderContext.ts
Improve git widget behavior in preview and runtime rendering. - treat text-presentation pictographs like the warning symbol as narrow unless explicitly emoji-style - keep git conflicts visible at zero and return numeric raw values for the conflict count - add regression coverage for glyph width handling and conflict widget rendering - resolve git-upstream widgets through the branch tracking remote when no literal upstream remote exists - cover tracked-upstream fallback behavior in git remote utility tests
Owner
|
Thanks for this, I'll publish it when the next release goes out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split out from #255 per reviewer request — widgets only, no rules engine.
git-status,git-staged,git-unstaged,git-untracked,git-ahead-behind,git-conflicts,git-shagit-origin-owner,git-origin-repo,git-origin-owner-repo,git-upstream-owner,git-upstream-repo,git-upstream-owner-repo,git-is-forkworktree-mode,worktree-name,worktree-branch,worktree-original-branchSupporting changes
customSymbol,hide,getNumericValue()type additionsworktreefield in StatusJSON,gitDatafield in RenderContextTest plan
bun test)bun run lint)clearGitCachefor test isolation🤖 Generated with Claude Code