fix(tui): pin hosted task on narrow panes

This commit is contained in:
Xubin Ren
2026-08-17 20:56:10 +08:00
parent 05acd79466
commit 6c987fc21d
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -1946,6 +1946,10 @@ describe("NanobotTui in a Herdr pane", () => {
action: "Approval required",
})
setup.resize(42, 6)
await setup.renderOnce()
expect(setup.captureCharFrame()).toContain(" Ship the Herdr integration")
app.accept({
event: "user_message",
chat_id: "chat",
+3 -1
View File
@@ -1534,7 +1534,9 @@ export class NanobotTui {
if (this.host.hosted) {
this.titleText.maxWidth = Math.max(8, this.renderer.width - 4)
this.titleText.content = this.currentTask ? ` ${this.currentTask}` : ""
this.title.visible = Boolean(this.currentTask) && this.renderer.height >= 8
// In a hosted pane this is the resume anchor, not decorative chrome.
// Keep it visible even when Herdr temporarily makes the pane very short.
this.title.visible = Boolean(this.currentTask)
this.syncHostMetadata()
return
}