Skip to content

Commit e9fa579

Browse files
mballanceCopilot
andcommitted
status: use pencil+cyan 'modified' instead of X+red 'dirty'
Packages with local changes are shown as ✎ (cyan) with label 'modified' rather than ✗ (red) with 'dirty' — indicating active work rather than an error state. Summary border also changed from red to cyan when modified packages are present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d388f35 commit e9fa579

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/ivpm/status_tui.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def render(self, results: List[PkgVcsStatus], verbose: int = 0):
8888
git_total += 1
8989
if s.is_dirty:
9090
dirty_count += 1
91-
marker = Text("", style="bold red")
92-
state = Text("dirty", style="red")
91+
marker = Text("", style="bold cyan")
92+
state = Text("modified", style="cyan")
9393
else:
9494
marker = Text("✓", style="bold green")
9595
state = Text("clean", style="green")
@@ -132,7 +132,7 @@ def render(self, results: List[PkgVcsStatus], verbose: int = 0):
132132
clean_count = git_total - dirty_count
133133
summary = "%d package(s)" % (len(results) - pypi_count if verbose < 2 else len(results))
134134
if git_total:
135-
summary += " · %d git (%d clean, %d dirty)" % (git_total, clean_count, dirty_count)
135+
summary += " · %d git (%d clean, %d modified)" % (git_total, clean_count, dirty_count)
136136
if non_vcs_count - pypi_count > 0:
137137
summary += " · %d non-VCS" % (non_vcs_count - pypi_count)
138138
if pypi_count:
@@ -141,7 +141,7 @@ def render(self, results: List[PkgVcsStatus], verbose: int = 0):
141141
else:
142142
summary += " · %d pypi" % pypi_count
143143

144-
border = "green" if dirty_count == 0 else "red"
144+
border = "green" if dirty_count == 0 else "cyan"
145145
console.print(Panel(summary, border_style=border, title="Status"))
146146

147147

@@ -165,8 +165,8 @@ def render(self, results: List[PkgVcsStatus], verbose: int = 0):
165165
git_total += 1
166166
if s.is_dirty:
167167
dirty_count += 1
168-
marker = ""
169-
state = "dirty"
168+
marker = ""
169+
state = "modified"
170170
else:
171171
marker = "✓"
172172
state = "clean"
@@ -192,7 +192,7 @@ def render(self, results: List[PkgVcsStatus], verbose: int = 0):
192192
shown = len(results) - (pypi_count if verbose < 2 else 0)
193193
print("%d package(s)" % shown, end="")
194194
if git_total:
195-
print(" · %d git (%d clean, %d dirty)" % (git_total, clean_count, dirty_count), end="")
195+
print(" · %d git (%d clean, %d modified)" % (git_total, clean_count, dirty_count), end="")
196196
if non_vcs_count - pypi_count > 0:
197197
print(" · %d non-VCS" % (non_vcs_count - pypi_count), end="")
198198
if pypi_count:

test/unit/test_status.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ def test_transcript_render(self):
191191
sys.stdout = old_stdout
192192

193193
self.assertIn("clean", output)
194-
self.assertIn("dirty", output)
194+
self.assertIn("dirty", output) # package *name* is "dirty"
195+
self.assertIn("modified", output)
195196
self.assertIn("lib", output)
196197
self.assertNotIn("foo.py", output) # verbose=0
197198

0 commit comments

Comments
 (0)