feat(amulegui): wire the Kad "More" search button over EC - #573
Merged
Conversation
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.
Completes the "More" half of #571. aMuleGUI's search "More" button was permanently greyed because the remote-GUI
CSearchListRemstubbedIsKadSearch/RequestMoreResultsto always return false (no local Kad layer). This wires it over EC, matching the monolithic GUI.Per-id search kind (fixes a latent scalar bug). The EC progress reply's
EC_TAG_SEARCH_LIFECYCLE_KINDwas the scalarm_searchType(the most-recently-started search's type), so with several searches open it was wrong for any older tab of a different type — cosmetic for amuleapi/amuleweb, but it made a reliable per-tab Kad check impossible.CSearchListnow records each search's kind by id and the reply reportsGetSearchLifecycleKindById(sid).Enable — gated on the progress lifecycle, no new status. amuleGUI caches
kind == Kad && state == RUNNINGper search from each progress reply and returns it fromIsKadSearch; the monolithic GUI gets the same live gate inRefreshVisibleTabProgress. So "More" is enabled only while a Kad search is running and greys out on completion, in both GUIs.Action. New
EC_OP_SEARCH_REQUEST_MORE(fire-and-forget, like the per-id stop):RequestMoreResults(sid)sends it with the selected tab'sEC_TAG_SEARCH_ID; the daemon widens that Kad search. Multi-search-correct — it addresses the selected tab by id.Single source of truth. The action and its outcome logging live in one place —
CSearchList::RequestMoreResultslogs "requested wider results" / "no peer left to reask (cap reached)"; the monolithic GUI and the daemon (for a remote request) both reach it. EC codes hand-added to bothECCodes.abstractand the committedECCodes.h.Verified by building
amule,amulegui, andamuled.