Fix task description image rendering failure

Task 12558 · Done · Coder · created · updated

On dev (app.dev.jaah.ai, build 1.3.1162), task 2051 "How to Fix Auto-Update Failure" → Task tab: the image in the description renders `⚠ image unavailable` (`rte-image-broken`). `GET /api/tasks/2051/attachments/148/content` answers 200 with a valid PNG. The page makes exactly one request for it and never paints it. The same happens with nothing injected. Task 2043 (attachment 139) is a second candidate. Found while running the epic's AC-7 oracle ("an attachment image whose first request fails renders after the retry"), which therefore cannot pass on dev. - Find why the task editor's attachment resolver (`resolveAttachmentSrc`, in the TaskEditForm/richtext attachmentResolver path) rejects a stored PNG that the content route serves. Suspects: `paintableImageUrl`, the attachment-list lookup, or a NotAnImageError on its content type. Fix it so the image paints. - Give that resolver the same one automatic retry the `ApiImg` path has (`net/href.tsx::useRetriedUrl`), so a transiently failed first request still renders. - Add an e2e or vitest case: the first content request fails, the image still renders after the retry, and no broken-image marker is shown. Out of scope: the relay/console transports and the `apps/web/src/net/` read/write choke point beyond reusing its retry hook. Done means: - On dev, task 2051's description image renders, with Playwright failing its first content request once; screenshot in the report. - `./dc check quick` green, PR merged via the merge lane.

Outcome

Attachment resolver now retries a failed content fetch once (ApiImg's ?_r=1). Vitest covers fail-then-render; quick gate green; #7729 merged (f55ed96). Dev 1.3.1240: task 2051 image paints with its first request reset, screenshot in report. Memory: used mem-34318.

Pull request

Artifacts

Activity

  • Created
  • Run
  • Runner started
  • Runner ended (done)