super-productivity/docs/wiki
Yehonatan Avrahimi 18c48d5ea8
feat(tasks): add task through eml file hover (#8282)
* 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>
2026-07-09 17:58:35 +02:00
..
assets docs(wiki): initial revision (v0.1) 2026-01-20 03:04:08 -08:00
0.-Meta-Diataxis.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
0.00-Wiki-Structure-and-Organization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.01-Style-Guide.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.02-Wiki-QA-and-Maintenance.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
1.00-Quickstarts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.01-First-Steps.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.02-Configure-Data-Synchronization.md fix(sync): support separate Nextcloud login name 2026-05-18 13:43:23 +02:00
2.00-How_To.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.01-Downloads and Install.md docs/wiki content v0.8 (#7068) 2026-04-01 12:40:28 +02:00
2.02-Restore-Data-From-Backup.md docs(backup): document Android automatic restore (#8193) 2026-06-09 11:27:43 +02:00
2.03-Add-Tasks.md feat(tasks): add task through eml file hover (#8282) 2026-07-09 17:58:35 +02:00
2.04-Manage-Subtasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.05-Manage-Scheduled-Tasks.md refactor(tasks): restructure reminder dialog footer into primary + overflow (#8517) 2026-06-22 15:42:44 +02:00
2.06-Manage-Repeating-Tasks.md feat(task-repeat): default skip-overdue for new everyday recurring tasks (#8861) 2026-07-08 19:55:37 +02:00
2.07-Manage-Task-Integrations.md feat(plainspace): Collaborate-on-Plainspace discovery + smoother connect (#8649) 2026-07-01 16:39:34 +02:00
2.08-Choose-Sync-Backend.md docs(sync): document Proton Drive via rclone WebDAV (#8064) 2026-06-19 11:05:30 +02:00
2.09-Configure-Sync-Backend.md fix(sync): surface OneDrive OAuth token errors and document Entra setup (#8580) 2026-06-24 16:18:46 +02:00
2.10-Configure-Obsidian-for-Wiki-Contributions.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.11-Run-the-Development-Server.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.12-Package-the-App.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.13-Run-with-Docker.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.14-Build-for-Android.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.15-Develop-a-Plugin.md fix(plugins): allow iframe-only plugin installs 2026-05-18 13:43:22 +02:00
2.16-Set-Up-Development-Environment.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.17-Add-a-New-Issue-Integration.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.18-Contribute-Translations.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.19-Sync-Proton-Drive-via-rclone.md docs(wiki): add Proton Drive via rclone + WebDAV guide 2026-06-18 15:18:15 +02:00
3.00-Reference.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.01-API.md fix(local-rest-api): validate PATCH/create field value types (#8738) 2026-07-03 18:20:33 +02:00
3.02-Settings-and-Preferences.md feat(update-check): notify desktop users about new releases (#5463) (#8705) 2026-07-02 14:13:09 +02:00
3.03-Keyboard-Shortcuts.md feat(tasks): redesign add-task-bar layout, toggles, note field & a11y (#8812) 2026-07-07 16:26:36 +02:00
3.04-Short-Syntax.md feat(help): add create task how-to #8015 (#8079) 2026-06-08 11:40:14 +02:00
3.05-Web-App-vs-Desktop.md feat(update-check): notify desktop users about new releases (#5463) (#8705) 2026-07-02 14:13:09 +02:00
3.06-User-Data.md refactor: remove dead SyncStateCorruptedError, compat exports, and 0 byte sync-providers barrel #8328 (#8396) 2026-06-15 14:16:14 +02:00
3.07-Issue-Integration-Comparison.md feat(plainspace): Collaborate-on-Plainspace discovery + smoother connect (#8649) 2026-07-01 16:39:34 +02:00
3.08-Sync-Integration-Comparison.md feat(sync): offer E2EE before first upload for file-based providers (#8709) 2026-07-02 17:17:01 +02:00
3.09-Theming.md feat(theme): add Plainspace built-in theme 2026-06-15 14:06:21 +02:00
3.97-Obsidian-Linter-Config-MD.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.98-Obsidian-Linter-Config-YAML.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.99-Other.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
4.00-Concepts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
4.01-The-Today-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.02-Inbox-View.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.03-Planner-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.04-Schedule-View.md fix(schedule): indicate tasks beyond available time 2026-05-11 14:30:55 +02:00
4.05-Board-View.md feat(boards): enhance project selection with multi-select and sidebar… (#8069) 2026-06-09 18:33:09 +02:00
4.06-Project-View.md feat(project): project completion experience (#8036) 2026-06-08 13:43:38 +02:00
4.07-Tag-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07a-Tags_Eat-the-Frog.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.07b-Tags_Ordinal-Priorities.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.08-Time-Estimates.md docs(wiki): add How Time Is Logged section 2026-02-04 14:45:00 +01:00
4.09-Task-Attributes.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.10-Task-Notes.md feat(search): include note content in global search and support folde… (#8044) 2026-06-09 19:18:10 +02:00
4.11-Subtasks.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.12-Scheduled-Tasks.md docs(wiki): added Scheduled Tasks; updated references in multiple sections 2026-02-04 14:45:00 +01:00
4.13-Repeating-Tasks.md feat(task-repeat): default skip-overdue for new everyday recurring tasks (#8861) 2026-07-08 19:55:37 +02:00
4.14-How-Time-Is-Logged.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.15-Timers-and-Focus-Mode.md feat(focus-mode): make preparation opt-in, smooth start transition (#8639) 2026-06-29 19:44:53 +02:00
4.16-Break-Reminders.md docs(wiki): add Reminders and Idle Time 2026-02-04 14:45:00 +01:00
4.17-Idle-Time.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.18-Reflection.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.19-Metrics.md [codex] Hide global metric charts outside Today (#8019) 2026-06-05 10:53:57 +02:00
4.20-Task-Archiving.md docs(wiki): add Task Archiving section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.21-Worklog.md fix(worklog): avoid misleading export start/end times (#8090) 2026-06-08 20:44:47 +02:00
4.22-Quick-History.md feat(history): merge Quick History and Worklog into a unified History view (#8033) 2026-06-05 18:10:56 +02:00
4.23-Managing-Your-Data.md feat(sync): show banner when LWW sync discards a user content edit (#8694) (#8702) 2026-07-02 12:53:02 +02:00
4.24-Integrations.md docs(caldav): clarify bidirectional VTODO sync (#8196) 2026-06-09 11:27:39 +02:00
_Footer.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
_Sidebar.md docs(sync): document Proton Drive via rclone WebDAV (#8064) 2026-06-19 11:05:30 +02:00
Home.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00