Production Lines
Client Review Panel — Framework v1
Client Review Panel — Framework v1
Drop-in browser review panel for JCT editorial deliverables. Lets clients leave pinned text + voice-to-text comments on a published page; producer triages and applies edits offline.
Scope: v1 = comments only. Track-changes, accept-to-publish, and AI rewrite are v2 (see TFD-0022).
Files
| File | Role |
|---|---|
assets/panel.js |
Client bundle (composer, voice, anchor pin/restore) |
assets/panel.css |
Editorial-matching styles (cream/navy/Fraunces) |
assets/config.js |
Per-deliverable on/off toggle |
assets/triage.html |
Producer review dashboard (/_review/) |
functions/api/comments.ts |
Cloudflare Pages Function — POST/GET/PATCH |
schema.sql |
D1 table definition |
wrangler.example.toml |
D1 binding snippet to merge into the client repo |
stamp-anchors.mjs |
Build helper — stamps data-comment-anchor on block elements |
install.mjs |
Used by /jct:add-review-panel to scaffold into a bundle |
Install (manual)
node install.mjs --bundle "C:\tmp\jct-{client}\livrables\{DAE}" --slug {DAE}
The install skill (/jct:add-review-panel) wraps this.
On/off toggle
Edit _review/config.js:
window.__REVIEW_PANEL__ = { enabled: true, apiBase: "/api/comments" };
Set enabled: false to hide the FAB on all pages without removing assets.
Data model
CREATE TABLE comments (
id TEXT PRIMARY KEY,
page_id TEXT NOT NULL,
anchor_id TEXT NOT NULL,
anchor_offset INTEGER,
anchor_length INTEGER,
anchor_text TEXT,
body TEXT NOT NULL,
email TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'open',
created_at INTEGER NOT NULL
);
Identity
functions/api/comments.ts reads the cf-access-jwt-assertion header and extracts the email claim. No signature verification in v1 — Cloudflare Access has already gated the request before it reaches the function. v2 will verify the signature.
See also
- TFD-0022 — architecture decisions
- CON-0013 — request