feat(ui): show attached images in the Details pane #81

Merged
deadstyle merged 2 commits from feature/80-attached-images into develop 2026-10-09 09:25:58 -05:00
Owner

Summary

Images attached to an issue or PR with the forge's attach control now draw in the Details pane below the body, with the same sizing, fallback link and "Show images" rules as body images. An attachment the body already embeds appears once. Non-image attachments are not shown.

Refs #80

Verification

make check: lint 0 issues, go test -race ./... all ok, govulncheck clean, build ok. The last step (install-test) needs ShellCheck, which isn't on this machine; CI runs it.
Dedupe test goes red when the dedupe is removed. Drawing in a real terminal was not observed here: layout reasoned from the code, not observed.

Review

  • spec: PASS. Its two gaps (PR attachments and link fallback untested) are now covered.
  • standards: fixed empty-URL skip, repeated-URL dedupe, newline in alt text, PR adapter test. Dismissed: substring match on the attachment path (paths are /attachments/<uuid>, so false matches are not realistic); URL escaping (forge UUID URLs); comment attachments and contract suite (out of scope, comments aren't shown in Details).
  • comments: shortened the Attachment doc comment.

Docs

docs/design.md records the PM's decision to show attached images. No architecture or ADR change: it reuses the ADR 0016 pipeline.

## Summary Images attached to an issue or PR with the forge's attach control now draw in the Details pane below the body, with the same sizing, fallback link and "Show images" rules as body images. An attachment the body already embeds appears once. Non-image attachments are not shown. Refs #80 ## Verification `make check`: lint 0 issues, `go test -race ./...` all ok, govulncheck clean, build ok. The last step (`install-test`) needs ShellCheck, which isn't on this machine; CI runs it. Dedupe test goes red when the dedupe is removed. Drawing in a real terminal was not observed here: layout reasoned from the code, not observed. ## Review - spec: PASS. Its two gaps (PR attachments and link fallback untested) are now covered. - standards: fixed empty-URL skip, repeated-URL dedupe, newline in alt text, PR adapter test. Dismissed: substring match on the attachment path (paths are `/attachments/<uuid>`, so false matches are not realistic); URL escaping (forge UUID URLs); comment attachments and contract suite (out of scope, comments aren't shown in Details). - comments: shortened the `Attachment` doc comment. ## Docs `docs/design.md` records the PM's decision to show attached images. No architecture or ADR change: it reuses the ADR 0016 pipeline.
Images attached with the forge's attach control live in the issue and PR
assets list, not the body, so they never drew. The Gitea adapter now reads
assets; the Details pane appends each image the body doesn't already embed
and draws it through the body-image path.

Refs #80

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rj3rLTtwszGUE5CBhs8vZS
fix(ui): harden attached-image handling after review
All checks were successful
ci / check (pull_request) Successful in 1m3s
a1c3dd2250
Skip attachments with no usable URL, draw a repeated URL once, collapse
newlines in alt text, and cover PR attachments and the link fallback.
Record the PM's decision in design.md.

Refs #80

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rj3rLTtwszGUE5CBhs8vZS
deadstyle merged commit d475ad3a0f into develop 2026-10-09 09:25:58 -05:00
deadstyle deleted branch feature/80-attached-images 2026-10-09 09:25:58 -05:00
Sign in to join this conversation.
No description provided.