Drop unimported re-exports outside the barrels

Eighteen modules carried a convenience re-export of a symbol defined
elsewhere. In each case the callers the comment describes now import the
concrete module directly, so the line had no importer left. Where the
whole re-export block went, the comment explaining it went with it —
doctor-report-pdf-core, trend-card and medication-extract-prompt each
claimed to be a single import surface that nothing was using.

Definitions are untouched; imports that existed only to feed a removed
re-export go too.
This commit is contained in:
Marc-André Bombeck committed 2026-08-23 19:11:12 +02:00
1 parent 244a939d05
commit 0e9c5f1a00
18 files changed
+6 -76

No files matched your search

-6
View File
@@ -15,14 +15,8 @@ import {
getTrendSentiment,
sentimentColorClass,
type TrendDirectionSentiment,
type TrendSentimentDirection,
} from "@/lib/insights/trend-sentiment";
// v1.9.0 — the metric-aware sentiment mapping moved to a shared module so the
// range-delta caption paints the same colour for the same signal. Re-exported
// here so existing `@/components/charts/trend-card` importers keep the type.
export type { TrendDirectionSentiment, TrendSentimentDirection };
interface SecondaryMetric {
/** Sub-value latest reading (e.g. diastolic when latest is systolic). */
latest: number | null;
@@ -13,7 +13,6 @@ import { toast } from "sonner";
import type {
CoachConversationAttachmentDTO,
CoachConversationDetailDTO,
CoachConversationDTO,
CoachConversationsPage,
CoachProvenance,
CoachScope,
@@ -1118,7 +1117,6 @@ export function useSendCoachMessage(opts: UseSendCoachMessageOptions = {}) {
// `@/lib/ai/coach/types` directly.
export type {
CoachConversationAttachmentDTO,
CoachConversationDTO,
CoachConversationDetailDTO,
CoachProvenance,
CoachSuggestion,
@@ -44,10 +44,7 @@
*/
import { encodeCadence } from "@/components/medications/scheduling/cadence-picker";
import {
dateToIsoString,
isoStringToDate,
} from "@/components/medications/scheduling/course-window-row";
import { dateToIsoString } from "@/components/medications/scheduling/course-window-row";
import {
type CadenceKind,
type CadenceSubControls,
@@ -1277,4 +1274,4 @@ function subControlsFromRrule(rrule: string): CadenceSubControls {
// Re-exports — convenience for the dialog and tests
// ────────────────────────────────────────────────────────────────────
export { dateToIsoString, isoStringToDate };
export { dateToIsoString };
-2
View File
@@ -42,8 +42,6 @@ import {
} from "@/lib/validations/health-profile-facts";
import { decryptHealthProfileFactValue } from "@/lib/profile/health-facts";
export { ABOUT_ME_MAX_CHARS } from "@/lib/validations/about-me";
export interface SelfContext {
aboutMe: string | null;
conditions: string | null;
@@ -90,13 +90,6 @@ export type MedicationExtractionResult = z.infer<
typeof medicationExtractionSchema
>;
/**
* Re-export the wizard `CadenceKind` + `WeekdayToken` types so callers
* (the route, the tests) import a single module rather than chasing
* the wizard types directory.
*/
export type { CadenceKind, WeekdayToken };
/**
* Build the system prompt. Same shape across calls — the model only
* sees the user's free text via `buildUserPrompt()`. The system prompt
+1 -6
View File
@@ -26,10 +26,7 @@
*
* Pure and in-place — the snapshot is a plain record by the time it gets here.
*/
import {
TODAY_CLAIM_MAX_AGE_DAYS,
isCurrentForTodayClaim,
} from "@/lib/insights/measurement-freshness";
import { isCurrentForTodayClaim } from "@/lib/insights/measurement-freshness";
/** When a metric block's series actually ends, and what may be said about it. */
export interface SnapshotAsOf {
@@ -187,5 +184,3 @@ export function annotateSnapshotFreshness(snapshot: Record<string, unknown>): {
}
return { stale, coarseWithheld };
}
export { TODAY_CLAIM_MAX_AGE_DAYS };
-2
View File
@@ -20,8 +20,6 @@ import { randomBytes } from "node:crypto";
import { prisma } from "@/lib/db";
import { hashToken } from "@/lib/auth/hmac";
export { INVITE_MAX_TTL_DAYS } from "@/lib/validations/invite";
/** Raw-token prefix — distinct from `hlk_` (API) and `hlr_` (refresh). */
export const INVITE_TOKEN_PREFIX = "hlv_";
-6
View File
@@ -44,13 +44,7 @@ export function buildNativeCallbackUrl(params: Record<string, string>): string {
// Re-export the shared mint/consume core so the OIDC callback + token route
// keep importing from here unchanged.
export {
HANDOFF_CODE_PREFIX,
mintNativeHandoff,
consumeNativeHandoff,
stampIssuedRefreshToken,
} from "@/lib/auth/native-handoff";
export type {
HandoffFlow,
MintedHandoff,
ConsumeHandoffResult,
} from "@/lib/auth/native-handoff";
-3
View File
@@ -40,7 +40,6 @@ import {
} from "@/lib/crypto";
import {
ENCRYPTED_COLUMNS,
encryptedColumnKey,
type EncryptedColumn,
} from "@/lib/crypto/encrypted-columns";
@@ -381,5 +380,3 @@ export async function rotateCorpus(
totalErrors,
};
}
export { encryptedColumnKey };
-2
View File
@@ -26,10 +26,8 @@ import { CUSTOM_SYMPTOM_KEY_PREFIX } from "@/lib/cycle/custom-symptoms-shared";
export {
CUSTOM_SYMPTOM_KEY_PREFIX,
CUSTOM_SYMPTOM_CATEGORY_KEY,
CUSTOM_SYMPTOM_CATEGORY_ID,
MAX_CUSTOM_SYMPTOMS_PER_USER,
CUSTOM_SYMPTOM_ICON_ALLOWLIST,
isCustomSymptomKey,
createCustomSymptomSchema,
updateCustomSymptomSchema,
+1 -7
View File
@@ -18,7 +18,7 @@ import {
isStructuredLeafId,
REPORT_GROUPS,
} from "./report-selection/catalogue";
import { MEASUREMENT_TYPE_LABEL_KEYS } from "./measurements/type-label-keys";
import { getUnitForType } from "./validations/measurement";
import {
makeFormatters,
@@ -166,12 +166,6 @@ export interface DoctorReportRenderOptions {
includeCharts?: boolean;
}
// Per-type label keys live in a lucide-free module so leaf consumers — the
// public clinician share view, this renderer — can import the map without
// dragging icon components into their graph. Re-exported here so the PDF core
// stays the single import surface its existing callers already use.
export { MEASUREMENT_TYPE_LABEL_KEYS };
export const DOCTOR_REPORT_TYPE_UNIT_KEYS: Record<string, string | null> = {
WEIGHT: "kg",
BLOOD_PRESSURE_SYS: "mmHg",
-3
View File
@@ -37,12 +37,9 @@
* to show a biomarker's name resolves it through the labs catalog instead.
*/
import { LOINC_SYSTEM, UCUM_SYSTEM } from "@/lib/fhir/loinc-map";
import { localisedValues } from "@/lib/i18n/shared-resolve";
import { stripDiacritics } from "@/lib/i18n/fold-for-match";
export { LOINC_SYSTEM, UCUM_SYSTEM };
/** A curated biomarker → LOINC + canonical-UCUM entry. */
export interface LabLoincMapping {
loinc: string;
+1 -6
View File
@@ -39,12 +39,7 @@ import {
type CoachReadStripData,
} from "@/lib/insights/derived/coach-read-shape";
export type {
CoachReadBaseline,
CoachReadDriver,
CoachReadStripData,
CoachReadBaselinePlacement,
} from "@/lib/insights/derived/coach-read-shape";
export type { CoachReadStripData } from "@/lib/insights/derived/coach-read-shape";
/**
* Read the latest reading for `(userId, type)` — the value the strip places
+1 -5
View File
@@ -39,11 +39,7 @@ import {
computeMoodDimensionSeries,
type MoodDimensionSummary,
} from "@/lib/insights/mood-dimension-series";
export {
computeMoodDimensionSeries,
type MoodDimensionPoint,
type MoodDimensionSummary,
} from "@/lib/insights/mood-dimension-series";
export { type MoodDimensionSummary } from "@/lib/insights/mood-dimension-series";
import { resolveUserTimezone } from "@/lib/tz/resolver";
import { annotate } from "@/lib/logging/context";
import { createCustomLabelResolver } from "@/lib/mood/custom-tags";
-3
View File
@@ -1,6 +1,5 @@
import { resolveProvider, resolveProviderChain } from "@/lib/ai/provider";
import {
AllProvidersFailedError,
runRawCompletionWithFallback,
type ProviderChainResolved,
} from "@/lib/ai/provider-runner";
@@ -299,5 +298,3 @@ export async function runStatusCompletion(
tokensUsed: result.tokensUsed ?? null,
};
}
export { AllProvidersFailedError };
@@ -26,13 +26,6 @@ import {
type ReportSelection,
} from "./selection";
export {
savedReportProfileSchema,
parseSavedProfile,
SAVED_PROFILE_FALLBACK,
type SavedReportProfile,
} from "./profile-shape";
/**
* Resolve the owner's saved selection.
*
-1
View File
@@ -49,7 +49,6 @@ export {
formatInUserTz,
userDayKey,
hourInTz,
type FormatInUserTzShape,
} from "./format";
const BERLIN_DAY_FORMATTER = new Intl.DateTimeFormat("en-US", {
-3
View File
@@ -307,10 +307,7 @@ export type ListLabResultsInput = z.infer<typeof listLabResultsSchema>;
* implementation. Re-exported here for the existing import sites.
*/
export {
classifyAgainstEffectiveRange,
classifyReferenceRange,
formatReferenceRange,
resolveEffectiveReferenceRange,
type EffectiveReferenceRange,
type ReferenceRangeOrigin,
type ReferenceRangeStatus,