Skip to content

ui-react: media review card tells a missing source apart and names the gone copy's path #3591

Open

Description

@schlessera

Context

Refs #1777 — the media hygiene review epic, closed as completed on 2026-11-10. The maintainer detached this follow-up from it; it stands alone at p3.

Found while implementing #2782 (closed), the media review card: MediaFrame (packages/ui-react/src/components/activity/hygiene-media.tsx:133) shows Couldn't load preview for every image error (hygiene-media.tsx:154), and MediaFinding (hygiene-media.tsx:284) renders the finding inside HygieneFinding (packages/ui-react/src/components/activity/hygiene-review.tsx:416).

Design rev 5 §8.1 (#1777 comment) and rev 5 §5.7 specify two texts the card cannot show yet:

  1. A missing source. "A 404 → File is no longer there · Refresh finding." The card shows its preview with a plain <img>, whose error event does not carry the HTTP status. ui-react: review media findings with previews and the five actions in hygiene review #2782 shows Couldn't load preview for every image error, so that the acceptance rule "an image error shows the fallback tile after exactly one request" holds. Telling a 404 apart without a second request needs a different loading path, for example a single fetch of the raw route turned into an object URL, with the same one-request bound.
  2. The gone copy's path. R1 reads "Your permanent copy at places/ithaca/harbour-dawn.jpg is gone (kept on 2026-07-12)." The brain hygiene next finding carries the invalidation (disposition: "kept", changed: ["copy-missing"]) but not the kept entry's copy path, so ui-react: review media findings with previews and the five actions in hygiene review #2782 says "Your permanent copy is gone (kept on 2026-07-12)." Showing the path needs the path on the selected finding (for example invalidation.copy), an additive hygiene next --json field.

Scope

  • One raw-route request per shown image that distinguishes 404 (File is no longer there with Refresh finding) from any other failure (Couldn't load preview), never retried.
  • The kept copy's path in the R1, copy-untracked and kept-change notices, from an additive field on the selected finding.

Out of scope

  • Any other change to the media card's states, layout or actions.
  • Changing the raw files route.

Acceptance criteria

  • A real-browser test proves a 404 image shows File is no longer there and Refresh finding after exactly one request, and a 500 shows Couldn't load preview after exactly one request.
  • brain hygiene next --json carries the kept copy's path on an invalidated kept media finding, recorded as additive in docs/integration-contract/cli.md, with a core test.
  • The R1 notice names that path in a real-browser test at 320px.

Verification

bun run test packages/core packages/ui-react
bun run build && bun run test:layout

Odysseus fixtures, offline.

Contract impact

Additive: one hygiene next --json field (CONTRACT: commit, minor changeset).

Triage 2026-11-05 at main 35217d283b849b5ef81700d5d4c2ec7486405d12: verified the published rev 5 preview/copy requirements and the still-open #2782 output, corrected the proposed-file context, and declared that actual dependency. The brief is complete with no independent needs gap, so agent-ready coexists with blocked. Preserve explicit p3 deferral, contract classification and native #1777 parent; no release is invented.

2026-11-10 (main 3aadc8df5): maintainer ruling on #1777 — detached from the epic, which closed as completed; replaced the parent and the closed #2782 blocker with a Refs #1777 line and re-anchored the card citations to the shipped file. Scope and criteria unchanged.

Activity

  1. added
    type: feat
    area: core
    area: ui-react
    priority: p3
    contract
    on Nov 4, 2026
  2. added
    agent-ready
    blocked
    on Nov 5, 2026
  3. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #2782 is closed, so scripts/sync-project.ts is removing the blocked label.

  4. removed
    blocked
    on Nov 6, 2026
  5. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main 3aadc8df5: by maintainer ruling, this issue was detached from #1777, which closed as completed. It stays a standalone p3 issue with a Refs #1777 line. The card citations now point at the shipped hygiene-media.tsx (MediaFrame :133, MediaFinding :284) and HygieneFinding (hygiene-review.tsx:416). Scope, criteria and labels are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: corearea: ui-reactcontractpriority: p3type: feat

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions