mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +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> |
||
|---|---|---|
| .. | ||
| long-term-plans | ||
| plans | ||
| promotion | ||
| research | ||
| screens | ||
| sync-and-op-log | ||
| wiki | ||
| add-new-integration.md | ||
| android-edge-to-edge-keyboard.md | ||
| apple-release-automation.md | ||
| build-and-publish-notes.md | ||
| documentation-guide.md | ||
| ENV_SETUP.md | ||
| github-access-token-instructions.md | ||
| gitlab-access-token-instructions.md | ||
| how-to-rate.md | ||
| howto-refresh-snap-credentials.md | ||
| i18n-script-usage.md | ||
| legacy-webview-analysis.md | ||
| mac-app-store-code-signing-guide.md | ||
| performance-project-tag-report.md | ||
| plainspace-api-extension-plan.md | ||
| plainspace-integration-plan.md | ||
| plugin-development.md | ||
| styling-guide.md | ||
| theming-contract.md | ||
| TRANSLATING.md | ||
| unused-translations-analysis.md | ||
| update-android-app.md | ||
| update-mac-certificates.md | ||