Skip to content

feat(amulegui): wire the Kad "More" search button over EC - #573

Merged
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:feat/amulegui-more-button-ec
Jul 24, 2026
Merged

feat(amulegui): wire the Kad "More" search button over EC#573
got3nks merged 2 commits into
amule-org:masterfrom
got3nks:feat/amulegui-more-button-ec

Conversation

@got3nks

@got3nks got3nks commented Jul 24, 2026

Copy link
Copy Markdown

Completes the "More" half of #571. aMuleGUI's search "More" button was permanently greyed because the remote-GUI CSearchListRem stubbed IsKadSearch/RequestMoreResults to 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_KIND was the scalar m_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. CSearchList now records each search's kind by id and the reply reports GetSearchLifecycleKindById(sid).

Enable — gated on the progress lifecycle, no new status. amuleGUI caches kind == Kad && state == RUNNING per search from each progress reply and returns it from IsKadSearch; the monolithic GUI gets the same live gate in RefreshVisibleTabProgress. 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's EC_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::RequestMoreResults logs "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 both ECCodes.abstract and the committed ECCodes.h.

Verified by building amule, amulegui, and amuled.

@got3nks
got3nks merged commit 9664aed into amule-org:master Jul 24, 2026
13 checks passed
@got3nks
got3nks deleted the feat/amulegui-more-button-ec branch July 24, 2026 12:00
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.

1 participant