mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
fix(3.7.0-alpha.14): auto-compact statusline on narrow terminals
Closes #1153. `ruflo hooks statusline` outputs 5+ lines of full-width formatted content by default. On narrow terminals (≤80 cols, common in tmux splits and side-by-side layouts) the lines wrap awkwardly and consume 6-7 lines of vertical space. Fix: `commands/hooks.ts` statusline now reads `process.stdout.columns` and auto-collapses to the existing single-line `compact` format when the terminal is narrower than 100 cols. New `--full` flag overrides this auto-detection for users who prefer the multi-line output even on narrow terms. `--compact` and `--json` continue to work as explicit overrides; default behavior on wide terminals is unchanged. Verification (this repo, both modes): COLUMNS=80 statusline (no flag) → "DDD:3/5 CVE:0/3 Swarm:1/15 Ctx:50% Int:10%" COLUMNS=80 statusline --full → 5-line multi-line output preserved COLUMNS=200 statusline (no flag) → 5-line multi-line (auto-detected wide) Build clean. Published @claude-flow/cli@3.7.0-alpha.14, claude-flow@3.7.0-alpha.14, ruflo@3.7.0-alpha.14 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
1 parent
ea8cbf697b
commit
2804d85f17
4 files changed
+20
-6
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "claude-flow",
|
||||
"version": "3.7.0-alpha.13",
|
||||
"version": "3.7.0-alpha.14",
|
||||
"description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ruflo",
|
||||
"version": "3.7.0-alpha.13",
|
||||
"version": "3.7.0-alpha.14",
|
||||
"description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
||||
"main": "bin/ruflo.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@claude-flow/cli",
|
||||
"version": "3.7.0-alpha.13",
|
||||
"version": "3.7.0-alpha.14",
|
||||
"type": "module",
|
||||
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
||||
"main": "dist/src/index.js",
|
||||
|
||||
@@ -4013,7 +4013,13 @@ const statuslineCommand: Command = {
|
||||
},
|
||||
{
|
||||
name: 'compact',
|
||||
description: 'Compact single-line output',
|
||||
description: 'Compact single-line output (auto-enabled when terminal width < 100 cols)',
|
||||
type: 'boolean',
|
||||
default: false
|
||||
},
|
||||
{
|
||||
name: 'full',
|
||||
description: 'Force the full multi-line output even on narrow terminals',
|
||||
type: 'boolean',
|
||||
default: false
|
||||
},
|
||||
@@ -4252,8 +4258,16 @@ const statuslineCommand: Command = {
|
||||
return { success: true, data: statusData };
|
||||
}
|
||||
|
||||
// Compact output
|
||||
if (ctx.flags.compact) {
|
||||
// #1153: auto-collapse to compact on narrow terminals so the full
|
||||
// 6+ line statusline doesn't dominate the screen. Honors:
|
||||
// - explicit --compact → compact
|
||||
// - explicit --full → full (overrides auto-detection)
|
||||
// - else → compact when terminal < 100 cols (full multi-line
|
||||
// output expects ~100 cols of horizontal space)
|
||||
const COMPACT_WIDTH_THRESHOLD = 100;
|
||||
const terminalCols = process.stdout.columns ?? 80;
|
||||
const autoCompact = !ctx.flags.full && terminalCols < COMPACT_WIDTH_THRESHOLD;
|
||||
if (ctx.flags.compact || autoCompact) {
|
||||
const line = `DDD:${progress.domainsCompleted}/${progress.totalDomains} CVE:${security.cvesFixed}/${security.totalCves} Swarm:${swarm.activeAgents}/${swarm.maxAgents} Ctx:${system.contextPct}% Int:${system.intelligencePct}%`;
|
||||
output.writeln(line);
|
||||
return { success: true, data: statusData };
|
||||
|
||||
Reference in new issue
Block a user