From 4567c992be6404c63a5639b6cf9f1def07ea78b6 Mon Sep 17 00:00:00 2001 From: Duncan Appleby Date: Sun, 9 Aug 2026 16:00:23 +0100 Subject: [PATCH 1/3] Fix GitHub Pages docs deploy: remove invalid storybook build flag storybook build has no --base option (that's Vite-only), so the build-storybook step has been failing on every push to main since the mkdocs conversion, leaving the deployed site stuck on a stale pre-mkdocs Storybook-only build. The base path is already set via viteFinal in .storybook/main.ts, so the flag was redundant anyway. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01QSwWkchRGye37hoCmEfDCz --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index a9fd57c1..db4d8ed5 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -55,7 +55,7 @@ jobs: run: cd frontend && npm ci - name: Build Storybook - run: cd frontend && npm run build-storybook -- --base=/ProgressRPG/storybook/ + run: cd frontend && npm run build-storybook - name: Combine sites run: | From db68e5fe466798516a75fe34aa7db152e4edbc00 Mon Sep 17 00:00:00 2001 From: Duncan Appleby Date: Sun, 9 Aug 2026 16:07:24 +0100 Subject: [PATCH 2/3] Fix Storybook build: avoid react-docgen infinite recursion in config.ts react-docgen's resolveToValue recurses infinitely on a let variable that is conditionally assigned and then reassigned multiple times, causing "Maximum call stack size exceeded" during `npm run build-storybook`. Compute API_BASE_URL once via a helper instead of reassigning it. Co-Authored-By: Claude Sonnet 5 --- frontend/src/config.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/frontend/src/config.ts b/frontend/src/config.ts index 5cf9b01f..586d481d 100644 --- a/frontend/src/config.ts +++ b/frontend/src/config.ts @@ -1,16 +1,14 @@ // src/config.ts -let API_BASE_URL: string; -const envApiBaseUrl = import.meta.env.VITE_API_BASE_URL as string | undefined; +function resolveApiBaseUrl(): string { + const envApiBaseUrl = import.meta.env.VITE_API_BASE_URL as string | undefined; -if (envApiBaseUrl) { - API_BASE_URL = envApiBaseUrl; -} else if (window.location.hostname === 'localhost') { - API_BASE_URL = 'http://localhost:8000'; -} else { - API_BASE_URL = window.location.origin; -} + const base = + envApiBaseUrl ?? + (window.location.hostname === 'localhost' + ? 'http://localhost:8000' + : window.location.origin); -API_BASE_URL = API_BASE_URL.replace(/\/api\/v1\/?$/i, ''); -API_BASE_URL = API_BASE_URL.replace(/\/$/, ''); + return base.replace(/\/api\/v1\/?$/i, '').replace(/\/$/, ''); +} -export { API_BASE_URL }; +export const API_BASE_URL = resolveApiBaseUrl(); From 708f7599c45c4bfabd4df7e425012899f7e717ea Mon Sep 17 00:00:00 2001 From: Harshit Chaturvedi Date: Wed, 12 Aug 2026 17:55:43 +0530 Subject: [PATCH 3/3] fix: standardize timer duration formatting --- frontend/src/components/ActivityInput/ActivityInput.tsx | 6 +++--- .../src/components/ActivityInput/useActivityInput.ts | 9 +++++---- .../src/components/UnifiedTimerHome/UnifiedTimerHome.tsx | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/ActivityInput/ActivityInput.tsx b/frontend/src/components/ActivityInput/ActivityInput.tsx index 89e77ae7..afb1eb4b 100644 --- a/frontend/src/components/ActivityInput/ActivityInput.tsx +++ b/frontend/src/components/ActivityInput/ActivityInput.tsx @@ -7,6 +7,7 @@ import EntitySearchInput from "../EntitySearchInput/EntitySearchInput"; import styles from "./ActivityInput.module.scss"; import { useActivityInput } from "./useActivityInput"; import SupportFlowModal from "../SupportFlow/SupportFlowModal"; +import { formatDuration } from "../../utils/formatUtils"; export default function ActivityInput() { const { @@ -14,8 +15,7 @@ export default function ActivityInput() { setName, isActive, inputValue, - minutes, - seconds, + elapsed, formattedLimit, showAutoStopWarning, flowState, @@ -63,7 +63,7 @@ export default function ActivityInput() {
- {minutes}:{seconds.toString().padStart(2, "0")} + {formatDuration(elapsed)}