Compare commits

..

1 commit

Author SHA1 Message Date
Chris Parsons
ff08155170 Debug sync-and-simulate cron job: surface curl output and log auth failures
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m3s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m35s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Remove -s (silent) from curl so CI logs show the HTTP response on failure.
Add logger.error in requireCronSecret so 401s from bad/missing secrets appear in Sentry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 09:45:06 -07:00
6 changed files with 18 additions and 13 deletions

View file

@ -99,14 +99,18 @@ export function SeasonStandings({
<Flag className="inline mr-2 h-5 w-5" />
{title}
</CardTitle>
{isFinalized && (
<CardDescription>
<CardDescription>
{isFinalized ? (
<span className="text-emerald-400 font-semibold">
<CheckCircle2 className="inline h-4 w-4 mr-1" />
Season complete fantasy points assigned to top 8 finishers
</span>
</CardDescription>
)}
) : (
<>
Current championship standings. Positions calculated from points (highest = 1st).
</>
)}
</CardDescription>
</CardHeader>
<CardContent>
{standings.length === 0 ? (

View file

@ -173,7 +173,7 @@ export function SportSeasonDisplay({
userParticipantIds={userParticipantIds}
showOwnership={showOwnership}
isFinalized={seasonIsFinalized}
title={`${sportSeasonName} Standings`}
title={sportSeasonName}
/>
);

View file

@ -333,6 +333,9 @@ export async function loader(args: Route.LoaderArgs) {
])
: [[], []];
// Derive seasonIsFinalized from status
const seasonIsFinalized = sportsSeason.status === "completed";
// Build participantId → expectedValue map for display
const participantEvs = Object.fromEntries(
regularSeasonEvs.map((ev) => [ev.participantId, ev.expectedValue])
@ -354,6 +357,7 @@ export async function loader(args: Route.LoaderArgs) {
userParticipantIds,
upcomingEvents,
recentEvents,
seasonIsFinalized,
regularSeasonStandings,
participantEvs,
groupStandings,

View file

@ -38,6 +38,7 @@ export default function SportSeasonDetail({
userParticipantIds,
upcomingEvents,
recentEvents,
seasonIsFinalized,
regularSeasonStandings,
groupStandings,
@ -108,7 +109,7 @@ export default function SportSeasonDetail({
participantPoints={participantPoints}
partialScoreParticipantIds={partialScoreParticipantIds}
seasonStandings={seasonStandings}
seasonIsFinalized={sportsSeason.status === "completed"}
seasonIsFinalized={seasonIsFinalized}
qpStandings={qpStandings}
qpIsFinalized={sportsSeason.qualifyingPointsFinalized || false}
totalMajors={sportsSeason.totalMajors}

View file

@ -42,7 +42,7 @@ const SAMPLE_ESPN_INDYCAR = {
athlete: { id: "3097", displayName: "Scott Dixon" },
stats: [
{ name: "rank", value: 1 },
{ name: "championshipPts", value: 437 },
{ name: "points", value: 437 },
{ name: "wins", value: 3 },
{ name: "starts", value: 10 },
],
@ -51,7 +51,7 @@ const SAMPLE_ESPN_INDYCAR = {
athlete: { id: "3098", displayName: "Alex Palou" },
stats: [
{ name: "rank", value: 2 },
{ name: "championshipPts", value: 398 },
{ name: "points", value: 398 },
{ name: "wins", value: 2 },
{ name: "starts", value: 10 },
],

View file

@ -114,11 +114,7 @@ export class IndyCarStandingsAdapter implements StandingsSyncAdapter {
return entries.map((entry, idx): FetchedStandingsRecord => {
const sm = statsMap(entry.stats);
const points =
sm.get("championshipPts")?.value ??
sm.get("points")?.value ??
sm.get("pts")?.value ??
0;
const points = sm.get("points")?.value ?? sm.get("pts")?.value ?? 0;
const wins = sm.get("wins")?.value ?? 0;
const starts = sm.get("starts")?.value ?? sm.get("racesStarted")?.value ?? 0;
const rank = sm.get("rank")?.value ?? sm.get("position")?.value ?? idx + 1;