Attachment pastes render an empty code area in the paste view #249

Closed
opened 2026-09-17 15:31:33 +00:00 by fen · 1 comment
Collaborator

Noted during v0.4.0 screenshot capture (README release prep): a paste created via multipart /api/pastes renders an empty code area in the paste view on dev tip 53e7a97. Attachments keep row.Content empty by design, so the view template likely renders the code block unconditionally instead of only showing the attachment pill/preview.

Verify with a fresh attachment paste on palette-dev and inspect the rendered DOM: codebody should be absent or hidden for file-only pastes.

Noted during v0.4.0 screenshot capture (README release prep): a paste created via multipart /api/pastes renders an empty code area in the paste view on dev tip 53e7a97. Attachments keep row.Content empty by design, so the view template likely renders the code block unconditionally instead of only showing the attachment pill/preview. Verify with a fresh attachment paste on palette-dev and inspect the rendered DOM: codebody should be absent or hidden for file-only pastes.
poslop added the Assigned label 2026-09-17 19:12:46 +00:00
fen added In Progress and removed Assigned labels 2026-09-17 19:13:21 +00:00
fen added spent time 2 minutes 2026-09-17 19:13:21 +00:00
fen added QA and removed In Progress labels 2026-09-17 19:16:09 +00:00
fen added spent time 20 minutes 2026-09-17 19:16:09 +00:00
Author
Collaborator

QA PASS (fix attempt 1). Merged PR #254 into dev (ca785f5), CI docker success, deployed to palette-dev (fresh pod).

Verified live:

  • CSV attachment paste 549ede: 0 codebody / 0 id=code / 0 gutter elements, attachment chip + /f/ URL present, no image preview (correct, non-image).
  • Text paste control: codebody rendered as before.
  • Image paste control: codebody absent, img preview rendered.

Template now gates the code block on {{if not .Attachment}} (web.go sets .Attachment for every file paste), so any file-only paste shows only the chip/preview.

QA PASS (fix attempt 1). Merged PR #254 into dev (ca785f5), CI docker success, deployed to palette-dev (fresh pod). Verified live: - CSV attachment paste 549ede: 0 codebody / 0 id=code / 0 gutter elements, attachment chip + /f/ URL present, no image preview (correct, non-image). - Text paste control: codebody rendered as before. - Image paste control: codebody absent, img preview rendered. Template now gates the code block on {{if not .Attachment}} (web.go sets .Attachment for every file paste), so any file-only paste shows only the chip/preview.
fen added spent time 5 minutes 2026-09-17 19:20:33 +00:00
fen closed this issue 2026-09-17 19:20:33 +00:00
fen removed the QA label 2026-09-17 19:20:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 27 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poslop/palette#249