Skip to content

feat(console): easier navigation β€” real Back, one name per page, /ruflo go, instant refresh (0.43.0) - #4039

Draft
socrates6969 wants to merge 16 commits into
ruvnet:mainfrom
socrates6969:feat/console-nav
Draft

socrates6969 wants to merge 16 commits into
ruvnet:mainfrom
socrates6969:feat/console-nav

Conversation

@socrates6969

Copy link
Copy Markdown
Contributor

Draft until a manual check in a live console: menu β†’ Swarm β†’ an agent β†’ "β—‚ Back" Γ—2 lands on the menu, at 40 and at 160 columns; y/n on the Timeline page with a confirm card showing; /ruflo go catalog; /ruflo learning lab.

Problem

Moving around ruflo-console 0.42 is harder than it needs to be:

  • Back only worked out of the agent drill-down; everywhere else it jumped to the menu.
  • On Timeline, n ("later") is drawn after the confirm card's Cancel n, so pressing n to cancel pans the timeline instead.
  • Key hints were stale ("Swarm (2)" β€” Swarm is 3; "Cost (9)" β€” Cost is c, 9 is Memory); the Terminal help taught s/o/z keys that do not exist; help said "b back" as if it worked on every page.
  • Three different group schemes (nav, menu, help) and pages with two names ("Learning Lab"/"Neural", "Claims Board", "Plugins & Mods").
  • viewOf matched only an id, key, exact label or id prefix, so "catalog" at the menu prompt found nothing; /ruflo catalog and /ruflo mission are other commands.
  • Refresh replayed the 5–8 s boot screen; below 44 columns the pane armed no page keys and no p/x/r/h.

Changes (0.43.0)

  • History: a trail of the pages you visited (cap 20; each agent entry remembers which agent was open; stale pages and vanished agents are skipped). Back returns through it; the agent page keeps "b goes back to …".
  • β—‚ Back button in the breadcrumb (mouse; no hotkey). A global back key was not possible: pane hotkeys accept one digit or lowercase letter, and ui.close cannot tell Esc from the close mark, so Esc and the close mark are unchanged.
  • Confirm card keys win: while an ask is pending, page buttons lose y/n hotkeys (withoutAnswerKeys), so y/n always answer the card (checked for every view).
  • Key hints from one table (keyLabel(id) from VIEWS), terminal/help wording fixed.
  • One group scheme: NAV_GROUPS drives the menu, tabs and the help index; each page has one label everywhere ("Neural Lab", "Claims", "Plugins", "Room"). Old names still work at the menu prompt and with /ruflo (RETIRED_NAMES).
  • Find a page by name: viewOf precedence exact id/key/label β†’ retired name β†’ id prefix (3+) β†’ label prefix β†’ all words; ambiguity β†’ none (a single letter is only ever a key). New /ruflo go <page> (answers with close matches when nothing or several match). /ruflo verbs always win over page names (VERBS, checked against the switch), so /ruflo swarm topology and /ruflo agent <id> keep their meaning. The palette lists pages and ranks a page whose label starts with the query first. /ruflo dump takes a full page name.
  • Refresh is instant (re-read + probe, missing-file cache cleared); the boot screen moved to Settings β†’ Replay boot.
  • Narrow panes (< 44 columns) keep the digit page keys, the core-tab page keys and p/x/r/h via hidden buttons (drawn before the page, so a page's own key still wins).
  • Removed the unreachable flat tab bar.

Tests

New specs: history, back-button, key-shadow, key-labels, group-scheme, commands-verbs, find-by-name, refresh-instant β€” 132+ tests, each written red first where it pins a fix. Related nav/menu/help/palette specs pass. On this Windows checkout the full vitest suite fails the same set before and after (environment-only: sparse checkout without sibling plugins, symlink EPERM, Windows path bugs fixed separately in #4036, claude-code/testing not importable under vitest); events-sweep hotkey tests occasionally time out under full-suite load and pass alone. claude plugin validate plugins/ruflo-console passes.

Known follow-ups

  • plugin.json description still says "The Room lists the sessions…" (page is "Room").
  • Words of retired names take part in word matching (/ruflo go agent opens Timeline via "agent timeline"); the typed side is not tokenised like page names (what's new with a straight apostrophe β†’ close-matches list).
  • Letter page keys outside the core tabs still only work on their group's tab strip (unchanged).
  • Conflicts with fix(console): ruflo-console works on Windows (project paths, home folder, disk writes) β€” 0.42.2Β #4036 (Windows fixes) in register.ts/pane.ts and the version are resolved by whichever merges second.

πŸ€– Generated with Claude Code

socrates6969 and others added 16 commits October 10, 2026 19:00
Back is now a real history: setView pushes the page it leaves (capped at 20, no
duplicate steps, skipped with { replace: true }), and Back pops, skipping
entries whose page or agent no longer exists, falling back to the menu (bbs) or
Overview. The breadcrumb names the page Back returns to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trail entries are { view, agentId? }: leaving the drill-down records its agent,
Back restores it through drill() and skips an entry whose agent is gone from the
snapshot. The liveness check no longer reads the claims cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine gives a hotkey to the later of two buttons that share it, and the
confirm card is drawn above the page body, so Timeline's "later" button (n)
won the key from the card's Cancel. While an ask is pending, the page body is
drawn through a kit that drops y/n hotkeys from page buttons (clicks, keys,
labels, focus order and layout are unchanged). tests/key-shadow.spec.ts checks
every view, with an ask raised anywhere and on the page itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hints that named a page and its key were hard-coded and had drifted:
"Swarm (2)" (Swarm is 3) and "Cost (9)" (Cost is c; 9 is Memory) on the
agent, memory and alerts pages. keyLabel(id) in state.ts now builds
"Cost (c)" from VIEWS, and those hints use it. The /ruflo help no longer
promises terminal keys the Stop/New/Clear buttons do not have, and no
longer presents "b back" as global (it is back on the agent page only;
the breadcrumb has a Back button). key-labels.spec.ts scans hooks/**
for "<page label> (<key>)" and checks each against VIEWS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"wait, or stop it (s)" told people to press a key the terminal does not
have. It now says "press β–  Stop", and key-labels.spec.ts checks that no
terminal message names a key for Stop, New session or Clear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… help

NAV_GROUPS is now the only grouping. The main menu's boxes are built from
it (SWARM, MIND, SAFETY, NETWORK, TOOLS, in that order; the menu keeps its
sub-sections as a second level in MENU_SECTIONS, and a page the split
forgets is added to the group's last section), and the Help index lists
Start, the same five groups, then Console. Guides for a page are filed
under that page's group. The accent table is keyed by the same names.

One label per page, the VIEWS one, in the menu, tabs, palette, help text and
boot log: Claims (was Claims Board), Plugins (was Plugins & Mods), Swarm,
Memory, Cost, Room, Terminal, Events, Timeline. The page that was "Learning
Lab" and "Neural" is now Neural Lab, so it no longer reads like Learning (7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s Neural Lab

"learning lab", "memory lab", "claims board", "plugins & mods" and the other
menu-only names stopped resolving when the labels were unified. viewOf now
falls back to a small explicit table (RETIRED_NAMES), and /ruflo <phrase>
tries the full page name before its first word, so "/ruflo learning lab"
opens Neural Lab. The key help line says "l neural lab". The retired-name
spec is now case-insensitive with word boundaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/ruflo swarm topology and /ruflo agent timeline are the verbs' own
arguments again: a multi-word page name is only tried when the first word
is not one of parseRuflo's verbs. VERBS is the list, and a spec keeps it
equal to the switch's cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
viewOf now finds a page by a label prefix or the words of its names under
one ranked rule (exact, alias, id prefix, label prefix, all words); a tie at
the best rule is ambiguous and opens nothing, and a single letter stays the
page key. /ruflo go <page> always opens a page and lists close pages when
none fits; mission and catalog output point at it. The palette lists a page
by the same rules and ranks a page whose label starts with the query first.
The menu prompt reads names through viewOf, so it gains the same matching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refresh (r, the footer button, the icon, the menu prompt's r) now only
re-reads and probes: it no longer replays the BBS boot screen that hid the
page for several seconds. The intro is Settings -> Replay boot.

Below 44 columns the pane has no tab or footer buttons, so page keys and
p / x / r / h were dead. The pages and the footer actions are now drawn as
hidden buttons (the technique the nav card and a full footer already use),
without y / n while an ask is pending. The unreachable flat tab bar is
removed; the navigation-style setting stays (the nav card reads it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gent page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inal does not have

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me test

The retired-name regex was built in a plain template literal, so \w became w and the escape class was malformed. It now uses String.raw and a proper escape, has a planted-case test, and bans the capitalised 'The Room'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…header says what it tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@proffesor-for-testing

Copy link
Copy Markdown
Collaborator

Adversarial review at cf30550cb

Verdict: closest of the three open console PRs to mergeable. No functional defects found. It is blocked by the 500-line smoke check and merge conflicts.

How this was tested: the PR head, plus a trial merge onto current main (keeping main's side of the version files): vitest 3166 pass, kit suite all 247 pass, scripts/typecheck.sh unchanged (7 errors, same as main). gh pr checks reports no checks, so CI has not run.

Checked: no navigation route skips the confirm cards; go, Back and the palette only call setView or drill. Stale trail entries (a gone agent, an unknown page id) are skipped. There are no URLs, so no open redirect.

Findings

  1. smoke.sh step 11 fails: controller.ts is 502 lines (the limit is 500), so all-plugins-smoke will be red.
  2. Conflicts. It conflicts with main (console is at 0.42.6 there: plugin.json, CHANGELOG.md, hooks/version.ts, scripts/smoke.sh). It also conflicts with feat(console): Chat with Claude β€” read and talk to the live session from the console (0.44.0)Β #4041 in nav-state.ts, self-check.ts, views/menu.ts and views/pane.ts. This PR makes NAV_GROUPS the single source for the menu and renames area labels, while feat(console): Chat with Claude β€” read and talk to the live session from the console (0.44.0)Β #4041 adds Chat to the old structure. Whichever lands second needs a real rebase, not just conflict fixes.
  3. Behaviour changes not mentioned in the description:
    • bindings.ts:271: r at the menu prompt now refreshes instead of replaying the boot.
    • commands.ts:44-47: any multi-word /ruflo <words> whose first word isn't a verb now opens a page by fuzzy match, before the old "Unknown:" reply.
    • Palette ranking (PAGE_LEAD/PAGE_NAMED) can change which entry Enter runs. It only promotes page-open entries, so this is harmless, but users will notice.
  4. Nits:
    • The Back trail (history.ts) is in memory only and is lost on restart.
    • b goes back only on the agent page; elsewhere it's the breadcrumb button. The help text says so.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants