feat: add topic whitespace detection setting#2017
Merged
Conversation
Add a new setting to detect and highlight whitespace characters in MQTT topics. This helps users identify accidental spaces that could cause publish/subscribe mismatches. When enabled, topics containing whitespace display a visual hint showing each character with spaces marked. Changes include: - New toggle in settings for both desktop and web apps - Whitespace detection UI in publish and subscription components - i18n support for zh, en, ja, tr, hu languages
There was a problem hiding this comment.
Pull request overview
This PR introduces a new "Topic whitespace detection" setting that helps users identify accidental whitespace characters in MQTT topics that could cause publish/subscribe mismatches. When enabled, the feature displays a visual hint showing each character in the topic with spaces marked using the ␣ symbol.
Changes:
- Added a new boolean setting
topicWhitespaceDetectionwith UI controls in the settings page - Implemented whitespace detection UI in both publish and subscribe topic input fields
- Added localization strings for Chinese, English, and Japanese (web) plus Turkish and Hungarian (desktop)
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/views/settings/index.vue | Added toggle switch and UI for the topic whitespace detection setting |
| src/views/settings/index.vue | Added toggle switch and UI for the topic whitespace detection setting in desktop app |
| web/src/types/global.d.ts | Added topicWhitespaceDetection boolean property to App interface |
| src/types/global.d.ts | Added topicWhitespaceDetection boolean property to App interface |
| web/src/store/modules/app.ts | Added state, mutation, and action for managing the setting in web app |
| src/store/modules/app.ts | Added state, mutation, and action for managing the setting in desktop app |
| web/src/store/getter.ts | Added getter for topicWhitespaceDetection state |
| src/store/getter.ts | Added getter for topicWhitespaceDetection state |
| web/src/lang/settings.ts | Added translation strings for the new setting |
| src/lang/settings.ts | Added translation strings for the new setting with additional languages |
| web/src/lang/connections.ts | Added translation for the whitespace hint label |
| src/lang/connections.ts | Added translation for the whitespace hint label with additional languages |
| web/src/database/index.ts | Added default value false for the new setting |
| web/src/components/SubscriptionsList.vue | Implemented whitespace detection UI in subscription topic input, removed .trim modifier |
| src/components/SubscriptionsList.vue | Implemented whitespace detection UI in subscription topic input, removed .trim modifier |
| web/src/components/MsgPublish.vue | Implemented whitespace detection UI in publish topic input |
| src/components/MsgPublish.vue | Implemented whitespace detection UI in publish topic input |
| src/background.ts | Added initialization of the setting from electronStore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Red-Asuka
approved these changes
Jan 14, 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.
Summary
␣Test plan