Add auto-refresh polling across all admin and jury pages
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
- Round detail page: 15s for live data (projects, assignments, scores, workload), 30s for config, 60s for static data - Filtering dashboard: 15s for results/stats, 30s for rules (job status already 2s) - Project states table: 15s polling - Coverage report: 15s polling - Jury round page: 30s for assignments and round data - Deliberation session: 10s polling for live vote updates - Admin dashboard: 30s for stats Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,13 +108,18 @@ export function FilteringDashboard({ competitionId, roundId }: FilteringDashboar
|
||||
// -- Queries --
|
||||
const { data: stats, isLoading: statsLoading } = trpc.filtering.getResultStats.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: 15_000 },
|
||||
)
|
||||
|
||||
const { data: latestJob, isLoading: jobLoading } = trpc.filtering.getLatestJob.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: 15_000 },
|
||||
)
|
||||
|
||||
const { data: rules } = trpc.filtering.getRules.useQuery({ roundId })
|
||||
const { data: rules } = trpc.filtering.getRules.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: 30_000 },
|
||||
)
|
||||
|
||||
const { data: resultsPage, isLoading: resultsLoading } = trpc.filtering.getResults.useQuery(
|
||||
{
|
||||
@@ -123,6 +128,7 @@ export function FilteringDashboard({ competitionId, roundId }: FilteringDashboar
|
||||
page,
|
||||
perPage: 25,
|
||||
},
|
||||
{ refetchInterval: 15_000 },
|
||||
)
|
||||
|
||||
const { data: jobStatus } = trpc.filtering.getJobStatus.useQuery(
|
||||
@@ -1089,7 +1095,10 @@ function FilteringRulesSection({ roundId }: { roundId: string }) {
|
||||
|
||||
const utils = trpc.useUtils()
|
||||
|
||||
const { data: rules, isLoading } = trpc.filtering.getRules.useQuery({ roundId })
|
||||
const { data: rules, isLoading } = trpc.filtering.getRules.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: 30_000 },
|
||||
)
|
||||
|
||||
const createMutation = trpc.filtering.createRule.useMutation({
|
||||
onSuccess: () => {
|
||||
|
||||
@@ -92,6 +92,7 @@ export function ProjectStatesTable({ competitionId, roundId }: ProjectStatesTabl
|
||||
|
||||
const { data: projectStates, isLoading } = trpc.roundEngine.getProjectStates.useQuery(
|
||||
{ roundId },
|
||||
{ refetchInterval: 15_000 },
|
||||
)
|
||||
|
||||
const transitionMutation = trpc.roundEngine.transitionProject.useMutation({
|
||||
|
||||
Reference in New Issue
Block a user