Skip to content

Commit 9f2e0fe

Browse files
authored
Merge pull request #7 from AlexPaiva/feature/verify-try-panel
feat: verifier Try it here control panel
2 parents 11a9a8c + 2e23f69 commit 9f2e0fe

2 files changed

Lines changed: 95 additions & 8 deletions

File tree

src/verify-ui/main.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,26 @@ const APP_HTML = `
311311
</div>
312312
</div>
313313
314-
<div class="vf-actions" style="margin-top:18px">
315-
<button type="button" class="vf-btn vf-btn-tamper" id="vf-tamper" data-testid="tamper" title="Add one identifiable request to the OFF evidence, the way the seeded defect would.">Tamper OFF evidence</button>
316-
<button type="button" class="vf-btn vf-btn-primary" id="vf-evaluate" data-testid="evaluate" title="Re-run the deterministic evaluator on the evidence shown above.">Evaluate current evidence</button>
317-
<button type="button" class="vf-btn" id="vf-check" data-testid="check" title="Re-derive the sealed report from the current evidence and check that it reproduces.">Verify loaded report</button>
318-
<button type="button" class="vf-btn" id="vf-seal" data-testid="seal" title="Bind a report to exactly the evidence shown now.">Seal current result</button>
319-
<button type="button" class="vf-btn vf-btn-quiet" id="vf-reset" data-testid="reset" title="Restore the original passing OFF and ON evidence.">Reset passing example</button>
320-
<button type="button" class="vf-btn vf-btn-quiet" id="vf-dl-json" title="Download the machine-readable report for the current evidence.">Download report.json</button>
321-
<button type="button" class="vf-btn vf-btn-quiet" id="vf-dl-md" title="Download the human-readable report for the current evidence.">Download report.md</button>
314+
<div class="vf-try" data-testid="try-panel">
315+
<span class="vf-try-badge">&#9654; Try it here</span>
316+
<p class="vf-try-lede">This is the live control panel, and it opens at <b>PASS</b>. Break the evidence, watch the same deterministic evaluator flip the verdict, then seal or download the proof. Nothing you do here leaves the page.</p>
317+
<ol class="vf-try-steps">
318+
<li><b>Tamper OFF evidence</b> to inject one identifiable request, the way the seeded bug would.</li>
319+
<li>The same evaluator returns <b>BROKEN_PROMISE</b> (<code>PP_IDENTIFIABLE_EVENT_LEAK</code>), and the report you sealed a moment ago goes <b>STALE_OR_MISMATCH</b>.</li>
320+
<li><b>Seal current result</b> to bind the honest failure, or <b>Download</b> the JSON and Markdown proof.</li>
321+
<li><b>Reset passing example</b> to return to the original PASS.</li>
322+
</ol>
323+
<p class="vf-try-hint">The buttons below are live. Hover any button for a one-line description of what it does.</p>
324+
<div class="vf-actions" style="margin-top:14px">
325+
<button type="button" class="vf-btn vf-btn-tamper" id="vf-tamper" data-testid="tamper" title="Add one identifiable request to the OFF evidence, the way the seeded defect would.">Tamper OFF evidence</button>
326+
<button type="button" class="vf-btn vf-btn-primary" id="vf-evaluate" data-testid="evaluate" title="Re-run the deterministic evaluator on the evidence shown above.">Evaluate current evidence</button>
327+
<button type="button" class="vf-btn" id="vf-check" data-testid="check" title="Re-derive the sealed report from the current evidence and check that it reproduces.">Verify loaded report</button>
328+
<button type="button" class="vf-btn" id="vf-seal" data-testid="seal" title="Bind a report to exactly the evidence shown now.">Seal current result</button>
329+
<button type="button" class="vf-btn vf-btn-quiet" id="vf-reset" data-testid="reset" title="Restore the original passing OFF and ON evidence.">Reset passing example</button>
330+
<span class="vf-actions-div" aria-hidden="true"></span>
331+
<button type="button" class="vf-btn vf-btn-quiet" id="vf-dl-json" title="Download the machine-readable report for the current evidence.">Download report.json</button>
332+
<button type="button" class="vf-btn vf-btn-quiet" id="vf-dl-md" title="Download the human-readable report for the current evidence.">Download report.md</button>
333+
</div>
322334
</div>
323335
324336
<div class="vf-result" style="margin-top:20px">

src/verify-ui/styles.css

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,81 @@ header {
800800
.btn-accent { background: #6c5ce7; color: #fff; }
801801
.btn-accent:hover { background: #5a4bd4; transform: translateY(-1px); }
802802
.ext::after { content: "\2197"; font-size: 0.9em; opacity: 0.8; }
803+
804+
/* ---- "Try it here" live control panel ---- */
805+
.vf-try {
806+
margin-top: 22px;
807+
border: 1px solid rgba(108, 92, 231, 0.38);
808+
background: linear-gradient(180deg, rgba(108, 92, 231, 0.12), rgba(108, 92, 231, 0.03));
809+
border-radius: 14px;
810+
padding: 18px 18px 20px;
811+
}
812+
.vf-try-badge {
813+
display: inline-flex;
814+
align-items: center;
815+
gap: 8px;
816+
font-family: var(--mono);
817+
font-size: 0.74rem;
818+
letter-spacing: 0.08em;
819+
text-transform: uppercase;
820+
font-weight: 700;
821+
color: #d4ccff;
822+
background: rgba(108, 92, 231, 0.22);
823+
border: 1px solid rgba(108, 92, 231, 0.45);
824+
padding: 6px 13px;
825+
border-radius: 999px;
826+
}
827+
.vf-try-lede {
828+
margin: 12px 0 0;
829+
color: var(--text);
830+
font-size: 1rem;
831+
line-height: 1.5;
832+
}
833+
.vf-try-steps {
834+
margin: 15px 0 0;
835+
padding: 0;
836+
list-style: none;
837+
counter-reset: vftry;
838+
display: grid;
839+
gap: 10px;
840+
}
841+
.vf-try-steps li {
842+
counter-increment: vftry;
843+
position: relative;
844+
padding-left: 36px;
845+
color: var(--muted);
846+
font-size: 0.94rem;
847+
line-height: 1.45;
848+
}
849+
.vf-try-steps li::before {
850+
content: counter(vftry);
851+
position: absolute;
852+
left: 0;
853+
top: -1px;
854+
width: 24px;
855+
height: 24px;
856+
border-radius: 50%;
857+
display: grid;
858+
place-items: center;
859+
font-family: var(--mono);
860+
font-size: 0.74rem;
861+
font-weight: 700;
862+
color: #fff;
863+
background: #6c5ce7;
864+
}
865+
.vf-try-steps b {
866+
color: var(--text);
867+
}
868+
.vf-try-hint {
869+
margin: 15px 0 0;
870+
font-size: 0.82rem;
871+
color: var(--muted2);
872+
}
873+
.vf-actions-div {
874+
flex-basis: 100%;
875+
height: 0;
876+
margin: 0;
877+
}
803878
.vf-runit {
804879
margin-top: 14px;
805880
color: var(--muted);

0 commit comments

Comments
 (0)