Skip to content

feat(processor): extract handwritten tasks into ScheduleService with page deep-links (#162) - #473

Open
allenporter wants to merge 8 commits into
mainfrom
feat/magic-todo-sync-162
Open

allenporter wants to merge 8 commits into
mainfrom
feat/magic-todo-sync-162

Conversation

@allenporter

Copy link
Copy Markdown
Owner

Summary

Implements #162 (Magic Handwritten To-Do Sync — stacked on #472):

  • Database Model & Migration (NoteTaskSyncDO / f_note_task_sync):
    • Tracks per-page task extraction state and tombstones (ACTIVE, SUPERSEDED, DELETED_REMOTE, CANCELLED, ERASED) scoped by user_id without leaking OCR/processor concerns into ScheduleService.
  • TaskExtractionModule (supernote/server/services/processor_modules/task_extraction.py):
    • Registered as a post-OCR notebook module in ProcessorService.global_post_modules (TaskType.TASK_EXTRACTION).
    • Creates/reuses the "From Notes" task group in ScheduleService and attaches ScheduleTaskLinkDTO Base64 deep-links (appName="Note", filePath, fileId, page, pageId, taskTitle) so tapping a task on a Supernote tablet jumps directly to the notebook page.
    • Bullet Journal Cross-Page Migration (> / < $\rightarrow$ •): Reconciles pages in page_index order so migrated tasks advance their deep-link and due_time to the newer page without creating duplicates, while tombstoning the earlier page as SUPERSEDED.
    • Edge-Triggered Completion & DELETED_REMOTE Tombstone: Preserves digital completions and remote deletions made in the To-Do app / Web UI across subsequent page edits.
    • Strikethrough (CANCELLED), Erasure (ERASED), and NoteDeletedEvent Cleanup: Removes open tasks from ScheduleService when crossed out, erased from a page, or when the source .note file is deleted.

Fixes #162

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.94581% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.22%. Comparing base (0b3c626) to head (da0e16e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rver/services/processor_modules/task_extraction.py 80.51% 45 Missing ⚠️
supernote/server/utils/task_parser.py 92.30% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #473      +/-   ##
==========================================
- Coverage   93.33%   93.22%   -0.12%     
==========================================
  Files         144      147       +3     
  Lines       14788    15192     +404     
==========================================
+ Hits        13803    14163     +360     
- Misses        985     1029      +44     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

feat(processor): extract handwritten action items and checkboxes into ScheduleService with notebook page deep-links

2 participants