Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

feat(ruflo-console): the selected tab always names itself; the main menu holds every area, grouped; tabs no longer overflow

ruv0de61567fd9d
diff --git a/plugins/ruflo-console/hooks/views/menu.ts b/plugins/ruflo-console/hooks/views/menu.ts
index dd90881539..6943623a56 100644
--- a/plugins/ruflo-console/hooks/views/menu.ts
+++ b/plugins/ruflo-console/hooks/views/menu.ts
@@ -16,16 +16,23 @@ const GROUPS: readonly { title: string; sections: readonly { name: string; items
title: 'SWARM',
sections: [
{ name: 'live', items: [{ key: '1', label: 'Overview', go: 'overview' }, { key: '2', label: 'Swarm Topology', go: 'swarm' }, { key: '·', label: 'Hive-Mind', go: 'hive' }] },
- { name: 'work', items: [{ key: '3', label: 'Claims Board', go: 'claims' }, { key: 'm', label: 'Missions', go: 'missions' }, { key: 'q', label: 'Approvals', go: 'approvals' }] },
+ { name: 'work', items: [{ key: '3', label: 'Claims Board', go: 'claims' }, { key: 'm', label: 'Missions', go: 'missions' }, { key: 'q', label: 'Approvals', go: 'approvals' }, { key: '·', label: 'Automation', go: 'automate' }] },
{ name: 'watch', items: [{ key: 'g', label: 'Agent Timeline', go: 'timeline' }, { key: 'e', label: 'Event Stream', go: 'events' }] },
],
},
{
title: 'INTELLIGENCE',
sections: [
- { name: 'learn', items: [{ key: '6', label: 'Learning', go: 'learning' }, { key: '7', label: 'MetaHarness', go: 'metaharness' }] },
- { name: 'remember', items: [{ key: '8', label: 'Memory Base', go: 'memory' }] },
- { name: 'spend', items: [{ key: '9', label: 'Cost & Budget', go: 'cost' }] },
+ { name: 'learn', items: [{ key: '6', label: 'Learning', go: 'learning' }, { key: '·', label: 'Neural', go: 'neural' }, { key: '7', label: 'MetaHarness', go: 'metaharness' }, { key: '·', label: 'Self-Evolution', go: 'evolve' }] },
+ { name: 'remember', items: [{ key: '8', label: 'Memory Lab', go: 'memory' }, { key: '·', label: 'Vector Lab', go: 'vector' }] },
+ { name: 'spend', items: [{ key: '9', label: 'Cost & Budget', go: 'cost' }, { key: '·', label: 'Performance', go: 'perf' }] },
+ ],
+ },
+ {
+ title: 'SAFETY & OPS',
+ sections: [
+ { name: 'protect', items: [{ key: '·', label: 'Security & Doctor', go: 'secure' }] },
+ { name: 'build', items: [{ key: '·', label: 'Dev Tools', go: 'devtools' }] },
],
},
{
diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.ts
index 585f47c21c..88e8842608 100644
--- a/plugins/ruflo-console/hooks/views/pane.ts
+++ b/plugins/ruflo-console/hooks/views/pane.ts
@@ -29,6 +29,9 @@ import { xruvView } from './xruv'
export const NARROW = 44
+/** The keyless views that keep a tab of their own (the rest are reached from the main menu). */
+const CORE_TABS = new Set<ViewId>(['hive', 'skills'])
+
/** The networks the Wildcat strip names, each with the view a click on it opens. */
const NETWORKS: readonly (readonly [string, ViewId])[] = [['x.ruv.io', 'xruv'], ['relay.ruv.io', 'xruv'], ['agentbbs', 'federation'], ['mcp', 'plugins'], ['claude code', 'terminal']]
/** Width from which every tab spells its name beside its emoji (the 1-9 row is about 128 columns with names). */
@@ -75,16 +78,20 @@ function tabs(ctx: Ctx): RenderElement {
// A Button cannot be styled, so the current tab is Text: its key is not needed, the view is already open
// (from a drill-down, b goes back).
- // BBS: the current tab is framed like a menu pick, [2: 🐝 SWARM]; the name always shows there, in capitals.
+ // The current tab always names itself, whatever the width: [3: 📌 CLAIMS], [📟 MAIN MENU]. The others are their emoji (or
+ // emoji and name from WIDE_TABS columns), since a name on every tab does not fit a dock.
// A view with no hotkey (key '') has no key to show: [🧰 SKILLS], and its tab is pressed, not typed.
const prefix = view.key === '' ? '' : `${view.key}: `
- const current = isBbs() ? `[${prefix}${view.icon}${withNames || view.label.length <= 6 ? ` ${view.label.toUpperCase()}` : ''}]` : `${prefix}${words}`
+ const current = isBbs() ? `[${prefix}${view.icon} ${view.label.toUpperCase()}]` : `${prefix}${view.icon} ${view.label}`
if (isCurrent) return ctx.kit.Box({ key: `tab-${view.id}`, children: [ctx.kit.Text({ bold: true, color: THEME.head, wrap: 'truncate-end', children: current })] })
return ctx.kit.Button({ key: `tab-${view.id}`, label: words, ...(view.key !== '' && { hotkey: view.key }), plain: true, dimColor: true, onPress: () => ctx.act.view(view.id) })
}
- const line = (views: readonly (typeof VIEWS)[number][], key: string) => ctx.kit.Box({ flexDirection: 'row', gap: 1, key, children: views.map(tab) })
+ // The tab bar keeps the keyed views and the core keyless ones; the many other views (labs, tools) are tabs only while
+ // open, and are reached from the main menu (0), where each is listed with its group.
+ const isTab = (view: (typeof VIEWS)[number]) => view.key !== '' || CORE_TABS.has(view.id) || view.id === ctx.state.view || (ctx.state.view === 'agent' && view.id === ctx.state.back)
+ const line = (views: readonly (typeof VIEWS)[number][], key: string) => ctx.kit.Box({ flexDirection: 'row', gap: 1, key, children: views.filter(isTab).map(tab) })
// The first row runs to the last digit-keyed view, so a keyless view sits where VIEWS puts it (Hive-Mind after Swarm).
const split = VIEWS.reduce((last, view, i) => (/^[0-9]$/.test(view.key) ? i + 1 : last), 0)
diff --git a/plugins/ruflo-console/tests/behaviour.test.ts b/plugins/ruflo-console/tests/behaviour.test.ts
index 1c5b22f5b8..d9cda6c107 100644
--- a/plugins/ruflo-console/tests/behaviour.test.ts
+++ b/plugins/ruflo-console/tests/behaviour.test.ts
@@ -20,6 +20,21 @@ describe('behaviour', () => {
await pane.unmount()
})
+ test('the selected tab always names itself, however long the name: [7: 🔬 METAHARNESS], [🧰 SKILLS]', { options: { boot: false } }, async ($, on) => {
+ worldOf(on, RUFLO_FILES)
+ mock.clock(on)
+ await $.session.start(SESSION)
+
+ for (const [view, tab] of [['metaharness', '[7: 🔬 METAHARNESS]'], ['skills', '[🧰 SKILLS]'], ['menu', '[0: 📟 MAIN MENU]'], ['federation', '[4: 🌐 FEDERATION]']] as const) {
+ await $.command.run(command(view))
+
+ const pane = await $.ui.mount({ ...paneAt(110), plugin: PLUGIN })
+
+ expect(textOf(await pane.drawn())).toContain(tab)
+ await pane.unmount()
+ }
+ })
+
test('a tab hotkey switches the view and the choice is kept for this folder only', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)