From c8feb017234365be54cdaee71e0c4f7521fdfc3f Mon Sep 17 00:00:00 2001 From: nairobi <61069237+nyairobi@users.noreply.github.com> Date: Mon, 1 Jun 2026 02:41:14 +0200 Subject: [PATCH] fix frontend issues with ongeki having too much data (#1607) * fix frontend issues with ongeki having too much data * probably better * I'm so done --- .../sessions/SessionRaiseBreakdown.tsx | 36 +++++++++++++------ .../tables/cells/DifficultyCell.tsx | 8 +++-- .../tables/cells/OngekiScoreRatingCell.tsx | 21 +++++++---- .../components/tables/cells/TimestampCell.tsx | 36 +++++++++++++++---- .../src/components/tables/cells/TitleCell.tsx | 6 ++-- .../components/DocumentComponent.tsx | 8 +++-- .../components/tables/folders/FolderTable.tsx | 2 +- .../history-scores/HistoryScoreTable.tsx | 2 +- .../src/components/tables/pbs/PBTable.tsx | 2 +- .../tables/rivals/RivalChartTable.tsx | 2 +- .../components/tables/scores/ScoreTable.tsx | 2 +- .../client/src/styles/legacy/_index.scss | 8 +++++ typescript/client/src/util/time.ts | 6 ++-- 13 files changed, 102 insertions(+), 37 deletions(-) diff --git a/typescript/client/src/components/sessions/SessionRaiseBreakdown.tsx b/typescript/client/src/components/sessions/SessionRaiseBreakdown.tsx index 9949f81bf..9e40d754e 100644 --- a/typescript/client/src/components/sessions/SessionRaiseBreakdown.tsx +++ b/typescript/client/src/components/sessions/SessionRaiseBreakdown.tsx @@ -38,6 +38,13 @@ import { type ConfEnumScoreMetric } from "tachi-common/types/metrics"; type SetScores = (scores: ScoreDocument[]) => void; +const Plural = (str: string) => str + (str.trimEnd().endsWith("s") ? "" : "s"); + +const FormatEnumTitle = (str: string) => + Plural(UppercaseFirst(str)) + .split(/(?=[A-Z])/u) + .join("\u00a0"); // nbsp + export default function SessionRaiseBreakdown({ sessionData, setScores, @@ -48,7 +55,9 @@ export default function SessionRaiseBreakdown({ setScores?: SetScores; }) { const game = sessionData.session.game; - const lampName = game === "ongeki" || game === "chunithm" ? "noteLamp" : "lamp"; + const gameConfig = GetGameConfig(game); + const enumMetrics = GetScoreMetrics(gameConfig, "ENUM"); + const gptImpl = GPT_CLIENT_IMPLEMENTATIONS[game]; const { user } = useContext(UserContext); @@ -82,15 +91,21 @@ export default function SessionRaiseBreakdown({