Skip to content

Commit 946585c

Browse files
committed
Simplify ui of multi prompt editor slightly
1 parent c0d0c37 commit 946585c

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

cli/src/components/blocks/implementor-row.tsx

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { pluralize } from '@codebuff/common/util/string'
21
import { TextAttributes } from '@opentui/core'
32
import React, { memo, useCallback, useMemo, useState } from 'react'
43

@@ -35,11 +34,6 @@ export const ImplementorGroup = memo(
3534
const theme = useTheme()
3635
const { columns, columnWidth: cardWidth, columnGroups } = useGridLayout(implementors, availableWidth)
3736

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`
4337

4438
return (
4539
<box
@@ -93,12 +87,6 @@ export const ImplementorGroup = memo(
9387
)
9488
})}
9589
</box>
96-
<text
97-
fg={theme.muted}
98-
attributes={TextAttributes.DIM}
99-
>
100-
{headerText}
101-
</text>
10290
</box>
10391
)
10492
},
@@ -338,11 +326,10 @@ const CompactFileRow = memo(({
338326
const removedContent = (' ' + removedStr).padEnd(removedSectionWidth)
339327

340328
// 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
343330
// Total bar section width: 2*maxBarWidth + maxAddedStrWidth + maxRemovedStrWidth (no center gap)
344331
const barWidth = 2 * maxBarWidth + maxAddedStrWidth + maxRemovedStrWidth
345-
const fixedWidth = 1 + 2 + 2 + hunkText.length + 2 + barWidth
332+
const fixedWidth = 1 + 2 + 2 + barWidth
346333
const maxFilePathWidth = Math.max(10, availableWidth - fixedWidth)
347334

348335
// Get and truncate file path
@@ -383,18 +370,12 @@ const CompactFileRow = memo(({
383370
</Button>
384371
<text style={{ flexShrink: 0 }}> </text>
385372

386-
{/* Hunk count */}
387-
<text fg={theme.muted} style={{ flexShrink: 0, wrapMode: 'none' }}>
388-
{hunkText}
389-
</text>
390-
<text style={{ flexShrink: 0 }}> </text>
391-
392373
{/* Bar visualization: full-width bars meeting at center with numbers inside */}
393374
<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>
398379
</text>
399380
</box>
400381

0 commit comments

Comments
 (0)