Skip to content

fix: folder scope in Settings now correctly reads/writes folder-specific settings (fixes PlatformNetwork/bounty-challenge#21930)#10

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

fix: folder scope in Settings now correctly reads/writes folder-specific settings (fixes PlatformNetwork/bounty-challenge#21930)#10
echobt wants to merge 0 commit intomainfrom
fix/issue-21930

Conversation

@echobt
Copy link
Copy Markdown
Contributor

@echobt echobt commented Feb 27, 2026

Summary

Fixes PlatformNetwork/bounty-challenge#21930 — Folder scope in Settings does not behave as folder-only.

Problem

When the user selects 'Folder' scope in the Settings dialog, the settings panels still read and write settings at the global/user level instead of folder-specific. The settingsScope() signal is correctly set to 'folder' but the individual setting controls call generic setSetting() / updateEditorSetting() etc. instead of setFolderSetting(folderPath, section, key, value).

Solution

SettingsDialog.tsx

  • Pass folderPath={selectedFolder()} to all sub-panels when scope is 'folder'
  • Fix inline settings (theme, wrapTabs, sortOrder) to check for folder scope and call setFolderSetting() / hasFolderOverride() / resetFolderSetting()
  • Add folder-specific reset buttons alongside workspace reset buttons

All 7 Sub-Panels (Editor, Files, Terminal, Network, Git, Debug, Workbench)

  • Added folderPath?: string to each panel's props interface
  • updateSetting(): Added scope() === 'folder' check → calls settings.setFolderSetting()
  • hasOverride(): Added scope() === 'folder' check → calls settings.hasFolderOverride()
  • resetOverride(): Added scope() === 'folder' check → calls settings.resetFolderSetting()
  • Effective settings read: Uses settings.getEffectiveSettingsForPath(folderPath) when in folder scope
  • Added green folder scope indicator badge to each panel
  • Reset-all buttons show folder-specific text when in folder scope

No changes needed in SettingsContext

All folder-level APIs (setFolderSetting, resetFolderSetting, hasFolderOverride, getEffectiveSettingsForPath, loadFolderSettings, saveFolderSettings) already existed in SettingsContext.tsx and were fully implemented.

Verification

  • npm run build
  • npm run typecheck

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.

[BUG] [alpha] Folder scope in Settings does not behave as folder-only

1 participant