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): emoji tabs in two rows, data views then management views

ruve36d882a9b16
diff --git a/plugins/ruflo-console/hooks/state.ts b/plugins/ruflo-console/hooks/state.ts
index f10f2bed5b..63a9cb8513 100644
--- a/plugins/ruflo-console/hooks/state.ts
+++ b/plugins/ruflo-console/hooks/state.ts
@@ -16,23 +16,24 @@ export type ViewId = 'overview' | 'swarm' | 'claims' | 'federation' | 'plugins'
* management views take letters no other control uses. `agent` is the drill-down, reached from a selection, not a tab.
*/
/**
- * `icon` is one terminal cell (no emoji: those are two cells wide and render unevenly), shown in the tab bar; the
+ * `icon` is an emoji with default emoji presentation (no variation selector, so it renders as one 2-cell glyph
+ * everywhere), shown in the tab bar; the
* current tab adds its label, and `blurb` is the one line under the bar that says what the view is for.
*/
export const VIEWS: readonly { id: ViewId; key: string; label: string; short: string; icon: string; blurb: string; rows: number }[] = [
- { id: 'overview', key: '1', label: 'Overview', short: 'Ovr', icon: 'βŒ‚', blurb: 'what ruflo is doing here: subsystems, mods, health alerts and live activity', rows: 26 },
- { id: 'swarm', key: '2', label: 'Swarm', short: 'Swm', icon: '⁂', blurb: 'the swarm as ruflo wrote it: topology, agents at work, and the hive-mind votes', rows: 30 },
- { id: 'claims', key: '3', label: 'Claims', short: 'Clm', icon: 'βš‘', blurb: 'who holds which task: claim, release, hand off or steal, each after a y/n confirm', rows: 30 },
- { id: 'federation', key: '4', label: 'Federation', short: 'Fed', icon: '⇄', blurb: 'this node, its peers, keys and channels, placed by how far each is trusted', rows: 26 },
- { id: 'plugins', key: '5', label: 'Plugins', short: 'Plg', icon: 'β—«', blurb: 'ruflo plugins: installed, enabled, in the marketplace clone, and loaded as mods', rows: 30 },
- { id: 'learning', key: '6', label: 'Learning', short: 'Lrn', icon: '✦', blurb: 'router picks and outcomes, and the RETRIEVE β†’ JUDGE β†’ DISTILL β†’ CONSOLIDATE pipeline', rows: 30 },
- { id: 'metaharness', key: '7', label: 'MetaHarness', short: 'MH', icon: 'βš™', blurb: 'harness readiness by axis, the audit trend, and the flywheel champion', rows: 26 },
- { id: 'memory', key: '8', label: 'Memory', short: 'Mem', icon: 'β–€', blurb: 'AgentDB entries by namespace: what the swarm has stored', rows: 22 },
- { id: 'cost', key: '9', label: 'Cost', short: 'Cst', icon: '$', blurb: 'this session spend against the budget, and how fast it is burning', rows: 20 },
- { id: 'timeline', key: 'g', label: 'Timeline', short: 'Gnt', icon: 'β—·', blurb: 'each agent busy or idle over the last minutes, beside Claude Code tool calls', rows: 24 },
- { id: 'approvals', key: 'q', label: 'Approvals', short: 'Apv', icon: 'βœ“', blurb: 'decisions waiting for a person: votes, stealable claims, refused mods, budget', rows: 24 },
- { id: 'events', key: 'e', label: 'Events', short: 'Evt', icon: '≋', blurb: 'every swarm, claim, memory and mod event as it happens (f filters them)', rows: 26 },
- { id: 'missions', key: 'm', label: 'Missions', short: 'Msn', icon: '⚐', blurb: 'ADR-406 missions: the plan, task dependencies, acceptance and budget (observe only)', rows: 26 },
+ { id: 'overview', key: '1', label: 'Overview', short: 'Ovr', icon: '🏠', blurb: 'what ruflo is doing here: subsystems, mods, health alerts and live activity', rows: 26 },
+ { id: 'swarm', key: '2', label: 'Swarm', short: 'Swm', icon: '🐝', blurb: 'the swarm as ruflo wrote it: topology, agents at work, and the hive-mind votes', rows: 30 },
+ { id: 'claims', key: '3', label: 'Claims', short: 'Clm', icon: 'πŸ“Œ', blurb: 'who holds which task: claim, release, hand off or steal, each after a y/n confirm', rows: 30 },
+ { id: 'federation', key: '4', label: 'Federation', short: 'Fed', icon: '🌐', blurb: 'this node, its peers, keys and channels, placed by how far each is trusted', rows: 26 },
+ { id: 'plugins', key: '5', label: 'Plugins', short: 'Plg', icon: '🧩', blurb: 'ruflo plugins: installed, enabled, in the marketplace clone, and loaded as mods', rows: 30 },
+ { id: 'learning', key: '6', label: 'Learning', short: 'Lrn', icon: '🧠', blurb: 'router picks and outcomes, and the RETRIEVE β†’ JUDGE β†’ DISTILL β†’ CONSOLIDATE pipeline', rows: 30 },
+ { id: 'metaharness', key: '7', label: 'MetaHarness', short: 'MH', icon: 'πŸ”¬', blurb: 'harness readiness by axis, the audit trend, and the flywheel champion', rows: 26 },
+ { id: 'memory', key: '8', label: 'Memory', short: 'Mem', icon: 'πŸ’Ύ', blurb: 'AgentDB entries by namespace: what the swarm has stored', rows: 22 },
+ { id: 'cost', key: '9', label: 'Cost', short: 'Cst', icon: 'πŸ’°', blurb: 'this session spend against the budget, and how fast it is burning', rows: 20 },
+ { id: 'timeline', key: 'g', label: 'Timeline', short: 'Gnt', icon: 'πŸ•’', blurb: 'each agent busy or idle over the last minutes, beside Claude Code tool calls', rows: 24 },
+ { id: 'approvals', key: 'q', label: 'Approvals', short: 'Apv', icon: 'βœ…', blurb: 'decisions waiting for a person: votes, stealable claims, refused mods, budget', rows: 24 },
+ { id: 'events', key: 'e', label: 'Events', short: 'Evt', icon: 'πŸ“‘', blurb: 'every swarm, claim, memory and mod event as it happens (f filters them)', rows: 26 },
+ { id: 'missions', key: 'm', label: 'Missions', short: 'Msn', icon: '🎯', blurb: 'ADR-406 missions: the plan, task dependencies, acceptance and budget (observe only)', rows: 26 },
]
export const AGENT_VIEW = { id: 'agent' as const, rows: 28 }
diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.ts
index e508cfba59..d968939b41 100644
--- a/plugins/ruflo-console/hooks/views/pane.ts
+++ b/plugins/ruflo-console/hooks/views/pane.ts
@@ -23,8 +23,8 @@ import { pluginsView } from './plugins'
import { swarmView } from './swarm'
export const NARROW = 44
-/** Width from which the current tab spells its name beside its icon. */
-const WIDE_TABS = 110
+/** Width from which every tab spells its name beside its emoji (the 1-9 row is about 128 columns with names). */
+const WIDE_TABS = 140
const BODIES: Record<ViewId, (ctx: Ctx) => RenderElement> = {
overview: overviewView,
@@ -51,23 +51,27 @@ function tabs(ctx: Ctx): RenderElement {
return text(ctx, `${index < 0 ? 'Β·' : `${index + 1}/${VIEWS.length}`} ${label} Β· /ruflo help`, { bold: true, color: THEME.head })
}
- // Every tab is its icon; the current one adds its name in the heading colour, so the bar reads at a glance and
- // still fits a docked pane. The names are in /ruflo help and in the line under the bar.
- return ctx.kit.Box({
- flexDirection: 'row',
- gap: 1,
- key: 'tabs',
- children: VIEWS.map(view => {
- const isCurrent = view.id === ctx.state.view || (ctx.state.view === 'agent' && view.id === ctx.state.back)
+ // Two rows: the nine data views (1-9), then the four management views (g q e m). Each tab is its emoji; the
+ // current one is highlighted, and from WIDE_TABS columns every tab also spells its name. The line under the bar
+ // always names the current view and says what it is for. The dock width is the engine's (it keeps where the
+ // divider was left), so the narrow form must fit about 60 columns.
+ const withNames = ctx.columns >= WIDE_TABS
+ const tab = (view: (typeof VIEWS)[number]): RenderElement => {
+ const isCurrent = view.id === ctx.state.view || (ctx.state.view === 'agent' && view.id === ctx.state.back)
+ const words = withNames ? `${view.icon} ${view.label}` : view.icon
+
+ // 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).
+ if (isCurrent) return ctx.kit.Box({ key: `tab-${view.id}`, children: [ctx.kit.Text({ bold: true, color: THEME.head, wrap: 'truncate-end', children: `${view.key}:${words}` })] })
- // 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).
- // The dock's width is the engine's (it keeps where the divider was left): the name joins the icon only where
- // the bar has room for it, and the line under the bar always leads with it.
- if (isCurrent) return ctx.kit.Box({ key: `tab-${view.id}`, children: [ctx.kit.Text({ bold: true, color: THEME.head, wrap: 'truncate-end', children: ctx.columns >= WIDE_TABS ? `${view.key}:${view.icon} ${view.label}` : `${view.key}:${view.icon}` })] })
+ return ctx.kit.Button({ key: `tab-${view.id}`, label: words, 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) })
- return ctx.kit.Button({ key: `tab-${view.id}`, label: view.icon, hotkey: view.key, plain: true, dimColor: true, onPress: () => ctx.act.view(view.id) })
- }),
+ return ctx.kit.Box({
+ flexDirection: 'column',
+ key: 'tabs',
+ children: [line(VIEWS.filter(view => /^[0-9]$/.test(view.key)), 'tabs-views'), line(VIEWS.filter(view => !/^[0-9]$/.test(view.key)), 'tabs-manage')],
})
}
diff --git a/plugins/ruflo-console/tests/behaviour.test.ts b/plugins/ruflo-console/tests/behaviour.test.ts
index 960df24e15..5bc835c019 100644
--- a/plugins/ruflo-console/tests/behaviour.test.ts
+++ b/plugins/ruflo-console/tests/behaviour.test.ts
@@ -14,9 +14,9 @@ describe('behaviour', () => {
const pane = await $.ui.mount({ ...paneAt(110), plugin: PLUGIN })
- expect(textOf(await pane.drawn())).toContain('βŒ‚ Overview')
+ expect(textOf(await pane.drawn())).toContain('🏠 Overview')
await pane.press({ key: 'tab-claims' })
- expect(textOf(await pane.drawn())).toContain('βš‘ Claims')
+ expect(textOf(await pane.drawn())).toContain('πŸ“Œ Claims')
expect(world.stored.get('ruflo-console/ui:/work')).toEqual({ view: 'claims', isClosedByPerson: false })
expect(world.opened.length).toBeGreaterThanOrEqual(2)
await pane.unmount()
@@ -96,7 +96,7 @@ describe('behaviour', () => {
const pane = await $.ui.mount({ ...paneAt(100), plugin: PLUGIN })
const text = textOf(await pane.drawn())
- expect(text).toMatch(/\n\S [A-Z][A-Za-z]+\n β€” \w/) // the line under the tabs: icon, view name, what it is for
+ expect(text).toMatch(/\n\S+ [A-Z][A-Za-z]+\n β€” \w/) // the line under the tabs: icon, view name, what it is for
await pane.unmount()
}