fix(desktop/bots): restore activeBotRoute — the Bots roster loads again - #92835
Closed
jonpol01 wants to merge 1 commit into
Closed
fix(desktop/bots): restore activeBotRoute — the Bots roster loads again#92835jonpol01 wants to merge 1 commit into
jonpol01 wants to merge 1 commit into
Conversation
The NousResearch#90006 reconciliation merge (0404020) dropped the definition of activeBotRoute() while keeping both of its call sites (useRoster's queryFn and sweepBotProfileSessions' cold path). plugin.js sits outside every gate that could have noticed — the eslint file set is *.{ts,tsx} only, tsc does not see .js, and the plugin tests evaluate slices rather than the module — so main ships a ReferenceError on every roster fetch. useRoster's retry: true (kept for slow SSH gateways) turns that into a permanent "Waking up ..." spinner: the Bots tab never populates, for every user, on every install. Restore the function exactly as 9b7ab9d wrote it, placed beside its routing siblings (botConnectionRoute / requestForBot), and pin it with behavior tests whose extraction step fails if the definition is ever lost again while the call sites survive.
Collaborator
Contributor
Author
|
Confirmed duplicate — #92811 is the earlier PR and restores the function identically (same excavation, same placement). Closing in its favor. One thing this PR carries that #92811 doesn't: a regression test ( |
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.
Problem
The Bots tab never loads on current main — every install shows the "Waking up …" spinner forever
and the roster never populates.
useRoster's queryFn andsweepBotProfileSessions' cold path both callactiveBotRoute(), butthe function is defined nowhere: the #90006 reconciliation merge (
0404020f7b) dropped thedefinition while keeping both call sites. It exists in exactly one commit in history — the
feature commit
9b7ab9d65a:Every roster fetch throws
ReferenceError: activeBotRoute is not defined, anduseRoster'sretry: true(kept deliberately for slow SSH gateways) masks it as a permanent loading stateinstead of an error card.
Why no gate caught it:
plugin.jssits outside every one. The eslint config's file set is**/*.{ts,tsx}only, so the file is never linted andno-undefnever ran;tscdoes not see.js; and the plugin's node tests deliberately evaluate slices of the file, never the wholemodule. Verified against main @
5c1a304ce8: still two call sites, zero definitions.Change
Restore the function verbatim from
9b7ab9d65a, placed beside its routing siblings(
botConnectionRoute/requestForBot), with a comment recording how it was lost so the nextreconciliation has a landmark.
Testing
tests/active-bot-route.test.mjs(4 behavior tests through the same vm extraction the suitealready uses):
(connection, profile)pair to its routeprofileRoutesresolves tonull(local path)nullThe extraction step asserts the definition exists, so this file is also the regression guard for
the exact failure mode: a future merge that keeps the call sites but loses the definition fails
these tests instead of shipping a spinner. Reverting the fix: 4/4 fail. Full plugin suite on the
rebased head: 415/415.
Live verification: a desktop build without this change reproduces the permanent "Waking up …"
(roster absent after 8+ minutes against a healthy gateway); with it, the same install's roster
populates in ~3 seconds with local and remote-connection rows.