Skip to content

fix: refresh runtime settings on change#17

Open
enieuwy wants to merge 2 commits into
kavinsood:mainfrom
enieuwy:fix/settings-runtime-refresh
Open

fix: refresh runtime settings on change#17
enieuwy wants to merge 2 commits into
kavinsood:mainfrom
enieuwy:fix/settings-runtime-refresh

Conversation

@enieuwy
Copy link
Copy Markdown

@enieuwy enieuwy commented Apr 13, 2026

Problem

Changing "Exclude paths" or "Max text file size" in YAOS settings had no effect until the plugin was reloaded. The onChange handlers saved the raw values to disk but never updated the runtime fields (this.excludePatterns, this.maxFileSize) used by the sync engine.

Fix

  • Extract refreshRuntimeSettings() on the plugin class — re-parses exclude patterns and recalculates max file size from settings
  • Call it from both onChange handlers in the settings tab
  • Deduplicate the onload() init to use the same method

Test plan

  • tsc --noEmit passes
  • Open YAOS settings, set exclude pattern to templates/, create a file in templates/ — confirm it is excluded from sync immediately (no reload needed)
  • Change max file size in settings — confirm new limit applies immediately

Settings onChange handlers saved the raw values but never re-parsed
them into the runtime fields used by the sync engine. Exclude patterns
and max file size only took effect after a plugin reload.

Extract refreshRuntimeSettings() and call it from both onChange handlers
and onload().
@enieuwy enieuwy force-pushed the fix/settings-runtime-refresh branch from 42da4dd to 420d0c5 Compare May 2, 2026 07:00
@enieuwy
Copy link
Copy Markdown
Author

enieuwy commented May 2, 2026

Review follow-up pushed in 8a5c9af.

This keeps the runtime settings refresh from leaving a stale conservative-reconcile untracked queue:

  • refreshRuntimeSettings() now re-filters queued untracked files against the current exclude patterns and max text size;
  • importUntrackedFiles() rechecks syncability and size before reading/importing each queued file.

Verification rerun:

  • npm run build
  • git diff --check

@kavinsood kavinsood force-pushed the main branch 4 times, most recently from fc810fe to 3837c05 Compare May 18, 2026 15:24
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.

1 participant