feat: image-based task extraction + priority board#1220
Open
KatlaSathwik wants to merge 1 commit into
Open
Conversation
- Add POST /api/extract/image: Gemini vision extraction (5 retries) with automatic Tesseract.js OCR + heuristic fallback, reporting the fallback reason back to the UI. - Add matching Smart Paste UI for uploading a photo/screenshot, reusing the existing extraction preview/edit/add-to-planner flow. - Add Task Priority Board: navbar "Tasks" now opens a High/Medium/Low grouped view with consistent priority colors, reused on calendar deadline dots so newly extracted tasks are highlighted immediately. - Add "View in Task Board" from a selected calendar date, filtered to that day, alongside the existing in-place day filtering. - Fix: toast notifications and the confirm dialog had no CSS anywhere in the project (rendered unstyled inline, and never got removed from the DOM since .toast-hiding had no animation to fire animationend). Added the missing styles. - Fix: the Smart Paste panel had overflow:hidden with no scroll, making content below the fold (e.g. "Add to planner") unreachable once it grew taller than the fixed app height. - Move the ~200-line NLP heuristic fallback out of server.js into backend/utils/nlpTextExtractor.js (behavior-preserving) so the new image route can reuse it without duplicating it. See CHANGES.md for full details. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
Related Issue
Closes #229
Summary
Implements the image-to-task extraction feature from #229: upload a photo or screenshot (WhatsApp message, LMS page, handwritten note, timetable) and get structured, editable tasks extracted automatically — the same way pasted text already works. Primary path is Gemini 2.5 Flash multimodal vision (reads the image directly); falls back to Tesseract.js OCR + the existing heuristic parser if Gemini fails 5 times or no API key is configured, always reporting why it fell back.
Also adds a Task Priority Board (navbar "Tasks") that groups all tasks into High/Medium/Low columns with consistent colors, reused on the calendar's deadline dots so newly extracted tasks are highlighted by urgency immediately.
Full technical breakdown, file-by-file, in
CHANGES.md.Changes Made
POST /api/extract/imageendpoint (Gemini vision, 5 retries, OCR fallback)server.jsintobackend/utils/nlpTextExtractor.js(behavior-preserving) so the new image route can reuse itTesting
Screenshots
I'll attach screenshots/GIF of the upload flow and priority board here before submitting.
Checklist