feat: implement smart notebook & tag apply, undo, and empty notebook cleanup#26
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an “application layer” to the plugin so users can apply categorization results (move notes + apply semantic tags), undo the last apply via a persisted change log, and optionally clean up original notebooks that became empty. It also adds corresponding UI controls and plugin-side settings to support these operations.
Changes:
- Adds apply/undo/cleanup commands and a persisted
categorization.changeLogstate to support revert and cleanup workflows. - Extends the webview state machine and UI (Dashboard + History) to trigger and monitor apply/undo/cleanup progress and results.
- Introduces new message types (
apply,undo,cleanUpEmptyNotebooks, settings get/update) to coordinate between webview and plugin.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/webview/panel.css | Adds styling for Apply/Undo/Cleanup UI controls and status banners. |
| src/webview/pages/HistoryPage.tsx | Implements a History view that surfaces undo/cleanup actions and status based on stored change log. |
| src/webview/pages/DashboardPage.tsx | Adds “Apply categorization” UI + wires up apply state/progress/error handling. |
| src/webview/context/AppStateContext.tsx | Adds settings fetch/update and apply/undo/cleanup state + polling handling in the app state context. |
| src/types/panel.ts | Adds ApplyOptions, ApplyMessage, and new panel message types for apply/undo/cleanup + settings. |
| src/index.ts | Registers plugin settings and routes new webview messages to apply/undo/cleanup background operations with a lock guard. |
| src/commands/applyChanges.ts | New core implementation for apply, undo, and cleanup (tag matching, moving notes, change log persistence). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
All the review comments have been addressed except the one about the parent notebook (#26 (comment)). |
style: ui refinement, clean stylesheet structure, and visual polish
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.
Overview
This PR implements the note categorization application layer, allowing users to apply folder organizations and smart semantic tags to notes in one click, revert changes (Undo), and clean up empty original notebook folders.
Key Features
Performance & Safety Optimizations
$O(1)$Map lookups.Screen Recording:
Screencast.From.2026-07-07.17-53-33.mp4