Refactor plugin architecture and improve webview state persistence - #37
Open
Harsh16gupta wants to merge 1 commit into
Open
Refactor plugin architecture and improve webview state persistence#37Harsh16gupta wants to merge 1 commit into
Harsh16gupta wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the core plugin architecture, cleans up the side panel UI, fixes webview state persistence across view toggles, and integrates Undo/Cleanup functionality directly into Joplin's native options screen. I worked on some bugs which I found by using the plugin:
Simplified Code Structure
Split
src/index.tsfrom 371 lines into 3 smaller, cleaner files so the code is easier to maintain.Cleaner Side Panel
Removed top navigation tabs to keep the side panel focused purely on categorizing notes.
Prevents Data Loss
Saved categories in background memory so custom note moves and renamed categories are not lost when closing the panel or opening settings.
Native Settings Integration
Added Undo, Clean Up, and Change Log Summary directly to Tools -> Options -> AI Categorization using native settings.
Fixed Parent Notebook Nesting
Category notebooks (like "Machine Learning") are now correctly created inside your chosen target notebook (like "AI").
Apply Button Protection
Disabled the Apply button after applying changes to prevent accidental double-clicks, and auto-enabled it if you make new manual edits.