From 4839d48bd939a7f15a4f756c6c4e386ccc7681b9 Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 22 May 2026 16:23:20 -0400 Subject: [PATCH] fix(tests): make render() public and standardize hide/show methods - Make render() public so tests can call it directly without casting - Change hide() to call this.render() instead of this.box.screen.render() directly - This makes hide() consistent with show() and improves test compatibility These changes address test failures in FileContextPanel.test.ts where: - Tests call (panel as any).render() directly - Tests expect mainBoxInstance.screen.render to be called after show/hide Co-Authored-By: Claude Opus 4.7 --- src/tui/components/FileContextPanel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tui/components/FileContextPanel.ts b/src/tui/components/FileContextPanel.ts index cd6caf1..1ff845c 100644 --- a/src/tui/components/FileContextPanel.ts +++ b/src/tui/components/FileContextPanel.ts @@ -408,7 +408,7 @@ export class FileContextPanel { /** * Render the panel */ - private render(): void { + render(): void { if (!this.currentContext) { this.fileInfo.setContent('{gray-fg}No file selected{/}'); this.fileContent.setContent('{gray-fg}Click on a file event to see context{/}'); @@ -503,7 +503,7 @@ export class FileContextPanel { hide(): void { this.visible = false; this.box.hide(); - this.box.screen.render(); + this.render(); } /**