HTML email nested in a text/html `action-text-attachment` renders as "📄 attachment" instead of its body
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Leggi internal/htmlutil/markdown.go e htmlutil.go, concentrandoti su actionTextAttachment() e sul caso action-text-attachment in walkNode; confrontali con la gestione esistente dei contenuti HTML in figure() e findAttachments. Usa l’esempio text/html annidato fornito per riprodurre il problema. Il lavoro è completato quando sia il Markdown renderizzato sia il testo semplice mostrano il corpo dell’e-mail incorporato invece di un segnaposto per un allegato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
Some inbound HTML emails render as nothing but a placeholder, in both hey thread read and the TUI:
"body": "📄 attachment"
The TUI shows the same file icon and "attachment", but there is no real attachment: the TUI footer has no attachment bindings, and hey attachment list correctly reports 0. The actual body text is never shown.
The text in the email's body can be retrieved by running hey thread read --html and pulling the text out of the raw html.
The email I noticed this on has some personally identifying information so I'm not providing it all in this issue, but I am happy to forward the email or provide the raw html to a developer if it would help.
Version: hey 1.10.0
Possible Cause
I'm sorry, I'm not a software developer myself, but after I had Claude Code extract the text in the email for me, it gave me this explanation:
HEY wraps the body twice. hey thread read --html gives this structure (trimmed):
<figure data-trix-attachment='{"contentType":"text/html","content":"<shadow-content><action-text-attachment content-type=\"text/html\" content=\"<p>Hi all, ...</p>\"></action-text-attachment></shadow-content>"}'>
</figure>
In internal/htmlutil/markdown.go:
figure()correctly unpacks the outer Trix attachment viam.embedded(attachment.Content).- The inner
<action-text-attachment content-type="text/html" content="...">then goes toactionTextAttachment(), which treats it as a file. It has no filename and the content type istext/, soattachment()writes📄+ the fallback nameattachment.
findAttachments in htmlutil.go already handles this shape (the isHTMLContentType(...) && getAttr(n, "content") != "" case recurses into the content), so the renderer and the attachment finder disagree about the same node.
Suggested fix
In actionTextAttachment(), render an HTML-typed node that carries content as embedded markup, the way figure() does:
func (m *markdownizer) actionTextAttachment(n *html.Node) {
if isHTMLContentType(getAttr(n, "content-type")) && getAttr(n, "content") != "" {
m.embedded(getAttr(n, "content"))
return
}
// ...existing handling
}
walkNode in htmlutil.go (the plain-text path) has the same gap in its action-text-attachment case and probably needs the same change.
Workaround
hey thread read <topic_id> --html and strip the tags yourself; the text is all there.
- Lingua principale
- Go
- Stelle
- 420
- Fork
- 54
- Merge medio
- 1g 1h
- PR unite (30g)
- 49
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di basecamp/hey-cli
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
basecamp/hey-cli#607 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Installer canary failureApertainstaller-canary
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
basecamp/hey-cli#601 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
I maintainer di solito rispondono entro 1 giorno
-
Bubble Up box is empty in the TUI and `hey box view`, but `hey bubble list` returns the emailsAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
basecamp/hey-cli#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di basecamp/hey-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
orchestration.migration.data.tasks.retry values are ignored by the 8.8 data migration jobForse già presa @irisfield l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
camunda/camunda-platform-helm#7773 ·
I maintainer di solito rispondono entro 1 giorno
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceNameForse già presa @a1h8 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Anthropic Responses converter forwards empty text blocks, upstream rejects with 400Forse già presa @david-choi-querypie l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[DOCS]: enforce_admins description understates what it covers and omits push restrictionsForse già presa @dav-tb l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
integrations/terraform-provider-github#3707 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno