From 58f40ff27662f32edecda06f919d778c2e70a29a Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 24 Mar 2026 13:19:48 -0500 Subject: [PATCH] Bug Fix: Fixed stale references to old guideutils location. Also change dockerfile to get clear error messages during failure. --- docker/Dockerfile | 8 ++++---- .../src/components/__tests__/ProgramDetailModal.test.jsx | 5 +++-- frontend/src/components/forms/ProgramRecordingModal.jsx | 2 +- frontend/src/components/forms/SeriesRecordingModal.jsx | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3e30a825..596c4025 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,7 +12,7 @@ COPY ./frontend /app/frontend # remove any node_modules that may have been copied from the host (x86) RUN rm -rf node_modules || true; \ npm install --no-audit --progress=false; -RUN npm run build; \ +RUN npm run build && \ rm -rf node_modules .cache # --- Redeclare build arguments for the next stage --- @@ -32,9 +32,9 @@ COPY . /app COPY ./docker/nginx.conf /etc/nginx/sites-enabled/default # Fix line endings and make entrypoint scripts executable RUN for f in /app/docker/entrypoint*.sh; do \ - if [ -f "$f" ]; then \ - sed -i 's/\r$//' "$f" && chmod +x "$f"; \ - fi; \ + if [ -f "$f" ]; then \ + sed -i 's/\r$//' "$f" && chmod +x "$f"; \ + fi; \ done # Clean out existing frontend folder RUN rm -rf /app/frontend diff --git a/frontend/src/components/__tests__/ProgramDetailModal.test.jsx b/frontend/src/components/__tests__/ProgramDetailModal.test.jsx index 11e65823..0127d8f9 100644 --- a/frontend/src/components/__tests__/ProgramDetailModal.test.jsx +++ b/frontend/src/components/__tests__/ProgramDetailModal.test.jsx @@ -21,9 +21,10 @@ vi.mock('../../utils/dateTimeUtils.js', () => ({ useDateTimeFormat: vi.fn(() => ({ timeFormat: 'h:mm A' })), })); -vi.mock('../../pages/guideUtils', () => ({ +vi.mock('../../utils/guideUtils', () => ({ formatSeasonEpisode: vi.fn((s, e) => { - if (s != null && e != null) return `S${String(s).padStart(2, '0')}E${String(e).padStart(2, '0')}`; + if (s != null && e != null) + return `S${String(s).padStart(2, '0')}E${String(e).padStart(2, '0')}`; if (s != null) return `S${String(s).padStart(2, '0')}`; if (e != null) return `E${String(e).padStart(2, '0')}`; return null; diff --git a/frontend/src/components/forms/ProgramRecordingModal.jsx b/frontend/src/components/forms/ProgramRecordingModal.jsx index 294cb2aa..82da2674 100644 --- a/frontend/src/components/forms/ProgramRecordingModal.jsx +++ b/frontend/src/components/forms/ProgramRecordingModal.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { Modal, Flex, Button } from '@mantine/core'; import { deleteRecordingById } from '../../utils/cards/RecordingCardUtils.js'; import { deleteSeriesAndRule } from '../../utils/cards/RecordingCardUtils.js'; -import { deleteSeriesRuleByTvgId } from '../../pages/guideUtils.js'; +import { deleteSeriesRuleByTvgId } from '../../utils/guideUtils.js'; export default function ProgramRecordingModal({ opened, diff --git a/frontend/src/components/forms/SeriesRecordingModal.jsx b/frontend/src/components/forms/SeriesRecordingModal.jsx index f2e6d489..7b1951b2 100644 --- a/frontend/src/components/forms/SeriesRecordingModal.jsx +++ b/frontend/src/components/forms/SeriesRecordingModal.jsx @@ -5,7 +5,7 @@ import { deleteSeriesAndRule } from '../../utils/cards/RecordingCardUtils.js'; import { evaluateSeriesRulesByTvgId, fetchRules, -} from '../../pages/guideUtils.js'; +} from '../../utils/guideUtils.js'; import { showNotification } from '../../utils/notificationUtils.js'; export default function SeriesRecordingModal({