Skip to content

Fix modem URL reverting to default on settings page load#289

Merged
itsDNNS merged 1 commit intomainfrom
fix/modem-url-overwrite
Mar 24, 2026
Merged

Fix modem URL reverting to default on settings page load#289
itsDNNS merged 1 commit intomainfrom
fix/modem-url-overwrite

Conversation

@itsDNNS
Copy link
Owner

@itsDNNS itsDNNS commented Mar 24, 2026

Summary

Fixes #288. The modem URL silently reverted to the driver's default every time the settings page loaded.

Root cause: toggleUsernameField() in settings.js checked if the current URL was in KNOWN_DEFAULT_URLS (a set of ALL driver defaults across ALL modem types). Since http://192.168.100.1 is the default for 6 other drivers (TC4400, CH7465, CM3000, etc.), a Vodafone Station user with that bridge-mode URL would have it silently replaced with http://192.168.0.1 (the Vodafone Station default) on every page load.

Fix: Track the previous driver's default URL and only auto-fill when switching drivers (where the URL still shows the old driver's default) or when the field is empty. User-customized URLs are never touched.

Test plan

  • 1871 tests pass
  • Settings page load with custom URL preserves the URL
  • Switching modem type updates URL from old default to new default
  • Switching modem type with custom URL preserves the URL
  • Empty URL field gets filled with driver default

The settings page JS checked if the current modem_url matched ANY
driver's default URL, and if so, replaced it with the currently
selected driver's default. This caused user-configured URLs like
192.168.100.1 (bridge mode) to be silently overwritten with the
selected driver's default (e.g. 192.168.0.1 for Vodafone Station)
every time the settings page loaded.

Now only replaces the URL if it matches the previously selected
driver's default (for driver switching) or if the field is empty.
Custom URLs are never touched.

Fixes #288
@itsDNNS itsDNNS merged commit fe0b98b into main Mar 24, 2026
2 checks passed
@itsDNNS itsDNNS deleted the fix/modem-url-overwrite branch March 24, 2026 09:01
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.

Vodafone Modem IP not stored?

1 participant