fix: normalize tabs in usage notes rendering
Address P2 review: sanitizeText preserves \t which can create visual holes in rendered output. Add .replace(/\t/g, ' ') to provider-wide and per-limit notes in usage-report.ts and usage-cli.ts, matching the TUI path which already uses replaceTabs().
This commit is contained in:
@@ -452,7 +452,8 @@ export function formatUsageBreakdown(
|
||||
);
|
||||
// Provider-wide disclaimers render once per provider, not per limit.
|
||||
const providerNotes = [...new Set(providerReports.flatMap(report => report.notes ?? []))];
|
||||
for (const note of providerNotes) lines.push(` ${chalk.dim(sanitizeText(note.replace(/[\r\n]+/g, " ")))}`);
|
||||
for (const note of providerNotes)
|
||||
lines.push(` ${chalk.dim(sanitizeText(note.replace(/[\r\n]+/g, " ").replace(/\t/g, " ")))}`);
|
||||
|
||||
const labelWidth = providerReports
|
||||
.flatMap(report => report.limits)
|
||||
|
||||
Reference in New Issue
Block a user