mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
* feat(eml): add EML file parsing and task creation on drop Currently a simple skeleton, needs more work, but should be a good POC before refining. Fixes #518 * fix(main-header): correct email message formatting and handle EML upload errors while this commit looks bad, its a first commit before refining this solution and sending the final PR. Fixes #518 * refactor(eml): move eml-parser to util and tighten isFileEml check * feat(eml): on eml hover error parse error to log and show a snack message * bugfix(eml-typecheck): tighten type for 'sender' to not have bugs * refactor(eml-drop): updated file locations for each file drop * bugfix(eml-drop): use stable npm package for parsing eml files * bugfix(eml-drop): remove relevant "dev" flag * refactor(eml-drop): drop empty emails with a snack instead of throwing * test(eml-drop): add isFileEml and parseEml unit tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * rafactor(eml-service): refactor code to be consistent as written in issue number 3 * bugfix(eml-drop): remove file name when geting an error as written in 1. inside the pr * docs: update task creation instructions to include .eml file support * refactor(eml-parser): update import statement for PostalMime to dynamic import * refactor(eml-drop): enhance file drop handling and improve error logging * test(eml-drop): add unit tests for EmlDropDirective and EmlDropService * feat(tasks): save eml body to task notes and harden eml parsing - capture the parsed plain-text email body into task notes (text/plain only, never HTML, to avoid injecting untrusted markup into markdown notes) - pass the File/Blob straight to postal-mime so it applies the message's own charset/transfer-encoding instead of forcing UTF-8 via file.text() - use relative import paths to match repo convention - document why the drop handler relies on the global dragover preventDefault - update wiki wording + tests for the new add() signature and notes behavior * fix(tasks): harden eml-to-task against untrusted subject/size Follow-up to the eml-drop feature from a multi-agent review: - suppress short-syntax on imported email subjects: email content is untrusted external input, but TaskService.add() dispatches addTask which ShortSyntaxEffects parses for #tag/@date/+project/URL tokens — stripping them from the intended literal "sender: subject" title and mutating tags/scheduling/attachments. Thread isIgnoreShortSyntax through add() (matching the existing plugin-bridge pattern) and set it here. - guard against oversized .eml files (postal-mime parses synchronously on the main thread and the body syncs to every device) with a 10MB cap + EML_TOO_LARGE snack. - trim sender/subject so whitespace-only headers don't bypass the empty check or block the address fallback. - drop the stale "add attachment" TODO. * fix(tasks): log bounded eml parse reason, not the raw error The source is untrusted email content and the log history is exportable (rule #9). Log only e.message (postal-mime's throw messages are structural, so no email content leaks) instead of the raw error object + stack. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Johannes Millan <johannes.millan@gmail.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| 0.-Meta-Diataxis.md | ||
| 0.00-Wiki-Structure-and-Organization.md | ||
| 0.01-Style-Guide.md | ||
| 0.02-Wiki-QA-and-Maintenance.md | ||
| 1.00-Quickstarts.md | ||
| 1.01-First-Steps.md | ||
| 1.02-Configure-Data-Synchronization.md | ||
| 2.00-How_To.md | ||
| 2.01-Downloads and Install.md | ||
| 2.02-Restore-Data-From-Backup.md | ||
| 2.03-Add-Tasks.md | ||
| 2.04-Manage-Subtasks.md | ||
| 2.05-Manage-Scheduled-Tasks.md | ||
| 2.06-Manage-Repeating-Tasks.md | ||
| 2.07-Manage-Task-Integrations.md | ||
| 2.08-Choose-Sync-Backend.md | ||
| 2.09-Configure-Sync-Backend.md | ||
| 2.10-Configure-Obsidian-for-Wiki-Contributions.md | ||
| 2.11-Run-the-Development-Server.md | ||
| 2.12-Package-the-App.md | ||
| 2.13-Run-with-Docker.md | ||
| 2.14-Build-for-Android.md | ||
| 2.15-Develop-a-Plugin.md | ||
| 2.16-Set-Up-Development-Environment.md | ||
| 2.17-Add-a-New-Issue-Integration.md | ||
| 2.18-Contribute-Translations.md | ||
| 2.19-Sync-Proton-Drive-via-rclone.md | ||
| 3.00-Reference.md | ||
| 3.01-API.md | ||
| 3.02-Settings-and-Preferences.md | ||
| 3.03-Keyboard-Shortcuts.md | ||
| 3.04-Short-Syntax.md | ||
| 3.05-Web-App-vs-Desktop.md | ||
| 3.06-User-Data.md | ||
| 3.07-Issue-Integration-Comparison.md | ||
| 3.08-Sync-Integration-Comparison.md | ||
| 3.09-Theming.md | ||
| 3.97-Obsidian-Linter-Config-MD.md | ||
| 3.98-Obsidian-Linter-Config-YAML.md | ||
| 3.99-Other.md | ||
| 4.00-Concepts.md | ||
| 4.01-The-Today-View.md | ||
| 4.02-Inbox-View.md | ||
| 4.03-Planner-View.md | ||
| 4.04-Schedule-View.md | ||
| 4.05-Board-View.md | ||
| 4.06-Project-View.md | ||
| 4.07-Tag-View.md | ||
| 4.07a-Tags_Eat-the-Frog.md | ||
| 4.07b-Tags_Ordinal-Priorities.md | ||
| 4.08-Time-Estimates.md | ||
| 4.09-Task-Attributes.md | ||
| 4.10-Task-Notes.md | ||
| 4.11-Subtasks.md | ||
| 4.12-Scheduled-Tasks.md | ||
| 4.13-Repeating-Tasks.md | ||
| 4.14-How-Time-Is-Logged.md | ||
| 4.15-Timers-and-Focus-Mode.md | ||
| 4.16-Break-Reminders.md | ||
| 4.17-Idle-Time.md | ||
| 4.18-Reflection.md | ||
| 4.19-Metrics.md | ||
| 4.20-Task-Archiving.md | ||
| 4.21-Worklog.md | ||
| 4.22-Quick-History.md | ||
| 4.23-Managing-Your-Data.md | ||
| 4.24-Integrations.md | ||
| _Footer.md | ||
| _Sidebar.md | ||
| Home.md | ||