Skip to content

Revert "fix(settings): fix unsaved change detection for non-admin-message config items"#1100

Merged
danditomaso merged 1 commit into
mainfrom
revert-1062-fix/unsaved-change-count
Jun 15, 2026
Merged

Revert "fix(settings): fix unsaved change detection for non-admin-message config items"#1100
danditomaso merged 1 commit into
mainfrom
revert-1062-fix/unsaved-change-count

Conversation

@danditomaso

Copy link
Copy Markdown
Collaborator

Reverts #1062

Copilot AI review requested due to automatic review settings June 15, 2026 00:03
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web-test Error Error Jun 15, 2026 12:03am

Request Review

@danditomaso
danditomaso merged commit 7a8529b into main Jun 15, 2026
4 of 5 checks passed
@danditomaso
danditomaso deleted the revert-1062-fix/unsaved-change-count branch June 15, 2026 00:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Picks up the #1062 revert (#1100). Clean auto-merge — #1097 had already dropped #1062, so both sides agree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants