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): narrow nav: the βœ• closes a picked group from the search line, and the open group's chip drops its arrow

ruvefd867e14a4f
diff --git a/plugins/ruflo-console/hooks/views/nav.ts b/plugins/ruflo-console/hooks/views/nav.ts
index d8d67c14ff..9b4970dbb9 100644
--- a/plugins/ruflo-console/hooks/views/nav.ts
+++ b/plugins/ruflo-console/hooks/views/nav.ts
@@ -79,7 +79,7 @@ export function groupedTabs(ctx: Ctx, hasHotkey: (view: View) => boolean): Rende
const isSearchInline = inner - chipCells >= 28
const chips = NAV_GROUPS.map(group =>
group.title === shown && found === null && !isMenuIdle
- ? ctx.kit.Box({ key: `nav-group-${group.title}`, children: [ctx.kit.Text({ ...(isBbs() ? chip(NAV_ACCENT[group.title] ?? THEME.head) : { bold: true, color: THEME.head }), children: `[${icons ? `${group.icon} ` : ''}${group.title} β–Ύ]` })] })
+ ? ctx.kit.Box({ key: `nav-group-${group.title}`, children: [ctx.kit.Text({ ...(isBbs() ? chip(NAV_ACCENT[group.title] ?? THEME.head) : { bold: true, color: THEME.head }), children: `[${icons ? `${group.icon} ` : ''}${group.title}${inner < 72 ? '' : ' β–Ύ'}]` })] })
: ctx.kit.Button({ key: `nav-group-${group.title}`, label: ` ${icons ? `${group.icon} ` : ''}${group.title} `, plain: true, dimColor: true, onPress: () => ctx.act.navigator.group(group.title) }),
)
// On the main menu a picked group's pages are open: a βœ• beside the chips closes them again.
@@ -91,9 +91,9 @@ export function groupedTabs(ctx: Ctx, hasHotkey: (view: View) => boolean): Rende
flexDirection: 'row',
gap: 1,
key: 'tabs-groups',
- children: [menu === undefined ? ctx.kit.Text({ children: '' }) : open === 'menu' ? tab(menu) : ctx.kit.Button({ key: 'tab-menu', label: ' πŸ“Ÿ MAIN ', plain: true, hotkey: '0', onPress: () => ctx.act.view('menu') }), ...chips, ...closePick, ...(isSearchInline ? [...search, ...clear] : [])],
+ children: [menu === undefined ? ctx.kit.Text({ children: '' }) : open === 'menu' ? tab(menu) : ctx.kit.Button({ key: 'tab-menu', label: ' πŸ“Ÿ MAIN ', plain: true, hotkey: '0', onPress: () => ctx.act.view('menu') }), ...chips, ...(isSearchInline ? closePick : []), ...(isSearchInline ? [...search, ...clear] : [])],
})
- const findRow = isSearchInline ? [] : [ctx.kit.Box({ flexDirection: 'row', gap: 1, key: 'tabs-find', children: [...search, ...clear] })]
+ const findRow = isSearchInline ? [] : [ctx.kit.Box({ flexDirection: 'row', gap: 1, key: 'tabs-find', children: [...search, ...clear, ...closePick] })]
const lines =
found !== null && found.length === 0
? [ctx.kit.Text({ dimColor: true, children: ` no page matches β€œ${query}” β€” try a name, a group or what it does` })]
diff --git a/plugins/ruflo-console/tests/design.spec.ts b/plugins/ruflo-console/tests/design.spec.ts
index f1ce089bc5..94f4bd4379 100644
--- a/plugins/ruflo-console/tests/design.spec.ts
+++ b/plugins/ruflo-console/tests/design.spec.ts
@@ -178,6 +178,24 @@ describe('the nav card on the main menu', () => {
expect(close).toBeDefined()
})
+ it('puts the βœ• on the search line in a narrow card, so the chips keep their row, and beside the chips in a wide one', () => {
+ const where = (columns: number): string => {
+ const state = newState({})
+
+ state.view = 'menu'
+ state.navPick = { group: 'MIND', view: 'menu' }
+ setLook('bbs')
+
+ const card = groupedTabs(ctxOf(state, columns), () => true) as unknown as El
+ const holder = flat(card).find(node => Array.isArray(node.props.children) && (node.props.children as El[]).some(child => child?.props?.key === 'nav-pick-close'))
+
+ return String(holder?.props.key)
+ }
+
+ expect(where(56)).toBe('tabs-find')
+ expect(where(140)).toBe('tabs-groups')
+ })
+
it('keeps every page reachable by its key from the menu: they are hidden buttons, not gone', () => {
const keys = flat(draw(false)).filter(node => String(node.props.key).startsWith('tab-') && node.props.hotkey !== undefined).map(node => String(node.props.key))