Revert "fix(settings): fix unsaved change detection for non-admin-message config items"#1100
Merged
Merged
Conversation
…sage con…" This reverts commit 87043f3.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reverts prior changes from #1062 related to unsaved-change detection and per-section change counting in the Settings UI.
Changes:
- Removed specialized radio/device config change counters and related type aliases.
- Reverted byte-array normalization used when comparing Security config payloads.
- Adjusted Settings page pending-state detection to also consider React Hook Form dirty state.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/src/pages/Settings/index.tsx | Rewires change-count badge inputs and pending-save detection logic. |
| packages/web/src/core/utils/deepCompareConfig.ts | Removes exported byte normalization helper. |
| packages/web/src/core/stores/deviceStore/index.ts | Removes per-section config change count APIs from the device store. |
| packages/web/src/core/stores/deviceStore/deviceStore.mock.ts | Updates mock to match removed store APIs. |
| packages/web/src/core/stores/deviceStore/changeRegistry.ts | Collapses config type discriminators and removes per-section config counters. |
| packages/web/src/components/PageComponents/Settings/Security/Security.tsx | Removes normalization when comparing Security config, relying on raw deep-compare. |
Comment on lines
+53
to
56
| const configChangeCount = getConfigChangeCount(); | ||
| const moduleConfigChangeCount = getModuleConfigChangeCount(); | ||
| const channelChangeCount = getChannelChangeCount(); | ||
| const adminMessageChangeCount = getAdminMessageChangeCount(); |
| label: t("navigation.radioConfig"), | ||
| icon: RadioTowerIcon, | ||
| changeCount: radioConfigChangeCount, | ||
| changeCount: configChangeCount, |
| label: t("navigation.deviceConfig"), | ||
| icon: RouterIcon, | ||
| changeCount: deviceConfigChangeCount, | ||
| changeCount: moduleConfigChangeCount, |
| label: t("navigation.moduleConfig"), | ||
| icon: LayersIcon, | ||
| changeCount: moduleConfigChangeCount, | ||
| changeCount: channelChangeCount, |
| }, | ||
| ], | ||
| [t, radioConfigChangeCount, deviceConfigChangeCount, moduleConfigChangeCount], | ||
| [t, configChangeCount, moduleConfigChangeCount, channelChangeCount], |
Comment on lines
+90
to
93
| if (deepCompareConfig(config.security, payload, true)) { | ||
| removeChange({ type: "config", variant: "security" }); | ||
| return; | ||
| } |
thebentern
added a commit
that referenced
this pull request
Jun 15, 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.
Reverts #1062