Skip to content

fix: settings Modified filter now correctly detects nested setting changes (fixes PlatformNetwork/bounty-challenge#21918)#14

Closed
echobt wants to merge 0 commit intomainfrom
fix/issue-21918
Closed

fix: settings Modified filter now correctly detects nested setting changes (fixes PlatformNetwork/bounty-challenge#21918)#14
echobt wants to merge 0 commit intomainfrom
fix/issue-21918

Conversation

@echobt
Copy link
Copy Markdown
Contributor

@echobt echobt commented Feb 27, 2026

Fix

The Settings 'Modified' filter now correctly detects changes in nested settings objects.

Changes

  • SettingsContext.tsx: Implemented countDeepDifferences() and collectDeepDifferences() utility functions for recursive deep comparison of nested settings objects
  • getModifiedCountForSection() now uses deep comparison instead of shallow reference checks
  • Handles nested objects (e.g., editor.inlayHints, zenMode.*, theme.*), arrays, and primitive values correctly

Root Cause

getModifiedCount() only compared top-level keys against defaults using reference equality. Nested objects like inlayHints: { enabled: true, fontSize: 12 } were compared by reference to the default object and always appeared 'equal', causing the Modified filter to show an empty sidebar.

Fixes PlatformNetwork/bounty-challenge#21918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant