Conversation
profiles.list opened every profile state.db as a writable SessionDB, which waits out write-lock patience while that profile's backend is mid-turn. The desktop RPC timed out and Bot Mode's infinite React Query retry kept the sidebar on a spinner. Inspect those DBs read-only and bound roster retries so names still paint.
The hang bound alone would pass if read-only open degraded to None.
useRoster called a helper that was dropped after the remote-routing commit. Bounded retries then surfaced ReferenceError as "Roster unavailable". Define the helper again and treat a missing route as the local profiles.list door.
Drop the plugin.js source regex (AGENTS.md: never read source in tests) and lock ROSTER_QUERY_RETRY at 2. Exercise matching, thrown, and no-match profileRoutes so the restore cannot stay green while unused.
- useRoster and the hide-sweep call host.request('profiles.list') on the
active socket instead of waiting on activeBotRoute / refreshProfiles
(60s /api/profiles) before first paint
Addressed differently: first-paint roster no longer waits on route inventory at all. |
|
Hi @kudapara Quick caveat: I'm not affiliated with Nous and can't really review the code. What I observed (v0.20.5 packaged desktop, macOS arm64)Chat over the same gateway worked fine the whole time, so the backend was healthy — only the roster render path was dead. 1. React Query roster cache frozen in // via CDP → Runtime.evaluate, walking the fiber tree to the queryClient
{
"key": ["hermes-bots", "roster", "local"],
"status": "pending",
"fetchStatus": "fetching",
"error": null,
"data": null
}
// same state after manual query.fetch() + 6s wait; survives app restarts2. The That ruled out the lock-timeout path for my instance and pointed at something dying inside the queryFn before the first request. 3. Cause: merge $ git show 38ce2d755:apps/desktop/src/plugins/hermes-bots/plugin.js | grep -c activeBotRoute
0 # main-side parent: definition already gone
$ git show ddc78217f:apps/desktop/src/plugins/hermes-bots/plugin.js | grep -c activeBotRoute
3 # branch-side parent: definition + 2 uses survive
# merge 0404020f7 kept the 2 uses without the definition → ReferenceError,
# swallowed by React Query's retry:true loop → eternal spinner, no error card4. Renderer-side confirmation of the throw (the pane never surfaces it): // window.hermesDesktop.api(...) against the healthy local backend answered
// instantly when called directly — only the plugin's queryFn was dead:
{"baseUrl":"http://127.0.0.1:49835","mode":"local","authMode":"token", ...}5. Updating to current main fixed it immediately: $ git log --oneline -S activeBotRoute origin/main -- apps/desktop/src/plugins/hermes-bots/plugin.js
2ec229ec5 fixup: roster query keeps SDK ambient owner route ... # removes the calls
8523819fc refactor(desktop): consume upstream Bot owner routing
9b7ab9d65 feat(desktop): route remote bot actions by connection # introduced themBot definitions in What this means for this PR (a humble suggestion)
If it helps triage: the two failure modes have distinguishable wire signatures. Merge-regression cases show zero Thanks again Note: I do QA professionally; hoping to contribute repro/verification help here going forward. |
|
Merged via #95126 (rebase-merge) — your two commits are on main as-authored: ad1d159. Thanks @kudapara — earliest submitter in the #92830 cluster, and the write-lock diagnosis was exactly right. Scope note: we took the |
The Bots tab could sit empty on a spinner while you were already talking to a bot, or land on Roster unavailable: activeBotRoute is not defined. The roster now keeps listing your agents during a live turn; a missing route falls through to the local profile list instead of crashing the pane.
profiles.listwas opening every profilestate.dbas a writer (up to 20s of lock patience, twice) while that bot's backend held the lock, so the desktop RPC timed out. Bot Mode then retried forever, which React Query treats as still-loading. Bounded retries then surfaced a second bug:useRosterstill calledactiveBotRoute()after that helper was dropped from the plugin.Validation
scripts/run_tests.sh tests/tui_gateway/test_profiles_list_canonical_session.py tests/tui_gateway/test_profiles_list_worker_session.py— 13 passed, including a held write-lock boundnode --test src/plugins/hermes-bots/tests/roster-query-retry.test.mjs src/plugins/hermes-bots/tests/hide-bots.test.mjs src/plugins/hermes-bots/tests/canonical-chat-registry.test.mjs— 24 passed