mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-08 04:06:18 -04:00
fix(#76): preserve worst availability truth and inactive SSE recovery
Aggregate conflicting freshness by severity so Local cannot mask Stale/Partial, treat authoritative inactive SSE as valid state, honor Weekend focus headers, and prove Limited Retry busy accessibility with deferred supplements. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from '../api'
|
||||
import { DataNotice, RouteState } from '../components/RouteState'
|
||||
import {
|
||||
aggregateNotices,
|
||||
noticeFromResponse,
|
||||
noticeMessage,
|
||||
shouldShowEmbeddedNotice,
|
||||
@@ -404,10 +405,13 @@ export function RacePreviewPage({
|
||||
if (meetingsQuery.isError && !meetingsQuery.isFetching) void meetingsQuery.refetch()
|
||||
}
|
||||
|
||||
const dataNotice =
|
||||
noticeFromResponse(championshipQuery.data, { includeLocal: true }) ??
|
||||
noticeFromResponse(sessionsQuery.data, { includeLocal: false }) ??
|
||||
noticeFromResponse(priorResultsQuery.data, { includeLocal: false })
|
||||
// Worst reported truth across primary + supplements — Local must not mask
|
||||
// Sessions/Prior Results Stale/Partial/Limited/Archive.
|
||||
const dataNotice = aggregateNotices([
|
||||
noticeFromResponse(championshipQuery.data, { includeLocal: true }),
|
||||
noticeFromResponse(sessionsQuery.data, { includeLocal: false }),
|
||||
noticeFromResponse(priorResultsQuery.data, { includeLocal: false }),
|
||||
])
|
||||
|
||||
const showFreshnessNotice =
|
||||
Boolean(dataNotice) &&
|
||||
|
||||
Reference in New Issue
Block a user