-
Notifications
You must be signed in to change notification settings - Fork 525
feat(settings): add configurable max payload display size #2029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
There was a problem hiding this 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.
Summary
Test plan