fix(moa): desktop/TUI advisor visibility, progress indicator, preset + per-advisor toggles (cluster salvage) - #70283
Merged
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on a33082f all good! |
teknium1
force-pushed
the
moa/desktop-tui-cluster
branch
from
July 24, 2026 00:25
674c120 to
1fb88e4
Compare
…placing Every moa.reference event called appendReasoningDelta(..., replace=true), which wipes ALL existing reasoning-type message parts and seeds exactly one new part. With two or more MoA reference models, each later reference erased the reasoning disclosure built by earlier references, so only the last advisor's output ever stayed visible instead of one labelled block per reference (contradicting the multi-reference visibility behavior from #53855). Only the first reference (index <= 1, or missing) now replaces — preserving the original "clear stale reasoning from before this turn" behavior. Every later reference accumulates via the existing queue-then-flush path instead, applied immediately since each reference arrives as one complete block rather than incremental tokens. Fixes #64658
… is hidden Every moa.reference gateway event stores its labelled reference-model output in a Msg's generic `thinking` field (turnController's recordMoaReference), which messageLine.tsx and the ToolTrail component gate on `display.sections.thinking`'s resolved mode. When that mode resolves to `hidden`, MoA reference blocks were suppressed along with ordinary model reasoning — even though (per #53855) references are the mixture-of-agents process the user explicitly opted into, not private reasoning, and should stay visible regardless of the thinking-section setting. Adds Msg.isMoaReference (set by recordMoaReference), a shouldShowThinkingTrail helper mirroring the existing shouldShowResponseSeparator pattern, and a reasoningAlwaysVisible prop threaded into ToolTrail to bypass the two suppression gates (the trail-wrapper return-null check and the allHidden/panel-push checks) plus the panel's initial open state and the shift-click expand-all gesture, so a MoA reference panel is not just present in the tree but actually visible and openable on first paint. Fixes #64657
…ce panels Maintainer review (hermes-sweeper) on this PR found the fix was incomplete: two paths still hid the MoA reference panel under thinking: hidden. 1. thinking.tsx: the mount useState correctly seeds openThinking from (visible.thinking === 'expanded' || reasoningAlwaysVisible), but the re-sync effect on [visible] fires after the FIRST render too, not just later updates, and lacks the reasoningAlwaysVisible OR — so it immediately collapsed a just-opened MoA panel right after mount. Skip only the effect's very first run (a ref flag); every later visible change still re-syncs without the override, preserving the documented no-OR-at-effect-time contract (manual collapse sticks). 2. useMainApp.ts: showProgressArea's streamSegments predicate gated thinking content on thinkingPanelVisible alone, so an MoA reference segment (segment.isMoaReference, same flag messageLine.tsx's shouldShowThinkingTrail already honors per #64657) never kept the live progress area up when thinking was hidden — StreamingAssistant then returned early before MessageLine was ever reached. Added the same override. Added tests/thinkingMoaReferenceVisibility.test.tsx: mounts ToolTrail with reasoningAlwaysVisible + sections.thinking: hidden, awaits queued effects, and asserts the chevron is still open (▾, not ▸) once they settle. Validation: npx vitest run src/__tests__/thinkingMoaReferenceVisibility.test.tsx -> 1 passed Fail-before: reverting only the thinking.tsx ref-guard reproduces the exact regression -- the same test's frame capture shows the panel open on first paint then collapsing to ▸ once the effect fires, and the 'not.toContain(▸)' assertion fails as expected. npx vitest run (full ui-tui suite): 1115 passed, 8 failed -- all 8 pre-existing and unrelated (terminalSetup/terminalParity/editor resolution env-path tests), confirmed by running them in isolation with the same result regardless of this diff. npx tsc --noEmit: clean. npx eslint src/components/thinking.tsx src/app/useMainApp.ts: clean.
Salvaged from PR #59743. Original author email was malformed (sr@samirusani, not resolvable to a GitHub account), so the commit is re-authored with credit via trailer. Co-authored-by: Sami Rusani <samrusani@users.noreply.github.com>
Adds per-reference progress events and a phase-transition marker to the
MoA display pipeline so TUI / CLI / desktop surfaces can render a status
bar like `MOA: 2/3 refs done` and surface which phase (reference vs
aggregator) is currently active.
- `moa.progress` — fired once per reference completion with
`refs_done`, `refs_total`, and the source label
- `moa.phase` — fired on phase transitions (currently the single
`phase="aggregator"` transition once the fan-out
finishes)
Plumbed through the existing `reference_callback` →
`tool_progress_callback` → gateway path; no new UI surface. The legacy
`moa.reference` / `moa.aggregating` events are unchanged for backwards
compatibility.
AI-assisted fix by https://github.com/SquabbyZ/peaks-loop
….phase Frontend consumers for the events added by PR #59646: the TUI shows a replace-in-place 'MoA: refs k/n' activity line (swapped for 'MoA: aggregating…' on the aggregator phase), and desktop streams '◇ MoA refs k/n' lines into the reasoning disclosure, self-cleaned by the first moa.reference block.
Follow-up for salvaged PR #59753 rebased over the per-slot reasoning_effort feature: _clean_slot now round-trips reasoning_effort AND enabled together; add a normalize→normalize regression test, update the validate/normalize agreement contract for the canonical enabled default, restore the desktop per-slot toggle test on the current autosave editor, and map oppenheimor's contributor email.
…abled flag The per-reference-model enabled toggle (#59753 salvage) intentionally adds 'enabled' to normalized slot dicts. The two endpoint tests asserted the exact key set {provider, model} — convert them to subset + round-trip contracts so optional slot keys (enabled, reasoning_effort, max_tokens) don't break them again.
…-cluster rebase The per-advisor enabled toggle adds enabled=True to normalized slots; the JSON-string-parse and per-slot max_tokens tests from sibling clusters asserted exact dicts. Compare against the enabled-augmented expectation instead.
teknium1
force-pushed
the
moa/desktop-tui-cluster
branch
from
July 24, 2026 01:03
1fb88e4 to
a33082f
Compare
This was referenced Jul 24, 2026
19 tasks
BillyNour
added a commit
to BillyNour/hermes-agent
that referenced
this pull request
Jul 31, 2026
Rebuild the Desktop MoA Studio PR on latest main after NousResearch#70283: - keep preset master + per-advisor enabled toggles in Studio - accept/edit/save fanout every_n:N (N>=2) with regression tests - drop bundled xAI same-MoA backend retry from this PR - preserve model-menu keyboard/search while adding Studio activation guards
BillyNour
added a commit
to BillyNour/hermes-agent
that referenced
this pull request
Aug 9, 2026
Rebuild the Desktop MoA Studio PR on latest main after NousResearch#70283: - keep preset master + per-advisor enabled toggles in Studio - accept/edit/save fanout every_n:N (N>=2) with regression tests - drop bundled xAI same-MoA backend retry from this PR - preserve model-menu keyboard/search while adding Studio activation guards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MoA's advisor pipeline becomes fully visible and controllable across Desktop and TUI: reference reasoning blocks accumulate instead of overwriting each other, stay visible when the thinking section is hidden, a live progress indicator shows fan-out state, and presets gain both a master Enabled toggle and per-advisor toggles. Consolidated salvage of five PRs (cluster: MoA desktop/TUI display).
Changes (8 commits, authorship preserved)
gateway-event.tsusedreplace=truefor EVERYmoa.reference— with ≥2 advisors only the last block survived. Now replace-first/append-rest + delta flush. Fixes [Bug]: Desktop MoA reference events replace earlier advisor output instead of accumulating #64658.Msg.isMoaReference+reasoningAlwaysVisiblewith a first-run-skip guard that preserves the feat(tui): per-section visibility for the details accordion #14968 manual-collapse contract. Fixes [Bug]: TUI hides MoA reference blocks when the thinking section is hidden #64657.enabledflag has been wired in the backend all along (skips fan-out when false) but had zero GUI control. Authorship note: the original commit email (sr@samirusani) is malformed/unresolvable, so this was re-authored with a Co-authored-by trailer instead of cherry-picking a broken identity. Closes bug(moa): enabled toggle documented but missing from Desktop GUI #59723.moa.progress(refs k/n + label) andmoa.phaseevents threaded moa_loop → facade → agent_init relay → tui_gateway. One keep-both conflict resolved. Our fix-up: actual frontend consumers — TUI shows "MoA: refs k/n" in the progress area, desktop registers the events and surfaces fan-out state in the reasoning block — so [Feature]: MOA 建议加上进度提示 #59546's ask is user-visible, not just plumbing.enabledtoggles full-stack (moa_config_clean_slot, skip-disabled in both call paths, moa_cmd, web_server, desktop checkboxes, dashboard). Rebased over the per-slotreasoning_effortfeature;_clean_slotround-tripsreasoning_effortANDenabledwith a round-trip regression test. Implements feat(moa): Add enable/disable toggle for individual reference models #59707.Contributor mappings committed for the non-noreply emails.
Validation
Salvages #64689, #64701, #59743, #59646, #59753. Fixes #64658, #64657, #59723, #59546, #59707.
Note: #70228 (Desktop MoA preset studio) touches this same settings surface — it needs a rebase over these toggles plus a split of its bundled xAI backend change before review.
Infographic