|
1 | | -import { pluralize } from '@codebuff/common/util/string' |
2 | 1 | import { TextAttributes } from '@opentui/core' |
3 | 2 | import React, { memo, useCallback, useMemo, useState } from 'react' |
4 | 3 |
|
@@ -35,11 +34,6 @@ export const ImplementorGroup = memo( |
35 | 34 | const theme = useTheme() |
36 | 35 | const { columns, columnWidth: cardWidth, columnGroups } = useGridLayout(implementors, availableWidth) |
37 | 36 |
|
38 | | - // Check if any implementors are still running |
39 | | - const anyRunning = implementors.some(impl => impl.status === 'running') |
40 | | - const headerText = anyRunning |
41 | | - ? `${pluralize(implementors.length, 'proposal')} being generated` |
42 | | - : `${pluralize(implementors.length, 'proposal')} generated` |
43 | 37 |
|
44 | 38 | return ( |
45 | 39 | <box |
@@ -93,12 +87,6 @@ export const ImplementorGroup = memo( |
93 | 87 | ) |
94 | 88 | })} |
95 | 89 | </box> |
96 | | - <text |
97 | | - fg={theme.muted} |
98 | | - attributes={TextAttributes.DIM} |
99 | | - > |
100 | | - {headerText} |
101 | | - </text> |
102 | 90 | </box> |
103 | 91 | ) |
104 | 92 | }, |
@@ -338,11 +326,10 @@ const CompactFileRow = memo(({ |
338 | 326 | const removedContent = (' ' + removedStr).padEnd(removedSectionWidth) |
339 | 327 |
|
340 | 328 | // Calculate available width for file path |
341 | | - // Layout: changeType(1) + spaces(2) + filePath + spaces(2) + hunks + spaces(2) + bars |
342 | | - const hunkText = `${file.stats.hunks} ${file.stats.hunks === 1 ? 'hunk' : 'hunks'}` |
| 329 | + // Layout: changeType(1) + spaces(2) + filePath + spaces(2) + bars |
343 | 330 | // Total bar section width: 2*maxBarWidth + maxAddedStrWidth + maxRemovedStrWidth (no center gap) |
344 | 331 | const barWidth = 2 * maxBarWidth + maxAddedStrWidth + maxRemovedStrWidth |
345 | | - const fixedWidth = 1 + 2 + 2 + hunkText.length + 2 + barWidth |
| 332 | + const fixedWidth = 1 + 2 + 2 + barWidth |
346 | 333 | const maxFilePathWidth = Math.max(10, availableWidth - fixedWidth) |
347 | 334 |
|
348 | 335 | // Get and truncate file path |
@@ -383,18 +370,12 @@ const CompactFileRow = memo(({ |
383 | 370 | </Button> |
384 | 371 | <text style={{ flexShrink: 0 }}> </text> |
385 | 372 |
|
386 | | - {/* Hunk count */} |
387 | | - <text fg={theme.muted} style={{ flexShrink: 0, wrapMode: 'none' }}> |
388 | | - {hunkText} |
389 | | - </text> |
390 | | - <text style={{ flexShrink: 0 }}> </text> |
391 | | - |
392 | 373 | {/* Bar visualization: full-width bars meeting at center with numbers inside */} |
393 | 374 | <text style={{ flexShrink: 0, wrapMode: 'none' }}> |
394 | | - {/* Added section: full green bar with +N in white inside, right-aligned to center */} |
395 | | - <span fg="white" bg={theme.success}>{addedContent}</span> |
396 | | - {/* Removed section: full red bar with -N in white inside, left-aligned from center */} |
397 | | - <span fg="white" bg={theme.error}>{removedContent}</span> |
| 375 | + {/* Added section: muted gray-green bar with +N inside */} |
| 376 | + <span fg={theme.foreground} bg="#3A5A3A">{addedContent}</span> |
| 377 | + {/* Removed section: muted gray-red bar with -N inside */} |
| 378 | + <span fg={theme.foreground} bg="#5A3A3A">{removedContent}</span> |
398 | 379 | </text> |
399 | 380 | </box> |
400 | 381 |
|
|
0 commit comments