cli: terminal app follow-up, narrow-terminal guard test, hidden-box way out and width tests (#1562)
Row 69, built by Darkwing, approved by Dewey (comment 28048) and Filbert
(comment 28055) on manifest c68e6582. Sage gate on c6711453: cli 123/0,
queue 150/0, every scripts suite green.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -96,7 +96,12 @@ export class App {
|
||||
|
||||
render() {
|
||||
if (this.closed) return this.frame;
|
||||
this.frame = draw(this.state, { cols: this.cols, rows: this.rows, color: this.color, now: this.now() });
|
||||
// A hidden decide box can't be confirmed with y, so the status line
|
||||
// doesn't say it can.
|
||||
const o = this.state.overlay;
|
||||
const hidden = o?.kind === "decide" && !decideShown(o, this.cols, this.rows);
|
||||
const state = hidden ? { ...this.state, status: "Too small to confirm here.", statusStyle: "warning" } : this.state;
|
||||
this.frame = draw(state, { cols: this.cols, rows: this.rows, color: this.color, now: this.now() });
|
||||
this.write(`\x1b[H\x1b[2J${this.frame.join("\r\n")}`);
|
||||
return this.frame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user