Item 6 — Desk showcase renders REAL data (or hides), kills the mocked ladder

The pricing Desk showcase hardcoded an alt-line ladder (1.5 A +7.1% / 2.5 A+
+11.4% / 4.5 C -3.8%), QUARTER-KELLY 2.4%, and PARLAY φ 0.34 — a mocked demo
selling something we weren't proving.

- deskShowcaseService reads the pre-graded snapshot for a real A/B prop's
  alt-line ladder (prefers the one with the most grade variation — the most
  compelling real example). Edge per rung shows only when it's a plausible
  market value; the inflated (model-line)/line artifact on small lines is
  guarded to "—" rather than shown as a fake +91%.
- PARLAY φ is now REAL: the model's same-team correlation (0.34, mirroring the
  frontend parlayMath team constant) computed for TWO REAL same-team legs,
  named. No real same-team pair on the board → the tile hides, never an
  invented number.
- QUARTER-KELLY tile is REMOVED: the snapshot has no odds, so a real
  quarter-Kelly % can't be computed here — a fabricated 2.4% is worse than
  nothing. Kelly stays a real in-app Desk feature; the showcase just doesn't
  fake it.
- DeskShowcase is now a client component fetching /api/desk-showcase; when the
  board has no real ladder the whole visuals column hides (real-or-hidden, same
  law as the hero). The pitch copy is unchanged.

5 service tests. Change-affected suites green, web build exit 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kev
2026-07-18 01:42:16 -04:00
parent 9b9aab4262
commit cb3237cdce
6 changed files with 287 additions and 51 deletions
+26
View File
@@ -0,0 +1,26 @@
'use strict';
/**
* GET /api/desk-showcase (Truth-Everywhere Part 2, item 6) — REAL data for the
* pricing Desk showcase (alt-line ladder + same-team correlation). Public,
* cache-only. { available:false } when the board has nothing → the visuals hide.
*/
const express = require('express');
const { createRateLimit } = require('../middleware/rateLimit');
const deskShowcaseService = require('../services/deskShowcaseService');
const router = express.Router();
router.use(createRateLimit({ windowMs: 60_000, max: 60 }));
router.get('/', async (req, res) => {
try {
const data = await deskShowcaseService.getDeskShowcase({});
res.set('Cache-Control', 'public, max-age=300');
return res.json(data);
} catch (err) {
console.error('[desk-showcase]', err.message);
return res.status(200).json({ available: false });
}
});
module.exports = router;