Repository navigation
fix(settings): Improve internal address dialog - #13977
Merged
Merged
Conversation
The API answers with no data when the address is already stored or covered by an internal domain, but the store passed that response on to the mutation, which failed on the missing ID. The settings therefore showed "Could not add internal address" for an address that is internal. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
The Ok button callback didn't return the promise of the request, so the dialog closed right away without a loading state, also when the request then failed. Returning the promise lets NcDialog show a spinner and ignore further clicks until the request is done, and a failure keeps the dialog open with the entered address. While saving, Cancel, the close button and Escape are blocked, and the text field is read-only. Ok itself stays enabled, because disabling the focused button would drop the focus out of the dialog. Ok is disabled while the address is empty, also after trimming spaces and a leading "@", which would otherwise request an invalid URL. The address is sent without those spaces, the button labels are translated, and Enter in the text field now submits the dialog like Ok. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
When the server rejects an address as invalid with HTTP 422, the dialog now shows the reason below the text field and moves the focus there, so screen readers announce it, instead of showing a toast. The message clears as soon as the address is edited, and closing the dialog resets the field, so a rejected address doesn't come back without its error. Other errors still show the toast. The server doesn't validate internal addresses yet. That follows in a separate change, which answers invalid input with HTTP 422. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
DerDreschner
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
October 30, 2026 10:57
1 task done
kesselb
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The internal address dialog has a few issues that this PR fixes:
data: null(which means: address already exists), the UI handled that as error and showed a "Could not add internal address" errorReferences to: #5139
References to: #13976
🤖 AI (if applicable)