From 0d204112a55adcbfeefbc2f0002e0bd2244c4a8a Mon Sep 17 00:00:00 2001 From: Lilith Date: Tue, 20 Jan 2026 04:46:12 -0800 Subject: [PATCH] =?UTF-8?q?chore(widgets):=20=F0=9F=94=A7=20Update=20widge?= =?UTF-8?q?t-related=20utility=20file=20HealthMonitor.ts=20with=20latest?= =?UTF-8?q?=20configuration/bug=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/HealthMonitor.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/widgets/HealthMonitor.ts b/src/widgets/HealthMonitor.ts index 9441789..148a888 100644 --- a/src/widgets/HealthMonitor.ts +++ b/src/widgets/HealthMonitor.ts @@ -433,13 +433,24 @@ export class HealthMonitor { // Build output lines const outputLines: string[] = Array(this.MAX_LINES).fill('') + // Calculate max width per column for proper spacing + const columnWidths: number[] = [] for (const column of visibleColumns) { + const maxWidth = Math.max(...column.map(item => this.stripTags(item.text).length)) + columnWidths.push(maxWidth) + } + + for (let colIdx = 0; colIdx < visibleColumns.length; colIdx++) { + const column = visibleColumns[colIdx] + const columnWidth = columnWidths[colIdx] + for (let lineIdx = 0; lineIdx < column.length && lineIdx < this.MAX_LINES; lineIdx++) { const item = column[lineIdx] if (item) { // Pad previous content on this line and append this item const currentLength = this.stripTags(outputLines[lineIdx]).length - const padding = lineIdx === 0 || currentLength === 0 ? '' : ' ' + // Use larger spacing between columns (6 spaces instead of 2) + const padding = currentLength === 0 ? '' : ' '.repeat(6) outputLines[lineIdx] += padding + item.text } }