From 922f770b41ae60dee9a7e8cce88cfd57626a902d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 19 Jun 2026 22:17:13 +0200 Subject: [PATCH] refactor(medications): rename PascalCase component files to kebab-case Bring the medication card, scheduling, wizard, and detail component files in line with the kebab-case file-naming convention. Component export identifiers are unchanged; only filenames and the import paths that point at them move. --- src/app/medications/[id]/page.tsx | 2 +- .../__tests__/list-view-toggle.test.tsx | 2 +- src/app/medications/page.tsx | 2 +- .../vorsorge-section.tsx | 2 +- ...art.test.tsx => drug-level-chart.test.tsx} | 2 +- ...st.tsx => medication-card-header.test.tsx} | 2 +- ...earch-mode-acknowledgment-dialog.test.tsx} | 2 +- ...test.tsx => side-effects-section.test.tsx} | 2 +- .../card-parts/medication-card-body.tsx | 2 +- ...ailTabs.tsx => medication-detail-tabs.tsx} | 8 ++++---- ...rugLevelChart.tsx => drug-level-chart.tsx} | 0 ...dHeader.tsx => medication-card-header.tsx} | 0 ...> research-mode-acknowledgment-dialog.tsx} | 0 ...icker.test.tsx => cadence-picker.test.tsx} | 2 +- ...ow.test.tsx => course-window-row.test.tsx} | 2 +- ...s.test.tsx => times-of-day-chips.test.tsx} | 2 +- .../{CadencePicker.tsx => cadence-picker.tsx} | 0 ...rseWindowRow.tsx => course-window-row.tsx} | 0 ...indowEditor.tsx => dose-window-editor.tsx} | 0 .../medications/scheduling/legacy-bridge.ts | 2 +- ...tor.tsx => natural-language-extractor.tsx} | 0 .../scheduling/schedule-history-timeline.tsx | 2 +- ...esEditor.tsx => schedule-times-editor.tsx} | 4 ++-- ...sOfDayChips.tsx => times-of-day-chips.tsx} | 0 ...tsSection.tsx => side-effects-section.tsx} | 0 .../wizard/__tests__/wizard-payload.test.ts | 2 +- ...ialog.tsx => medication-wizard-dialog.tsx} | 20 +++++++++---------- .../medications/wizard/nl-bridge.ts | 6 +++--- .../steps/{Step1Name.tsx => step1-name.tsx} | 0 .../steps/{Step2Class.tsx => step2-class.tsx} | 2 +- .../steps/{Step3Dose.tsx => step3-dose.tsx} | 2 +- .../{Step4Window.tsx => step4-window.tsx} | 4 ++-- .../{Step5Cadence.tsx => step5-cadence.tsx} | 4 ++-- ...p6SubCadence.tsx => step6-sub-cadence.tsx} | 4 ++-- .../steps/{Step7Times.tsx => step7-times.tsx} | 6 +++--- .../{Step8Summary.tsx => step8-summary.tsx} | 0 .../medications/wizard/wizard-payload.ts | 4 ++-- .../{WizardStepper.tsx => wizard-stepper.tsx} | 0 .../{AnamnesisCard.tsx => anamnesis-card.tsx} | 0 .../{BaselineForm.tsx => baseline-form.tsx} | 0 .../{DoneScreen.tsx => done-screen.tsx} | 0 ...lsChipPicker.tsx => goals-chip-picker.tsx} | 0 ...boardingShell.tsx => onboarding-shell.tsx} | 0 ...ourceCardGrid.tsx => source-card-grid.tsx} | 0 ...lcomeCarousel.tsx => welcome-carousel.tsx} | 0 .../advanced-account-delete.test.tsx | 2 +- .../__tests__/advanced-research-mode.test.tsx | 4 ++-- src/components/settings/advanced-section.tsx | 2 +- 48 files changed, 51 insertions(+), 51 deletions(-) rename src/components/medications/__tests__/{DrugLevelChart.test.tsx => drug-level-chart.test.tsx} (99%) rename src/components/medications/__tests__/{MedicationCardHeader.test.tsx => medication-card-header.test.tsx} (97%) rename src/components/medications/__tests__/{ResearchModeAcknowledgmentDialog.test.tsx => research-mode-acknowledgment-dialog.test.tsx} (99%) rename src/components/medications/__tests__/{SideEffectsSection.test.tsx => side-effects-section.test.tsx} (98%) rename src/components/medications/detail/{MedicationDetailTabs.tsx => medication-detail-tabs.tsx} (99%) rename src/components/medications/{DrugLevelChart.tsx => drug-level-chart.tsx} (100%) rename src/components/medications/{MedicationCardHeader.tsx => medication-card-header.tsx} (100%) rename src/components/medications/{ResearchModeAcknowledgmentDialog.tsx => research-mode-acknowledgment-dialog.tsx} (100%) rename src/components/medications/scheduling/__tests__/{CadencePicker.test.tsx => cadence-picker.test.tsx} (99%) rename src/components/medications/scheduling/__tests__/{CourseWindowRow.test.tsx => course-window-row.test.tsx} (98%) rename src/components/medications/scheduling/__tests__/{TimesOfDayChips.test.tsx => times-of-day-chips.test.tsx} (98%) rename src/components/medications/scheduling/{CadencePicker.tsx => cadence-picker.tsx} (100%) rename src/components/medications/scheduling/{CourseWindowRow.tsx => course-window-row.tsx} (100%) rename src/components/medications/scheduling/{DoseWindowEditor.tsx => dose-window-editor.tsx} (100%) rename src/components/medications/scheduling/{NaturalLanguageExtractor.tsx => natural-language-extractor.tsx} (100%) rename src/components/medications/scheduling/{ScheduleTimesEditor.tsx => schedule-times-editor.tsx} (99%) rename src/components/medications/scheduling/{TimesOfDayChips.tsx => times-of-day-chips.tsx} (100%) rename src/components/medications/{SideEffectsSection.tsx => side-effects-section.tsx} (100%) rename src/components/medications/wizard/{MedicationWizardDialog.tsx => medication-wizard-dialog.tsx} (97%) rename src/components/medications/wizard/steps/{Step1Name.tsx => step1-name.tsx} (100%) rename src/components/medications/wizard/steps/{Step2Class.tsx => step2-class.tsx} (98%) rename src/components/medications/wizard/steps/{Step3Dose.tsx => step3-dose.tsx} (99%) rename src/components/medications/wizard/steps/{Step4Window.tsx => step4-window.tsx} (92%) rename src/components/medications/wizard/steps/{Step5Cadence.tsx => step5-cadence.tsx} (98%) rename src/components/medications/wizard/steps/{Step6SubCadence.tsx => step6-sub-cadence.tsx} (98%) rename src/components/medications/wizard/steps/{Step7Times.tsx => step7-times.tsx} (97%) rename src/components/medications/wizard/steps/{Step8Summary.tsx => step8-summary.tsx} (100%) rename src/components/medications/wizard/{WizardStepper.tsx => wizard-stepper.tsx} (100%) rename src/components/onboarding/{AnamnesisCard.tsx => anamnesis-card.tsx} (100%) rename src/components/onboarding/{BaselineForm.tsx => baseline-form.tsx} (100%) rename src/components/onboarding/{DoneScreen.tsx => done-screen.tsx} (100%) rename src/components/onboarding/{GoalsChipPicker.tsx => goals-chip-picker.tsx} (100%) rename src/components/onboarding/{OnboardingShell.tsx => onboarding-shell.tsx} (100%) rename src/components/onboarding/{SourceCardGrid.tsx => source-card-grid.tsx} (100%) rename src/components/onboarding/{WelcomeCarousel.tsx => welcome-carousel.tsx} (100%) diff --git a/src/app/medications/[id]/page.tsx b/src/app/medications/[id]/page.tsx index ffe82a7be..dd1365992 100644 --- a/src/app/medications/[id]/page.tsx +++ b/src/app/medications/[id]/page.tsx @@ -26,7 +26,7 @@ import { Card } from "@/components/ui/card"; import { MedicationDetailTabs, type MedicationDetailSnapshot, -} from "@/components/medications/detail/MedicationDetailTabs"; +} from "@/components/medications/detail/medication-detail-tabs"; import { apiGet } from "@/lib/api/api-fetch"; export default function MedicationDetailPage({ diff --git a/src/app/medications/__tests__/list-view-toggle.test.tsx b/src/app/medications/__tests__/list-view-toggle.test.tsx index 418e65477..f1c2a45ca 100644 --- a/src/app/medications/__tests__/list-view-toggle.test.tsx +++ b/src/app/medications/__tests__/list-view-toggle.test.tsx @@ -27,7 +27,7 @@ vi.mock("@/hooks/use-auth", () => ({ // The create wizard and the dialogs are closed in every assertion here; // mock them away so the page render stays scoped to the list surface. -vi.mock("@/components/medications/wizard/MedicationWizardDialog", () => ({ +vi.mock("@/components/medications/wizard/medication-wizard-dialog", () => ({ MedicationWizardDialog: () => null, })); vi.mock("@/components/medications/log-intake-dialog", () => ({ diff --git a/src/app/medications/page.tsx b/src/app/medications/page.tsx index 002763a41..a65d0182e 100644 --- a/src/app/medications/page.tsx +++ b/src/app/medications/page.tsx @@ -7,7 +7,7 @@ import { useRouter, useSearchParams } from "next/navigation"; import { useAuth } from "@/hooks/use-auth"; import { useTranslations } from "@/lib/i18n/context"; import { queryKeys } from "@/lib/query-keys"; -import { MedicationWizardDialog } from "@/components/medications/wizard/MedicationWizardDialog"; +import { MedicationWizardDialog } from "@/components/medications/wizard/medication-wizard-dialog"; import { MedicationCard } from "@/components/medications/medication-card"; import { Glp1MedicationCard } from "@/components/medications/glp1-medication-card"; import { LogIntakeDialog } from "@/components/medications/log-intake-dialog"; diff --git a/src/components/measurement-reminders/vorsorge-section.tsx b/src/components/measurement-reminders/vorsorge-section.tsx index ab129c9ed..79f4a8b25 100644 --- a/src/components/measurement-reminders/vorsorge-section.tsx +++ b/src/components/measurement-reminders/vorsorge-section.tsx @@ -72,7 +72,7 @@ import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { Skeleton } from "@/components/ui/skeleton"; import { MeasurementForm } from "@/components/measurements/measurement-form"; import { VorsorgeTrendStrip } from "@/components/measurement-reminders/vorsorge-trend-strip"; -import { MedicationCardHeader } from "@/components/medications/MedicationCardHeader"; +import { MedicationCardHeader } from "@/components/medications/medication-card-header"; import { useMeasurementReminders, useMeasurementReminderMutations, diff --git a/src/components/medications/__tests__/DrugLevelChart.test.tsx b/src/components/medications/__tests__/drug-level-chart.test.tsx similarity index 99% rename from src/components/medications/__tests__/DrugLevelChart.test.tsx rename to src/components/medications/__tests__/drug-level-chart.test.tsx index 684ce4671..d8cc5777c 100644 --- a/src/components/medications/__tests__/DrugLevelChart.test.tsx +++ b/src/components/medications/__tests__/drug-level-chart.test.tsx @@ -84,7 +84,7 @@ import { DrugLevelChart, parseDoseMg, resolveDoseMg, -} from "../DrugLevelChart"; +} from "../drug-level-chart"; function render(node: React.ReactNode, locale: "en" | "de" = "en") { return renderToStaticMarkup( diff --git a/src/components/medications/__tests__/MedicationCardHeader.test.tsx b/src/components/medications/__tests__/medication-card-header.test.tsx similarity index 97% rename from src/components/medications/__tests__/MedicationCardHeader.test.tsx rename to src/components/medications/__tests__/medication-card-header.test.tsx index baa0d60ba..e1976d9ec 100644 --- a/src/components/medications/__tests__/MedicationCardHeader.test.tsx +++ b/src/components/medications/__tests__/medication-card-header.test.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from "react-dom/server"; import { Badge } from "@/components/ui/badge"; import { Card } from "@/components/ui/card"; -import { MedicationCardHeader } from "@/components/medications/MedicationCardHeader"; +import { MedicationCardHeader } from "@/components/medications/medication-card-header"; /** * v1.4.28 — narrow-viewport contract for the shared medication-list diff --git a/src/components/medications/__tests__/ResearchModeAcknowledgmentDialog.test.tsx b/src/components/medications/__tests__/research-mode-acknowledgment-dialog.test.tsx similarity index 99% rename from src/components/medications/__tests__/ResearchModeAcknowledgmentDialog.test.tsx rename to src/components/medications/__tests__/research-mode-acknowledgment-dialog.test.tsx index 9b6d70da1..a1d4f0da0 100644 --- a/src/components/medications/__tests__/ResearchModeAcknowledgmentDialog.test.tsx +++ b/src/components/medications/__tests__/research-mode-acknowledgment-dialog.test.tsx @@ -94,7 +94,7 @@ vi.mock("@/components/ui/responsive-sheet", () => ({ ) : null, })); -import { ResearchModeAcknowledgmentDialog } from "../ResearchModeAcknowledgmentDialog"; +import { ResearchModeAcknowledgmentDialog } from "../research-mode-acknowledgment-dialog"; function render(node: React.ReactNode, locale: "en" | "de" = "en") { return renderToStaticMarkup( diff --git a/src/components/medications/__tests__/SideEffectsSection.test.tsx b/src/components/medications/__tests__/side-effects-section.test.tsx similarity index 98% rename from src/components/medications/__tests__/SideEffectsSection.test.tsx rename to src/components/medications/__tests__/side-effects-section.test.tsx index d33b133c9..fb1db7141 100644 --- a/src/components/medications/__tests__/SideEffectsSection.test.tsx +++ b/src/components/medications/__tests__/side-effects-section.test.tsx @@ -3,7 +3,7 @@ import { renderToStaticMarkup } from "react-dom/server"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { I18nProvider } from "@/lib/i18n/context"; -import { SideEffectsSection } from "@/components/medications/SideEffectsSection"; +import { SideEffectsSection } from "@/components/medications/side-effects-section"; /** * v1.4.25 W19d — SideEffectsSection SSR smoke tests. diff --git a/src/components/medications/card-parts/medication-card-body.tsx b/src/components/medications/card-parts/medication-card-body.tsx index 58e883b47..38e290699 100644 --- a/src/components/medications/card-parts/medication-card-body.tsx +++ b/src/components/medications/card-parts/medication-card-body.tsx @@ -6,7 +6,7 @@ import { AlertTriangle } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { cn } from "@/lib/utils"; import { formatTimeWindowRange } from "@/lib/time-window-format"; -import { MedicationCardHeader } from "@/components/medications/MedicationCardHeader"; +import { MedicationCardHeader } from "@/components/medications/medication-card-header"; import { MedicationStatusPill } from "@/components/medications/card-parts/medication-status-pill"; import { MedicationComplianceBars, diff --git a/src/components/medications/detail/MedicationDetailTabs.tsx b/src/components/medications/detail/medication-detail-tabs.tsx similarity index 99% rename from src/components/medications/detail/MedicationDetailTabs.tsx rename to src/components/medications/detail/medication-detail-tabs.tsx index 03bf145e9..5f5fdcd09 100644 --- a/src/components/medications/detail/MedicationDetailTabs.tsx +++ b/src/components/medications/detail/medication-detail-tabs.tsx @@ -49,7 +49,7 @@ import { MedicationDetailSummary } from "@/components/medications/medication-det import { MedicationDetailSection } from "@/components/medications/medication-detail-section"; import { MedicationComplianceBars } from "@/components/medications/card-parts/medication-compliance-bars"; import { DoseHistoryLedger } from "@/components/medications/dose-history-ledger"; -import { ScheduleTimesEditor } from "@/components/medications/scheduling/ScheduleTimesEditor"; +import { ScheduleTimesEditor } from "@/components/medications/scheduling/schedule-times-editor"; import { ScheduleHistoryTimeline } from "@/components/medications/scheduling/schedule-history-timeline"; import type { DoseWindowEntry } from "@/components/medications/scheduling/dose-window"; import { IntakeImportDialog } from "@/components/medications/intake-import-dialog"; @@ -68,12 +68,12 @@ import { } from "@/components/medications/sections/destructive-zone-section"; import { SettingsGroup } from "@/components/medications/settings-group"; import { PhaseConfigSheet } from "@/components/medications/sections/phase-config-sheet"; -import { SideEffectsSection } from "@/components/medications/SideEffectsSection"; +import { SideEffectsSection } from "@/components/medications/side-effects-section"; import { ChartSkeleton } from "@/components/charts/chart-skeleton"; import { TitrationTimeline } from "@/components/medications/titration-timeline"; import { estimateRunwayDays } from "@/components/medications/detail/supply-runway"; import { summariseSupply } from "@/lib/medications/inventory/summary"; -import { MedicationWizardDialog } from "@/components/medications/wizard/MedicationWizardDialog"; +import { MedicationWizardDialog } from "@/components/medications/wizard/medication-wizard-dialog"; import { parseScheduleRecurrence } from "@/lib/medication-schedule"; import { useQuery } from "@tanstack/react-query"; import { queryKeys } from "@/lib/query-keys"; @@ -88,7 +88,7 @@ import type { ComplianceDisplay } from "@/lib/analytics/compliance"; // shared chart skeleton standing in while the chunk streams. const DrugLevelChart = dynamic( () => - import("@/components/medications/DrugLevelChart").then((mod) => ({ + import("@/components/medications/drug-level-chart").then((mod) => ({ default: mod.DrugLevelChart, })), { ssr: false, loading: () => }, diff --git a/src/components/medications/DrugLevelChart.tsx b/src/components/medications/drug-level-chart.tsx similarity index 100% rename from src/components/medications/DrugLevelChart.tsx rename to src/components/medications/drug-level-chart.tsx diff --git a/src/components/medications/MedicationCardHeader.tsx b/src/components/medications/medication-card-header.tsx similarity index 100% rename from src/components/medications/MedicationCardHeader.tsx rename to src/components/medications/medication-card-header.tsx diff --git a/src/components/medications/ResearchModeAcknowledgmentDialog.tsx b/src/components/medications/research-mode-acknowledgment-dialog.tsx similarity index 100% rename from src/components/medications/ResearchModeAcknowledgmentDialog.tsx rename to src/components/medications/research-mode-acknowledgment-dialog.tsx diff --git a/src/components/medications/scheduling/__tests__/CadencePicker.test.tsx b/src/components/medications/scheduling/__tests__/cadence-picker.test.tsx similarity index 99% rename from src/components/medications/scheduling/__tests__/CadencePicker.test.tsx rename to src/components/medications/scheduling/__tests__/cadence-picker.test.tsx index c553c9070..3d232df9a 100644 --- a/src/components/medications/scheduling/__tests__/CadencePicker.test.tsx +++ b/src/components/medications/scheduling/__tests__/cadence-picker.test.tsx @@ -6,7 +6,7 @@ import { I18nProvider } from "@/lib/i18n/context"; import { CadencePicker, encodeCadence, -} from "@/components/medications/scheduling/CadencePicker"; +} from "@/components/medications/scheduling/cadence-picker"; import { type CadenceKind, type CadenceSubControls, diff --git a/src/components/medications/scheduling/__tests__/CourseWindowRow.test.tsx b/src/components/medications/scheduling/__tests__/course-window-row.test.tsx similarity index 98% rename from src/components/medications/scheduling/__tests__/CourseWindowRow.test.tsx rename to src/components/medications/scheduling/__tests__/course-window-row.test.tsx index 3095d117d..84d10f205 100644 --- a/src/components/medications/scheduling/__tests__/CourseWindowRow.test.tsx +++ b/src/components/medications/scheduling/__tests__/course-window-row.test.tsx @@ -8,7 +8,7 @@ import { dateToIsoString, isRangeValid, isoStringToDate, -} from "@/components/medications/scheduling/CourseWindowRow"; +} from "@/components/medications/scheduling/course-window-row"; /** * v1.5.0 — CourseWindowRow tests. diff --git a/src/components/medications/scheduling/__tests__/TimesOfDayChips.test.tsx b/src/components/medications/scheduling/__tests__/times-of-day-chips.test.tsx similarity index 98% rename from src/components/medications/scheduling/__tests__/TimesOfDayChips.test.tsx rename to src/components/medications/scheduling/__tests__/times-of-day-chips.test.tsx index 61a5be8fe..a5593b438 100644 --- a/src/components/medications/scheduling/__tests__/TimesOfDayChips.test.tsx +++ b/src/components/medications/scheduling/__tests__/times-of-day-chips.test.tsx @@ -9,7 +9,7 @@ import { removeTime, sortTimes, togglePreset, -} from "@/components/medications/scheduling/TimesOfDayChips"; +} from "@/components/medications/scheduling/times-of-day-chips"; /** * v1.5.0 — TimesOfDayChips tests. diff --git a/src/components/medications/scheduling/CadencePicker.tsx b/src/components/medications/scheduling/cadence-picker.tsx similarity index 100% rename from src/components/medications/scheduling/CadencePicker.tsx rename to src/components/medications/scheduling/cadence-picker.tsx diff --git a/src/components/medications/scheduling/CourseWindowRow.tsx b/src/components/medications/scheduling/course-window-row.tsx similarity index 100% rename from src/components/medications/scheduling/CourseWindowRow.tsx rename to src/components/medications/scheduling/course-window-row.tsx diff --git a/src/components/medications/scheduling/DoseWindowEditor.tsx b/src/components/medications/scheduling/dose-window-editor.tsx similarity index 100% rename from src/components/medications/scheduling/DoseWindowEditor.tsx rename to src/components/medications/scheduling/dose-window-editor.tsx diff --git a/src/components/medications/scheduling/legacy-bridge.ts b/src/components/medications/scheduling/legacy-bridge.ts index c6b2e8ba6..1fa87d947 100644 --- a/src/components/medications/scheduling/legacy-bridge.ts +++ b/src/components/medications/scheduling/legacy-bridge.ts @@ -12,7 +12,7 @@ * Pure functions only — no React, no DOM — so the unit tests can pin * the mapping table without spinning up a render tree. */ -import { encodeCadence } from "./CadencePicker"; +import { encodeCadence } from "./cadence-picker"; import { type CadenceSubControls, type CadenceValue, diff --git a/src/components/medications/scheduling/NaturalLanguageExtractor.tsx b/src/components/medications/scheduling/natural-language-extractor.tsx similarity index 100% rename from src/components/medications/scheduling/NaturalLanguageExtractor.tsx rename to src/components/medications/scheduling/natural-language-extractor.tsx diff --git a/src/components/medications/scheduling/schedule-history-timeline.tsx b/src/components/medications/scheduling/schedule-history-timeline.tsx index e09db0f24..9be638d5f 100644 --- a/src/components/medications/scheduling/schedule-history-timeline.tsx +++ b/src/components/medications/scheduling/schedule-history-timeline.tsx @@ -61,7 +61,7 @@ import { } from "@/components/ui/dialog"; import { DateInput } from "@/components/ui/date-input"; import { Label } from "@/components/ui/label"; -import { TimesOfDayChips } from "@/components/medications/scheduling/TimesOfDayChips"; +import { TimesOfDayChips } from "@/components/medications/scheduling/times-of-day-chips"; import { apiDelete, apiGet, apiPatch, apiPost } from "@/lib/api/api-fetch"; import { useFormatters, useTranslations } from "@/lib/i18n/context"; import { queryKeys } from "@/lib/query-keys"; diff --git a/src/components/medications/scheduling/ScheduleTimesEditor.tsx b/src/components/medications/scheduling/schedule-times-editor.tsx similarity index 99% rename from src/components/medications/scheduling/ScheduleTimesEditor.tsx rename to src/components/medications/scheduling/schedule-times-editor.tsx index 48b5fcdb2..84b1c78f8 100644 --- a/src/components/medications/scheduling/ScheduleTimesEditor.tsx +++ b/src/components/medications/scheduling/schedule-times-editor.tsx @@ -23,8 +23,8 @@ import { toast } from "sonner"; import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; -import { TimesOfDayChips } from "@/components/medications/scheduling/TimesOfDayChips"; -import { DoseWindowEditor } from "@/components/medications/scheduling/DoseWindowEditor"; +import { TimesOfDayChips } from "@/components/medications/scheduling/times-of-day-chips"; +import { DoseWindowEditor } from "@/components/medications/scheduling/dose-window-editor"; import { type DoseWindowEntry, type DoseWindowScale, diff --git a/src/components/medications/scheduling/TimesOfDayChips.tsx b/src/components/medications/scheduling/times-of-day-chips.tsx similarity index 100% rename from src/components/medications/scheduling/TimesOfDayChips.tsx rename to src/components/medications/scheduling/times-of-day-chips.tsx diff --git a/src/components/medications/SideEffectsSection.tsx b/src/components/medications/side-effects-section.tsx similarity index 100% rename from src/components/medications/SideEffectsSection.tsx rename to src/components/medications/side-effects-section.tsx diff --git a/src/components/medications/wizard/__tests__/wizard-payload.test.ts b/src/components/medications/wizard/__tests__/wizard-payload.test.ts index c2c8c217d..90a4f64f3 100644 --- a/src/components/medications/wizard/__tests__/wizard-payload.test.ts +++ b/src/components/medications/wizard/__tests__/wizard-payload.test.ts @@ -20,7 +20,7 @@ import { WIZARD_TREATMENT_MAPPING, type WizardTreatmentRow, } from "@/components/medications/wizard/wizard-payload"; -import { encodeCadence } from "@/components/medications/scheduling/CadencePicker"; +import { encodeCadence } from "@/components/medications/scheduling/cadence-picker"; import { type CadenceKind, DEFAULT_SUB_CONTROLS, diff --git a/src/components/medications/wizard/MedicationWizardDialog.tsx b/src/components/medications/wizard/medication-wizard-dialog.tsx similarity index 97% rename from src/components/medications/wizard/MedicationWizardDialog.tsx rename to src/components/medications/wizard/medication-wizard-dialog.tsx index 154f0be94..5d789d405 100644 --- a/src/components/medications/wizard/MedicationWizardDialog.tsx +++ b/src/components/medications/wizard/medication-wizard-dialog.tsx @@ -49,7 +49,7 @@ import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { useTranslations } from "@/lib/i18n/context"; import { invalidateKeys, medicationDependentKeys } from "@/lib/query-keys"; -import { NaturalLanguageExtractor } from "@/components/medications/scheduling/NaturalLanguageExtractor"; +import { NaturalLanguageExtractor } from "@/components/medications/scheduling/natural-language-extractor"; import { addSchedule, @@ -65,15 +65,15 @@ import { setActiveSchedule, type WizardPayload, } from "./wizard-payload"; -import { WizardStepper } from "./WizardStepper"; -import { Step1Name } from "./steps/Step1Name"; -import { Step2Class } from "./steps/Step2Class"; -import { Step3Dose } from "./steps/Step3Dose"; -import { Step4Window } from "./steps/Step4Window"; -import { Step5Cadence } from "./steps/Step5Cadence"; -import { Step6SubCadence } from "./steps/Step6SubCadence"; -import { Step7Times } from "./steps/Step7Times"; -import { Step8Summary } from "./steps/Step8Summary"; +import { WizardStepper } from "./wizard-stepper"; +import { Step1Name } from "./steps/step1-name"; +import { Step2Class } from "./steps/step2-class"; +import { Step3Dose } from "./steps/step3-dose"; +import { Step4Window } from "./steps/step4-window"; +import { Step5Cadence } from "./steps/step5-cadence"; +import { Step6SubCadence } from "./steps/step6-sub-cadence"; +import { Step7Times } from "./steps/step7-times"; +import { Step8Summary } from "./steps/step8-summary"; import { validateStep } from "./wizard-payload"; import { extractorToWizardPartial } from "./nl-bridge"; diff --git a/src/components/medications/wizard/nl-bridge.ts b/src/components/medications/wizard/nl-bridge.ts index 43d3eae38..9279a2211 100644 --- a/src/components/medications/wizard/nl-bridge.ts +++ b/src/components/medications/wizard/nl-bridge.ts @@ -11,14 +11,14 @@ * the mapping logic. */ -import { encodeCadence } from "@/components/medications/scheduling/CadencePicker"; -import { isoStringToDate } from "@/components/medications/scheduling/CourseWindowRow"; +import { encodeCadence } from "@/components/medications/scheduling/cadence-picker"; +import { isoStringToDate } from "@/components/medications/scheduling/course-window-row"; import { DEFAULT_SUB_CONTROLS, type CadenceSubControls, type WeekdayToken, } from "@/components/medications/scheduling/types"; -import type { WizardPayload as ExtractorPayload } from "@/components/medications/scheduling/NaturalLanguageExtractor"; +import type { WizardPayload as ExtractorPayload } from "@/components/medications/scheduling/natural-language-extractor"; import type { WizardPayload } from "./wizard-payload"; diff --git a/src/components/medications/wizard/steps/Step1Name.tsx b/src/components/medications/wizard/steps/step1-name.tsx similarity index 100% rename from src/components/medications/wizard/steps/Step1Name.tsx rename to src/components/medications/wizard/steps/step1-name.tsx diff --git a/src/components/medications/wizard/steps/Step2Class.tsx b/src/components/medications/wizard/steps/step2-class.tsx similarity index 98% rename from src/components/medications/wizard/steps/Step2Class.tsx rename to src/components/medications/wizard/steps/step2-class.tsx index b33f4f959..c4b9d2f27 100644 --- a/src/components/medications/wizard/steps/Step2Class.tsx +++ b/src/components/medications/wizard/steps/step2-class.tsx @@ -22,7 +22,7 @@ import { type WizardTreatmentRow, WIZARD_TREATMENT_ROWS, } from "../wizard-payload"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; // Each row's Lucide glyph. maintainer-confirmed assignment in D-1 §3 Step 2. const ROW_ICONS: Record< diff --git a/src/components/medications/wizard/steps/Step3Dose.tsx b/src/components/medications/wizard/steps/step3-dose.tsx similarity index 99% rename from src/components/medications/wizard/steps/Step3Dose.tsx rename to src/components/medications/wizard/steps/step3-dose.tsx index a14db3400..85bc82012 100644 --- a/src/components/medications/wizard/steps/Step3Dose.tsx +++ b/src/components/medications/wizard/steps/step3-dose.tsx @@ -24,7 +24,7 @@ import type { MedicationDeliveryForm } from "@/lib/validations/medication"; import { unitsPerDoseOptionsFor } from "@/components/medications/units-per-dose"; import { useTranslations } from "@/lib/i18n/context"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; /** * Dose unit choices, ordered so mg / ml / IE / µg lead and the diff --git a/src/components/medications/wizard/steps/Step4Window.tsx b/src/components/medications/wizard/steps/step4-window.tsx similarity index 92% rename from src/components/medications/wizard/steps/Step4Window.tsx rename to src/components/medications/wizard/steps/step4-window.tsx index 26dcf69b5..e14c3b070 100644 --- a/src/components/medications/wizard/steps/Step4Window.tsx +++ b/src/components/medications/wizard/steps/step4-window.tsx @@ -1,8 +1,8 @@ "use client"; -import { CourseWindowRow } from "@/components/medications/scheduling/CourseWindowRow"; +import { CourseWindowRow } from "@/components/medications/scheduling/course-window-row"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; /** * Step 4 — Behandlungszeitraum (course window). diff --git a/src/components/medications/wizard/steps/Step5Cadence.tsx b/src/components/medications/wizard/steps/step5-cadence.tsx similarity index 98% rename from src/components/medications/wizard/steps/Step5Cadence.tsx rename to src/components/medications/wizard/steps/step5-cadence.tsx index 089f8985a..7eb53b0fc 100644 --- a/src/components/medications/wizard/steps/Step5Cadence.tsx +++ b/src/components/medications/wizard/steps/step5-cadence.tsx @@ -1,11 +1,11 @@ "use client"; -import { encodeCadence } from "@/components/medications/scheduling/CadencePicker"; +import { encodeCadence } from "@/components/medications/scheduling/cadence-picker"; import type { CadenceKind } from "@/components/medications/scheduling/types"; import { useTranslations } from "@/lib/i18n/context"; import type { WizardPayload } from "../wizard-payload"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; /** * The seven cadence rows surfaced in Step 5. Each maps to a (mode, diff --git a/src/components/medications/wizard/steps/Step6SubCadence.tsx b/src/components/medications/wizard/steps/step6-sub-cadence.tsx similarity index 98% rename from src/components/medications/wizard/steps/Step6SubCadence.tsx rename to src/components/medications/wizard/steps/step6-sub-cadence.tsx index aa4831fe4..f3dbfcb05 100644 --- a/src/components/medications/wizard/steps/Step6SubCadence.tsx +++ b/src/components/medications/wizard/steps/step6-sub-cadence.tsx @@ -2,7 +2,7 @@ import { useMemo } from "react"; -import { encodeCadence } from "@/components/medications/scheduling/CadencePicker"; +import { encodeCadence } from "@/components/medications/scheduling/cadence-picker"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { @@ -12,7 +12,7 @@ import { } from "@/components/medications/scheduling/types"; import { useTranslations } from "@/lib/i18n/context"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; /** * Step 6 — sub-cadence detail. The body swaps on the cadence kind the diff --git a/src/components/medications/wizard/steps/Step7Times.tsx b/src/components/medications/wizard/steps/step7-times.tsx similarity index 97% rename from src/components/medications/wizard/steps/Step7Times.tsx rename to src/components/medications/wizard/steps/step7-times.tsx index 3af88c51d..8536242ea 100644 --- a/src/components/medications/wizard/steps/Step7Times.tsx +++ b/src/components/medications/wizard/steps/step7-times.tsx @@ -2,12 +2,12 @@ import { Moon, Sun, Sunrise, Sunset } from "lucide-react"; -import { TimesOfDayChips } from "@/components/medications/scheduling/TimesOfDayChips"; -import { DoseWindowEditor } from "@/components/medications/scheduling/DoseWindowEditor"; +import { TimesOfDayChips } from "@/components/medications/scheduling/times-of-day-chips"; +import { DoseWindowEditor } from "@/components/medications/scheduling/dose-window-editor"; import type { DoseWindowScale } from "@/components/medications/scheduling/dose-window"; import { useTranslations } from "@/lib/i18n/context"; -import type { StepProps } from "./Step1Name"; +import type { StepProps } from "./step1-name"; /** * Step 7 — Einnahmezeit(en). Reuses the v1.5 `TimesOfDayChips` diff --git a/src/components/medications/wizard/steps/Step8Summary.tsx b/src/components/medications/wizard/steps/step8-summary.tsx similarity index 100% rename from src/components/medications/wizard/steps/Step8Summary.tsx rename to src/components/medications/wizard/steps/step8-summary.tsx diff --git a/src/components/medications/wizard/wizard-payload.ts b/src/components/medications/wizard/wizard-payload.ts index 209a825dc..225b7dca0 100644 --- a/src/components/medications/wizard/wizard-payload.ts +++ b/src/components/medications/wizard/wizard-payload.ts @@ -43,11 +43,11 @@ * reads. The mapping table is the single source of truth. */ -import { encodeCadence } from "@/components/medications/scheduling/CadencePicker"; +import { encodeCadence } from "@/components/medications/scheduling/cadence-picker"; import { dateToIsoString, isoStringToDate, -} from "@/components/medications/scheduling/CourseWindowRow"; +} from "@/components/medications/scheduling/course-window-row"; import { type CadenceKind, type CadenceSubControls, diff --git a/src/components/medications/wizard/WizardStepper.tsx b/src/components/medications/wizard/wizard-stepper.tsx similarity index 100% rename from src/components/medications/wizard/WizardStepper.tsx rename to src/components/medications/wizard/wizard-stepper.tsx diff --git a/src/components/onboarding/AnamnesisCard.tsx b/src/components/onboarding/anamnesis-card.tsx similarity index 100% rename from src/components/onboarding/AnamnesisCard.tsx rename to src/components/onboarding/anamnesis-card.tsx diff --git a/src/components/onboarding/BaselineForm.tsx b/src/components/onboarding/baseline-form.tsx similarity index 100% rename from src/components/onboarding/BaselineForm.tsx rename to src/components/onboarding/baseline-form.tsx diff --git a/src/components/onboarding/DoneScreen.tsx b/src/components/onboarding/done-screen.tsx similarity index 100% rename from src/components/onboarding/DoneScreen.tsx rename to src/components/onboarding/done-screen.tsx diff --git a/src/components/onboarding/GoalsChipPicker.tsx b/src/components/onboarding/goals-chip-picker.tsx similarity index 100% rename from src/components/onboarding/GoalsChipPicker.tsx rename to src/components/onboarding/goals-chip-picker.tsx diff --git a/src/components/onboarding/OnboardingShell.tsx b/src/components/onboarding/onboarding-shell.tsx similarity index 100% rename from src/components/onboarding/OnboardingShell.tsx rename to src/components/onboarding/onboarding-shell.tsx diff --git a/src/components/onboarding/SourceCardGrid.tsx b/src/components/onboarding/source-card-grid.tsx similarity index 100% rename from src/components/onboarding/SourceCardGrid.tsx rename to src/components/onboarding/source-card-grid.tsx diff --git a/src/components/onboarding/WelcomeCarousel.tsx b/src/components/onboarding/welcome-carousel.tsx similarity index 100% rename from src/components/onboarding/WelcomeCarousel.tsx rename to src/components/onboarding/welcome-carousel.tsx diff --git a/src/components/settings/__tests__/advanced-account-delete.test.tsx b/src/components/settings/__tests__/advanced-account-delete.test.tsx index 0bbec8cbf..fd1c4e711 100644 --- a/src/components/settings/__tests__/advanced-account-delete.test.tsx +++ b/src/components/settings/__tests__/advanced-account-delete.test.tsx @@ -29,7 +29,7 @@ vi.mock("@tanstack/react-query", () => ({ useMutation: () => ({ mutate: vi.fn(), isPending: false }), })); -vi.mock("@/components/medications/ResearchModeAcknowledgmentDialog", () => ({ +vi.mock("@/components/medications/research-mode-acknowledgment-dialog", () => ({ ResearchModeAcknowledgmentDialog: () =>
, })); diff --git a/src/components/settings/__tests__/advanced-research-mode.test.tsx b/src/components/settings/__tests__/advanced-research-mode.test.tsx index df58a3c88..2984351cc 100644 --- a/src/components/settings/__tests__/advanced-research-mode.test.tsx +++ b/src/components/settings/__tests__/advanced-research-mode.test.tsx @@ -16,7 +16,7 @@ * even when `enabled === true`. * * The dialog itself is covered by - * `ResearchModeAcknowledgmentDialog.test.tsx`; we mock it down to a + * `research-mode-acknowledgment-dialog.test.tsx`; we mock it down to a * marker here so the toggle behaviour is the only contract under * test. */ @@ -48,7 +48,7 @@ vi.mock("@tanstack/react-query", () => ({ // import to a transparent marker so we can assert "the toggle ON path // renders the dialog with the right props" without re-running the // dialog tree. -vi.mock("@/components/medications/ResearchModeAcknowledgmentDialog", () => ({ +vi.mock("@/components/medications/research-mode-acknowledgment-dialog", () => ({ ResearchModeAcknowledgmentDialog: ({ open, currentDisclaimerVersion, diff --git a/src/components/settings/advanced-section.tsx b/src/components/settings/advanced-section.tsx index 9005f5ef3..46f9414a7 100644 --- a/src/components/settings/advanced-section.tsx +++ b/src/components/settings/advanced-section.tsx @@ -17,7 +17,7 @@ import { } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { Switch } from "@/components/ui/switch"; -import { ResearchModeAcknowledgmentDialog } from "@/components/medications/ResearchModeAcknowledgmentDialog"; +import { ResearchModeAcknowledgmentDialog } from "@/components/medications/research-mode-acknowledgment-dialog"; import { formatDateTime } from "@/lib/format"; import { SettingsCard } from "@/components/settings/settings-card"; import { SettingsCardHeader } from "@/components/settings/_card-header";