Uh oh!
There was an error while loading. Please reload this page.
Add HTML file input and complete draft exports - #340
Conversation
There was a problem hiding this comment.
Pull request overview
Adds raw HTML file input across email commands and comprehensive local draft export support.
Changes:
- Adds
--message-html-fileto five email workflows. - Adds draft HTML output, attachment metadata, and staged export bundles.
- Updates tests, documentation, help, and command-surface snapshots.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.surface | Records new commands and flags. |
README.md | Documents HTML input and draft exports. |
skills/hey/SKILL.md | Updates bundled agent guidance. |
tests/smoke/draft_lifecycle_test.go | Smoke-tests draft HTML and export. |
internal/output/writer.go | Updates HTML format documentation. |
internal/cmd/topic.go | Updates HTML-fragment commentary. |
internal/cmd/thread_reply_test.go | Tests reply HTML-file input. |
internal/cmd/root.go | Enables HTML output for draft show. |
internal/cmd/reply.go | Adds reply HTML-file input. |
internal/cmd/message_html_file.go | Implements validated HTML-file reading. |
internal/cmd/message_html_file_test.go | Tests validation and exclusivity. |
internal/cmd/journal.go | Uses shared HTML-fragment writer. |
internal/cmd/html.go | Adds shared fragment writer. |
internal/cmd/html_test.go | Tests fragment output. |
internal/cmd/forward.go | Adds forward HTML-file input. |
internal/cmd/forward_test.go | Tests forward file input. |
internal/cmd/drafts.go | Registers draft export. |
internal/cmd/draft.go | Adds HTML output, metadata, and file editing. |
internal/cmd/draft_test.go | Tests new draft behavior. |
internal/cmd/draft_export.go | Implements staged draft bundles. |
internal/cmd/draft_export_test.go | Tests export integrity and replacement. |
internal/cmd/draft_export_commit_windows.go | Adds Windows no-replace publishing. |
internal/cmd/draft_export_commit_other.go | Adds fallback publishing. |
internal/cmd/draft_export_commit_linux.go | Adds Linux no-replace publishing. |
internal/cmd/draft_export_commit_darwin.go | Adds macOS no-replace publishing. |
internal/cmd/contacts_show.go | Uses shared fragment output. |
internal/cmd/contact_note_show.go | Uses shared fragment output. |
internal/cmd/compose.go | Adds compose HTML-file input. |
internal/cmd/compose_test.go | Tests compose file input. |
internal/cmd/bulk_reply.go | Adds bulk-reply HTML-file input. |
internal/cmd/bulk_reply_test.go | Tests bulk-reply file input. |
internal/cmd/attachments_test.go | Tests HTML-file drafts with attachments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
--message-html-fileto compose, reply, forward, bulk reply, and draft editing with regular-file and UTF-8 validationdraft show --htmloutput and safe ordered attachment metadatadraft exportbundles containing exact HTML, safe JSON, and verified attachment downloads, with narrowly guarded same-draft--forcereplacementThis branch builds independently against the released HEY SDK v0.27.0 and does not add a module replacement.
Testing
TMPDIR=/tmp GOWORK=off make release-checkgitleaks v8.21.2Summary by cubic
Adds
--message-html-fileto compose, reply, forward, bulk reply, and draft edit so raw HTML messages can be read from a local file instead of passed inline, with regular-file and UTF-8 validation. Adds byte-exactdraft show --htmloutput with safe attachment metadata, plus a newdraft exportcommand that writes an all-or-nothing bundle containing the exact HTML, a JSON manifest, and SHA-256-verified attachment downloads.New Features
draft exportwrites ahey-draft-export/v1bundle into a new directory and commits it atomically on macOS and Linux, refusing to overwrite an existing one;--forceswaps the new bundle in atomically where the OS supports it.draft show --jsonnow includes attachment filename, content type, and byte size, without internal locators.Written for commit 510126f. Summary will update on new commits.