Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-initialize on Base64 Config Change #463

Open
ibolton336 opened this issue Mar 26, 2025 · 0 comments
Open

Re-initialize on Base64 Config Change #463

ibolton336 opened this issue Mar 26, 2025 · 0 comments
Assignees

Comments

@ibolton336
Copy link
Member

When the Base64-encoded configuration (or its decoded content) changes, we want to detect and re-initialize the extension to ensure new config values take effect immediately.


Tasks

  1. Implement Change Detection

    • Monitor the Base64-encoded config in real time or at key points (e.g., on save, on profile switch, etc.).
    • Compare the new value with the old cached value to detect changes.
  2. Trigger Re-initialization

    • If the new config is different, programmatically re-initialize the necessary extension states:
      • Reload analysis
      • Refresh webview content
      • Re-parse rules
    • Ensure minimal disruption to the user (i.e., avoid a full extension reload if possible).
  3. Update Event Flow

    • Integrate this logic into any existing config update functions or watchers.
    • Make sure that when the user updates the configuration (via UI/webview or VS Code settings), the event triggers the re-init.
  4. Testing & Validation

    • Verify that all extension functionalities (e.g., analysis, status bar commands) still work as expected after a re-init.
    • Test edge cases, such as:
      • Multiple quick successive changes to the config
      • User reverting to a previous configuration

Acceptance Criteria

  • Config changes are detected reliably.
  • Extension refreshes to adopt new config with minimal user interruption.
  • No stale state remains after re-init.
@ibolton336 ibolton336 self-assigned this Mar 26, 2025
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

No branches or pull requests

1 participant