{
  "id": "workspace-doctolib/you-are-a-senior-buzzing-sundae-subagent-ab00a163",
  "slug": "you-are-a-senior-buzzing-sundae-subagent-ab00a163",
  "title": "Session: you-are-a-senior-buzzing-sundae-subagent-ab00a163 — 2026-04-17",
  "type": "source",
  "project": "workspace-doctolib",
  "date": "2026-04-17",
  "started": "2026-04-17T13:49:31.721000+00:00",
  "ended": "2026-04-17T13:50:29.526000+00:00",
  "model": "claude-haiku-4-5-20251001",
  "cwd": "/Users/USER/workspace/doctolib",
  "git_branch": "HEAD",
  "permission_mode": "",
  "user_messages": 1,
  "tool_calls": 26,
  "tools_used": [
    "Bash",
    "Read",
    "Glob"
  ],
  "is_subagent": true,
  "wikilinks_out": [],
  "body_text": "Project: workspace-doctolib · Branch: HEAD · Mode:  · Model: claude-haiku-4-5-20251001\n\nStats: 1 user messages, 26 tool calls, tools used: Bash, Read, Glob.\n\nConversation\n\nTurn 1 — User\n\nExplore the package at /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui to understand:\n\n1. Does the package already have ANY i18n setup? Look for:\n   - i18n.json at root level (what's in it?)\n   - Any imports of i18n libraries (react-i18next, i18next, formatjs, etc.)\n   - Any existing translation keys or t() function usage\n\n2. How are component props currently defined? Look at:\n   - TypeScript interfaces/types for component props\n   - What props already accept string labels externally vs hardcoding them\n\n3. What is the package's public API (index.ts exports)?\n\n4. What testing patterns exist for these components?\n\n5. Check the package.json for dependencies related to i18n\n\n6. Look at /Users/USER/workspace/doctolib/treatment-plan/packages for other packages that might already have i18n patterns we should follow.\n\nOutput a summary of findings covering all points above.\n\nTurn 1 — Assistant\n\nI'll explore this package systematically to understand its current state and i18n capabilities. Let me start by examining the directory structure and key files.\n\nTools used:\n\n- Bash: find /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui -type f -name \".json\" -o -name \".ts\" -o -name \".tsx\" | head -50\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/storybook-static/project.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/storybook-static/index.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/rsbuild.config.ts\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/dist/entry.d.ts\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-natio\n…(truncated, 9578 more chars)\n\nGood! I can see there's already i18n structure in place. Let me explore the source files and key configuration files.\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/package.json\n\nTool results:\n\n  → result (ok): 1\t{\n2\t  \"name\": \"@doctolib/tpf-national-health-records-ui\",\n3\t  \"version\": \"13.0.2\",\n4\t  \"repository\": {\n5\t    \"type\": \"git\",\n6\t    \"url\": \"git+https://github.com/doctolib/treatment-plan.git\"\n7\t  },\n8\t  \"keywords\": [\n9\t    \"upfront\",\n10\t    \"modular frontend\",\n11\t    \"smaller-scope\"\n12\t  ],\n13\t  \"author\": \"@doctolib/fire\",\n14\t  \"license\": \"Doctolib\",\n15\t  \"doctolib\": {\n16\t    \"upfront-type\": \"smaller-scope\"\n17\t  },\n18\t  \"type\": \"module\",\n19\t  \"sideEffects\": [\n20\t    \"./src/i18n.ts\"\n21\t  ],\n22\t  \n…(truncated, 3864 more chars)\n\nTools used:\n\n- Bash: ls -la /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/ | grep -E \"i18n|src|index\"\n\nTool results:\n\n  → result (ok): .rw-r--r-- clertonra staff  207 B  Tue Feb 24 15:53:39 2026 i18n.json\ndrwxr-xr-x clertonra staff  448 B  Thu Apr 16 16:25:13 2026 src\n\nTools used:\n\n- Glob: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src//.ts\n\nTool results:\n\n  → result (ok): treatment-plan/packages/tpf-national-health-records-ui/src/__tests__/index.test.ts\ntreatment-plan/packages/tpf-national-health-records-ui/src/i18n.ts\ntreatment-plan/packages/tpf-national-health-records-ui/src/entry.ts\ntreatment-plan/packages/tpf-national-health-records-ui/src/test-helpers/fixtures/createFixtureBuilder.ts\ntreatment-plan/packages/tpf-national-health-records-ui/src/test-helpers/fixtures/index.ts\ntreatment-plan/packages/tpf-national-health-records-ui/src/test-helpers/fixtures/nhrDoc\n…(truncated, 2858 more chars)\n\nNow let me examine the i18n configuration files and source code:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/i18n.json\n\nTool results:\n\n  → result (ok): 1\t{\n2\t  \"projectIDs\": [\"0965d2af05c26d3439c7ebf078fb684d\"],\n3\t  \"namespaces\": [\"tpf_national_health_records_ui\"],\n4\t  \"outputPath\": \"packages/tpf-national-health-records-ui/src/locales\",\n5\t  \"locales\": [\"en\", \"fr\"]\n6\t}\n7\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/i18n.ts\n\nTool results:\n\n  → result (ok): 1\timport { i18n } from '@doctolib/tpf-commons/i18n'\n2\t\n3\timport { loadNamespace } from './locales/loadNamespace'\n4\t\n5\ti18n.registerNamespace('tpf_national_health_records_ui', loadNamespace)\n6\t\n7\texport const t = i18n.t\n8\texport const changeLanguage = i18n.changeLanguage\n9\t// To be used only for storybook\n10\texport const getInstance = i18n.getInstance\n11\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/index.ts\n\nTool results:\n\n  → result (ok): 1\texport { NhrDocumentList } from './components/NhrDocumentList/NhrDocumentList'\n2\texport { NhrDocumentListFilterPanel } from './components/NhrDocumentListFilterPanel/NhrDocumentListFilterPanel'\n3\texport type {\n4\t  ActionConfig,\n5\t  ActionsFactory,\n6\t  ColumnConfig,\n7\t  FilterConfig,\n8\t  FilterRenderContext,\n9\t  NhrPatientInfo,\n10\t  NhrVisibilityEntry,\n11\t  StatusOption,\n12\t  NhrDocumentStatusFilterProps,\n13\t  VisibilityOption,\n14\t  SearchDocumentsFn,\n15\t} from './types'\n16\texport { NhrEntryPoin\n…(truncated, 2130 more chars)\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/locales/loadNamespace.ts\n\nTool results:\n\n  → result (ok): 1\timport type { Language } from '@doctolib/upfront-core/i18n'\n2\t\n3\timport NationalHealthRecordsUiEn from './en/tpf_national_health_records_ui.json'\n4\timport NationalHealthRecordsUiFr from './fr/tpf_national_health_records_ui.json'\n5\t\n6\texport const loadNamespace = (lang: Language, namespace: string) => {\n7\t  console.log(Loading namespace: ${namespace} for language: ${lang})\n8\t\n9\t  if (namespace !== 'tpf_national_health_records_ui') {\n10\t    throw new Error(Unsupported namespace: ${namespace}\n…(truncated, 284 more chars)\n\nLet me check the translation files and component prop definitions:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/locales/en/tpf_national_health_records_ui.json\n\nTool results:\n\n  → result (ok): 1\t{\n2\t  \"entry_point.open\": \"Open NHR\",\n3\t  \"filters.date_selection.custom_range.label\": \"Custom date range\",\n4\t  \"filters.date_selection.last_access.label\": \"Since I last accessed this DMP\",\n5\t  \"filters.date_selection.last_access.message\": \"Last accessed on:\",\n6\t  \"translation\": \"Translation\"\n7\t}\n8\n\nTools used:\n\n- Glob: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components//.tsx\n\nTool results:\n\n  → result (ok): treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrEntryPointButton/NhrEntryPointButton.stories.tsx\ntreatment-plan/packages/tpf-national-health-records-ui/src/components/NhrEntryPointButton/NhrEntryPointButton.tsx\ntreatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentListModal/NhrDocumentListTable/NhrDocumentListTableHead/NhrDocumentListTableHead.test.tsx\ntreatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentListModal/Nh\n…(truncated, 8344 more chars)\n\nNow let me check the types and examine some component prop definitions:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/types.ts\n\nTool results:\n\n  → result (ok): 1\timport type { DesignSystemIconComponent } from '@doctolib/design-system-icons'\n2\timport type { NhrDocument } from '@doctolib/tpf-national-health-records'\n3\timport type { ReactNode } from 'react'\n4\t\n5\texport type NhrPatientInfo = {\n6\t  fullName: string\n7\t  gender: 'male' | 'female' | 'other'\n8\t  birthDate: string\n9\t  age: number\n10\t}\n11\t\n12\texport type ColumnConfig = {\n13\t  key: string\n14\t  header: string\n15\t  sortable: boolean\n16\t  / Only required when sortable: true. Returns a string for lo\n…(truncated, 2274 more chars)\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentList.tsx (1–100)\n\nTool results:\n\n  → result (ok): 1\timport { getPagedData } from '#utils/nhrPaginationHelpers'\n2\timport { SpinnerLoader } from '@doctolib/design-system/SpinnerLoader'\n3\timport type { NhrDocument } from '@doctolib/tpf-national-health-records'\n4\timport { useMemo, useState } from 'react'\n5\t\n6\timport type { ActionConfig, ColumnConfig, FilterConfig, NhrPatientInfo } from '../../types'\n7\timport { NhrDocumentListFilterPanel } from '../NhrDocumentListFilterPanel/NhrDocumentListFilterPanel'\n8\timport { NhrDocumentListHeader } from '../Nhr\n…(truncated, 3113 more chars)\n\nTools used:\n\n- Bash: grep -r \"StatusOption\\|FilterConfig\\|ColumnConfig\\|ActionConfig\" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/types.ts | head -20\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/types.ts:export type ColumnConfig = {\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/types.ts:/ Passed to every FilterConfig.render() — country variant casts to its own patient type /\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/types.ts:export type StatusOption = {\n/Users/USER/workspace/doctolib/treatment-plan/packag\n…(truncated, 518 more chars)\n\nNow let me check the i18n test and look at other packages for patterns:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/i18n.test.ts\n\nTool results:\n\n  → result (ok): 1\timport { beforeEach, describe, expect, it } from 'vitest'\n2\t\n3\timport { changeLanguage, t } from './i18n'\n4\t\n5\tdescribe('i18n tests', () => {\n6\t  beforeEach(async () => {\n7\t    await changeLanguage('en')\n8\t  })\n9\t\n10\t  it('should return missing translation', () => {\n11\t    const unknownKey = 'unknown.key'\n12\t    expect(t(unknownKey)).toBe(unknownKey)\n13\t  })\n14\t\n15\t  it('should return the entry point open label', () => {\n16\t    expect(t('tpf_national_health_records_ui.entry_point.open')).toBe(\n…(truncated, 625 more chars)\n\nTools used:\n\n- Bash: find /Users/USER/workspace/doctolib/treatment-plan/packages -maxdepth 2 -name \"i18n.json\" -o -name \"i18n.ts\" | head -20\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-ti-components/i18n.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-nhr-fr/i18n.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/i18n.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-therapy-prescriptions/i18n.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-muster-forms/i18n.json\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-prescription-\n…(truncated, 1215 more chars)\n\nLet me check another package to see the i18n patterns and look at one more component example:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-commons/i18n.json\n\nTool results:\n\n  → result (ok): 1\t{\n2\t  \"projectIDs\": [\"0965d2af05c26d3439c7ebf078fb684d\"],\n3\t  \"namespaces\": [\"tpf_commons\"],\n4\t  \"outputPath\": \"packages/tpf-commons/src/locales\",\n5\t  \"locales\": [\"en\", \"de\", \"fr\", \"it\"]\n6\t}\n7\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrEntryPointButton/NhrEntryPointButton.tsx\n\nTool results:\n\n  → result (ok): 1\timport { Badge } from '@doctolib/design-system/Badge'\n2\timport { IconButton } from '@doctolib/design-system/IconButton/v2'\n3\t\n4\timport { t } from '../../i18n'\n5\t\n6\tconst NEW_DOCUMENTS_COUNT_LIMIT = 99\n7\t\n8\tconst formatNewDocumentsCount = (newDocumentsCount: number) =>\n9\t  newDocumentsCount > NEW_DOCUMENTS_COUNT_LIMIT ? '99+' : newDocumentsCount\n10\t\n11\texport type NhrEntryPointButtonProps = {\n12\t  newDocumentsCount?: number\n13\t  onClick: () => void\n14\t}\n15\t\n16\texport const NhrEntryPointButton =\n…(truncated, 532 more chars)\n\nTools used:\n\n- Bash: grep -r \"export type.Props\" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components --include=\".tsx\" | head -5\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentList.tsx:export type NhrDocumentListProps = {\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentVisibilityFilter/NhrDocumentVisibilityFilter.tsx:export type NhrDocumentVisibilityFilterProps = {\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrEntryPoint/N\n…(truncated, 450 more chars)\n\nPerfect! Now let me check a factory function to understand how labels are currently handled:\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentStatusFilterConfig.ts\n\nTool results:\n\n  → result (ERROR): File does not exist. Note: your current working directory is /Users/USER/workspace/doctolib. Did you mean createNhrDocumentStatusFilterConfig.tsx?\n\nTools used:\n\n- Bash: head -50 /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/columns/createNhrStatusColumn.ts\n\nTool results:\n\n  → result (ERROR): Exit code 1\nhead: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/columns/createNhrStatusColumn.ts: No such file or directory\n\nLet me find the actual files:\n\nTools used:\n\n- Bash: find /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories -type f -name \".ts\" -o -name \".tsx\" | head -10\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDateSelectionFilterConfig.tsx\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentStatusFilterConfig.test.tsx\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.tsx\n/Users/USER/workspace/d\n…(truncated, 1084 more chars)\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/locales/en/tpf_national_health_records_ui.json\n\nTool results:\n\n  → result (ok): File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current — refer to that instead of re-reading.\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentStatusFilterConfig.tsx\n\nTool results:\n\n  → result (ok): 1\timport { NhrDocumentStatusFilter } from '../../../components/NhrDocumentList/NhrDocumentStatusFilter/NhrDocumentStatusFilter'\n2\timport type { FilterConfig, StatusOption } from '../../../types'\n3\t\n4\texport const createNhrDocumentStatusFilterConfig = (statuses: StatusOption[], label: string): FilterConfig => ({\n5\t  key: 'documentStatus',\n6\t  render: (filters, onChange) => (\n7\t    <NhrDocumentStatusFilter\n8\t      label={label}\n9\t      statuses={statuses}\n10\t      value={statuses.filter((s) => fil\n…(truncated, 158 more chars)\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentStatusFilter/NhrDocumentStatusFilter.tsx\n\nTool results:\n\n  → result (ok): 1\timport { Checkbox } from '@doctolib/design-system/Checkbox/v2'\n2\timport { Heading } from '@doctolib/design-system/Heading'\n3\t\n4\timport type { NhrDocumentStatusFilterProps } from '../../../types'\n5\t\n6\texport const NhrDocumentStatusFilter = ({ label, statuses, value, onChange }: NhrDocumentStatusFilterProps) => (\n7\t  <>\n8\t    <Heading level='h5'>{label}</Heading>\n9\t    <div className='flex flex-col'>\n10\t      {statuses.map((status) => (\n11\t        <Checkbox\n12\t          key={status.filterKey}\n13\n…(truncated, 327 more chars)\n\nPerfect! Now let me check the storybook setup to understand how translations work there:\n\nTools used:\n\n- Bash: find /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/.storybook -type f 2>/dev/null | head -10\n\nTool results:\n\n  → result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/.storybook/main.ts\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/.storybook/preview.tsx\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/.storybook/preview.css\n/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/.storybook/public/mockServiceWorker.js\n/Users/USER/workspace/doctolib/treatment-plan/packag\n…(truncated, 61 more chars)\n\nTools used:\n\n- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrEntryPoint/NhrEntryPoint.stories.tsx (1–80)\n\nTool results:\n\n  → result (ok): 1\timport type { NhrDocument } from '@doctolib/tpf-national-health-records'\n2\timport type { Meta, StoryObj } from '@storybook/react'\n3\t\n4\timport type { FilterConfig, NhrPatientInfo } from '../../types'\n5\timport { NhrEntryPoint } from './NhrEntryPoint'\n6\timport { nhrDocumentListColumns } from './nhrDocumentListColumns'\n7\t\n8\tconst samplePatient: NhrPatientInfo = {\n9\t  fullName: 'Camille Devailly',\n10\t  gender: 'female',\n11\t  birthDate: '1990-06-15',\n12\t  age: 34,\n13\t}\n14\t\n15\tconst sampleDocuments: \n…(truncated, 2096 more chars)\n\nExcellent! Now I have all the information I need. Let me create a comprehensive summary report.\n\nSummary of Findings\n\n1. I18N Setup Status: ALREADY ESTABLISHED\n\nThe package already has comprehensive i18n infrastructure in place:\n\n- i18n.json exists at /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/i18n.json with:\n  - Phrase project ID: 0965d2af05c26d3439c7ebf078fb684d\n  - Namespace: tpf_national_health_records_ui\n  - Locales: en, fr\n  - Output path: packages/tpf-national-health-records-ui/src/locales\n\n- i18n.ts at /src/i18n.ts:\n  - Imports i18n from @doctolib/tpf-commons/i18n (centralized i18n management)\n  - Registers namespace via i18n.registerNamespace()\n  - Exports t() function and changeLanguage() for use throughout the package\n\n- Translation files:\n  - /src/locales/en/tpf_national_health_records_ui.json (English source)\n  - /src/locales/fr/tpf_national_health_records_ui.json (French)\n  - Both pulled from Phrase (managed externally, not hand-edited)\n\n- loadNamespace.ts at /src/locales/loadNamespace.ts:\n  - Static imports with language-based switch statement (Vite-friendly)\n  - Supports both en and fr locales\n  - Fallback to English for unsupported languages\n\n- Tests at /src/i18n.test.ts:\n  - Tests verify translation key loading for both languages\n  - Pattern matches documentation guidelines\n\n---\n\n2. Component Props Definition: MIXED APPROACH\n\nComponent props are defined with:\n\nHardcoded strings (most components):\n- Labels passed as props to child components\n- Parent components responsible for providing text\n- Example: NhrDocumentStatusFilter accepts label prop as string\n- Factory functions like createNhrDocumentStatusFilterConfig() accept label parameter\n\nType-safe prop interfaces:\n- All components have TypeScript interfaces\n- Example types exported:\n  - ColumnConfig - table columns with header: string\n  - FilterConfig - filter definitions with render function\n  - ActionConfig - action buttons with tooltip: string\n  - StatusOption - status filters with label: string\n  - VisibilityOption - visibility filters with label: string\n  - NhrDocumentStatusFilterProps - component props including label: string\n\nWhere strings are currently used:\n- NhrEntryPointButton: Uses t('tpf_national_health_records_ui.entry_point.open') for tooltip\n- Component signatures accept string props that are then rendered\n\n---\n\n3. Public API (index.ts exports)\n\nThe package exports a comprehensive public API:\n\nMain Components:\n- NhrDocumentList\n- NhrDocumentListFilterPanel\n- NhrEntryPoint\n- NhrDocumentVisibilityFilter\n\nFactory Functions (for creating configurations):\n- createNhrStatusColumn()\n- createNhrSharedByColumn()\n- createNhrProcedureDateColumn()\n- createNhrDocumentCategoryColumn()\n- createNhrDocumentCategoryFilterConfig()\n- createNhrDateSelectionFilterConfig()\n- createNhrShareDateColumn()\n- createNhrDocumentNameColumn()\n- createNhrVisibilityColumn()\n- createNhrDocumentStatusFilterConfig()\n- createNhrDocumentVisibilityFilterConfig()\n- createViewDocumentAction()\n- createMoreActionsAction()\n\nType Exports:\n- ActionConfig, ActionsFactory, ColumnConfig, FilterConfig, FilterRenderContext\n- NhrPatientInfo, NhrVisibilityEntry, StatusOption, NhrDocumentStatusFilterProps, VisibilityOption\n- SearchDocumentsFn\n- DateMode\n\n---\n\n4. Testing Patterns\n\nTest structure:\n- Vitest (frontend test runner)\n- React Testing Library for component testing\n- Colocated test files: .test.tsx alongside component files\n- Storybook stories: .stories.tsx for visual documentation and interaction testing\n\ni18n testing:\n- src/i18n.test.ts verifies namespace loading and translation keys\n- Tests use changeLanguage() to switch locales\n- Pattern: t('tpf_national_health_records_ui.section.key')\n\nComponent test patterns:\n- Use setup() from @doctolib/test-helpers (pre-configured userEvent)\n- MSW mocking available via @storybook/experimental-addon-test for Storybook tests\n- CSS Modules for component styling with type generation\n\n---\n\n5. Package.json Dependencies\n\ni18n-related dependencies:\n- i18next-browser-languagedetector ^8.2.1 (in dependencies)\n- @doctolib/tpf-commons 3.0.1 (provides centralized i18n service)\n\nDev dependencies for i18n testing:\n- storybook-react-i18next ^3.3.1 (Storybook i18n addon)\n\nNo direct i18n library like react-i18next or i18next - uses Doctolib's centralized solution via @doctolib/tpf-commons/i18n\n\n---\n\n6. Other Packages I18N Patterns (Reference)\n\nExplored i18n configurations from sibling packages. All follow the same pattern:\n\n- tpf-commons: Centralized i18n service (project ID: same as NHR)\n- tpf-therapy-prescriptions: German-only ([\"en\", \"de\"])\n- tpf-diga-fulfillments: German-only ([\"en\", \"de\"])\n- tpf-french-teleservices: French-specific features\n- tpf-muster-forms, tpf-rich-texts, tpf-hand-letters: All use same Phrase-managed approach\n\nKey pattern: Phrase is the source of truth. Translation files are auto-pulled via GitHub Actions workflows (i18n-sync.yml, i18n-create-auto-pr.yml). Developers add labels to Phrase, then PR is labeled i18n to pull translations.\n\n---\n\n7. Current Translation Keys in Package\n\nFrom /src/locales/en/tpf_national_health_records_ui.json:\n\n{\n  \"entry_point.open\": \"Open NHR\",\n  \"filters.date_selection.custom_range.label\": \"Custom date range\",\n  \"filters.date_selection.last_access.label\": \"Since I last accessed this DMP\",\n  \"filters.date_selection.last_access.message\": \"Last accessed on:\",\n  \"translation\": \"Translation\"\n}\n\nMinimal set - only 5 keys. Most UI labels are currently passed as props.\n\n---\n\nKey Files:\n\n- i18n configuration: /packages/tpf-national-health-records-ui/i18n.json\n- i18n exports: /packages/tpf-national-health-records-ui/src/i18n.ts\n- i18n loader: /packages/tpf-national-health-records-ui/src/locales/loadNamespace.ts\n- Translation files: /packages/tpf-national-health-records-ui/src/locales/{en,fr}/tpf_national_health_records_ui.json\n- Types: /packages/tpf-national-health-records-ui/src/types.ts\n- Package config: /packages/tpf-national-health-records-ui/package.json\n- Index/API: /packages/tpf-national-health-records-ui/src/index.ts",
  "sha256": "24c3d773fc39c327",
  "source_url": "sessions/workspace-doctolib/2026-04-17T13-49-workspace-doctolib-you-are-a-senior-buzzing-sundae-subagent-ab00a163.html"
}