Skip to content

Commit d557f82

Browse files
authored
Playground: paste a payload, watch it get measured (#19)
* playground: client-side schema inference, in-browser profile training, honest numbers * playground gate round 1: in-sample disclosure, artifact-priced break-even, unsafe-integer rejection, explicit traffic selector, strict inflate probe, trained-nothing state, live CTA and mobile nav * playground: unsafe-integer scan ignores digits inside string literals * playground verify round: lookbehind on the integer scan, debounce cancellation, selector survives errors, training-state honesty, wrapper depth, float-semantics footnote
1 parent 98c201b commit d557f82

7 files changed

Lines changed: 965 additions & 8 deletions

File tree

‎apps/web/app/globals.css‎

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ h3 {
10161016
border-right: 0;
10171017
}
10181018

1019-
.nav-links a:not(:last-child) {
1019+
.nav-links a:not(:nth-last-child(-n + 2)) {
10201020
display: none;
10211021
}
10221022

@@ -1085,3 +1085,154 @@ h3 {
10851085
transition: none;
10861086
}
10871087
}
1088+
1089+
/* ── playground ─────────────────────────────────────────────────────────── */
1090+
1091+
.play-section {
1092+
min-height: 70vh;
1093+
}
1094+
1095+
.playground {
1096+
display: flex;
1097+
flex-direction: column;
1098+
gap: 18px;
1099+
margin-top: 34px;
1100+
}
1101+
1102+
.play-controls {
1103+
border: 1px solid var(--edge);
1104+
background: var(--panel);
1105+
}
1106+
1107+
.play-examples {
1108+
display: flex;
1109+
border-bottom: 1px solid var(--edge-soft);
1110+
overflow-x: auto;
1111+
scrollbar-width: none;
1112+
}
1113+
1114+
.play-input {
1115+
width: 100%;
1116+
min-height: 240px;
1117+
resize: vertical;
1118+
border: 0;
1119+
outline: none;
1120+
background: transparent;
1121+
color: var(--text);
1122+
font-family: var(--mono);
1123+
font-size: 12.5px;
1124+
line-height: 1.6;
1125+
padding: 16px 18px;
1126+
}
1127+
1128+
.play-input::placeholder {
1129+
color: var(--faint);
1130+
}
1131+
1132+
.play-meta {
1133+
display: flex;
1134+
flex-wrap: wrap;
1135+
gap: 10px 24px;
1136+
justify-content: space-between;
1137+
align-items: center;
1138+
border-top: 1px solid var(--edge-soft);
1139+
padding: 10px 18px;
1140+
font-family: var(--mono);
1141+
font-size: 11px;
1142+
color: var(--muted);
1143+
}
1144+
1145+
.play-toggle {
1146+
display: inline-flex;
1147+
align-items: center;
1148+
gap: 8px;
1149+
cursor: pointer;
1150+
}
1151+
1152+
.play-toggle input {
1153+
accent-color: var(--accent);
1154+
}
1155+
1156+
.play-privacy {
1157+
color: var(--faint);
1158+
}
1159+
1160+
.play-error {
1161+
border: 1px solid rgba(240, 178, 106, 0.35);
1162+
color: var(--warn);
1163+
font-family: var(--mono);
1164+
font-size: 12px;
1165+
padding: 12px 16px;
1166+
}
1167+
1168+
.play-error-path {
1169+
color: var(--text);
1170+
}
1171+
1172+
.play-learned {
1173+
border-top: 1px solid var(--edge-soft);
1174+
margin-top: 18px;
1175+
padding-top: 14px;
1176+
}
1177+
1178+
.play-learned-head {
1179+
font-family: var(--mono);
1180+
font-size: 11px;
1181+
text-transform: uppercase;
1182+
letter-spacing: 0.14em;
1183+
color: var(--muted);
1184+
margin-bottom: 10px;
1185+
}
1186+
1187+
.play-learned ul {
1188+
list-style: none;
1189+
display: flex;
1190+
flex-direction: column;
1191+
gap: 6px;
1192+
}
1193+
1194+
.play-learned-item {
1195+
font-family: var(--mono);
1196+
font-size: 12px;
1197+
color: var(--muted);
1198+
}
1199+
1200+
.play-learned-item code {
1201+
color: var(--accent);
1202+
}
1203+
1204+
.play-schema {
1205+
margin-top: 18px;
1206+
border-top: 1px solid var(--edge-soft);
1207+
padding-top: 14px;
1208+
}
1209+
1210+
.play-schema summary {
1211+
cursor: pointer;
1212+
font-family: var(--mono);
1213+
font-size: 11px;
1214+
text-transform: uppercase;
1215+
letter-spacing: 0.14em;
1216+
color: var(--muted);
1217+
}
1218+
1219+
.play-schema pre {
1220+
margin-top: 12px;
1221+
font-family: var(--mono);
1222+
font-size: 12px;
1223+
line-height: 1.55;
1224+
color: var(--muted);
1225+
overflow-x: auto;
1226+
}
1227+
1228+
.play-toggle label {
1229+
display: inline-flex;
1230+
align-items: center;
1231+
gap: 6px;
1232+
margin-right: 16px;
1233+
cursor: pointer;
1234+
}
1235+
1236+
.play-disclosure {
1237+
color: var(--faint);
1238+
}

‎apps/web/app/page.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export default function Home() {
8282
<nav className="nav-links">
8383
<a href="#size">size</a>
8484
<a href="#pipeline">pipeline</a>
85+
<Link href="/playground">playground</Link>
8586
<a href={GITHUB} target="_blank" rel="noopener noreferrer">
8687
github
8788
</a>
@@ -327,9 +328,9 @@ export default function Home() {
327328
github
328329
<span aria-hidden="true">↗</span>
329330
</a>
330-
<span className="button ghost" aria-disabled="true">
331-
benchmark playground — soon
332-
</span>
331+
<Link className="button ghost" href="/playground">
332+
benchmark playground
333+
</Link>
333334
</div>
334335
</Reveal>
335336
</section>

0 commit comments

Comments
 (0)