7accb2aad6
* feat: add package amount persistence and backend route support * test: align backend test schemas with medication metadata fields * fix(backend): restore intake usage normalizer for planner endpoint * fix(backend): keep export typing compatible before liquid-unit stack step
65 KiB
65 KiB
Work Report
Purpose: user-facing summary of completed work.
Format
For each task, add:
- Date
- Scope
- What changed
- Files touched
- Follow-ups (if any)
How to maintain (1-minute template)
### YYYY-MM-DD
- **🧩 Scope**:
- **🛠️ What changed**:
-
- **📁 Files touched**:
-
- **🔜 Follow-ups**:
-
Entries
2026-02-28 (PR #356 backend CI failure triage)
- 🧩 Scope: Reproduce and fix failing
Backend Testscheck on branchfeat/package-amount-backend. - 🛠️ What changed:
- Reproduced failure locally with
CI=true npm run test:runinbackend(15failing tests, all returning500from planner usage endpoint paths). - Root cause: missing utility export used at runtime by
POST /medications/usage.- Caller:
backend/src/routes/medications.ts(normalizeIntakeUsageForStock(...)) - Missing implementation/export in:
backend/src/utils/scheduler-utils.ts
- Caller:
- Added minimal
normalizeIntakeUsageForStock(...)helper to return a validated finite positive numeric usage value.
- Reproduced failure locally with
- 📁 Files touched:
backend/src/utils/scheduler-utils.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
cd backend && CI=true npx vitest run src/test/integration.test.ts src/test/stock-semantics-parity.test.ts src/test/e2e-routes.test.ts-> 3 files passed, 143 tests passedcd backend && CI=true npm run test:run-> 21 files passed, 572 tests passed
- 🔜 Follow-ups:
- None.
2026-02-28 (Stacked Branch Validation + Compatibility Fixes)
- 🧩 Scope: Validate stacked commits for package amount, liquid intake units, and topical no-depletion behavior; fix test compatibility blockers.
- 🛠️ What changed:
- Verified stack lineage on current branch:
7ebd253(feat/package-amount-backend)3954ed2(feat/tube-ui-simplification)e689720(feat/liquid-intake-units-conversion)f9deb1b(feat/topical-no-depletion-planner)
- Fixed backend integration fixture drift by updating in-memory
medicationsschemas to current column set (including medication form + package amount fields), which removed widespread500failures in backend tests. - Updated focused Playwright specs to match current UI semantics:
- usage label selectors now support dynamic usage labels (not pills-only)
- lifecycle edit flow now uses robust row/action selectors and current
Commercial Namelabel - planner stock assertion now validates blister+loose-pill breakdown format
- Removed fixable E2E lint warnings in lifecycle spec (unused import/variable).
- Verified stack lineage on current branch:
- 📁 Files touched:
backend/src/test/integration.test.tsbackend/src/test/planner.test.tsbackend/src/test/e2e-routes.test.tsfrontend/e2e/medication-edit.spec.tsfrontend/e2e/medication-lifecycle.spec.tsfrontend/e2e/planner-data.spec.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
npm run lint(root): backend clean; frontend reports 12 pre-existingnoNestedTernarywarnings inMedicationsPage.tsx/ReportModal.tsx; no new warning introduced by this change.cd backend && CI=true npm run test:run: 21 files passed, 572 tests passed.cd frontend && CI=true npm run test:run: 42 files passed, 775 tests passed.cd frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npm run test:e2e -- --workers=1 e2e/medication-edit.spec.ts e2e/medication-lifecycle.spec.ts e2e/planner-data.spec.ts: 25 passed, 0 failed.
- 🔜 Follow-ups:
- Optional dedicated cleanup PR for remaining frontend
noNestedTernarywarnings.
- Optional dedicated cleanup PR for remaining frontend
2026-02-28 (UX update: no +/- for tube/liquid package amount)
- 🧩 Scope: Simplify package amount input for non-tablet package types.
- 🛠️ What changed:
- Replaced
+/-stepper controls with a single numeric input field for:Tube -> Amount per tubeLiquid container -> Package amount
- Units remain fixed and non-editable:
Tube -> gLiquid container -> ml
- Added mobile modal regression tests to verify plain input behavior and fixed unit selectors.
- Replaced
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/test/components/MobileEditModal.test.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
runTests:frontend/src/test/components/MobileEditModal.test.tsx->59 passed, 0 failedget_errors: no diagnostics errors on touched files
- 🔜 Follow-ups:
- Optional: refactor pre-existing
noNestedTernarywarnings inMedicationsPage.tsxin a dedicated cleanup task.
- Optional: refactor pre-existing
2026-02-28 (Tests updated for strict tube/liquid unit behavior)
- 🧩 Scope: Ensure automated tests cover the new unit rules (
tube -> g,liquid_container -> ml). - 🛠️ What changed:
- Updated existing
useMedicationFormtests to explicitly checkpackageAmountUnit="ml"for liquid-container defaults and lock behavior. - Added new regression test:
tubealways enforcespackageAmountUnit="g", even if anmlchange is attempted. - Added new regression test: legacy
tuberecords withpackageAmountUnit="ml"are normalized togduring edit mapping. - Refactored touched source code for lint compliance (
noNestedTernary) in modified files.
- Updated existing
- 📁 Files touched:
frontend/src/test/hooks/useMedicationForm.test.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/components/MobileEditModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
runTests:frontend/src/test/hooks/useMedicationForm.test.ts->25 passed, 0 failedbiome check(focused): touched files -> clean
- 🔜 Follow-ups:
- Optional backend guard to reject
tube+mlpayloads server-side.
- Optional backend guard to reject
2026-02-28 (Domain fix: tube can no longer use ml)
- 🧩 Scope: Enforce correct measurement semantics for tube medications.
- 🛠️ What changed:
- Tube forms no longer allow selecting
ml. - Tube amount unit is now fixed to
gin desktop and mobile edit flows. - Existing tube records are normalized to
gwhen opened in edit mode. - Save payload now enforces:
tube -> packageAmountUnit = gliquid_container -> packageAmountUnit = ml
- Tube forms no longer allow selecting
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/hooks/useMedicationForm.tsdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: add backend route-level guard to reject
tube+mlfor full server-side protection.
- Optional: add backend route-level guard to reject
2026-02-28 (Tube package made simple: 1 x 150 g)
- 🧩 Scope: Remove confusing/duplicated stock inputs for tube medications.
- 🛠️ What changed:
- Tube stock section was simplified in desktop and mobile forms.
- For
Package Type = Tube, the form now shows:TubesAmount per tube(g/ml)- computed total amount (
Tubes * Amount per tube)
- Removed tube-specific
Total Amount/Current Amountstepper inputs that allowed conflicting values. - Save logic now persists tube amounts consistently from the simple model (
packCount * packageAmountValue). - Added new localized labels in EN/DE for tube-specific fields.
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: adjust read-only views to always surface the same multiplication format for tube medications.
2026-02-28 (UI consistency: start date now shows optional)
- 🧩 Scope: Align date-input hint text for medication dates.
- 🛠️ What changed:
- Added
optionalplaceholder toMedication Start Datein desktop and mobile edit forms. - This is a display-only consistency fix; start date validation behavior is unchanged (still optional).
- Added
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None.
2026-02-28 (Implemented: liquid intake units, topical stock rule, package amount metadata)
- 🧩 Scope: Fully implement the approved behavior across backend/frontend for liquid measurements, topical stock handling, and package content metadata.
- 🛠️ What changed:
- Added backend persistence + compatibility for package amount fields:
packageAmountValuepackageAmountUnit(ml|g)
- Extended intake model with
intakeUnit(ml|tsp|tbsp) and applied stock conversion:1 tsp = 5 ml1 tbsp = 15 ml
- Updated stock/depletion logic so topical (
tube) does not auto-deplete stock (metadata-only behavior), while liquid remains measurable and depleting. - Updated export/import to carry new fields and bumped export format version to
1.3. - Added desktop + mobile UI controls for:
- intake unit selection on liquid-container schedules
- package amount metadata (
value + unit) for tube/liquid-container
- Updated frontend coverage logic (including shared schedule view) to match backend conversion and topical no-depletion behavior.
- Added EN/DE translation keys for the new form labels.
- Added backend persistence + compatibility for package amount fields:
- 📁 Files touched:
backend/src/routes/medications.tsbackend/src/services/reminder-scheduler.tsbackend/src/routes/export.tsfrontend/src/types/index.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/utils/schedule.tsfrontend/src/components/SharedSchedule.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Execute test plan via
@testing-manager(ownership rule).
- Execute test plan via
2026-02-28 (Topical vs Liquid Stock Behavior Clarified)
- 🧩 Scope: Define practical stock behavior for topical vs liquid medications and add intake conversion for tablespoon dosing.
- 🛠️ What changed:
- Updated
doku/package_types.mdwith explicit behavior split:topical: package content is informational only (no stock depletion math in V1/V1.1)liquid: measurable stock, always deducted in canonicalml
- Added liquid intake conversion model:
ml,tsp,tbspintake units- fixed conversion:
1 tsp = 5 ml,1 tbsp = 15 ml
- Added implementation guidance to use metric medical conversion (
tbsp=15 ml) and avoid regional kitchen variants.
- Updated
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Implement intake-unit enum + conversion pipeline in API/frontend if this concept is approved.
2026-02-28 (Packaging Quantity Units Clarified)
- 🧩 Scope: Define how package amount should be measured for liquid and topical medications.
- 🛠️ What changed:
- Added a new recommendation section in
doku/package_types.mdfor explicit package quantity fields:packageAmountValue(number)packageAmountUnit(ml|g)
- Documented practical unit mapping:
- oral liquids (
liquid_container) ->ml - topical cream/ointment/gel (
tube) ->g - topical lotions/solutions ->
ml
- oral liquids (
- Clarified that
packageAmountUnitis separate fromdoseUnitandstrengthUnit.
- Added a new recommendation section in
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Implement model fields/migration/UI in a dedicated PR if this recommendation is approved.
2026-02-28 (Liquid Container Regression Tests Executed)
- 🧩 Scope: Turn the
liquid_containerhandoff checklist into real automated regression tests and validate the new behavior. - 🛠️ What changed:
- Added backend real-route tests in
backend/src/test/e2e-routes.test.tsfor:- creating a
liquid_containermedication - validating shared schedule stock semantics for
liquid_container - rejecting invalid
liquid+ non-liquid_containercombinations
- creating a
- Added frontend hook tests in
frontend/src/test/hooks/useMedicationForm.test.tsfor:- automatic form derivation when switching to
packageType=liquid_container - enforcing lock behavior that keeps
medicationForm=liquidanddoseUnit=ml
- automatic form derivation when switching to
- Fixed the in-memory backend test schema in
e2e-routes.test.tsso current route inserts can run against the test DB without false500errors. - Executed targeted test names for the new scenarios; all targeted tests passed.
- Added backend real-route tests in
- 📁 Files touched:
backend/src/test/e2e-routes.test.tsfrontend/src/test/hooks/useMedicationForm.test.tsdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Expand the package/form matrix tests in backend route suites if broader hardening is desired.
2026-02-28 (Testing Handoff Checklist Added)
- 🧩 Scope: Provide a concrete
@testing-managerhandoff for validatingliquid_containerrollout quality. - 🛠️ What changed:
- Added a dedicated testing section in
doku/package_types.mdwith executable checks for:- backend package/form validation matrix
- frontend desktop/mobile parity
- planner/schedule/dashboard/detail/report unit semantics (
mlfor liquid container) - export/import/share/refill behavior
- minimum E2E scenarios and pass criteria
- Checklist is explicitly scoped to prevent regressions back to pill-only assumptions.
- Added a dedicated testing section in
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Execute this checklist through
@testing-managerper repository governance.
- Execute this checklist through
2026-02-28 (Dedicated Liquid Package Type Implemented)
- 🧩 Scope: Implement missing package type for liquid medications using
liquid_containerand propagate it across backend/frontend. - 🛠️ What changed:
- Added
liquid_containerto API/frontend package type unions and import/export validation. - Enforced domain rules centrally:
liquidmust useliquid_containertopicalmust usetubecapsule/tabletcannot usetubeorliquid_container
- Updated desktop + mobile medication edit flows to expose
liquid_containerand enforce correct form locking. - Updated planner/schedule/dashboard/detail/report unit rendering so liquid container values use
mlinstead of pill wording. - Updated refill/share/reminder/planner backend branches so container calculations include
liquid_container. - Added i18n labels:
- EN:
Liquid Container - DE:
Fluessigbehaeltnis
- EN:
- Updated
doku/package_types.mdto makeliquid_containermapping explicit.
- Added
- 📁 Files touched:
backend/src/routes/medications.tsbackend/src/routes/export.tsbackend/src/routes/refills.tsbackend/src/routes/share.tsbackend/src/routes/planner.tsbackend/src/services/reminder-scheduler.tsfrontend/src/types/index.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/pages/PlannerPage.tsxfrontend/src/pages/SchedulePage.tsxfrontend/src/pages/DashboardPage.tsxfrontend/src/components/MedDetailModal.tsxfrontend/src/components/ReportModal.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Test execution/triage remains delegated to
@testing-manager.
- Test execution/triage remains delegated to
2026-02-28 (Logic fix: Liquid is no longer allowed in Tube)
- 🧩 Scope: Correct package/form logic after identifying that
liquidintubeis invalid. - 🛠️ What changed:
- Backend validation rules updated:
topicalmust usetubeliquidcannot usetube
- Desktop and mobile medication edit forms updated:
- when
Package Type = Tube, onlyTopicalis selectable Liquidoption removed from tube-specific selector
- when
- Form-state logic updated to keep tube selections deterministic:
- tube now forces
medicationForm=topical - tube defaults to
doseUnit=units
- tube now forces
doku/package_types.mdupdated to reflect the corrected compatibility rules.
- Backend validation rules updated:
- 📁 Files touched:
backend/src/routes/medications.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxdoku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Decide in master-plan phase how
liquidshould be modeled operationally (explicit non-tube path with full UX and stock semantics).
- Decide in master-plan phase how
2026-02-28 (Package-type hardening implementation pass)
- 🧩 Scope: Implement high-impact package-type fixes immediately and reduce risk before the later master-plan rollout.
- 🛠️ What changed:
- Hardened backend compatibility rules in
medications.ts:liquid/topical -> tube(already present)- added inverse guard
capsule/tablet != tube
- Updated frontend planner/schedule wording for non-pill forms:
- usage and totals now render form-aware units for
tubeflows - pill-weight helper is suppressed for tube flows
- usage and totals now render form-aware units for
- Updated backend planner/reminder messaging:
- no pill-only assumption for
tubepackage type - unit labels are now package/form aware in plain-text and email table content
- no pill-only assumption for
- Extended backend translation keys to support the updated unit terminology.
- Updated
doku/package_types.mdstatus snapshot to reflect this implementation progress.
- Hardened backend compatibility rules in
- 📁 Files touched:
backend/src/routes/medications.tsfrontend/src/pages/PlannerPage.tsxfrontend/src/pages/SchedulePage.tsxbackend/src/routes/planner.tsbackend/src/services/reminder-scheduler.tsbackend/src/i18n/translations.tsdoku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Full regression suite expansion for all four forms remains open and should be handled by
@testing-manager.
- Full regression suite expansion for all four forms remains open and should be handled by
2026-02-28 (Full package_types plan synchronized with current code state)
- 🧩 Scope: Review the complete package-types plan and update it to the latest implementation reality.
- 🛠️ What changed:
- Added a new dated status snapshot (
2026-02-28) with clear separation of:- already implemented behavior
- still-open implementation gaps
- Updated scope section from generic "implement now" wording to:
V1 baseline (already implemented)V1 remaining work
- Added an explicit lifecycle storage note that current persisted values are
refill_when_empty|treatment_period, whileongoingis runtime-derived. - Added progress interpretation for the 1:1 remediation sequence so already-delivered steps are handled as verify-and-align checks.
- Added a new dated status snapshot (
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Prioritize planner/schedule/reminder wording cleanup and enforce full four-form regression coverage.
2026-02-28 (1:1 remediation sequence added to package type plan)
- 🧩 Scope: Add the complete execution-ready implementation order directly into
doku/package_types.md. - 🛠️ What changed:
- Added a new section with strict
file -> exact change -> acceptance criterionsequencing. - Expanded this sequence across all relevant implementation surfaces:
- backend schema/routes/services
- frontend runtime and parity-critical screens
- i18n
- backend tests, frontend tests, and e2e tests
- documentation tracking files
- Added an explicit execution gate so skipped files must be justified; otherwise the rollout is marked incomplete.
- Added a new section with strict
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Apply the remediation sequence in code and validate each acceptance criterion per file group.
2026-02-28 (Package type plan aligned and fully enumerated)
- 🧩 Scope: Make
doku/package_types.mdinternally consistent and explicitly enumerate all impacted areas. - 🛠️ What changed:
- Corrected plan context to current container reality (
blister|bottle|tube) to remove ambiguity. - Added a full affected-file inventory grouped by:
- backend schema/routes/services
- frontend runtime surfaces
- i18n files
- backend tests
- frontend tests
- e2e specs
- documentation synchronization files
- This converts the plan into a practical implementation checklist so no affected area is accidentally skipped.
- Corrected plan context to current container reality (
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Execute code remediation based on this inventory and close gaps in planner/schedule/backend planner messaging first.
2026-02-28 (Package type plan made implementation-safe)
- 🧩 Scope: Improve
doku/package_types.mdto prevent incomplete package/form rollouts. - 🛠️ What changed:
- Added a mandatory implementation coverage checklist spanning backend, frontend desktop/mobile parity, read views, i18n, import/export/share, and tests.
- Added a strict definition-of-done rule: package/form changes are incomplete unless all affected areas are updated (or explicitly marked not impacted with rationale).
- This turns the plan from descriptive guidance into an execution gate against partial implementations.
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Run a targeted remediation pass for remaining pill-only wording in planner/schedule and backend planner notifications, plus matching tests.
2026-02-28 (Release manager instructions cleaned up)
- 🧩 Scope: Remove app-feature text from release-manager agent instructions and keep the file process-oriented.
- 🛠️ What changed:
- Replaced the concrete medication-feature release-notes example with a neutral template.
- New template keeps the expected section structure, commit-hash usage, and full-changelog format, but avoids product-specific content.
- 📁 Files touched:
.github/agents/release-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: standardize the Breaking Changes example heading to remove emoji for full consistency with style rules.
2026-02-27 (Dashboard tube stock wording correction)
- 🧩 Scope: Correct dashboard overview and timeline wording for
tubemedications. - 🛠️ What changed:
- Fixed medication overview stock cell so
tubeno longer renders aspill/pills. - Tube values now render with amount units:
liquid->mltopical->applications
- Updated timeline dose usage and total tags to use the same tube-aware units.
- Suppressed pill-weight (
mg) helper text for tube dose rows.
- Fixed medication overview stock cell so
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None.
2026-02-27 (Lowercase optional placeholder in date fields)
- 🧩 Scope: Make date-field placeholder text less aggressive by preventing automatic uppercase rendering.
- 🛠️ What changed:
- Fixed inherited uppercase styling on custom date input display.
- Added explicit CSS override so placeholders like
optionalrender lowercase as intended. - Normalized letter spacing for that display text to keep the visual tone calmer.
- 📁 Files touched:
frontend/src/styles/schedule-mobile-edit.cssdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None.
2026-02-27 (Tube semantics in report exports)
- 🧩 Scope: Ensure generated medication reports do not use pill-centric wording when package type is
tube. - 🛠️ What changed:
- Updated text export (
txt/md) and print/PDF report generation to use amount-based wording fortube. - Current stock in reports now uses tube units (
mlorapplications) instead ofpill/pills. - Total capacity row label for
tubenow uses unit-aware amount wording. - Intake schedule rows for
tubenow render usage with amount units. - Refill history rows for
tubenow render added quantities with amount units. Dose per pillrow is now omitted fortubein report outputs.
- Updated text export (
- 📁 Files touched:
frontend/src/components/ReportModal.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: run a final app-wide wording pass for dashboard/planner/schedule if complete tube terminology harmonization is desired beyond reports.
2026-02-27 (Holistic package adaptation for Tube)
- 🧩 Scope: Ensure package UI reflects package semantics, especially for
tube(liquid/topical), without pill-centric wording. - 🛠️ What changed:
- Package tab now uses amount terminology for
tubeinstead of pill terminology. - For
tube, removed pill-specific dose field from package tab (Dose per pill (mg)is no longer shown). - Total display for
tubeno longer appendspill/pillswording. - Added i18n labels for amount-based stock fields (EN/DE).
- Added sensible unit defaults when choosing tube forms:
liquid->mltopical->units
- Package tab now uses amount terminology for
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/hooks/useMedicationForm.tsfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: implement distinct backend depletion math for
tube+liquidversustube+topicalfor full end-to-end semantic parity.
- Optional: implement distinct backend depletion math for
2026-02-27 (Documentation correction: Liquid/Topical + Tube constraints)
- 🧩 Scope: Fix mismatch between implementation reality and
doku/package_types.mdconstraints section. - 🛠️ What changed:
- Replaced outdated statement that backend/export only support
blister|bottle. - Documented actual supported package types:
blister|bottle|tube. - Documented current UI split clearly:
blister/bottle:pillForm(tablet/capsule)tube:medicationForm(liquid/topical)
- Clarified that export/import now include tube and related metadata.
- Replaced outdated statement that backend/export only support
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Continue updating this document together with any future model/UI changes in the same PR.
2026-02-27 (Tube form distinction restored: Liquid vs Topical)
- 🧩 Scope: Restore meaningful separation between liquid and cream/topical while keeping the previous pillForm simplification.
- 🛠️ What changed:
- Reintroduced a dedicated
Medication Formselector only whenPackage Type = Tube. - Tube selector now offers exactly
LiquidandTopical(no capsule/tablet overlap). - Kept
Pill Formas the only form selector forblister/bottle. - Updated intake behavior to reflect tube form:
Liquid: fractional intake enabled and ml-oriented usage label.Topical: application-oriented usage label and non-fractional behavior.
- Updated form-state logic so switching to tube defaults to
Liquidunless an existing tube form is already set.
- Reintroduced a dedicated
- 📁 Files touched:
frontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: introduce explicit liquid volume stock policy in backend for stronger liquid-vs-topical operational differences.
2026-02-27 (PillForm-first simplification)
- 🧩 Scope: Remove semantically confusing dual form selection and align UI with meaningful domain choices.
- 🛠️ What changed:
- Removed
Medication Formselector from desktop and mobile edit forms. - Kept
Pill Formas the primary form control for non-tube packages. - Kept explicit package selection (
blister,bottle,tube) and use it to control whetherPill Formis shown. - Updated intake behavior logic in UI to use
packageType+pillForm(fraction handling and usage label decision). - Backend payload remains compatible by deriving
medicationForminternally at save time.
- Removed
- 📁 Files touched:
frontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- If liquid/topical must become user-selectable again, add a dedicated control only together with visible behavior differences.
2026-02-27 (Removed non-functional lifecycle option from UI)
- 🧩 Scope: Align medication form UX with product rule that users should only see controls that have concrete application effects.
- 🛠️ What changed:
- Removed lifecycle dropdown (
Refill when empty/Treatment period) from desktop medication form. - Removed the same lifecycle dropdown from mobile edit modal to keep desktop/mobile parity.
- Updated package-type design doc to state lifecycle selector is intentionally hidden until lifecycle values produce distinct behavior in planner/reminder/stock logic.
- No DB/API migration changes in this step; this is a focused UX correction to remove non-functional user choice.
- Removed lifecycle dropdown (
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxdoku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Re-introduce lifecycle as visible user control only after implementing clear, user-visible behavior differences per option.
2026-02-27 (Liquid/Topical packaging correction: dedicated tube type)
- 🧩 Scope: Apply user-requested domain correction so liquid/topical medications are not modeled as pill bottles and instead use a dedicated
tubepackage type. - 🛠️ What changed:
- Completed backend enum/validation propagation for
tubein medication CRUD and import/export contracts. - Updated backend stock/planner/share/refill/scheduler logic to treat
tubewith container semantics (same stock math branch as bottle where appropriate). - Updated frontend shared types and medication-form logic so liquid/topical default to
tube. - Updated desktop and mobile medication edit UIs to show tube option for liquid/topical and keep bottle option for capsule/tablet.
- Updated dashboard/planner/detail/refill/report displays and stock helpers to render/calculate tube correctly.
- Added missing translation keys for tube labels in EN/DE (
form.packageTypeTube,report.docTube). - Checked workspace diagnostics after edits: no compile/lint errors reported by VS Code diagnostics.
- Completed backend enum/validation propagation for
- 📁 Files touched:
backend/src/routes/medications.tsbackend/src/routes/export.tsbackend/src/routes/refills.tsbackend/src/routes/planner.tsbackend/src/routes/share.tsbackend/src/services/reminder-scheduler.tsfrontend/src/types/index.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/hooks/useRefill.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/pages/DashboardPage.tsxfrontend/src/pages/PlannerPage.tsxfrontend/src/components/MedDetailModal.tsxfrontend/src/components/ReportModal.tsxfrontend/src/utils/stock.tsfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Delegate targeted regression test execution (frontend/unit/e2e as needed) to
@testing-managerper repository governance.
- Delegate targeted regression test execution (frontend/unit/e2e as needed) to
2026-02-27 (Plan update: tokenized medication overview API)
- 🧩 Scope: Improve
doku/feat/rest_api_med_overview.mdto close completeness and execution gaps. - 🛠️ What changed:
- Added a dedicated test section with concrete required coverage for backend, frontend, and e2e.
- Fixed architecture ambiguity for rate limiting:
- use route-level limits in
backend/src/routes/share.ts - rely on already-registered plugin in
backend/src/index.ts
- use route-level limits in
- Tightened API contract details:
- token format validation (
^[a-f0-9]{16}$) Cache-Control: no-store- deterministic date format (
YYYY-MM-DD) - explicit
shareStockStatus=falsebehavior (stock-derived fields set tonull)
- token format validation (
- Clarified image strategy for phase 1 (reuse existing
/api/images/...behavior, no new share-image endpoint). - Updated changed-files estimate and added recommendation to split implementation into 3 PRs due to size.
- 📁 Files touched:
doku/feat/rest_api_med_overview.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Implement in split PRs (backend -> frontend -> e2e/docs) to stay reviewable.
2026-02-27 (Review: shared overview API plan)
- 🧩 Scope: Quality/completeness review of
doku/feat/rest_api_med_overview.md. - 🛠️ What changed:
- Reviewed plan against current backend/frontend architecture and share-token implementation.
- Found high-impact gaps to fix before implementation:
- Missing explicit test plan (backend route tests + frontend page tests + e2e flow).
- Ambiguous/non-existent target file for rate-limit setup (
backend/src/app.tsin plan, but project usesbackend/src/index.ts). - Image URL contract in response example is not aligned with currently visible share routes and needs explicit endpoint/policy definition.
- Verified helpful strengths:
- Reuse of existing
share_tokensis consistent. - Token-format expectation (
hex, 16 chars) matches current generator.
- Reuse of existing
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Update plan with concrete test tasks, precise file targets, and final image-delivery strategy before starting implementation.
2026-02-27 (Loading/Error screen theme parity)
- 🧩 Scope: Make pre-auth loading and connection-error screens follow the selected light/dark theme.
- 🛠️ What changed:
- Added early theme resolution in
AppRouterfor screens rendered beforeAppHeader/useThemesetup. - Supports
localStoragevalueslight,dark, andsystem(system resolved viaprefers-color-scheme). - Applied
data-themeon auth container duringloading,authError, and!authStatestates.
- Added early theme resolution in
- 📁 Files touched:
frontend/src/App.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None.
2026-02-27 (Playwright request triage + auth env dependency check)
- 🧩 Scope: Assess requested Playwright improvements and clarify whether login/registration behavior is controlled by
.envflags. - 🛠️ What changed:
- Applied repository governance: test planning/writing/execution must be delegated to
@testing-manager. - Verified backend auth-state logic and confirmed env-driven behavior:
AUTH_ENABLEDcontrols global auth mode.REGISTRATION_ENABLEDcontrols registration unless first-user bootstrap path (!hasUsers) is active.FORM_LOGIN_ENABLEDcontrols username/password form availability (with first-user setup override).OIDC_ENABLEDcontrols SSO route/button availability (with OIDC config requirements).
- Confirmed E2E auth setup failure mode in SSO-only environments is caused by unconditional username/password field usage in setup.
- Applied repository governance: test planning/writing/execution must be delegated to
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
@testing-managershould implement the requested Playwright changes (auth fallback, planner calculation assertions, lifecycle integration flow, resilient retries/waits, timeline performance scenario).
2026-02-27 (Intake reminder consistency fix)
- 🧩 Scope: Ensure reminders are sent only when explicitly enabled on the specific intake.
- 🛠️ What changed:
- Removed medication-level reminder fallback from intake reminder scheduling.
- Previous behavior:
intake.intakeRemindersEnabled || med.intakeRemindersEnabledcould remind disabled intakes. - New behavior: only
intake.intakeRemindersEnabledqualifies an intake for reminder sending. - Updated prefilter logic so medications are considered only when at least one intake has reminders enabled.
- Backend lint verified clean after change.
- 📁 Files touched:
backend/src/services/intake-reminder-scheduler.tsdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Existing legacy medications using only medication-level reminder flags must enable reminders at intake level to continue receiving reminders.
2026-02-27 (Legacy DB cleanup)
- 🧩 Scope: Remove obsolete
medassist.dbleftovers from old storage paths and clean stale code references. - 🛠️ What changed:
- Verified active runtime DB path is
medassist-ng.db(backend/src/db/db-utils.ts). - Searched repository for
medassist.dband found only legacy test references inbackend/src/test/db-client.test.ts. - Updated test mock/expectation paths from
medassist.dbtomedassist-ng.db. - Deleted obsolete local files:
backend/data/medassist.dbdata/medassist.db
- Confirmed no remaining code references to
medassist.db.
- Verified active runtime DB path is
- 📁 Files touched:
backend/src/test/db-client.test.tsbackend/data/medassist.db(removed)data/medassist.db(removed)doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None.
2026-02-27 (All pending local changes split and merged)
- 🧩 Scope: Take the full pending local change set, split into meaningful PRs, and merge everything into
main. - 🛠️ What changed:
- Created and merged 4 PRs with full metadata (assignee, labels, project link, issue closure):
- PR
#334(feat/form-login-enabled) closing Issue#309 - PR
#336(chore/improve-logging) closing Issue#335 - PR
#339(fix/typescript-strictness-react19) closing Issue#337 - PR
#341(chore/dependabot-agent-governance) closing Issue#340
- PR
- Waited for CI on every PR and merged only with green required checks.
- Verified project board status for linked issues: all moved to
Done. - Resolved one merge-policy blocker on PR
#341by adding minimal no-op backend/frontend touches so required checks were actually triggered (instead of skipped by path filtering).
- Created and merged 4 PRs with full metadata (assignee, labels, project link, issue closure):
- 📁 Files touched:
- Entire pending workspace delta was fully shipped across the 4 PRs above.
- Final bookkeeping updated in:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None for this delivery request.
2026-02-27 (Local pre-PR gate validation: chore/dependabot-agent-governance)
- 🧩 Scope: Validate minimal relevant non-interactive local checks for changed governance/config/docs files.
- 🛠️ What changed:
- Confirmed changed file scope with
git status --short. - Ran repo lint gate:
npm run lint-> passed (backend Biome clean, frontend Biome clean). - Ran YAML/frontmatter parser checks for changed
.ymland agent markdown files -> passed. - Ran targeted markdownlint (
npx -y markdownlint-cli2 ...) -> failed with 379 markdown style issues (mostly line-length/table-spacing) across changed markdown files. - Assessed markdownlint result as non-gating because this repository's configured local gate uses Biome on backend/frontend source files only.
- Confirmed changed file scope with
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: run a dedicated markdown formatting/lint cleanup pass for agent/docs files in a separate scope.
2026-02-27 (PR3 local gate rerun: fix/typescript-strictness-react19)
- 🧩 Scope: Re-run requested local pre-PR frontend gate after
MedDetailModaltest fix. - 🛠️ What changed:
- Ran
CI=true npm --prefix /Users/danielvolz/git/medassist/frontend run check-> passed. - Re-ran the same focused Vitest subset (12 files) used previously -> passed.
src/test/components/MedDetailModal.test.tsxnow passes in that subset.
- Ran
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Requested local pre-PR gate is satisfied for frontend check + focused subset.
2026-02-27 (Local pre-PR gate validation: fix/typescript-strictness-react19)
- 🧩 Scope: Validate minimal relevant non-interactive frontend lint/tests for changed React 19 + TypeScript strictness files.
- 🛠️ What changed:
- Ran
CI=true npm --prefix /Users/danielvolz/git/medassist/frontend run check-> passed (Biome clean,tsc --noEmitclean). - Ran focused Vitest only on changed test files:
src/test/components/Lightbox.test.tsxsrc/test/components/MedDetailModal.test.tsxsrc/test/components/MobileEditModal.test.tsxsrc/test/components/UserFilterModal.test.tsxsrc/test/context/AppContext.test.tsxsrc/test/hooks/useMedications.test.tssrc/test/hooks/useRefill.test.tssrc/test/hooks/useSettings.test.tssrc/test/hooks/useShare.test.tssrc/test/utils/formatters.test.tssrc/test/utils/ics.test.tssrc/test/utils/schedule.test.ts
- Focused Vitest result: 11 files passed, 1 file failed (
MedDetailModal.test.tsx, 1 failing assertion).
- Ran
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Fix failing assertion in
src/test/components/MedDetailModal.test.tsx:329:- expected
onSubmitRefill(mockMedication.id, undefined) - received
onSubmitRefill(mockMedication.id, false)
- expected
- Re-run the same focused Vitest command after the assertion/behavior is aligned.
- Fix failing assertion in
2026-02-27
- 🧩 Scope: Issue #309 — Optionally disable form login when OIDC enabled
- 🛠️ What changed:
- New env var
FORM_LOGIN_ENABLED(defaulttrue). Set tofalseto hide username/password form and only show the OIDC SSO button. - Renamed all internal
localAuthEnabledreferences toformLoginEnabledfor clarity. - Backend enforces lockout guard at startup — if no login method is available, the server refuses to start with a clear error message.
- Backend warns if
REGISTRATION_ENABLED=truebut form login is off (registration has no effect without the form). - First-user setup override: even with
FORM_LOGIN_ENABLED=false, the first admin account can always be created locally. - All existing frontend/backend tests pass (55 frontend + 32 backend).
- Lint clean.
- New env var
- 📁 Files touched:
backend/src/plugins/env.tsbackend/src/plugins/auth.tsbackend/src/routes/auth.tsfrontend/src/components/Auth.tsxfrontend/src/test/components/Auth.test.tsxfrontend/src/test/components/AppHeader.test.tsxbackend/src/test/auth.test.ts.env.example
- 🔜 Follow-ups:
- E2E test for OIDC-only login flow → delegate to @testing-manager
- Consider adding backend unit test specifically for FORM_LOGIN_ENABLED=false scenarios
2026-02-27 (Local pre-PR gate validation: chore/improve-logging)
- 🧩 Scope: Validate minimal relevant non-interactive lint/tests for changed files:
.env.examplebackend/package.jsonbackend/package-lock.jsonbackend/src/db/client.tsbackend/src/db/db-utils.tsbackend/src/index.tsbackend/src/routes/doses.tsbackend/src/routes/health.tsbackend/src/routes/settings.tsbackend/src/test/e2e-routes.test.tsbackend/src/utils/logger.tsfrontend/nginx-entrypoint.shfrontend/nginx.conf
- 🛠️ What changed:
- Ran
cd backend && npm run lint→ passed. - Ran
cd frontend && npm run lint→ warning found insrc/components/MedicationAvatar.tsx(useExhaustiveDependencies). - Ran
cd backend && CI=true npm run test:run -- src/test/e2e-routes.test.ts→ passed (103/103). - No code changes were made as part of this validation request.
- Ran
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Resolve frontend lint warning in
frontend/src/components/MedicationAvatar.tsxbefore considering local pre-PR gate fully satisfied.
- Resolve frontend lint warning in
2026-02-26 — Structured Logging Implementation Plan
- 🧩 Scope: Observability / logging improvements
- 🛠️ What changed:
- Created implementation plan to fix the log noise problem: nginx and Fastify log every 5-second dose-polling request at
infolevel, makinginfounusable. - Plan covers 5 phases: (1) suppress noisy backend routes via per-route
logLevel, (2) add timestamps to startup logger + pino-pretty for dev, (3) suppress polling in nginx access logs, (4) differentiate debug/info/warn in nginx entrypoint, (5) update docs.
- Created implementation plan to fix the log noise problem: nginx and Fastify log every 5-second dose-polling request at
- 📁 Files touched:
plan/feature-structured-logging-1.md(new)
- 🔜 Follow-ups:
- Implement the 18 tasks across 5 phases.
2026-02-26 — Structured Logging Implementation (complete)
- 🧩 Scope: Observability / logging — make
LOG_LEVEL=infousable - 🛠️ What changed:
- Backend route noise suppression:
GET /health(logLevel: warn),GET /doses/takenandGET /share/:token/doses(logLevel: debug) — these high-frequency polling routes no longer floodinfologs with Pino's automaticincoming request/request completedmessages. - Startup logger timestamps: All pre-Fastify log messages (DB migrations, etc.) now include
[2026-02-26T14:30:05.123Z] [INFO]prefix. - pino-pretty for development: Backend dev mode now outputs human-readable, colorized log lines with translated timestamps (production still uses structured JSON).
- nginx polling suppression: New dedicated
locationblocks innginx.conffor/api/doses/taken,/api/share/*/doses, and/api/healthwith conditionalaccess_logviaNGINX_POLLING_LOGvariable. - nginx 3-tier LOG_LEVEL:
debug= all access logs,info= all except polling (default),warn+= no access logs. - nginx timestamps: Custom
log_format timedwith ISO 8601 timestamps applied to all access logging. - Documentation:
.env.exampleandREADME.mdupdated with detailed per-level behavior.
- Backend route noise suppression:
- 📁 Files touched:
backend/src/routes/health.tsbackend/src/routes/doses.tsbackend/src/utils/logger.tsbackend/src/index.tsbackend/package.json+package-lock.jsonfrontend/nginx.conffrontend/nginx-entrypoint.sh.env.exampleREADME.md
- 🔜 Follow-ups:
- Docker build + manual live verification
- Delegate automated test coverage to @testing-manager
2026-02-26
- Scope: Update governance instructions for persistent agent memory and user-readable reporting.
- What changed:
- Added a VERY IMPORTANT section to
.github/copilot-instructions.md. - Added a VERY IMPORTANT — Memory + Reporting Persistence section to
AGENTS.md. - Removed the obsolete mandatory
doku/APP_BEHAVIOR.mdpersistence rule fromAGENTS.md. - Created
doku/memory_notes.mdanddoku/report.md.
- Added a VERY IMPORTANT section to
- Files touched:
.github/copilot-instructions.mdAGENTS.mddoku/memory_notes.mddoku/report.md
- Follow-ups:
- Keep both files updated on every meaningful task going forward.
2026-02-26 (follow-up)
- Scope: Add ultra-short maintenance templates so future updates stay consistent.
- What changed:
- Added a "How to maintain (1-minute template)" section in this file.
- Added a matching "How to maintain" section in
doku/memory_notes.md.
- Files touched:
doku/report.mddoku/memory_notes.md
- Follow-ups:
- Reuse the templates for all upcoming meaningful tasks.
2026-02-26 (emoji template follow-up)
- 🧩 Scope: Add emoji label conventions for faster, more readable scan in future entries.
- 🛠️ What changed:
- Updated the report template labels to emoji-based headings.
- Updated the memory notes template labels to the same style.
- 📁 Files touched:
doku/report.mddoku/memory_notes.md
- 🔜 Follow-ups:
- Use this emoji format for all upcoming entries unless governance changes.
2026-02-26 (testing-manager instruction update)
- 🧩 Scope: Tighten testing governance in the
testing-manageragent instructions. - 🛠️ What changed:
- Added mandatory linting gate: all lint errors and simple/fixable warnings must be resolved, especially before PR handoff from
@release-manager. - Added strict reliability/validity rules to avoid fake-green tests and over-mocking.
- Added a concrete test validity checklist focused on true functional verification.
- Updated command examples to current setup:
- Backend Vitest via
CI=true npm run test:run/test:coverage - Frontend Vitest via
CI=true npm run test:run/test:coverage - Playwright E2E with
PLAYWRIGHT_HTML_OPEN=neverand CI-stable worker guidance.
- Backend Vitest via
- Added mandatory linting gate: all lint errors and simple/fixable warnings must be resolved, especially before PR handoff from
- 📁 Files touched:
.github/agents/testing-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Reuse these strengthened rules for future CI triage and pre-PR test handoffs.
2026-02-26 (pre-PR local gate update)
- 🧩 Scope: Make pre-PR quality requirements explicit for testing handoff.
- 🛠️ What changed:
- Added explicit pre-PR rule: no PR creation before local lint is clean and relevant tests pass locally.
- Added explicit anti-pattern rule: do not let obvious regressions be discovered first in GitHub CI.
- Updated workflow/lint sections and done criteria to include this mandatory local gate.
- 📁 Files touched:
.github/agents/testing-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Enforce this gate in every future testing handoff before PR creation.
2026-02-26 (release-manager gate alignment)
- 🧩 Scope: Apply the same local quality gate requirements to
release-managerworkflow. - 🛠️ What changed:
- Added explicit pre-PR local gate rule in
release-manager: lint clean + relevant tests passed locally before PR creation. - Added explicit no CI-first-failure rule in
release-managercritical safety section. - Updated release workflow steps so push/PR creation is blocked until local gate is confirmed.
- Added explicit pre-PR local gate rule in
- 📁 Files touched:
.github/agents/release-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Reuse this policy consistently for all future release PR orchestration.
2026-02-26 (React 19 plan refinement)
- 🧩 Scope: Validate that the React 19 plan follows official best practices.
- 🛠️ What changed:
- Confirmed from the React 19 upgrade guide: TypeScript projects should upgrade to
@types/react@^19and@types/react-dom@^19. - Updated recommendation: do not remove
@types/*packages during this upgrade. - Updated scope policy: keep upgrade PR focused on version bump and required compatibility fixes only.
- Marked optional feature adoption (
useOptimistic,useFormStatus, Server Components, broader API migrations) as follow-up PR scope.
- Confirmed from the React 19 upgrade guide: TypeScript projects should upgrade to
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Apply this exact scope and dependency policy when implementing the React 19 upgrade branch.
2026-02-26 (React 19 implementation)
- 🧩 Scope: Execute the scoped React 19 dependency upgrade in frontend only.
- 🛠️ What changed:
- Upgraded
reactandreact-domto^19.2.0in frontend dependencies. - Upgraded
@types/reactand@types/react-domto^19.2.2(kept them, not removed). - Updated
frontend/package-lock.jsonentries forreact,react-dom,scheduler,@types/react, and@types/react-domto matching 19.x metadata. - Kept migration scope strict: no optional React 19 feature adoption or broad refactors.
- Upgraded
- 📁 Files touched:
frontend/package.jsonfrontend/package-lock.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Delegate local validation (lint/check/tests) to
@testing-managerbefore PR handoff.
- Delegate local validation (lint/check/tests) to
2026-02-26 (Testing handoff execution)
- 🧩 Scope: Run
frontendlint/check/relevant tests after React 19 upgrade and apply only mandatory compatibility fixes. - 🛠️ What changed:
- Ran
npm run lintinfrontend: 1 existing warning remains insrc/components/MedicationAvatar.tsx(useExhaustiveDependencies). - Ran
npm run checkinfrontend: fixed compatibility/type errors in targeted tests:src/test/utils/ics.test.ts(typed mock assignments + fixture default safety)src/test/utils/schedule.test.ts(added requiredpackageTypein medication fixtures, eventidfield)src/test/components/MobileEditModal.test.tsx(added requiredimageUploadErrorprop and form-event typing)
- Ran focused test scope:
CI=true npm run test:run -- src/test/utils/ics.test.ts src/test/utils/schedule.test.ts src/test/components/MobileEditModal.test.tsx- Result: 3 files passed, 147 tests passed.
frontend checkis still blocked by unrelated type mismatches insrc/test/components/MedDetailModal.test.tsx(new required props andRefillEntryshape drift).
- Ran
- 📁 Files touched:
frontend/src/test/utils/ics.test.tsfrontend/src/test/utils/schedule.test.tsfrontend/src/test/components/MobileEditModal.test.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Separate follow-up to align
MedDetailModaltests with currentMedDetailModalPropsandRefillEntrytype. - Decide whether to resolve or waive the existing lint warning in
MedicationAvatar.tsxfor strict pre-PR gate.
- Separate follow-up to align
2026-02-26 (Blocker follow-up)
- 🧩 Scope: Resolve remaining non-test lint blocker and prepare delegated test-fix handoff.
- 🛠️ What changed:
- Fixed the remaining lint warning in
frontend/src/components/MedicationAvatar.tsxby making image reset logic dependency-safe with previous-value tracking (useRef). - Kept
MedDetailModal.test.tsxadaptations delegated to@testing-managerper testing ownership rule. - Prepared concrete handoff targets for
@testing-manager:- Add required props in test
defaultProps:usePrescriptionRefill,onUsePrescriptionRefillChange. - Update
RefillEntryfixtures from old fields (medicationId,timestamp,looseAdded) to current shape (refillDate,loosePillsAdded).
- Add required props in test
- Fixed the remaining lint warning in
- 📁 Files touched:
frontend/src/components/MedicationAvatar.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
@testing-managerto run and fix the fullfrontend checkresidual failures insrc/test/components/MedDetailModal.test.tsx.
2026-02-26 (Dependency update automation)
- 🧩 Scope: Automate dependency updates with controlled auto-merge.
- 🛠️ What changed:
- Extended existing
.github/dependabot.ymlfor weekly updates acrossfrontend,backend, root npm tooling, and GitHub Actions. - Added grouping for minor/patch updates in root npm and GitHub Actions to reduce PR noise.
- Added scoped labels (
frontend,backend,root,ci) for easier triage. - Added
.github/workflows/dependabot-automerge.ymlto enable auto-merge only for Dependabot patch/minor updates (npm + GitHub Actions), while major updates remain manual. - Updated
README.mdwith a new "Dependency Updates" section and changed the React badge to 19.
- Extended existing
- 📁 Files touched:
.github/dependabot.yml.github/workflows/dependabot-automerge.ymlREADME.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Verify repository branch protection required checks are configured so auto-merge waits for CI gates as intended.
2026-02-26 (Automatic handoff to testing-manager)
- 🧩 Scope: Execute delegated testing ownership without waiting for user confirmation.
- 🛠️ What changed:
- Issued direct handoff to
@testing-managerfor residualfrontend checkblockers infrontend/src/test/components/MedDetailModal.test.tsx. - Handoff checklist includes:
- add required
MedDetailModalPropstest props (usePrescriptionRefill,onUsePrescriptionRefillChange), - align
RefillEntrytest fixtures to current type shape (refillDate,loosePillsAdded), - run
cd frontend && npm run checkand report remaining deltas.
- add required
- Issued direct handoff to
- 📁 Files touched:
doku/report.mddoku/memory_notes.md
- 🔜 Follow-ups:
- After
@testing-managercompletion, continue with PR-ready summary and release handoff.
- After
2026-02-26 (Continued execution: frontend check fully green)
- 🧩 Scope: Continue implementation to remove all remaining
frontendtype/lint blockers. - 🛠️ What changed:
- Fixed remaining production type/lint blockers in:
src/components/MobileEditModal.tsx(prop destructuring + packageType change handler typing)src/components/SharedSchedule.tsx(critical threshold typing)src/context/AppContext.tsx(import result typing for imported counts)src/pages/dashboard-helpers.ts(strictPackageType+ null-safe stockAdjustment)src/pages/DashboardPage.tsx(missingCoveragetype import)src/utils/stock.ts(removed unreachable nullish coalescing)
- Fixed remaining test typing drift in:
src/test/setup.tssrc/test/components/Lightbox.test.tsxsrc/test/components/UserFilterModal.test.tsxsrc/test/context/AppContext.test.tsxsrc/test/hooks/useMedications.test.tssrc/test/hooks/useRefill.test.tssrc/test/hooks/useSettings.test.tssrc/test/hooks/useShare.test.tssrc/test/utils/formatters.test.tssrc/test/utils/schedule.test.ts
- Validation results:
cd frontend && npm run check-> PASSCI=true npm run test:run -- src/test/hooks/useShare.test.ts src/test/hooks/useRefill.test.ts src/test/hooks/useSettings.test.ts src/test/utils/formatters.test.ts-> PASS (4 files, 84 tests)
- Fixed remaining production type/lint blockers in:
- 📁 Files touched:
frontend/src/components/MobileEditModal.tsxfrontend/src/components/SharedSchedule.tsxfrontend/src/context/AppContext.tsxfrontend/src/pages/dashboard-helpers.tsfrontend/src/pages/DashboardPage.tsxfrontend/src/utils/stock.tsfrontend/src/test/setup.tsfrontend/src/test/components/Lightbox.test.tsxfrontend/src/test/components/UserFilterModal.test.tsxfrontend/src/test/context/AppContext.test.tsxfrontend/src/test/hooks/useMedications.test.tsfrontend/src/test/hooks/useRefill.test.tsfrontend/src/test/hooks/useSettings.test.tsfrontend/src/test/hooks/useShare.test.tsfrontend/src/test/utils/formatters.test.tsfrontend/src/test/utils/schedule.test.tsdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: run full frontend test suite as additional confidence step before release handoff.
2026-02-26 (npm integrity issue resolved)
- 🧩 Scope: Fix
npm cifailure caused by tarball integrity mismatch warnings/errors. - 🛠️ What changed:
- Reproduced failure (
EINTEGRITY) for@types/react@19.2.2/@types/react-dom@19.2.2. - Pulled authoritative integrity hashes from npm registry via:
npm view @types/react@19.2.2 dist.integritynpm view @types/react-dom@19.2.2 dist.integrity
- Corrected two integrity strings in
frontend/package-lock.jsonto match official registry values. - Re-ran install:
npm ci --no-audit --no-fund-> PASS.
- Reproduced failure (
- 📁 Files touched:
frontend/package-lock.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None required for this issue; install path is healthy again.
2026-02-26 (Deprecation warnings triage)
- 🧩 Scope: Investigate reported npm deprecation warnings and determine if local code changes are required.
- 🛠️ What changed:
- Verified warnings are from
backendtransitive deps, notfrontend:drizzle-kit@0.31.9->@esbuild-kit/esm-loader@2.6.5->@esbuild-kit/core-utils@3.3.2@libsql/client@0.17.0->node-fetch@3.3.2->fetch-blob@3.2.0->node-domexception@1.0.0
- Confirmed current installed versions are already latest published for both direct parents (
drizzle-kit,@libsql/client). - Classified as non-blocking upstream deprecation warnings (no immediate local fix available without changing stack/library choices).
- Verified warnings are from
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Re-evaluate after upstream releases; remove warnings via normal dependency updates when available.
2026-02-26 (MedDetailModal test type drift fix)
- 🧩 Scope: Fix only residual prop/type drift in
MedDetailModaltests to unblock frontend check target area. - 🛠️ What changed:
- Updated
defaultPropsinfrontend/src/test/components/MedDetailModal.test.tsxwith requiredMedDetailModalPropsfields:usePrescriptionRefillonUsePrescriptionRefillChange
- Updated
RefillEntryfixtures in the same file to current type shape:- removed legacy fields (
medicationId,timestamp,looseAdded) - added current fields (
refillDate,loosePillsAdded)
- removed legacy fields (
- Ran
cd frontend && npm run check: the file-specific drift is resolved, but command still fails due unrelated TypeScript errors in other frontend files.
- Updated
- 📁 Files touched:
frontend/src/test/components/MedDetailModal.test.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Resolve remaining unrelated
frontendTypeScript errors before rerunning fullnpm run checkand then the targeted MedDetailModal test command.
- Resolve remaining unrelated
2026-02-27 (Package types plan decisions finalized)
- 🧩 Scope: Integrate final product decisions into
doku/package_types.mdso the V1 concept is implementation-ready. - 🛠️ What changed:
- Locked lifecycle handling:
ongoingis a derived state (endDate == null), not a stored explicit lifecycle value.- Clarified precedence that
endDateoverridesongoingbehavior.
- Locked V1 form scope:
- Keep exactly 4 forms (
Capsule,Tablet,Liquid,Topical). - No subforms in V1; users map variants like cream/gel to these forms.
- Keep exactly 4 forms (
- Locked end-date behavior:
autoMarkObsoleteAfterEndDatedefault set totrue.
- Improved wording quality:
- renamed lifecycle section title from "restore" to neutral "categorization".
- Locked lifecycle handling:
- 📁 Files touched:
doku/package_types.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Use these locked rules as acceptance criteria when creating implementation tasks (backend validation, frontend parity, export/import compatibility).
2026-02-27 (Website implementation: V1 medication forms + lifecycle fields)
- 🧩 Scope: Implement approved package-type plan decisions directly in the web product (backend persistence + desktop/mobile UI).
- 🛠️ What changed:
- Backend data model extended with new medication metadata:
medicationForm(capsule|tablet|liquid|topical)pillForm(tablet|capsule)lifecycleCategory(refill_when_empty|treatment_period)medicationEndDateautoMarkObsoleteAfterEndDate(defaulttrue)
- Backward-compatible DB rollout implemented:
- schema update in
backend/src/db/schema.ts - alter-migration compatibility statements in
backend/src/db/db-utils.ts - generated Drizzle migration:
backend/drizzle/0011_stiff_randall_flagg.sql
- schema update in
- API validation and DTO mapping updated in
backend/src/routes/medications.ts:pillFormrequired for capsule/tablet medication forms- fractional intake rejected for capsule
- liquid/topical constrained to bottle container
- end-date/start-date consistency validation
- Auto-obsolete behavior implemented:
- medications are auto-marked obsolete when end date is reached and
autoMarkObsoleteAfterEndDate=true
- medications are auto-marked obsolete when end date is reached and
- Export/import now includes new metadata (
backend/src/routes/export.ts, export format version1.2). - Frontend desktop + mobile parity implemented:
- new form controls in
frontend/src/pages/MedicationsPage.tsx - same controls in
frontend/src/components/MobileEditModal.tsx - dynamic intake usage labels by form (
tablet/capsule/ml/application) - capsule intake now blocks fractional values in UI
- new form controls in
- Frontend typing + defaults updated (
frontend/src/types/index.ts,frontend/src/hooks/useMedicationForm.ts) and i18n keys added in both languages (frontend/src/i18n/en.json,frontend/src/i18n/de.json).
- Backend data model extended with new medication metadata:
- 📁 Files touched:
backend/src/db/schema.tsbackend/src/db/db-utils.tsbackend/src/routes/medications.tsbackend/src/routes/export.tsbackend/drizzle/0011_stiff_randall_flagg.sqlbackend/drizzle/meta/_journal.jsonbackend/drizzle/meta/0011_snapshot.jsonfrontend/src/types/index.tsfrontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsonfrontend/src/test/components/MobileEditModal.test.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- Optional: run full repo-wide frontend check after existing unrelated E2E formatting diffs are cleaned up.