super-productivity/docs
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
..
long-term-plans docs(security): revise secure-storage plan after multi-agent review 2026-07-03 18:21:16 +02:00
plans fix(op-log): serialize SQLite adapter transactions on the shared connection (#8849) 2026-07-07 18:00:25 +02:00
promotion build: better organize stuff 2025-06-27 09:03:16 +02:00
research feat(task-repeat): RFC 5545 RRULE recurring schedules — EPIC · Phase 1/13 (Closes #4020) (#7948) 2026-06-09 11:25:35 +02:00
screens docs/wiki content v0.8 (#7068) 2026-04-01 12:40:28 +02:00
sync-and-op-log fix(op-log): serialize SQLite adapter transactions on the shared connection (#8849) 2026-07-07 18:00:25 +02:00
wiki feat(tasks): add task through eml file hover (#8282) 2026-07-09 17:58:35 +02:00
add-new-integration.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
android-edge-to-edge-keyboard.md fix(android): keyboard + status-bar follow-ups for edge-to-edge (#8508) (#8548) 2026-06-23 11:57:49 +02:00
apple-release-automation.md ci: auto-submit iOS and macOS App Store builds for review (#7857) 2026-06-01 11:42:16 +02:00
build-and-publish-notes.md fix(ci): prevent duplicate unsigned exe files in GitHub Releases 2026-03-19 18:58:52 +01:00
documentation-guide.md Housekeeping for various docs, templates, and actions (#7451) 2026-05-02 13:58:25 +02:00
ENV_SETUP.md build: final approach 2025-07-14 20:52:51 +02:00
github-access-token-instructions.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
gitlab-access-token-instructions.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
how-to-rate.md feat(rate-dialog): action-aware prompt with feedback split 2026-05-04 17:27:11 +02:00
howto-refresh-snap-credentials.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
i18n-script-usage.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
legacy-webview-analysis.md 16.2.1 2025-11-01 13:22:58 +01:00
mac-app-store-code-signing-guide.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
performance-project-tag-report.md docs: add performance report 2025-11-13 18:23:50 +01:00
plainspace-api-extension-plan.md feat(plainspace): create tasks directly in a Plainspace-backed project (#8676) 2026-07-01 19:36:52 +02:00
plainspace-integration-plan.md refactor(sync): remove unused error classes, dialog, and constructor-time logging (phase 1, #8325) (#8510) 2026-06-20 13:36:56 +02:00
plugin-development.md fix(electron): remove exec IPC to close GHSA-256q (#8669) 2026-07-01 17:55:35 +02:00
styling-guide.md docs: update styling breakpoint table (#8846) 2026-07-07 16:50:49 +02:00
theming-contract.md feat(theme): add Plainspace built-in theme 2026-06-15 14:06:21 +02:00
TRANSLATING.md Fix frequency translations (#8000) 2026-06-05 10:53:26 +02:00
unused-translations-analysis.md chore(i18n): remove additional 86 orphan translation keys 2026-01-09 14:59:05 +01:00
update-android-app.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00
update-mac-certificates.md docs: clean up and organize project documentation 2026-03-10 10:22:56 +01:00