From d9449c5e328d33edcdc4666ad4cdaba1a5c2b350 Mon Sep 17 00:00:00 2001 From: zk Date: Sat, 28 Mar 2026 22:55:09 +0000 Subject: [PATCH] feat: and the last bit, score calcs over --- .../src/app/pages/admin/AdminActionsPage.tsx | 23 ++++-- .../src/app/pages/admin/AdminCronJobsPage.tsx | 23 ++++-- .../app/pages/admin/AdminDestructivePage.tsx | 16 ++-- .../src/app/pages/admin/AdminJobQueuePage.tsx | 26 +++++-- .../app/pages/admin/AdminOperationsPage.tsx | 11 +-- .../src/game-implementations/games/_common.ts | 41 ++-------- .../games/arcaea.oldtest.ts | 12 ++- .../src/game-implementations/games/arcaea.ts | 10 +-- .../games/bms-pms.oldtest.ts | 14 ++-- .../src/game-implementations/games/bms-pms.ts | 12 +-- .../games/chunithm.oldtest.ts | 13 +++- .../game-implementations/games/chunithm.ts | 8 +- .../game-implementations/games/ddr.oldtest.ts | 16 ++-- .../src/game-implementations/games/ddr.ts | 36 +-------- .../games/gitadora.oldtest.ts | 16 ++-- .../game-implementations/games/gitadora.ts | 8 +- .../games/iidx.oldtest.ts | 42 +++++----- .../src/game-implementations/games/iidx.ts | 77 ++----------------- .../src/game-implementations/games/itg.ts | 47 +---------- .../games/jubeat.oldtest.ts | 9 ++- .../src/game-implementations/games/jubeat.ts | 12 +-- .../games/maimai.oldtest.ts | 9 ++- .../src/game-implementations/games/maimai.ts | 11 +-- .../games/maimaidx.oldtest.ts | 6 +- .../game-implementations/games/maimaidx.ts | 11 +-- .../games/museca.oldtest.ts | 3 +- .../src/game-implementations/games/museca.ts | 10 +-- .../games/ongeki.oldtest.ts | 39 +++++----- .../src/game-implementations/games/ongeki.ts | 41 +--------- .../games/popn.oldtest.ts | 3 +- .../src/game-implementations/games/popn.ts | 15 +--- .../games/sdvx.oldtest.ts | 3 +- .../src/game-implementations/games/sdvx.ts | 10 +-- .../game-implementations/games/usc.oldtest.ts | 3 +- .../src/game-implementations/games/usc.ts | 10 +-- .../games/wacca.oldtest.ts | 9 ++- .../src/game-implementations/games/wacca.ts | 10 +-- .../server/src/game-implementations/types.ts | 44 ++--------- typescript/server/src/lib/cdn/cdn.test.ts | 5 +- typescript/server/src/lib/cdn/s3.ts | 7 +- .../framework/calculated-data/profile.ts | 22 +++--- .../framework/calculated-data/score.ts | 23 ++++-- .../framework/score-importing/derivers.ts | 1 + .../score-importing/hydrate-score.ts | 2 +- .../src/test-utils/ensure-test-cdn-bucket.ts | 4 +- 45 files changed, 280 insertions(+), 493 deletions(-) diff --git a/typescript/client/src/app/pages/admin/AdminActionsPage.tsx b/typescript/client/src/app/pages/admin/AdminActionsPage.tsx index 29958ac03..66703f1f4 100644 --- a/typescript/client/src/app/pages/admin/AdminActionsPage.tsx +++ b/typescript/client/src/app/pages/admin/AdminActionsPage.tsx @@ -62,7 +62,10 @@ function JsonCell({ label, value }: { label: string; value: unknown }) { return (
{label} -
+			
 				{json}
 			
@@ -178,11 +181,15 @@ export default function AdminActionsPage() { {action.kind} - {action.result} + + {action.result} + {action.username ? ( - {action.username} + + {action.username} + ) : ( — )} @@ -204,7 +211,10 @@ export default function AdminActionsPage() { {totalPages > 1 && (
{currentPage > 0 && ( - + ← Prev )} @@ -212,7 +222,10 @@ export default function AdminActionsPage() { Page {currentPage + 1} of {totalPages} {currentPage < totalPages - 1 && ( - + Next → )} diff --git a/typescript/client/src/app/pages/admin/AdminCronJobsPage.tsx b/typescript/client/src/app/pages/admin/AdminCronJobsPage.tsx index ad051c57c..7d3d23da6 100644 --- a/typescript/client/src/app/pages/admin/AdminCronJobsPage.tsx +++ b/typescript/client/src/app/pages/admin/AdminCronJobsPage.tsx @@ -97,7 +97,9 @@ export default function AdminCronJobsPage() {
{task.id} {task.schedule} - {task.description &&

{task.description}

} + {task.description && ( +

{task.description}

+ )}
Last scheduled:{" "} @@ -110,7 +112,8 @@ export default function AdminCronJobsPage() {

- Recent executions {execs.length} + Recent executions{" "} + {execs.length}

{execs.length === 0 ? (

No executions yet.

@@ -140,19 +143,25 @@ export default function AdminCronJobsPage() { {exec.completed_at ? ( MillisToSince(Date.parse(exec.completed_at)) ) : ( - In progress + + In progress + )} {durationMs(exec.started_at, exec.completed_at)} - {exec.status} + + {exec.status} + {exec.error ? (
- Error + + Error +
 																{exec.error}
 															
@@ -165,7 +174,9 @@ export default function AdminCronJobsPage() {
) : ( - — + + — + )} diff --git a/typescript/client/src/app/pages/admin/AdminDestructivePage.tsx b/typescript/client/src/app/pages/admin/AdminDestructivePage.tsx index 05a0627f6..a2e4e461f 100644 --- a/typescript/client/src/app/pages/admin/AdminDestructivePage.tsx +++ b/typescript/client/src/app/pages/admin/AdminDestructivePage.tsx @@ -14,8 +14,8 @@ export default function AdminDestructivePage() { const [ugptUserId, setUgptUserId] = useState(""); const [ugptGame, setUgptGame] = useState(TachiConfig.GAMES[0]); const ugptGameConfig = useMemo(() => GetGameGroupConfig(ugptGame), [ugptGame]); - const [ugptPlaytype, setUgptPlaytype] = useState(() => - GetGameGroupConfig(TachiConfig.GAMES[0]).playtypes[0], + const [ugptPlaytype, setUgptPlaytype] = useState( + () => GetGameGroupConfig(TachiConfig.GAMES[0]).playtypes[0], ); const [destroyChartId, setDestroyChartId] = useState(""); @@ -29,7 +29,9 @@ export default function AdminDestructivePage() { - Delete score + + Delete score + Score ID @@ -70,7 +72,9 @@ export default function AdminDestructivePage() { - Delete session + + Delete session + Session ID @@ -194,7 +198,9 @@ export default function AdminDestructivePage() { - Destroy chart + + Destroy chart + Game diff --git a/typescript/client/src/app/pages/admin/AdminJobQueuePage.tsx b/typescript/client/src/app/pages/admin/AdminJobQueuePage.tsx index 5f138950a..7bfad3db2 100644 --- a/typescript/client/src/app/pages/admin/AdminJobQueuePage.tsx +++ b/typescript/client/src/app/pages/admin/AdminJobQueuePage.tsx @@ -38,7 +38,10 @@ function PayloadCell({ payload }: { payload: unknown }) { return (
View payload -
+			
 				{json}
 			
@@ -115,8 +118,7 @@ export default function AdminJobQueuePage() { {activeJobs.length > 0 && (

- Active jobs{" "} - {activeJobs.length} + Active jobs {activeJobs.length}

@@ -144,10 +146,14 @@ export default function AdminJobQueuePage() {

- All jobs {jobQueue.total.toLocaleString()} + All jobs{" "} + {jobQueue.total.toLocaleString()}

-
+ Status 1 && (
{currentPage > 0 && ( - + ← Prev )} @@ -231,7 +240,10 @@ export default function AdminJobQueuePage() { Page {currentPage + 1} of {totalPages} {currentPage < totalPages - 1 && ( - + Next → )} diff --git a/typescript/client/src/app/pages/admin/AdminOperationsPage.tsx b/typescript/client/src/app/pages/admin/AdminOperationsPage.tsx index 61dd1f835..beb71585a 100644 --- a/typescript/client/src/app/pages/admin/AdminOperationsPage.tsx +++ b/typescript/client/src/app/pages/admin/AdminOperationsPage.tsx @@ -19,9 +19,7 @@ export default function AdminOperationsPage() { const [supporterUser, setSupporterUser] = useState(""); - const announcementGameConfig = announcementGame - ? GetGameGroupConfig(announcementGame) - : null; + const announcementGameConfig = announcementGame ? GetGameGroupConfig(announcementGame) : null; return ( @@ -74,7 +72,9 @@ export default function AdminOperationsPage() {