Skip to content

Conversation

@ysfscream
Copy link
Member

Summary

  • Add user setting to configure the maximum payload display size threshold (16KB - 2MB, default 512KB)
  • Create PayloadSizeControl component with slider and preset size options
  • Add translations for the new setting in all supported languages (zh, en, tr, ja, hu)
  • Store the setting persistently via electron-store and Vuex state management

Test plan

  • Verify the new setting appears in Settings page under the correct section
  • Test slider functionality and preset value selection
  • Confirm messages at or above the threshold are collapsed in the message list
  • Verify setting persists across application restarts
  • Test boundary values (16KB min, 2MB max)

Add user setting to configure the threshold at which message payloads
are collapsed in the message list. The setting supports a range from
16KB to 2MB with a default of 512KB.

- Add PayloadSizeControl component with slider and preset options
- Add translations for new setting in all supported languages
- Store setting in electron-store and Vuex
- Enable Element UI Slider component
Copilot AI review requested due to automatic review settings January 22, 2026 07:05
Copy link

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 adds a user-configurable setting for the maximum payload display size threshold, allowing users to control when large messages are collapsed in the message list. The configurable range is 16KB to 2MB with a default of 512KB.

Changes:

  • Created a new PayloadSizeControl component with slider and preset size selection functionality
  • Added UI setting in the Settings page with proper Vuex integration and electron-store persistence
  • Modified the isLargeData function to accept a configurable threshold parameter instead of using a hardcoded constant
  • Added translations for the new setting in all supported languages (zh, en, tr, ja, hu)

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/components/PayloadSizeControl.vue New component providing slider and input controls for selecting payload size with unit conversion between KB/MB
src/views/settings/index.vue Integrated PayloadSizeControl component into settings page with proper state management and validation
src/views/connections/ConnectionsDetail.vue Updated isLargeData call to use the configurable maxPayloadDisplaySize from Vuex state
src/utils/data.ts Added constants for min/max/default payload sizes, normalization function, and updated isLargeData to accept configurable threshold
src/utils/element.ts Enabled the Slider component from Element UI
src/store/modules/app.ts Added Vuex state, mutation, action, and electron-store integration for maxPayloadDisplaySize setting
src/store/getter.ts Added getter for maxPayloadDisplaySize
src/types/global.d.ts Added maxPayloadDisplaySize property to App interface
src/lang/settings.ts Added translations for maxPayloadDisplaySize label, description, and validation messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ysfscream ysfscream self-assigned this Jan 22, 2026
@ysfscream ysfscream added enhancement New feature or request feature This pr is a feature desktop MQTTX Desktop labels Jan 22, 2026
@ysfscream ysfscream moved this to In Progress in MQTTX Jan 22, 2026
@ysfscream ysfscream added this to the v1.13.0 milestone Jan 22, 2026
@ysfscream ysfscream merged commit 4294625 into main Jan 23, 2026
4 checks passed
@ysfscream ysfscream deleted the feat/configurable-payload-display-size branch January 23, 2026 02:24
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQTTX Jan 23, 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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant