From c6242fbbe649771749b01609ad1ba0e96a9b200e Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 14:53:49 +0100 Subject: [PATCH 1/8] Improved tournament timeline fallback for empty forecasting_end_date --- .../tournament/components/tournament_timeline.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_timeline.tsx b/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_timeline.tsx index 4733efbbf0..6b5b334014 100644 --- a/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_timeline.tsx +++ b/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_timeline.tsx @@ -50,7 +50,7 @@ const TournamentTimeline: FC = async ({ tournament }) => { : null } latestScheduledCloseTimestamp={getTimestampFromDateString( - tournament.forecasting_end_date + tournament.forecasting_end_date || tournament.close_date )} /> ) : ( @@ -60,7 +60,7 @@ const TournamentTimeline: FC = async ({ tournament }) => { latest_scheduled_resolve_time )} latestActualCloseTimestamp={getTimestampFromDateString( - tournament.forecasting_end_date + tournament.forecasting_end_date || tournament.close_date )} isAllQuestionsResolved={all_questions_resolved} latestActualResolutionTimestamp={getTimestampFromDateString( From 88c00dfbac23beb244fff9d640c8c9439f6c17e0 Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 14:54:28 +0100 Subject: [PATCH 2/8] Fixed `get_project_timeline_data` function --- projects/services/common.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/services/common.py b/projects/services/common.py index ce8842a812..80efbd9fe4 100644 --- a/projects/services/common.py +++ b/projects/services/common.py @@ -208,11 +208,13 @@ def get_max(data: list): def get_project_timeline_data(project: Project): - # Fetch questions directly as per new requirement questions = Question.objects.filter( - related_posts__post__default_project=project, - related_posts__post__curation_status=Post.CurationStatus.APPROVED, - ).distinct("id") + related_posts__post_id__in=list( + Post.objects.filter_projects(project) + .filter(curation_status=Post.CurationStatus.APPROVED) + .values_list("id", flat=True) + ) + ) return _calculate_timeline_data(project, questions) From 6cfe55df29cb2d624b2b3beaf1ea79d27e3f7c1d Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 14:57:06 +0100 Subject: [PATCH 3/8] Show indexes with prize pool on the Live Tournaments page --- .../src/app/(main)/(tournaments)/tournaments/helpers/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front_end/src/app/(main)/(tournaments)/tournaments/helpers/index.ts b/front_end/src/app/(main)/(tournaments)/tournaments/helpers/index.ts index d668c6ab5b..869e29dc64 100644 --- a/front_end/src/app/(main)/(tournaments)/tournaments/helpers/index.ts +++ b/front_end/src/app/(main)/(tournaments)/tournaments/helpers/index.ts @@ -34,6 +34,6 @@ export function selectTournamentsForSection( return ongoing.filter( (t) => t.type !== TournamentType.QuestionSeries && - t.type !== TournamentType.Index + (t.type !== TournamentType.Index || !!t.prize_pool) ); } From 4d0c9330199f21ec603f58fc689f67e3a290d0fb Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 14:59:06 +0100 Subject: [PATCH 4/8] Fixed mobile horizontal scroll on the tournament page --- front_end/src/components/ui/tabs/index.tsx | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/front_end/src/components/ui/tabs/index.tsx b/front_end/src/components/ui/tabs/index.tsx index 169ffe6604..4c10bb5a12 100644 --- a/front_end/src/components/ui/tabs/index.tsx +++ b/front_end/src/components/ui/tabs/index.tsx @@ -89,7 +89,7 @@ export const TabsList = ({ return (
Date: Fri, 2 Jan 2026 15:26:15 +0100 Subject: [PATCH 5/8] Adjusted tournaments order --- .../(tournaments)/tournaments/helpers/tournament_filters.ts | 6 ++++++ front_end/src/types/projects.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/front_end/src/app/(main)/(tournaments)/tournaments/helpers/tournament_filters.ts b/front_end/src/app/(main)/(tournaments)/tournaments/helpers/tournament_filters.ts index 67a29a63ea..82653352fe 100644 --- a/front_end/src/app/(main)/(tournaments)/tournaments/helpers/tournament_filters.ts +++ b/front_end/src/app/(main)/(tournaments)/tournaments/helpers/tournament_filters.ts @@ -60,6 +60,12 @@ export function filterTournaments( ); case TournamentsSortBy.StartDateDesc: + // Primary sort: Order + const orderDiff = (a.order ?? 0) - (b.order ?? 0); + if (orderDiff !== 0) { + return orderDiff; + } + return differenceInMilliseconds( new Date(b.start_date), new Date(a.start_date) diff --git a/front_end/src/types/projects.ts b/front_end/src/types/projects.ts index 5291f4fa23..9b0acd3bff 100644 --- a/front_end/src/types/projects.ts +++ b/front_end/src/types/projects.ts @@ -71,6 +71,7 @@ export type TournamentPreview = Project & { followers_count?: number; timeline: TournamentTimeline; description_preview?: string; + order?: number; }; export type TournamentTimeline = { From 8ec3a1feab8cc87b0af565041bc1581dca3061af Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 15:28:19 +0100 Subject: [PATCH 6/8] Small fix --- projects/migrations/0001_initial.py | 2 +- projects/models.py | 2 +- projects/serializers/common.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/migrations/0001_initial.py b/projects/migrations/0001_initial.py index 4c1936889d..286221a263 100644 --- a/projects/migrations/0001_initial.py +++ b/projects/migrations/0001_initial.py @@ -85,7 +85,7 @@ class Migration(migrations.Migration): "order", models.IntegerField( default=0, - help_text="Will be displayed ordered by this field inside each section", + help_text="Will be displayed ordered by this field inside each section. Lower numbers appear first.", ), ), ( diff --git a/projects/models.py b/projects/models.py index 62f8adda8f..630e44be0e 100644 --- a/projects/models.py +++ b/projects/models.py @@ -250,7 +250,7 @@ class BotLeaderboardStatus(models.TextChoices): emoji = models.CharField(max_length=10, default="", blank=True) order = models.IntegerField( - help_text="Will be displayed ordered by this field inside each section", + help_text="Will be displayed ordered by this field inside each section. Lower numbers appear first.", default=0, ) diff --git a/projects/serializers/common.py b/projects/serializers/common.py index f74dbbde06..03c855ba35 100644 --- a/projects/serializers/common.py +++ b/projects/serializers/common.py @@ -95,6 +95,7 @@ class Meta: "html_metadata_json", "is_ongoing", "user_permission", + "order", "created_at", "edited_at", "score_type", From b7f4e1fe85cc422010f2af18d01c017a9aaab723 Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 15:42:44 +0100 Subject: [PATCH 7/8] Small fix --- front_end/src/components/ui/tabs/index.tsx | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/front_end/src/components/ui/tabs/index.tsx b/front_end/src/components/ui/tabs/index.tsx index 4c10bb5a12..a66a734dcf 100644 --- a/front_end/src/components/ui/tabs/index.tsx +++ b/front_end/src/components/ui/tabs/index.tsx @@ -129,19 +129,19 @@ export const TabsTab = ({ "whitespace-nowrap px-3 py-1 text-sm transition-colors sm:px-5 sm:py-1.5 sm:text-lg sm:leading-[26px]", ctx.variant === "separated" ? [ - // pill-style tabs - "rounded-full", - isActive - ? "bg-blue-800 text-gray-0 dark:bg-blue-800-dark dark:text-gray-0-dark" - : "bg-gray-0 text-gray-800 dark:bg-gray-0-dark dark:text-gray-800-dark", - ] + // pill-style tabs + "rounded-full", + isActive + ? "bg-blue-800 text-gray-0 dark:bg-blue-800-dark dark:text-gray-0-dark" + : "bg-gray-0 text-gray-800 dark:bg-gray-0-dark dark:text-gray-800-dark", + ] : [ - // grouped / segmented control style - "border font-[500] items-center flex no-underline leading-[16px] first:rounded-l-full last:rounded-r-full [&:not(:first-child)]:-ml-px", - isActive - ? "bg-blue-800 text-gray-0 dark:bg-blue-800-dark dark:text-gray-0-dark border-transparent" - : "bg-gray-0 dark:bg-gray-0-dark border-blue-400 text-blue-700 dark:border-blue-400 dark:text-blue-700-dark", - ], + // grouped / segmented control style + "border font-[500] items-center flex no-underline leading-[16px] first:rounded-l-full last:rounded-r-full [&:not(:first-child)]:-ml-px", + isActive + ? "bg-blue-800 text-gray-0 dark:bg-blue-800-dark dark:text-gray-0-dark border-transparent" + : "bg-gray-0 dark:bg-gray-0-dark border-blue-400 text-blue-700 dark:border-blue-400 dark:text-blue-700-dark", + ], dynamicClassName?.(isActive), className ); From 6df198778b8ae4a52a2710c7d6af3f081c61df0b Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 2 Jan 2026 15:58:21 +0100 Subject: [PATCH 8/8] Fixed windowns google chrome horizontal scroll --- .../tournaments/components/tournaments_container.tsx | 5 +---- .../tournaments/components/tournaments_header.tsx | 4 +--- .../tournaments/components/tournaments_screen.tsx | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_container.tsx b/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_container.tsx index 470dc4a6d4..f52614ec28 100644 --- a/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_container.tsx +++ b/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_container.tsx @@ -2,10 +2,7 @@ import React, { PropsWithChildren } from "react"; const TournamentsContainer: React.FC = ({ children }) => { return ( -
+
{children}
); diff --git a/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_header.tsx b/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_header.tsx index fae35dbc13..b321191bfc 100644 --- a/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_header.tsx +++ b/front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_header.tsx @@ -62,9 +62,7 @@ const TournamentsHeader: React.FC = () => {
= ({ current={current} > -
+