-
Notifications
You must be signed in to change notification settings - Fork 120
frontend: kraken: fix duplicated entries in settings and user custom settings #3744
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
Merged
patrickelectric
merged 1 commit into
bluerobotics:master
from
nicoschmdt:fix-duplicated-entries-extension
Jan 26, 2026
Merged
frontend: kraken: fix duplicated entries in settings and user custom settings #3744
patrickelectric
merged 1 commit into
bluerobotics:master
from
nicoschmdt:fix-duplicated-entries-extension
Jan 26, 2026
Conversation
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors how extension permissions JSON is parsed and displayed in the InstalledExtensionCard by moving JSON.parse calls into typed computed properties, preventing duplicated entries and improving type safety. Class diagram for updated InstalledExtensionCard computed JSON parsingclassDiagram
class InstalledExtensionCard {
+ExtensionData extension
+InstalledExtensionData installedExtension
+JSONValue parsed_permissions()
+JSONValue parsed_user_permissions()
+string formatVersion()
+string prettifySize(number size_kb)
}
class JSONValue
class ExtensionData
class InstalledExtensionData
InstalledExtensionCard ..> JSONValue : uses
InstalledExtensionCard ..> ExtensionData : renders
InstalledExtensionCard ..> InstalledExtensionData : renders
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey - I've left some high level feedback:
- Both
parsed_permissionsandparsed_user_permissionscallJSON.parseon potentially user-controlled strings without error handling; consider wrapping them in a try/catch and falling back to{}ornullto avoid runtime errors when the JSON is malformed. - The two computed properties
parsed_permissionsandparsed_user_permissionsare nearly identical; consider extracting a small helper (e.g.,parseJsonOrDefault(this.extension.permissions)) to reduce duplication and keep the parsing logic consistent in one place.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Both `parsed_permissions` and `parsed_user_permissions` call `JSON.parse` on potentially user-controlled strings without error handling; consider wrapping them in a try/catch and falling back to `{}` or `null` to avoid runtime errors when the JSON is malformed.
- The two computed properties `parsed_permissions` and `parsed_user_permissions` are nearly identical; consider extracting a small helper (e.g., `parseJsonOrDefault(this.extension.permissions)`) to reduce duplication and keep the parsing logic consistent in one place.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
882146a to
09bb6da
Compare
patrickelectric
approved these changes
Jan 26, 2026
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.
fix #3453
Tested by applying the change in
User Custom Settingsand leavingSettingswith theJSON.parse(). The modification displayed the configurations correctly while the old version was showing duplicates.Summary by Sourcery
Bug Fixes: