mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 12:32:02 +00:00
feat(optimize): UX polish
- Rename "ctx" column to "overhead" with wider padding for legibility in the By Project panel. - Name magic numbers for the project column widths. - Empty-state now includes a one-line description of what optimize does, so first-time users with no findings still understand the feature.
This commit is contained in:
parent
a9ca2a1134
commit
707d2faff1
2 changed files with 9 additions and 3 deletions
|
|
@ -231,11 +231,13 @@ function shortProject(encoded: string): string {
|
|||
function ProjectBreakdown({ projects, pw, bw, budgets }: { projects: ProjectSummary[]; pw: number; bw: number; budgets?: Map<string, ContextBudget> }) {
|
||||
const maxCost = Math.max(...projects.map(p => p.totalCostUSD))
|
||||
const hasBudgets = budgets && budgets.size > 0
|
||||
const nw = Math.max(8, pw - bw - (hasBudgets ? 31 : 23))
|
||||
const PROJECT_COL_BASE_WIDTH = 23
|
||||
const PROJECT_COL_WITH_OVERHEAD_WIDTH = 33
|
||||
const nw = Math.max(8, pw - bw - (hasBudgets ? PROJECT_COL_WITH_OVERHEAD_WIDTH : PROJECT_COL_BASE_WIDTH))
|
||||
return (
|
||||
<Panel title="By Project" color={PANEL_COLORS.project} width={pw}>
|
||||
<Text dimColor wrap="truncate-end">
|
||||
{''.padEnd(bw + 1 + nw)}{'cost'.padStart(8)}{'sess'.padStart(6)}{hasBudgets ? 'ctx'.padStart(8) : ''}
|
||||
{''.padEnd(bw + 1 + nw)}{'cost'.padStart(8)}{'sess'.padStart(6)}{hasBudgets ? 'overhead'.padStart(10) : ''}
|
||||
</Text>
|
||||
{projects.slice(0, 8).map((project, i) => {
|
||||
const budget = budgets?.get(project.project)
|
||||
|
|
@ -245,7 +247,7 @@ function ProjectBreakdown({ projects, pw, bw, budgets }: { projects: ProjectSumm
|
|||
<Text dimColor> {fit(shortProject(project.project), nw)}</Text>
|
||||
<Text color={GOLD}>{formatCost(project.totalCostUSD).padStart(8)}</Text>
|
||||
<Text>{String(project.sessions.length).padStart(6)}</Text>
|
||||
{hasBudgets && <Text color="#7B9EF5">{(budget ? formatTokens(budget.total) : '-').padStart(8)}</Text>}
|
||||
{hasBudgets && <Text color="#7B9EF5">{(budget ? formatTokens(budget.total) : '-').padStart(10)}</Text>}
|
||||
</Text>
|
||||
)
|
||||
})}
|
||||
|
|
|
|||
|
|
@ -1124,6 +1124,10 @@ function renderOptimize(
|
|||
if (findings.length === 0) {
|
||||
lines.push(chalk.hex(GREEN)(' Nothing to fix. Your setup is lean.'))
|
||||
lines.push('')
|
||||
lines.push(chalk.dim(' CodeBurn optimize scans your Claude Code sessions and config for'))
|
||||
lines.push(chalk.dim(' token waste: junk directory reads, duplicate file reads, unused'))
|
||||
lines.push(chalk.dim(' agents/skills/MCP servers, bloated CLAUDE.md, and more.'))
|
||||
lines.push('')
|
||||
return lines.join('\n')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue