Add HTML file input and complete draft exports - #340
Open
jr-lillard wants to merge 5 commits into
Open
Conversation
Contributor
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.