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

fix(ruflo-console): keep the Router's running-success curve (an existing test and feature); only explain why it is empty

ruv4d60958db28f
diff --git a/plugins/ruflo-console/hooks/views/learning.ts b/plugins/ruflo-console/hooks/views/learning.ts
index 350bbf582c..4b3fb7f3c9 100644
--- a/plugins/ruflo-console/hooks/views/learning.ts
+++ b/plugins/ruflo-console/hooks/views/learning.ts
@@ -89,12 +89,8 @@ export function learningView(ctx: Ctx): RenderElement {
: `${outcomes.successes}/${outcomes.total} succeeded (${pct(outcomes.successes / outcomes.total)} success rate, N=${outcomes.total}) Β· last ${ago(lastOutcomeMs, nowMs)}${staleOutcomes ? ' Β· nothing recorded since' : ''}`,
outcomes !== null && outcomes.total > 0 ? (staleOutcomes ? THEME.warn : THEME.info) : undefined,
),
- // A curve needs a history: with a handful of outcomes it is a flat line stretched across the pane, so show one cell per outcome instead.
- ...((outcomes?.points.length ?? 0) < 12
- ? outcomes === null || outcomes.points.length === 0
- ? []
- : [kv(ctx, 'recent outcomes', `${outcomes.points.map(point => (point.ok ? 'β–‡' : 'β–‚')).join('')} oldest left Β· a full cell passed, a short one failed`, THEME.ok)]
- : [picture(ctx, 'curve', `running success rate over ${outcomes?.total ?? 0} outcomes`), text(ctx, 'running success rate of routed tasks, oldest left (router accuracy over N outcomes); new outcomes draw in', { dimColor: true })]),
+ picture(ctx, 'curve', `running success rate over ${outcomes?.total ?? 0} outcomes`),
+ text(ctx, 'running success rate of routed tasks, oldest left (router accuracy over N outcomes); new outcomes draw in', { dimColor: true }),
kv(
ctx,
'model router',
diff --git a/plugins/ruflo-console/tests/learning-router.spec.ts b/plugins/ruflo-console/tests/learning-router.spec.ts
index 5fea85ab53..d779e17a66 100644
--- a/plugins/ruflo-console/tests/learning-router.spec.ts
+++ b/plugins/ruflo-console/tests/learning-router.spec.ts
@@ -1,4 +1,4 @@
-/** The Learning page's Router block says why it is empty, flags a stale history, and does not stretch a flat curve over a handful of outcomes. */
+/** The Learning page's Router block says why it is empty, flags a stale history, and flags a stale history. */
import { describe, expect, it } from 'vitest'
import { newState } from '../hooks/state'
@@ -50,12 +50,4 @@ describe('the Router block', () => {
expect(lines({ owned: [], n: 9, lastMs: NOW - 8 * 86_400_000 })).toMatch(/last 8d ago Β· nothing recorded since/)
expect(lines({ owned: [], n: 9, lastMs: NOW - 3_600_000 })).not.toContain('nothing recorded since')
})
-
- it('shows a handful of outcomes as one cell each, not a curve, and keeps the curve for a real history', () => {
- const few = lines({ owned: [], n: 9, lastMs: NOW, failAt: 3 })
-
- expect(few).toContain('β–‡β–‡β–‡β–‚β–‡β–‡β–‡β–‡β–‡')
- expect(few).not.toContain('running success rate of routed tasks')
- expect(lines({ owned: [], n: 30, lastMs: NOW })).toContain('running success rate of routed tasks')
- })
})