/dev/null | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui
/Users/USER/workspace/doctolib/doctolib/.yalc/@doctolib/tpf-national-health-records-ui
/Users/USER/workspace/doctolib/doctolib/node_modules/@doctolib/tpf-national-health-records-ui
/Users/USER/workspace/doctolib/treatment-plan/build/packages/tpf-national-health-records-ui
/Users/USER/workspace/doctolib/treatment-plan/dist/docs/packages/tpf-national-health-records-ui
/Users/USER/workspace/doctolib/treatment-plan
…(truncated, 1702 more chars)
Tools used:
- Bash: ls /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/
Tool results:
→ result (ok): index.ts
NhrDocumentCategoryFilter.stories.tsx
NhrDocumentCategoryFilter.test.tsx
NhrDocumentCategoryFilter.tsx
Tools used:
- Bash: find /Users/USER/workspace/doctolib/treatment-plan -name "CLAUDE.md" -not -path "/node_modules/" -not -path "/.nx/" -not -path "/build/" -not -path "/dist/" 2>/dev/null
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/CLAUDE.md
/Users/USER/workspace/doctolib/treatment-plan/backend/cda-validator/CLAUDE.md
/Users/USER/workspace/doctolib/treatment-plan/.claude/worktrees/stupefied-lewin/CLAUDE.md
/Users/USER/workspace/doctolib/treatment-plan/.claude/worktrees/friendly-lalande/CLAUDE.md
Tools used:
- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx
Tool results:
→ result (ok): 1 import { ChevronDownRegularIcon } from '@doctolib/design-system-icons/ChevronDownRegularIcon'
2 import { Checkbox } from '@doctolib/design-system/Checkbox/v2'
3 import { IconButton } from '@doctolib/design-system/IconButton/v2'
4 import type { Option } from '@doctolib/design-system/Option'
5 import { useEffect, useId, useRef, useState } from 'react'
6
7 type NhrDocumentCategoryFilterProps = {
8 label: string
9 values: string[]
10 options: Option[]
11 placeholder?: string
12 onToggle
…(truncated, 4401 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/treatment-plan/CLAUDE.md
Tool results:
→ result (ok): 1 # CLAUDE.md
2
3 This is a full-stack healthcare treatment plan application (Kotlin/Spring Boot backend + React/TypeScript frontend) built as a modular monolith using the "hive" pattern with hexagonal architecture. It handles prescription creation, document management, and clinical workflows for the French and German markets.
4
5 Refer to @AGENTS.md for complete project overview, architecture, tech stack, and development guidelines.
6
7 ## Language Rule
8
9 All Claude stack files (C
…(truncated, 664 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.test.tsx
Tool results:
→ result (ok): 1 import { setup } from '@doctolib/test-helpers'
2 import { screen } from '@testing-library/react'
3 import { describe, expect, it, vi } from 'vitest'
4
5 import { NhrDocumentCategoryFilter } from './NhrDocumentCategoryFilter'
6
7 const sampleOptions = [
8 { value: 'A', label: 'Report A' },
9 { value: 'B', label: 'Report B' },
10 { value: 'C', label: 'Report C' },
11 ]
12
13 describe('NhrDocumentCategoryFilter', () => {
14 const renderComponent = (props: Partial
/dev/null | hea
…(truncated, 5 more chars)
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/package.json
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/tsconfig.build.json
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/tsconfig.json
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/node_modules/jiti/package.json
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-rec
…(truncated, 1905 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.tsx
Tool results:
→ result (ok): 1 import type { Option } from '@doctolib/design-system/Option'
2
3 import { NhrDocumentCategoryFilter } from '../../../components/NhrDocumentList/NhrDocumentCategoryFilter'
4 import type { FilterConfig } from '../../../types'
5
6 export const createNhrDocumentCategoryFilterConfig = ({
7 options = [],
8 label = 'Document Category',
9 placeholder,
10 }: {
11 options?: Option[]
12 label?: string
13 placeholder?: string
14 } = {}): FilterConfig => ({
15 key: 'typeCodes',
16 render:
…(truncated, 653 more chars)
Tools used:
- Bash: grep -r "dl-new-dropdown" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/ 2>/dev/null | head -5
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx: className='dl-new-dropdown flex flex-col border-0 p-0 [&_label]:!py-[1.2rem] [&_label]:!px-[1.6rem] [&_label>span:last-child]:![font-size:1.4rem]'
Tools used:
- Bash: grep -r "oxygen-input-field" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/ 2>/dev/null | head -10
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx:
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx:
/Users/USER/wo
…(truncated, 594 more chars)
Tools used:
- Bash: find /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system -path "Select" -name ".css" 2>/dev/null | head -5; find /Users/USER/workspace/doctolib/treatment-pl
…(truncated, 121 more chars)
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
- Bash: grep -rn "oxygen-input-field" /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist 2>/dev/null | head -10
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/PinInput/PinInput.module.scss:6: .pinInput { // selector needs to be higher specificity than the default oxygen-input-field__input selector
/Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/PinInput/_RawPinInput.js:14: return (_jsx("div", { className: classnames('oxygen-input-field__inputWrapper'), children: _jsx("input", { "aria-describedby": aria
…(truncated, 3874 more chars)
Good - the Oxygen design system classes are real and used in the design system itself. Let me now examine if there are nuances to verify before finalizing the review.
Tools used:
- Bash: grep -rn "oxygen-input-field__inputWrapper" /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/InputText/ 2>/dev/null | head -10
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/InputText/RawInputText.js:39: return (_jsxs("div", { className: classnames('oxygen-input-field__inputWrapper', {
/Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/InputText/RawInputText.js:40: 'oxygen-input-field__inputWrapper--with-icon': type === 'search',
/Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-syste
…(truncated, 143 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/treatment-plan/node_modules/@doctolib/design-system/dist/dataEntry/InputText/RawInputText.js (1–80)
Tool results:
→ result (ok): 1 import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2 import '../private/_Input.scss';
3 import classnames from 'classnames';
4 import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
5 import { Icon } from '../../Icon.js';
6 import { IconButton } from '../../action/IconButton/v2/IconButton.js';
7 import { useTranslations } from '../../i18n/useTranslations.js';
8 export const RawInputText = forwardRef(({ id, placehol
…(truncated, 3708 more chars)
Confirmed — the Oxygen classes match the design system pattern. Now I have enough context to provide a thorough review.
---
Code Review: NhrDocumentCategoryFilter Multi-Select Refactor
Files Reviewed
- /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx
- /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentList/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.test.tsx
- /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.test.tsx
Summary
The refactor is well-structured: it preserves the existing onToggle/onClear/values props contract, layers Oxygen design-system classes correctly (matching the patterns in RawInputText.js / AlphaMultipleComboBox.js), and the test suite covers the new search/filter behavior, escape/outside-click dismissal, and the multi-value display semantics. The useEffects use empty dependency arrays but only reference setters from useState (stable identities) and the containerRef (read at event time), so there are no stale-closure hazards.
I found a small set of issues at or above the 80-confidence bar.
---
Critical (90–100)
1. aria-controls referencing an element that does not exist breaks a11y contract — confidence 88
File: NhrDocumentCategoryFilter.tsx lines 92–93, 119–124
The combobox advertises aria-controls={isOpen ? popupId : undefined} while the popup with id={popupId} is conditionally rendered ({isOpen && (