Skip to content

amulegui: re-show connection dialog on connect failure instead of quitting - #841

Merged
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:fix/amulegui-connection-retry
Jun 4, 2026
Merged

amulegui: re-show connection dialog on connect failure instead of quitting#841
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:fix/amulegui-connection-retry

Conversation

@got3nks

@got3nks got3nks commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Why

Currently amulegui hard-quits whenever the initial EC connect fails — wrong host / port / password / timeout all unwind through ShutDown + ExitMainLoop. The only feedback the user gets is a one-shot error message; relaunching the app to fix a typo (or a daemon that wasn't listening yet) is a poor UX.

What

Refactor ShowConnectionDialog into a retry loop:

  • Keep the CEConnectDlg alive across retry attempts so the user's typed values (host, port, password) survive a wrong guess. Destroyed in Startup() on success or below when the user cancels.
  • Watchdog timer is now armed inside ShowConnectionDialog right before each ConnectToCore call instead of in OnInit, so every retry attempt gets a fresh 15 s budget.
  • Sync ConnectToCore failure (DNS / connect-refused): cancel the watchdog, show an error, ResetEcConnect(), loop back to the dialog.
  • Async OnECConnection failure: same path — ResetEcConnect() then re-enter ShowConnectionDialog. Only when the user cancels the retry dialog do we ShutDown + ExitMainLoop.
  • OnConnectTimeout: same pattern.
  • --skip is now one-shot: the first attempt uses the persisted values silently, but a failed retry falls into the modal dialog so the user can correct what was wrong (looping silently with the same wrong creds would never recover).

ResetEcConnect() tears down and rebuilds m_connect + glob_prefs because CRemoteConnect's socket / auth state isn't safe to reuse after a failed handshake. Both objects are only wired into the rest of the app by Startup() (which only runs on successful connect), so recreating them mid-flight is safe.

The "server disconnected after Startup" branch in OnECConnection (where the daemon dies during a live session) keeps the original graceful-quit behaviour — the dialog is gone and the rest of the app is wired up, no clean retry path exists.

Verified

  • macOS local build: clean
  • Manual reproduction on macOS: wrong password → "Connection Failed" message → dialog reappears with prior host/port/password fields preserved → fix password → succeed (exercises the async OnECConnection failure → retry path).
  • OnConnectTimeout retry path (wrong/unreachable host triggering the 15 s watchdog) — code-reviewed, not manually reproduced yet.
  • Sync ConnectToCore failure path (immediate connect-refused) — code-reviewed, not manually reproduced yet.

@got3nks

got3nks commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@mrjimenez all tested and ready to be merged.

@mrjimenez

Copy link
Copy Markdown
Contributor

This one has a conflict.

…tting

Currently amulegui hard-quits whenever the initial EC connect fails -
wrong host / port / password / timeout all unwind through ShutDown +
ExitMainLoop. The only feedback the user gets is a one-shot error
message; relaunching the app to fix a typo (or a daemon that wasn't
listening yet) is a poor UX.

Refactor ShowConnectionDialog into a retry loop:

 - Keep the CEConnectDlg alive across retry attempts so the user's
   typed values (host, port, password) survive a wrong guess.
   Destroyed in Startup() on success or below when the user cancels.

 - Watchdog timer is now armed inside ShowConnectionDialog right
   before each ConnectToCore call instead of in OnInit, so every
   retry attempt gets a fresh 15 s budget.

 - Sync ConnectToCore failure (DNS / connect-refused): cancel the
   watchdog, show an error, ResetEcConnect(), loop back to the
   dialog.

 - Async OnECConnection failure: same path - ResetEcConnect() then
   re-enter ShowConnectionDialog. Only when the user cancels the
   retry dialog do we ShutDown + ExitMainLoop.

 - OnConnectTimeout: same pattern.

 - --skip is now one-shot: the first attempt uses the persisted
   values silently, but a failed retry falls into the modal dialog
   so the user can correct what was wrong (looping silently with
   the same wrong creds would never recover).

ResetEcConnect() tears down and rebuilds m_connect + glob_prefs
because CRemoteConnect's socket / auth state isn't safe to reuse
after a failed handshake. Both objects are only wired into the
rest of the app by Startup() (which only runs on successful
connect), so recreating them mid-flight is safe.

The "server disconnected after Startup" branch in OnECConnection
(where the daemon dies during a live session) keeps the original
graceful-quit behaviour - the dialog is gone and the rest of the
app is wired up, no clean retry path exists.
@got3nks
got3nks force-pushed the fix/amulegui-connection-retry branch from fde12fb to fdb6214 Compare June 4, 2026 12:44
@got3nks

got3nks commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on current master — conflict was the SetForceZlib(dialog->ForceZlib()) call from #840, resolved by moving it inside the retry loop so it gets re-applied on every connect attempt (lets the user toggle the checkbox between retries). Verified the rebased branch builds clean on macOS. Ready when you are, @mrjimenez.

got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
…ndex

Adds 55+ merged PRs to the 3.0.0 changelog since the last update
(amule-project#747, 2026-05-27). Narrative additions cover:

- Packaging: expanded the top list to include the macOS per-arch .app
  bundles and the Windows NSIS installer alongside the existing
  AppImage / Flatpak / .dmg / .zip entries. New bullets for amule-project#785
  (alc/alcc/cas/wxcas everywhere + Windows amuleweb), amule-project#794 (.dmg
  amuleweb path), amule-project#789 (<OS>-<arch> artifact naming), amule-project#780 / amule-project#796
  (Windows DPI + comctl32 manifest), amule-project#784 (FHS share/amule paths).

- Bug Fixes & Stability: post-amule-project#744 fixes including EC notification
  leak (amule-project#797), big-library scaling (amule-project#736, amule-project#840 superseding amule-project#728),
  amulegui ghost entries (amule-project#810, amule-project#819, amule-project#841, amule-project#824, amule-project#830, amule-project#760),
  PartFile early hash (amule-project#762), server protocol fixes (amule-project#835, amule-project#788,
  amule-project#721, amule-project#787), crypto stream UB (amule-project#779), UAF prevention (amule-project#756),
  Kad rotation (amule-project#795, amule-project#799/amule-project#805), GTK warning silencing (amule-project#833,
  amule-project#826/amule-project#836), and the clang-tidy worklist (amule-project#770, amule-project#772-amule-project#774).

- Translations: late-cycle wave covering French/Turkish manpages
  (amule-project#753/amule-project#754/amule-project#776), Galician (amule-project#763), Slovenian (amule-project#771), pt-BR
  (amule-project#768/amule-project#775/amule-project#812), French (amule-project#811), plus man-page tooling for
  date+version drift (amule-project#802).

- Contributors: added ngosang for UX feedback on the late-3.0
  cycle (amule-project#817/amule-project#818/amule-project#821/amule-project#828/amule-project#844) and ongoing work on the
  user-facing manual at amule-org.github.io.

- Merged PRs flat index: extended with amule-project#746-amule-project#845 + amule-project#841.
got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-amule-project#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (amule-project#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (amule-project#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (amule-project#809)
  - "Connection Type:" (amule-project#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (amule-project#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR amule-project#841 applied locally, so the new amulegui retry-loop strings
are included even though amule-project#841 itself is not in this branch — when
amule-project#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
…ndex

Adds 55+ merged PRs to the 3.0.0 changelog since the last update
(amule-project#747, 2026-05-27). Narrative additions cover:

- Packaging: expanded the top list to include the macOS per-arch .app
  bundles and the Windows NSIS installer alongside the existing
  AppImage / Flatpak / .dmg / .zip entries. New bullets for amule-project#785
  (alc/alcc/cas/wxcas everywhere + Windows amuleweb), amule-project#794 (.dmg
  amuleweb path), amule-project#789 (<OS>-<arch> artifact naming), amule-project#780 / amule-project#796
  (Windows DPI + comctl32 manifest), amule-project#784 (FHS share/amule paths).

- Bug Fixes & Stability: post-amule-project#744 fixes including EC notification
  leak (amule-project#797), big-library scaling (amule-project#736, amule-project#840 superseding amule-project#728),
  amulegui ghost entries (amule-project#810, amule-project#819, amule-project#841, amule-project#824, amule-project#830, amule-project#760),
  PartFile early hash (amule-project#762), server protocol fixes (amule-project#835, amule-project#788,
  amule-project#721, amule-project#787), crypto stream UB (amule-project#779), UAF prevention (amule-project#756),
  Kad rotation (amule-project#795, amule-project#799/amule-project#805), GTK warning silencing (amule-project#833,
  amule-project#826/amule-project#836), and the clang-tidy worklist (amule-project#770, amule-project#772-amule-project#774).

- Translations: late-cycle wave covering French/Turkish manpages
  (amule-project#753/amule-project#754/amule-project#776), Galician (amule-project#763), Slovenian (amule-project#771), pt-BR
  (amule-project#768/amule-project#775/amule-project#812), French (amule-project#811), plus man-page tooling for
  date+version drift (amule-project#802).

- Contributors: added ngosang for UX feedback on the late-3.0
  cycle (amule-project#817/amule-project#818/amule-project#821/amule-project#828/amule-project#844) and ongoing work on the
  user-facing manual at amule-org.github.io.

- Merged PRs flat index: extended with amule-project#746-amule-project#845 + amule-project#841.
got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-amule-project#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (amule-project#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (amule-project#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (amule-project#809)
  - "Connection Type:" (amule-project#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (amule-project#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR amule-project#841 applied locally, so the new amulegui retry-loop strings
are included even though amule-project#841 itself is not in this branch — when
amule-project#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
@mrjimenez
mrjimenez merged commit 2b95175 into amule-project:master Jun 4, 2026
7 checks passed
mrjimenez pushed a commit that referenced this pull request Jun 4, 2026
Adds 55+ merged PRs to the 3.0.0 changelog since the last update
(#747, 2026-05-27). Narrative additions cover:

- Packaging: expanded the top list to include the macOS per-arch .app
  bundles and the Windows NSIS installer alongside the existing
  AppImage / Flatpak / .dmg / .zip entries. New bullets for #785
  (alc/alcc/cas/wxcas everywhere + Windows amuleweb), #794 (.dmg
  amuleweb path), #789 (<OS>-<arch> artifact naming), #780 / #796
  (Windows DPI + comctl32 manifest), #784 (FHS share/amule paths).

- Bug Fixes & Stability: post-#744 fixes including EC notification
  leak (#797), big-library scaling (#736, #840 superseding #728),
  amulegui ghost entries (#810, #819, #841, #824, #830, #760),
  PartFile early hash (#762), server protocol fixes (#835, #788,
  #721, #787), crypto stream UB (#779), UAF prevention (#756),
  Kad rotation (#795, #799/#805), GTK warning silencing (#833,
  #826/#836), and the clang-tidy worklist (#770, #772-#774).

- Translations: late-cycle wave covering French/Turkish manpages
  (#753/#754/#776), Galician (#763), Slovenian (#771), pt-BR
  (#768/#775/#812), French (#811), plus man-page tooling for
  date+version drift (#802).

- Contributors: added ngosang for UX feedback on the late-3.0
  cycle (#817/#818/#821/#828/#844) and ongoing work on the
  user-facing manual at amule-org.github.io.

- Merged PRs flat index: extended with #746-#845 + #841.
mrjimenez pushed a commit that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (#809)
  - "Connection Type:" (#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR #841 applied locally, so the new amulegui retry-loop strings
are included even though #841 itself is not in this branch — when
#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
@got3nks
got3nks deleted the fix/amulegui-connection-retry branch June 5, 2026 22:35
mrjimenez pushed a commit to mrjimenez/amule that referenced this pull request Aug 8, 2026
…roject#841)

Closes amule-project#840. Servers cap how many of a user's shared files they will index --
some at 9,000, others at 100,000 or more -- and nothing surfaced it, so a user
sharing 37,000 files could not tell whether a server was publishing all of
them.

Adds Soft Files, Hard Files and Max Users to the server list. All three were
already parsed from server.met, kept on CServer and refreshed by the periodic
UDP status ping that fills Users and Files; only the display was missing. Soft
and hard files are streamed over EC so the remote GUI has them too.

Zero renders blank rather than "0": these arrive only once a status reply comes
back, and the reply is parsed progressively by size, so a server that has not
answered advertises nothing. Showing that as a limit of zero would be a claim
about the server rather than an absence of data.

The wire-flag columns are now offered in both binaries as well (requested by
danim7): the flags are streamed like the limits, the columns are appended,
registered and rendered unconditionally, and hidden-by-default keys on the
build type rather than on which binary is running.

Several column-layer defects came out of building it. Two predate this work:
drag-resizing was never persisted, because the idle poll standing in for
wxDataViewCtrl's missing end-of-drag event called a virtual that did nothing;
and the remote GUI never sized its columns to content at all, since the core's
bulk-load notification is a path it does not take. Both are fixed, and the
auto-fit is gated on the profile having no stored widths so it cannot overwrite
a width the user dragged -- a clobber that was harmless only while nothing was
saved.

Also: column ids must match the order columns are appended, since the fit walks
one index as both a model column and a view position -- now asserted rather
than documented; and the header show/hide menu was limited to 15 columns, which
silently dropped the 16th.
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.

2 participants