<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Rupato]]></title><description><![CDATA[Rupato]]></description><link>https://rupato.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 24 Nov 2026 12:34:03 GMT</lastBuildDate><atom:link href="https://rupato.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Designing image approvals that survive a new revision]]></title><description><![CDATA[A proposed design for revision-aware image approvals, stale tabs, repeated requests, permissions and feedback history.]]></description><link>https://rupato.hashnode.dev/designing-image-approvals-that-survive-a-new-revision</link><guid isPermaLink="true">https://rupato.hashnode.dev/designing-image-approvals-that-survive-a-new-revision</guid><dc:creator><![CDATA[Rupato]]></dc:creator><pubDate>Thu, 05 Nov 2026 12:49:39 GMT</pubDate><content:encoded><![CDATA[<p>An image-review tool has a deceptively difficult question to answer: <strong>which exact file did the reviewer approve?</strong></p>
<p>Consider a simple sequence. Maya opens revision 2 of a product image. An editor uploads revision 3. Maya then clicks Approve in the tab she left open. If the server approves whichever file is newest, the recorded decision no longer matches what Maya saw.</p>
<p>This article proposes a design for that problem. It is an illustrative architecture, not a report of a tested production implementation.</p>
<h2>Separate the asset from its revisions</h2>
<p>Give the logical asset a stable identifier. Give each uploaded revision a different identifier and storage key. An upload creates a revision rather than replacing the bytes behind an existing revision.</p>
<p>For example, asset <code>shoe-42</code> might have revisions <code>rev-a</code> and <code>rev-b</code>. Keep the current revision identifier on the asset, but attach comments and approval decisions to a revision identifier. That distinction lets the interface show old feedback without implying it applies to the latest file.</p>
<h2>Make the approval request explicit</h2>
<p>An approval request should name the asset, the revision the reviewer saw, and a unique request identifier. The server should derive the reviewer’s identity from the authenticated session. A client-supplied reviewer name is not evidence of authorization.</p>
<p>Within one database transaction, check that the reviewer can approve this asset and that the requested revision is still current. If your workflow separates editing from quality approval, also check that the reviewer is not the person who produced that revision. Only then record the decision.</p>
<p>For the stale-tab example, return a conflict instead of silently approving revision 3. Show a message such as: “A newer revision is ready. Open it before approving.” Preserve any unsent feedback so the reviewer does not lose work.</p>
<h2>Plan for two clicks and two reviewers</h2>
<p>A disabled button improves the interface, but it cannot enforce the rule on the server. A repeated request should return the existing result rather than create duplicate decisions. Scope the request identifier to the actor and action, and reject reuse with a different payload.</p>
<p>Two reviewers may act at once. Decide whether one approval is sufficient or several are required. Enforce that policy while writing the decision; do not let separate browser tabs independently decide that a job is complete. The exact locking or conditional-update mechanism depends on the database.</p>
<h2>Keep feedback where it belongs</h2>
<p>Store each image pin with its revision identifier and coordinates relative to that revision’s dimensions. A pin at 80% of the width may point somewhere else after a crop. Keep old pins visible in revision history, but do not automatically move them onto a replacement image.</p>
<p>Keep a dated decision history as well. “Approved revision 2” and “revision 3 awaiting review” can both be true. A single green badge on the asset hides that difference.</p>
<h2>Test the transitions</h2>
<p>Before shipping, exercise these scenarios:</p>
<ul>
<li>A new revision arrives after the reviewer opens the page.</li>
<li>The same approval request arrives twice after a network retry.</li>
<li>Two reviewers submit conflicting decisions at the same time.</li>
<li>Someone loses permission while their review tab is open.</li>
<li>An approved file is followed by a new crop with different dimensions.</li>
</ul>
<p>For each case, inspect both the visible result and the stored revision and decision records. A successful response alone does not prove the correct file was approved.</p>
<p>The useful invariant is small: <strong>every approval identifies the file that was actually reviewed.</strong> Build the state transitions around that rule before polishing the approval button.</p>
<p><em>Prepared with AI assistance for Rupato’s publication. The design is illustrative and has not been validated as production code.</em></p>
]]></content:encoded></item></channel></rss>