Files
romm/frontend/src
Ellis Nieuwpoort 9b705d9602 fix(notifications): start a pasted Apprise URL from defaults, not stale values (#5217)
* fix(notifications): drop stale fields from an earlier pasted URL

A URL read half-typed (ntfy://romm) sets mode=cloud. The full URL then
omits mode as the default, so the stale cloud mode stayed and Apprise
ignored the host. Remember what the last read filled in and drop it on
the next read unless it was changed by hand.

* refactor(notifications): apply code-review fixes to stale URL field handling

Reset the last-read memory with the form values instead of a clearPaste
flag, compare with lodash isEqual, and fix the test import order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(notifications): simplify the stale URL field tests

Fold the three drop cases into it.each, bind the paste label once, and
drive the URL debounce with fake timers instead of real sleeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(notifications): let a pasted URL replace every option it decides

The parse response now lists every key the URL decides, defaults included,
so the dialog drops a stale value (ntfy's mode: cloud) whether it came from
an earlier read or from the channel being edited. This replaces the
frontend's memory of the last read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(notifications): keep typed values only beside a service's own URL

An Apprise URL carries every option, so a pasted one starts from defaults
and a stale ntfy mode: cloud (from an earlier read or the channel being
edited) is dropped. Only an https URL, a service's own, keeps what was
typed beside it. This replaces the parse endpoint's decided list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:17:47 -04:00
..