Files
visa/templates/review_made.html
T
grabowski a4155548b8
CI / secret scan (push) Successful in 5s
CI / fmt, clippy, tests (push) Successful in 49s
CI / release (push) Skipped
The other side reviews a draft (phase 13, step 1)
A lawyer sends a contract version to one of its parties with a link. On
it the other side marks the text up in an editor that keeps every change
visible, as tracked changes do: deleting our text crosses it out in red,
typing is marked as added in green, and the highlighter marks a passage
in yellow with a comment. Restore and Undo take marks back. They send it
back once a round; each later version comes on the same link.

- Migration 0014: review_links (token kept as a SHA-256, one open link a
  party) and review_rounds (the reply written once: their pieces, text,
  SHA-256, name, message; a trigger refuses any other change and every
  delete). Journal entries "sent for review", "review returned" (with the
  fingerprint of their text) and "review link closed"; audit entity
  "review".
- The reply is a list of pieces (same, ins, del, mark). The server checks
  that the pieces without the added ones are exactly the version sent, so
  nothing changes unseen (reviews::check).
- Our review page: their message, the changes numbered with the words
  around them and a box each, the highlights with comments, a git-style
  diff (line numbers, - and + lines, the changed words marked, three lines
  of context per hunk) and their markup. "Take the ticked changes" opens
  the contract page with the version form filled with our text plus those
  changes.
- static/review-editor.js: edits work on the pieces and redraw, so our
  text cannot vanish; keyboard compositions and edits the browser will not
  cancel are compared with the text and taken as edits.
- Property tests (any markup is accepted and taken back exactly; markup
  that changes our text unseen is refused), the fuzz text target runs
  reviews::check, integration tests, and the demo has the label's review
  of the recording agreement.
- PLAN: phase 13.
2026-11-23 15:31:43 +07:00

24 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% block main %}
<div class="phead">
<div class="crumbs"><a href="/contracts">Contracts</a> <span class="sep">/</span> <a href="/contracts/{{ id }}">{{ head.code }}</a></div>
<div class="pagehead"><h1>Sent for review</h1></div>
</div>
<section class="card linkcard" id="review-made">
{% if url %}
<header><h2>The link for {{ party }}</h2></header>
<p>Give this link to {{ party }}: by email or chat, or let them scan the code. On it they read version {{ review_version }}, cross out, add and highlight, and send it back. It works until {{ until }}; every version you send them later comes on the same link.</p>
<div class="linkrow">
<input type="text" readonly value="{{ url }}" id="link-url" aria-label="The link" data-select-all>
<button type="button" class="btn" data-copy="#link-url">Copy</button>
</div>
{% if qr %}<div class="qr" aria-label="The link as a QR code">{{ qr|safe }}</div>{% endif %}
<p class="notice warn">The link is shown only now: the app keeps only a fingerprint of it. Copy it before you leave this page; otherwise close the link on the contract page and send again, which makes a new one.</p>
{% else %}
<header><h2>On {{ party }}'s link</h2></header>
<p>Version {{ review_version }} is now on the link {{ party }} has already. Tell them it is there; the link works until {{ until }}.</p>
{% endif %}
<div class="formactions"><a class="btn pri" href="/contracts/{{ id }}#reviews">Done</a></div>
</section>
{% endblock %}