Skip to content

feat: add topic whitespace detection setting#2017

Merged
Red-Asuka merged 3 commits intomainfrom
feat/topic-whitespace-detection
Jan 14, 2026
Merged

feat: add topic whitespace detection setting#2017
Red-Asuka merged 3 commits intomainfrom
feat/topic-whitespace-detection

Conversation

@ysfscream
Copy link
Copy Markdown
Member

Summary

  • Add a new setting to detect and highlight whitespace characters in MQTT topics
  • Visual hint displays when topics contain whitespace, showing each character with spaces marked as
  • Helps users identify accidental spaces that could cause publish/subscribe mismatches
  • Implemented for both desktop (Electron) and web applications

Test plan

  • Enable "Topic whitespace detection" in Settings
  • Enter a topic with spaces in the publish input and verify the whitespace hint appears
  • Enter a topic with spaces in the subscription dialog and verify the whitespace hint appears
  • Disable the setting and verify the hint no longer appears
  • Test on both desktop and web versions

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
Copilot AI review requested due to automatic review settings January 13, 2026 07:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 topicWhitespaceDetection with 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.

@ysfscream ysfscream self-assigned this Jan 13, 2026
@ysfscream ysfscream moved this to In Progress in MQTTX Jan 13, 2026
@ysfscream ysfscream added this to the v1.13.0 milestone Jan 13, 2026
@ysfscream ysfscream added web MQTTX Web desktop MQTTX Desktop enhancement New feature or request feature This pr is a feature labels Jan 13, 2026
@ysfscream ysfscream requested a review from Red-Asuka January 13, 2026 09:01
@ysfscream ysfscream marked this pull request as draft January 13, 2026 09:13
@ysfscream ysfscream marked this pull request as ready for review January 13, 2026 09:34
@Red-Asuka Red-Asuka merged commit 0b2b652 into main Jan 14, 2026
6 checks passed
@Red-Asuka Red-Asuka deleted the feat/topic-whitespace-detection branch January 14, 2026 01:38
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQTTX Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop MQTTX Desktop enhancement New feature or request feature This pr is a feature web MQTTX Web

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants