Show attached images in the Details pane #80
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Images attached to an issue or PR with the forge's attach control (not pasted into the body text) never appear in the Details pane. Issue #79 is the example: empty body, one attached
demo-renovate.png. The PM chose to show them (option 2 of the decision on this request).Acceptance criteria
🖼 namelink, like a body image (ADR 0016).Plan
domain: addAttachment{Name, URL string};Attachments []AttachmentonIssueandChangeRequest.forge/gitea: parseassets(name,browser_download_url) on the issue and pull payloads; keep only names ending.png .jpg .jpeg .gif.ui/details.go: inoverview, after the body, build markdown(one paragraph per attachment, name escaped) for attachments not already inmarkdown.Images(body)(compare URL paths), and render it through the existingmdcallback so loading/caching/placement reuse the body-image path.assets; details test for dedupe and for the link fallback; revert-check that the dedupe test goes red.Context
GET /issuesfor #79 returnsbody: ""andassets: [{name: demo-renovate.png, browser_download_url: https://git.bobparsons.dev/attachments/<uuid>}].internal/ui/details.go:46markdown()+internal/ui/images.go; fetch is same-origin only throughforge.AssetReader(internal/forge/gitea/assets.go), so attachment URLs are fetched with the token.Out of scope
Non-image attachments, comment attachments, uploading attachments.
🤖 merged: #81