d296e40cb6
ledger_entries is live (migration 019 applied to prod, RLS + NULLS NOT
DISTINCT dedupe verified against the real database). Every grade now
persists, settles against the real result, and carries closing-line value.
- ledgerService: pipeline pre-grade upserts (public model record, user_id
null, idempotent), closing capture on every snapshot (last write before
game start = the close), settlement with SIGNED CLV (over = locked -
closing; beat/faded/flat), 30d model aggregate with the hard n>=20 rule.
- Write paths: snapshotService -> ledger (priority path); Next /api/scan ->
ledger for authenticated users only (anon never touches the public
record). Refused reads write nothing and don't burn a scan.
- Honest refusal (work-order 1.5): no projection => insufficient_data,
grade null, "INSUFFICIENT DATA - no read" UI. The web gradeAdapter no
longer displays the line as the model projection (the audit's
model==line / +0% edge degenerate); the card renders absent states.
projectionFor is sport-aware (l5 -> l20 -> {stat}_per_90 -> xG).
- /ledger: MY READS | MODEL tabs; model header shows hit% + beat-close%
only at n>=20, else RECORD BUILDING + live pending count. ModelRecord
deferred-render strip on landing + player hero. CLV + outcome chips,
revised_from_grade strikethrough (Phase 2.5 ready).
- SYNC (Task 5): thresholds vs SNAPSHOT_EXPECTED_INTERVAL (normal <1.5x,
amber >=1.5x, STALE red >=3x) via /api/snapshot/summary.
- Phase 2.5 logged in specs/vyndr-roadmap.md (build after Phase 3).
- Data-semantics hardening: strict null-safe numeric parsing everywhere a
market value is handled (Number(null)===0 would have fabricated lines).
Backend 2309 -> 2327 tests (201 suites), web build exit 0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
76 lines
2.9 KiB
TypeScript
76 lines
2.9 KiB
TypeScript
'use client';
|
|
|
|
import { useEffect } from 'react';
|
|
import { useRouter } from 'next/navigation';
|
|
import { useAuth } from '@/contexts/AuthContext';
|
|
import Hero from '@/components/Hero';
|
|
import { ClaimMeter, ModelRecord } from '@/components/vyndr';
|
|
// Session 55 — live top A-rated grades pulled from tonight's real snapshot,
|
|
// with the self-learning loop's accuracy line. The product shown, not described.
|
|
import TopSignals from '@/components/TopSignals';
|
|
// Session 17 — game-count strip mounted between the hero and the
|
|
// existing LivePropsStrip. Shows "X NBA · Y WNBA · Z MLB games
|
|
// being graded right now" with a signup CTA. Hides itself when
|
|
// every sport returns zero (off-hours / upstream outages).
|
|
import TonightsSlate from '@/components/TonightsSlate';
|
|
import LivePropsStrip from '@/components/LivePropsStrip';
|
|
// Session 23 — all-day intelligence teasers. Free/cheap content that
|
|
// keeps the landing page alive even when odds-api props are empty.
|
|
// Both self-hide when there's nothing to show.
|
|
import StreaksPanel from '@/components/StreaksPanel';
|
|
import HotListPanel from '@/components/HotListPanel';
|
|
import Features from '@/components/Features';
|
|
import HowItWorks from '@/components/HowItWorks';
|
|
import Pricing from '@/components/Pricing';
|
|
import FAQ from '@/components/FAQ';
|
|
// Footer is mounted globally in the root layout (Session 34) — no per-page import.
|
|
|
|
export default function Home() {
|
|
const { user, loading } = useAuth();
|
|
const router = useRouter();
|
|
|
|
useEffect(() => {
|
|
if (!loading && user) router.replace('/dashboard');
|
|
}, [user, loading, router]);
|
|
|
|
// While we know the user is signed in we suppress the marketing
|
|
// render to avoid a flicker before the redirect lands.
|
|
if (loading || user) {
|
|
return (
|
|
<section style={{ minHeight: '80vh', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
<p className="mono" style={{ color: 'var(--text-tertiary)', fontSize: 13, letterSpacing: '0.08em', textTransform: 'uppercase' }}>
|
|
Loading the slate
|
|
</p>
|
|
</section>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<Hero />
|
|
{/* Session 55 — tonight's real top signals + live accuracy (the system works). */}
|
|
<TopSignals />
|
|
{/* Session 58 (work-order 1.4) — the public model record (proof-strip
|
|
footer). Deferred-render: "RECORD BUILDING" until 20 settles, then
|
|
the real hit% + beat-close%. Self-hides with no data. */}
|
|
<div style={{ padding: '4px 16px 12px' }}>
|
|
<ModelRecord />
|
|
</div>
|
|
{/* Founder-seat scarcity meter (§12) */}
|
|
<div style={{ padding: '0 16px 8px' }}>
|
|
<ClaimMeter />
|
|
</div>
|
|
<TonightsSlate />
|
|
<LivePropsStrip />
|
|
<div style={{ maxWidth: 960, margin: '0 auto', padding: '0 16px' }}>
|
|
<StreaksPanel sport="nba" tier="free" limit={3} />
|
|
<HotListPanel sport="mlb" tier="free" limit={3} />
|
|
</div>
|
|
<Features />
|
|
<HowItWorks />
|
|
<Pricing />
|
|
<FAQ />
|
|
</>
|
|
);
|
|
}
|