From ff332be6d364ce3d5974133deb7c76220684181a Mon Sep 17 00:00:00 2001 From: liruifengv Date: Tue, 16 Jun 2026 12:19:52 +0800 Subject: [PATCH] fix(tui): add top border to queue pane to separate it from todo panel (#801) --- .changeset/queue-pane-border.md | 5 +++++ apps/kimi-code/src/tui/components/panes/queue-pane.ts | 2 +- .../test/tui/components/panes/queue-pane.test.ts | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/queue-pane-border.md diff --git a/.changeset/queue-pane-border.md b/.changeset/queue-pane-border.md new file mode 100644 index 000000000..f269bc215 --- /dev/null +++ b/.changeset/queue-pane-border.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Polish queue pane styling diff --git a/apps/kimi-code/src/tui/components/panes/queue-pane.ts b/apps/kimi-code/src/tui/components/panes/queue-pane.ts index 3a255b52d..77800b97e 100644 --- a/apps/kimi-code/src/tui/components/panes/queue-pane.ts +++ b/apps/kimi-code/src/tui/components/panes/queue-pane.ts @@ -34,7 +34,7 @@ export class QueuePaneComponent extends Container { override render(width: number): string[] { const accent = (text: string) => currentTheme.fg('accent', text); const dim = (text: string) => currentTheme.fg('textDim', text); - const lines: string[] = []; + const lines: string[] = [currentTheme.fg('border', '─'.repeat(width))]; for (const item of this.messages) { const singleLine = item.text.replaceAll(/\s+/g, ' ').trim(); diff --git a/apps/kimi-code/test/tui/components/panes/queue-pane.test.ts b/apps/kimi-code/test/tui/components/panes/queue-pane.test.ts index 68a5fc1d8..ca276a138 100644 --- a/apps/kimi-code/test/tui/components/panes/queue-pane.test.ts +++ b/apps/kimi-code/test/tui/components/panes/queue-pane.test.ts @@ -62,8 +62,8 @@ describe('QueuePaneComponent', () => { }); const lines = component.render(30); - expect(lines).toHaveLength(2); // message + hint - const messageLine = stripAnsi(lines[0] as string); + expect(lines).toHaveLength(3); // border + message + hint + const messageLine = stripAnsi(lines[1] as string); expect(messageLine).not.toContain('a'.repeat(30)); expect(messageLine.endsWith('…')).toBe(true); }); @@ -77,8 +77,8 @@ describe('QueuePaneComponent', () => { }); const lines = component.render(120); - expect(lines).toHaveLength(2); // message + hint - const messageLine = stripAnsi(lines[0] as string); + expect(lines).toHaveLength(3); // border + message + hint + const messageLine = stripAnsi(lines[1] as string); expect(messageLine).toContain('line one line two line three'); expect(messageLine).not.toContain('\n'); });