Skip to content

fix(web-ui): filter clients by every real ident state - #726

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/web35
Jul 30, 2026
Merged

fix(web-ui): filter clients by every real ident state#726
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/web35

Conversation

@ngosang

@ngosang ngosang commented Jul 30, 2026

Copy link
Copy Markdown
Member

The identity filter on the client tables treated ident_state as a boolean, but the daemon emits six distinct values (ClientIdentStateName in src/webapi/Refresher.cpp). "Not identified" was implemented as ident_state !== "identified", a catch-all merging unsupported, pending, failed and bad-guy peers, with no way to isolate any of them.

Web UI:

  • Drive the filter options from IDENT_STATES, 1:1 with the daemon's value set, so the comparison collapses to a plain equality test. The duplicated two-branch condition in clients.js and client-table.js is gone.
  • Default the filter to "all" in the Clients view. It defaulted to "identified", so the table opened pre-filtered while the tab badges counted every peer, and could look empty while the tab said 3. FileClients already defaulted to "all".
  • Add an Ident column (badge, sortable, hidden by default) so the full state is readable, not just inferable from the presence of an icon.
  • Show the warning icon for id_failed too. A signature that failed verification looked identical to a peer with no SecIdent at all.
  • Add the missing downloads_peer_state_connected label. DS_CONNECTED is reachable, so the DL state column rendered the raw key "downloads_peer_state_connected". Drop the orphan _undefined key and the three ident labels misfiled under the transfer-state prefix.

API docs, same class of defect found while auditing the rest of the client fields:

  • ident_state was documented as "verified", obfuscation_status as "obfuscated" and software as "eMule" in all three example blocks. None of those values can be emitted; the field sets themselves were complete and correct.
  • Enumerate the legal values of upload_state, download_state, ident_state, obfuscation_status, software and source_origin, plus the "unknown" fallback rule. Nothing enumerated them before, which is how the fabricated example values survived.
  • Fix the stale obfuscation_status and ident_state comments in State.h.

The identity filter on the client tables treated ident_state as a
boolean, but the daemon emits six distinct values (ClientIdentStateName
in src/webapi/Refresher.cpp). "Not identified" was implemented as
`ident_state !== "identified"`, a catch-all merging unsupported,
pending, failed and bad-guy peers, with no way to isolate any of them.

Web UI:

- Drive the filter options from IDENT_STATES, 1:1 with the daemon's
  value set, so the comparison collapses to a plain equality test. The
  duplicated two-branch condition in clients.js and client-table.js is
  gone.
- Default the filter to "all" in the Clients view. It defaulted to
  "identified", so the table opened pre-filtered while the tab badges
  counted every peer, and could look empty while the tab said 3.
  FileClients already defaulted to "all".
- Add an Ident column (badge, sortable, hidden by default) so the full
  state is readable, not just inferable from the presence of an icon.
- Show the warning icon for id_failed too. A signature that failed
  verification looked identical to a peer with no SecIdent at all.
- Add the missing downloads_peer_state_connected label. DS_CONNECTED is
  reachable, so the DL state column rendered the raw key
  "downloads_peer_state_connected". Drop the orphan _undefined key and
  the three ident labels misfiled under the transfer-state prefix.

API docs, same class of defect found while auditing the rest of the
client fields:

- ident_state was documented as "verified", obfuscation_status as
  "obfuscated" and software as "eMule" in all three example blocks.
  None of those values can be emitted; the field sets themselves were
  complete and correct.
- Enumerate the legal values of upload_state, download_state,
  ident_state, obfuscation_status, software and source_origin, plus the
  "unknown" fallback rule. Nothing enumerated them before, which is how
  the fabricated example values survived.
- Fix the stale obfuscation_status and ident_state comments in State.h.
@ngosang
ngosang merged commit 486d348 into amule-org:master Jul 30, 2026
14 of 15 checks passed
@ngosang
ngosang deleted the feature/web35 branch July 30, 2026 22:05
got3nks added a commit that referenced this pull request Jul 30, 2026
The trailing comments on ident_state and obfuscation_status went past the
column limit when #726 added the "unknown" value to each, and score's
comment kept an old alignment. The clang-format gate is whole-tree over
src/, so this left master red and every branch cut from it inheriting the
failure.

Formatting only, no semantic change. Verified as a clang-format fixpoint
(three consecutive passes identical), and src/ is clean tree-wide after it.
LSalami added a commit to LSalami/amule that referenced this pull request Jul 31, 2026
muleToolbar() duplicated several msgid source-location references
(Networks, Searches, Downloads Window, etc.) already present via
amuleDlg.cpp's own toolbar setup. Deleting it drops those now-stale
#: comments; no msgid added, removed, or retranslated -- verified via
unchanged msgid count (1903 before/after) and a diff limited to
source-location comments and POT-Creation-Date.

Regenerated after rebasing onto upstream/master to pick up po/
changes from amule-org#723/amule-org#724/amule-org#726/amule-org#728/amule-org#730/amule-org#731, which had drifted our
prior regeneration out of sync.
got3nks pushed a commit that referenced this pull request Jul 31, 2026
…r.cpp (#675) (#725)

* chore(gui): delete unreachable bitmap functions/entries from muuli_wdr.cpp

First slice of the icon-system cleanup scoped in #675: remove code with
zero call sites anywhere in the tree, before any wxArtProvider migration
work starts.

- muleToolbar(): whole function unused -- superseded by the main
  wxToolBar setup in amuleDlg.cpp; nothing calls it.
- moreImages(): whole function unused, both of its two icon entries.
- amuleDlgImages(): 21 of 35 index blocks have no caller anywhere
  (0-13, 16, 17, 19, 27, 28, 31, 34). The 14 live ones are untouched --
  10 of those (20-26, 29, 32, 33) are already the fallback path inside
  amuleDlg.cpp's Add_Skin_Icon, which prefers a wxArtProvider/SVG lookup
  first; the other 4 (14, 15, 18, 30) are still called directly.
- amuleSpecial(): 6 of 26 index blocks have no caller (6, 7, 8, 9, 18,
  20) -- checked both direct call sites and the PrefsUnifiedDlg.cpp
  fallback table (pages[].m_imageidx), which uses neither.

convert_xpm in PartFileConvertDlg.cpp was on the same "no literal
grep hits" list initially but is not actually dead -- SetIcon(wxICON
(convert)) reaches it via the wxICON macro's token-pasting
(X##_xpm), invisible to a plain identifier search. Caught by a full
build failing on the undeclared identifier, not by inspection; left
untouched.

Deletes 1373 lines (~16% of the file). No behavior change: every
touched entry was unreachable code. clang-format v18 clean; full
amule build verified (macOS, CLIENT_GUI unaffected since neither
touched symbol is CLIENT_GUI-only).

* chore(po): regenerate catalogs after muuli_wdr.cpp dead-code removal

muleToolbar() duplicated several msgid source-location references
(Networks, Searches, Downloads Window, etc.) already present via
amuleDlg.cpp's own toolbar setup. Deleting it drops those now-stale
#: comments; no msgid added, removed, or retranslated -- verified via
unchanged msgid count (1903 before/after) and a diff limited to
source-location comments and POT-Creation-Date.

Regenerated after rebasing onto upstream/master to pick up po/
changes from #723/#724/#726/#728/#730/#731, which had drifted our
prior regeneration out of sync.
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