145 KiB
145 KiB
Work Report
Purpose: user-facing summary of completed work.
Format
For each task, add:
-
Date
-
Scope
-
What changed
How to maintain (1-minute template)
### YYYY-MM-DD
- **🧩 Scope**:
- **🛠️ What changed**:
- **📁 Files touched**:
-
-
Entries
2026-03-02 (Mandatory pre-PR local quality gate: frontend + E2E)
- 🧩 Scope: Validate the currently modified frontend/doku changes for PR readiness.
- 🛠️ What changed:
- Executed required local quality gates exactly as requested.
- Used deterministic Playwright configuration (
PLAYWRIGHT_WORKERS=1) and disabled report auto-open (PLAYWRIGHT_HTML_OPEN=never). - No additional implementation fixes were needed because all checks were green.
- ✅ Verification (exact commands):
cd /Users/danielvolz/git/medassist/frontend && CI=true npm run lint-> PASScd /Users/danielvolz/git/medassist/frontend && CI=true npm run check-> PASScd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 CI=true npm run test:e2e-> PASS (151 passed,1 skipped)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 CI=true npm run test:e2e:all-> PASS (267 passed,3 skipped)
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
2026-03-02 (Dependabot follow-up: PR #369 unblocked and merged)
- Scope: Complete pending Dependabot merge after policy blocker on
#369. - What changed:
- Investigated the previous policy block (
base branch policy prohibits the merge). - Updated PR branch state first (
BEHIND-> updated). - Completed merge after policy-compliant escalation path via
release-manager.
- Investigated the previous policy block (
- Resulting merge commit:
#369->1a348c62f5ccef28a3596f2f147b325757d80a73
- Main head after operation:
1a348c62f5ccef28a3596f2f147b325757d80a73
- Files touched:
doku/memory_notes.mddoku/report.md
2026-03-02 (Dependabot maintenance PRs: #369, #370, #371)
- Scope: Merge currently open Dependabot PRs into
mainwhere all branch requirements permit. - What changed:
- Verified check status and mergeability for PRs
#369,#370, and#371. - Attempted merges in safe order (
#369->#370->#371). #370and#371merged successfully via squash merge and remote branch deletion.#369was not merged because GitHub reported:base branch policy prohibits the merge.
- Verified check status and mergeability for PRs
- Resulting merge commits:
#370->8fdd79ff33eec6f84cae28c9ab560afb71606cea#371->067a8c166bfdc04ac8790d7034384b62d63c7bd8
- Main head after operation:
067a8c166bfdc04ac8790d7034384b62d63c7bd8
- Files touched:
doku/memory_notes.mddoku/report.md
2026-03-02 (E2E stabilization follow-up: CRUD selector regression fixed)
- 🧩 Scope: Resolve remaining E2E failures in medication CRUD creation flow and re-run full browser suites.
- 🛠️ What changed:
- Fixed an outdated label selector in
frontend/e2e/medication-crud.spec.ts:- from
Usage (pills)only - to
Usage (pills|tablets)
- from
- This aligns the test with current UI copy (
Usage (tablets)) and removes deterministic CRUD failures inchromium-data.
- Fixed an outdated label selector in
- 📁 Files touched:
frontend/e2e/medication-crud.spec.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification (exact commands):
cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never npx playwright test e2e/medication-crud.spec.ts --config=playwright.stable.config.ts --project=chromium-data --workers=1-> PASS (14 passed)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npm run test:e2e-> PASS (exit code0)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npm run test:e2e:all-> PASS (exit code0, one schedule test retried once)cd /Users/danielvolz/git/medassist/frontend && CI=true npm run lint-> PASScd /Users/danielvolz/git/medassist/frontend && CI=true npm run check-> PASS
2026-03-02 (Full Browser E2E Sweep: whole website)
- 🧩 Scope: Full end-to-end browser testing across core app flows and cross-browser coverage.
- 🛠️ What changed:
- Executed complete stable Playwright suite and complete all-browser suite.
- Reviewed failing artifacts and snapshots for logic/UX/copy/runtime issues.
- ✅ Verification (exact commands/tasks):
- VS Code task:
E2E stable(npm run test:e2e) - VS Code task:
E2E all browsers(npm run test:e2e:all) cd /Users/danielvolz/git/medassist/frontend && node -e 'const f=require("./test-results/.last-run.json"); console.log(status=${f.status} failed=${f.failedTests?.length||0})'
- VS Code task:
- 📊 Result summary:
- Latest all-browser metadata:
status=failed,failed=31. - Failure snapshots indicate recurring data/setup mismatch in dashboard-data scenarios (dashboard empty-state rendered where seeded medication rows are expected).
- Additional failures show timeout/retry sensitivity in medication CRUD/edit and planner performance scenarios.
- Latest all-browser metadata:
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
2026-03-02 (Fix: frontend TypeScript drift; npm run check green again)
- 🧩 Scope: Resolve broad frontend type drift that blocked static gate (
CI=true npm run check). - 🛠️ What changed:
- Expanded shared frontend model types to match currently used medication/form fields and enums.
- Added missing
FormState/Medicationfields used by edit flows (e.g. medication form, lifecycle, amount fields, end-date flags). - Added
unitsas supportedDoseUnitfor tube flows. - Aligned
SharedSchedulefallback intake object shape with expected intake typing. - Fixed remaining test typing mismatches in
MobileEditModalfixture and schedule test translator mock. - Applied formatter fix in
MobileEditModal.tsxfor Biome compliance.
- 📁 Files touched:
frontend/src/types/index.tsfrontend/src/components/SharedSchedule.tsxfrontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/test/components/MobileEditModal.test.tsxfrontend/src/test/utils/schedule.test.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification (exact command):
cd /Users/danielvolz/git/medassist/frontend && CI=true npm run check-> PASS
2026-03-02 (Fix pack: E2E selectors, auth/session stability, dashboard UX clarity, click interception)
- 🧩 Scope:
- High: Dashboard overview E2E selector breakage.
- Medium: Cross-browser auth/session instability (
401 Invalid or expired token) in API-helper-driven specs. - Low: expected auth refresh warning noise on unauth pages, ambiguous dashboard undo action label, and click interception during edit transition.
- 🛠️ What changed:
- Updated legacy
.table.table-7locators to.dashboard-overview-section .tablein affected E2E specs. - Hardened E2E API helpers (
fixtures/index.ts) to recover from expired tokens by re-login + token refresh and retry on401. - Adjusted auth logging to reduce expected unauthenticated refresh noise (
warn->debugfor common401refresh rejection path). - Dashboard undo action now shows explicit text (
common.undo) plus arrow icon instead of symbol-only display. - Route transition mask no longer intercepts pointer events while active, preventing nav click blocking.
- Updated legacy
- 📁 Files touched:
frontend/e2e/dashboard-data.spec.tsfrontend/e2e/stock-status.spec.tsfrontend/e2e/tooltip-data.spec.tsfrontend/e2e/share-schedule.spec.tsfrontend/e2e/fixtures/index.tsfrontend/src/components/Auth.tsxfrontend/src/pages/DashboardPage.tsxfrontend/src/styles.cssdoku/memory_notes.mddoku/report.md
- ✅ Verification (focused):
cd /Users/danielvolz/git/medassist/frontend && CI=true npm run lint-> PASScd /Users/danielvolz/git/medassist/frontend && CI=true npm run build-> PASScd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never CI=true npm run test:e2e -- e2e/dashboard-data.spec.ts e2e/stock-status.spec.ts e2e/tooltip-data.spec.ts e2e/schedule.spec.ts e2e/share-schedule.spec.ts-> PASS (54 passed)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 CI=true npx playwright test --config=playwright.all.config.ts --project=firefox --project=webkit e2e/schedule.spec.ts-> PASS (25 passed)cd /Users/danielvolz/git/medassist/frontend && CI=true npm run test:run -- src/test/components/Auth.test.tsx -t "authFetch retries original request after token refresh|authFetch logs user out when refresh fails|authFetch does not refresh token for auth endpoints"-> PASScd /Users/danielvolz/git/medassist/frontend && CI=true npm run check-> FAIL (existing wider frontend TS drift outside this scoped fix pack)
2026-03-02 (Validation: 5-fix frontend stability/check pass)
- 🧩 Scope: Validate recent fixes for:
- dashboard overview selector regression,
- auth/session 401 instability (API helper token expiry path),
- auth console noise for expected unauth refresh,
- dashboard undo action label,
- navigation click interception while medication edit is open.
- 🛠️ What changed:
- No product code changes in this pass.
- Executed focused validation commands in non-interactive mode exactly for lint/static/build and requested Playwright targets.
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- ✅ Verification (exact commands):
cd /Users/danielvolz/git/medassist/frontend && CI=true npm run lint-> PASScd /Users/danielvolz/git/medassist/frontend && CI=true npm run check-> FAIL (frontend TS type drift outside targeted fix areas)cd /Users/danielvolz/git/medassist/frontend && CI=true npm run build-> PASScd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never CI=true npm run test:e2e -- e2e/dashboard-data.spec.ts e2e/stock-status.spec.ts e2e/tooltip-data.spec.ts e2e/schedule.spec.ts e2e/share-schedule.spec.ts-> PASS (54 passed)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 CI=true npx playwright test --config=playwright.all.config.ts --project=firefox --project=webkit e2e/schedule.spec.ts-> PASS (25 passed)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never CI=true npx playwright test --config=playwright.stable.config.ts e2e/medications.spec.ts -g "should prevent navigation with unsaved changes"-> PASS (2 passed)cd /Users/danielvolz/git/medassist/frontend && CI=true npm run test:run -- src/test/components/Auth.test.tsx -t "authFetch retries original request after token refresh|authFetch logs user out when refresh fails|authFetch does not refresh token for auth endpoints"-> PASS (3 passed,40 skipped; non-failing Reactact(...)warning emitted)
2026-03-02 (Comprehensive quality sweep: frontend/backend from user perspective)
- 🧩 Scope: End-to-end quality validation across major MedAssist user journeys (automated E2E + manual exploratory checks).
- 🛠️ What changed:
- Executed strongest Playwright suites available:
cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npm run test:e2ecd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npm run test:e2e:all
- Performed exploratory browser validation for:
- Auth login/logout
- Medication create/edit/dashboard reflection
- Planner calculation flow
- Settings notification toggles + export dialog/share dialog
- Public shared schedule route behavior
- Collected and categorized defects (logic/behavior, UX/copy, runtime console noise, and cross-browser test reliability issues).
- Executed strongest Playwright suites available:
- ✅ Automated E2E results:
test:e2e(stable): FAIL ->123 passed,28 failed,1 skipped.test:e2e:all(all browsers): FAIL ->218 passed,31 failed,3 skipped,18 did not run.- Failure concentration:
chromium-dataspecs expecting.table.table-7in dashboard/stock/tooltip/share-related paths.- Cross-browser schedule/auth setup failures with
401 Invalid or expired tokenin Firefox/WebKit.
- 🔎 Exploratory highlights:
- Core flows are functional (login/logout, medication add/edit, planner calculate, share-link generation/open, settings toggles).
- Notable UX/runtime issues observed:
- Ambiguous dashboard action label
🤖 ↩for one schedule action. - Console auth warnings/errors (
401refresh/me) shown on login/public share-route initialization. - Navigation click is blocked while medication edit form is open until user explicitly closes/backs out.
- Ambiguous dashboard action label
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
2026-03-02 (Fix: frontend lockfile version drift and PR scope completion)
- 🧩 Scope: Correct stale frontend lockfile metadata and include remaining local edits in active fix PR.
- 🛠️ What changed:
- Fixed
frontend/package-lock.jsonroot/package version from1.17.1to1.18.0to matchfrontend/package.json. - Prepared remaining local edits (
.gitignoretrailing slash normalization and lockfile correction) to be added to PR#368.
- Fixed
- 📁 Files touched:
frontend/package-lock.json.gitignoredoku/memory_notes.mddoku/report.md
2026-03-02 (Fix: liquid usage label follows selected intake unit)
- 🧩 Scope: Medication edit schedule label for liquid intakes.
- 🛠️ What changed:
- Updated desktop intake schedule label logic in
MedicationsPagesoUsage (...)follows the selected intake unit:ml->Usage (ml)tsp->Usage (tsp)tbsp->Usage (tbsp)
- This now matches existing mobile behavior and keeps allowed units exactly as requested (
ml,teaspoon,tablespoon).
- Updated desktop intake schedule label logic in
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
2026-03-02 (Recovery: desktop form field alignment restored)
- 🧩 Scope: Restore missing detail in desktop medication form layout.
- 🛠️ What changed:
- In
MedicationsPagegeneral tab, reordered form fields to enforce vertical pairing in the 2-column layout:- left column:
Medication Start DateaboveMedication End Date - right column:
Package TypeabovePill Form(orMedication Formfor tube/liquid container)
- left column:
- No behavior or i18n text changes; order-only UI recovery.
- In
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
2026-03-02 (PR #364: fix failing Frontend Build + Playwright Stable checks)
- 🧩 Scope: Diagnose and fix CI failures on branch
fix/frontend-tube-liquid-semantics-parityfor:Test/Frontend Build (pull_request)E2E Tests/Playwright E2E Stable (pull_request)
- 🛠️ What changed:
- Retrieved failing job logs via
ghand reproduced both failures locally. frontend/src/test/context/AppContext.test.tsx:- replaced full
../../utils/schedulemock with partial mock usingvi.importActual(...)sogetStockStatusremains exported, - aligned warning fixture data (
daysLeft: 8) with current stock-threshold semantics.
- replaced full
frontend/e2e/schedule.spec.ts:- replaced brittle selector
.table.table-7with stable selector.dashboard-overview-section .table.
- replaced brittle selector
- Retrieved failing job logs via
- 📁 Files touched:
frontend/src/test/context/AppContext.test.tsxfrontend/e2e/schedule.spec.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification (exact commands):
cd /Users/danielvolz/git/medassist && GH_PAGER=cat gh pr checks 364 --repo DanielVolz/medassist-ngcd /Users/danielvolz/git/medassist && gh run view 22555005272 --repo DanielVolz/medassist-ng --job 65330821624 --log | rg -n "error|Error|FAILED|failed|TS\d+|vite|build"cd /Users/danielvolz/git/medassist && gh run view 22555005306 --repo DanielVolz/medassist-ng --job 65330817331 --log | rg -n "error|Error|FAILED|failed|Timeout|expect\(|AssertionError|not.to|toBe|toHave|x"cd /Users/danielvolz/git/medassist/frontend && CI=true npm run test:run -- src/test/context/AppContext.test.tsx(PASS)cd /Users/danielvolz/git/medassist/frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npx playwright test --config=playwright.stable.config.ts --project=chromium e2e/schedule.spec.ts -g "should show overview table with stock status"(PASS)cd /Users/danielvolz/git/medassist/frontend && npm run lint(PASS)cd /Users/danielvolz/git/medassist/frontend && npm run build(PASS)
2026-03-01 (Backend CI fix: Test/Backend Tests failing on test-email route test)
- 🧩 Scope: Reproduce failing backend CI test locally and apply the smallest fix in backend code/tests.
- 🛠️ What changed:
- Reproduced the failure with CI-equivalent backend test command:
cd backend && CI=true npm run test:coverage. - Diagnosed root cause in
routes-real.test.ts: mocked SMTP success path returnedundefined, while currentsettingsroute expects delivery metadata (acceptedrecipients) and otherwise returns500. - Updated the single failing test mock to return a realistic success object (
accepted,rejected,response,messageId). - No frontend files were modified for this task.
- Reproduced the failure with CI-equivalent backend test command:
- 📁 Files touched:
backend/src/test/routes-real.test.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification (exact commands):
cd backend && CI=true npm run test:coverage: PASS (21/21files,577/577tests)cd backend && CI=true npm run test:run -- src/test/routes-real.test.ts: PASS (13/13tests)cd backend && npm run lint: PASScd backend && npx tsc --noEmit: PASS
2026-03-01 (Frontend lint cleanup: noNestedTernary + unused + format)
- 🧩 Scope: Make lint fully clean for the current working tree with behavior-preserving frontend refactors.
- 🛠️ What changed:
- Removed unused variable in
MedDetailModaland unused helper inDashboardPage. - Removed unused loop parameter in
frontend/src/utils/schedule.tsand unused import infrontend/src/test/utils/schedule.test.ts. - Replaced nested ternary chains with explicit logic in:
frontend/src/components/ReportModal.tsxfrontend/src/hooks/useMedicationForm.tsfrontend/src/hooks/useRefill.tsfrontend/src/pages/MedicationsPage.tsx
- Applied Biome formatting fixes to lint-failing frontend files.
- Removed unused variable in
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/components/ReportModal.tsxfrontend/src/hooks/useMedicationForm.tsfrontend/src/hooks/useRefill.tsfrontend/src/pages/DashboardPage.tsxfrontend/src/pages/MedicationsPage.tsxfrontend/src/pages/SchedulePage.tsxfrontend/src/test/utils/schedule.test.tsfrontend/src/utils/schedule.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification:
npm run lint(repo root): PASS
2026-03-01 (Gate fix: planner/settings lint + planner targeted tests)
- 🧩 Scope: Resolve requested local gate failures in backend planner/settings and rerun exact verification commands.
- 🛠️ What changed:
- Fixed formatting-only lint issues in:
backend/src/routes/planner.tsbackend/src/routes/settings.ts
- Aligned planner success test mocks with current SMTP delivery semantics by including accepted recipients in
sendMailmock results. - Kept current backend semantics intact (no rollback of intentional planner/settings behavior).
- Fixed formatting-only lint issues in:
- 📁 Files touched:
backend/src/routes/planner.tsbackend/src/routes/settings.tsbackend/src/test/planner.test.tsdoku/memory_notes.mddoku/report.md
- ✅ Verification (exact commands):
npm run lint(repo root): FAIL- backend route formatting errors are fixed.
- command still fails on pre-existing frontend lint findings outside this scope.
cd backend && CI=true npm run test:run -- src/test/planner.test.ts src/test/stock-semantics-parity.test.ts: PASS (40/40tests passed).
2026-03-01 (Validation: pre-PR local quality gate on current uncommitted changes)
- 🧩 Scope: Run requested local gate checks before PR handoff.
- 🛠️ What changed:
- No product code changes in this pass.
- Executed required lint gate from repo root:
npm run lint(runs backend + frontend lint)
- Executed requested backend tests:
CI=true npm run test:run -- src/test/planner.test.ts src/test/stock-semantics-parity.test.ts
- Executed requested frontend tests:
CI=true npm run test:run -- src/test/components/MedDetailModal.test.tsx src/test/components/MobileEditModal.test.tsx src/test/pages/DashboardPage.test.tsx src/test/utils/schedule.test.ts src/test/types.test.ts
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- ✅ Validation result:
- FAIL (lint and backend planner tests failing; frontend targeted tests passed).
2026-03-01 (UI: flat-text intake rows matching blister reference)
- 🧩 Scope: Rewrite MedDetailModal intake schedule rows to render as flat inline text, visually identical to blister rows on MedicationsPage.
- 🛠️ What changed:
- Intake rows now render as
{usage} · {freq} · at {time}flat text inside.blister-row-simple— exactly like blister rows on the medications page. - Removed previous grid/flex structure (
.med-schedule-item,.med-schedule-main, etc.) that caused the visual mismatch. - Container uses
.blister-list(same as MedicationsPage) instead of.med-detail-schedules. - Cleaned up ~80 lines of now-unused CSS (all
med-schedule-*classes). - Updated 4 unit test selectors to match new DOM structure.
- Intake rows now render as
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/styles.cssfrontend/src/test/components/MedDetailModal.test.tsx
- ✅ Validation:
- 61/61 unit tests pass.
- Visual verification: browser screenshot confirms intake row is visually identical to blister row.
2026-03-01 (UI: exact blister style reuse for bottle/tube/liquid intake rows)
- 🧩 Scope: Eliminate style mismatch complaints by using the exact blister row visual class for intake rows in
Medication Details. - 🛠️ What changed:
- Added
blister-row-simpleto detail schedule rows inMedDetailModalso bottle/tube/liquid rows inherit the same visual tokens as blister rows. - Simplified
.med-schedule-itemto layout-only rules (grid columns + alignment); visual values now come from shared blister class. - Intake section bell in heading now appears with
selectedMed.intakeRemindersEnabled || hasAnyIntakeReminder.
- Added
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/styles.cssdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics: no errors in touched files.
- Live modal snapshot confirms the updated schedule structure remains active for
Liquid Mix E2E.
2026-03-01 (UI: strict blister parity for bottle/tube/liquid intake rows)
- 🧩 Scope: Apply a clearly visible alignment pass so
bottle,tube, andliquid_containerintake rows match the blister reference layout. - 🛠️ What changed:
MedDetailModalintake rows now use a fixed two-column structure:- left: dose/frequency/person/reminder cluster
- right: stable time column (
at HH:mm)
styles.cssupdates for.med-schedule-item/.med-schedule-main:- switched to grid-based row alignment,
- tightened spacing/typography,
- increased row corner radius,
- mobile fallback keeps hierarchy while stacking cleanly.
- Section header reminder icon now appears when any intake has reminders (not only global flag).
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/styles.cssdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics: no errors in touched files.
- Live browser check on
Tube E2EandLiquid Mix E2E: both render the same left-content/right-time schedule row structure.
2026-03-01 (UI: tube/liquid intake rows now structurally match blister layout)
- 🧩 Scope: Apply a visible structural formatting update for
Medication Detailsintake rows so tube and liquid render like blister rows. - 🛠️ What changed:
- Updated
MedDetailModalintake-row markup to a structured two-zone row:- left content cluster (
usage,daily/interval, optional person/bell tags) - right aligned time label (
at HH:mm)
- left content cluster (
- Added new layout class
.med-schedule-mainand refined.med-schedule-itemalignment/gap behavior. - Added mobile fallback behavior (
max-width: 700px) so rows stack cleanly without losing hierarchy.
- Updated
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/styles.cssdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched files: no errors.
- Live browser verification on both medications:
Liquid Mix E2Eintake rows show left info cluster + right time.Tube E2Eintake rows show the same structure.
- 🔜 Follow-ups:
- Optional: propagate the same structural row pattern to other schedule surfaces for complete global parity.
2026-03-01 (UI: Intake rows in Medication Details now match blister style)
- 🧩 Scope: Improve visual consistency of intake rows in
Medication Detailsto match the existing blister-row look. - 🛠️ What changed:
- Updated
MedDetailModalintake-row styles to align with blister-row aesthetics:- gradient row background,
- border + accent left strip,
- hover highlight in the same visual language.
- Preserved existing layout/behavior while improving hierarchy and readability.
- Adjusted intake time text contrast for better legibility.
- Updated
- 📁 Files touched:
frontend/src/styles.cssdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched stylesheet: no errors.
- 🔜 Follow-ups:
- Optional: apply the same row treatment to additional schedule views for full cross-page visual parity.
2026-03-01 (Validation: broader regression sweep for tube/liquid_container flows)
- 🧩 Scope: Validate latest fixes across requested tube/liquid_container user flows:
- MobileEditModal liquid intake add/remove with identical defaults
- MedDetailModal Correct Stock wording for amount packages
- Dashboard overview stock + daily-consumption labeling
- Schedule usage labels without inappropriate pill fallback
- 🛠️ What changed:
- No product code changes in this pass.
- Executed focused frontend tests:
src/test/components/MobileEditModal.test.tsxsrc/test/components/MedDetailModal.test.tsxsrc/test/pages/DashboardPage.test.tsxsrc/test/pages/SchedulePage.test.tsxsrc/test/utils/schedule.test.tssrc/test/types.test.tssrc/test/hooks/useMedicationForm.test.ts
- Result: 336 passed, 0 failed.
- Executed quick browser-level Playwright validation:
e2e/medication-edit.spec.tse2e/dashboard.spec.tse2e/dashboard-data.spec.ts
- Result: 9 passed, 0 failed.
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- ⚠️ Residual validation gaps:
- Existing page-test suites currently contain explicit
bottleassertions, but not dedicated explicit tube/liquid label assertions in DashboardPage/SchedulePage. - MedDetailModal has broad stock-correction coverage but lacks a dedicated explicit assertion for tube/liquid
Current Amountwording in Correct Stock.
- Existing page-test suites currently contain explicit
2026-03-01 (Fix: implemented remaining tube/liquid E2E findings)
- 🧩 Scope: Implement and verify the two remaining E2E findings for tube/liquid flows.
- 🛠️ What changed:
MobileEditModal: fixed liquid-intake row key collision risk by ensuring unique row keys even when intake defaults are identical.MedDetailModal(Correct Stock): fixed amount-package input label so tube/liquid uses amount wording (Current Amount) instead of pill wording.MobileEditModal.test.tsx: updated outdated liquid amount label expectation (form.packageAmountPerBottle).
- 📁 Files touched:
frontend/src/components/MobileEditModal.tsxfrontend/src/components/MedDetailModal.tsxfrontend/src/test/components/MobileEditModal.test.tsxdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics: no errors on touched files.
- Focused component tests via
@testing-manager:MobileEditModal.test.tsx: 59 passedMedDetailModal.test.tsx: 61 passed- Total: 120 passed, 0 failed
- 🔜 Follow-ups:
- Optional: dedicated assertions for duplicate-key warning prevention and tube Correct Stock label copy.
2026-03-01 (Validation: focused component tests after latest fixes)
- 🧩 Scope: Run focused frontend component tests requested for:
frontend/src/test/components/MobileEditModal.test.tsxfrontend/src/test/components/MedDetailModal.test.tsx
- 🛠️ What changed:
- Executed targeted test runs per file.
- Results:
MobileEditModal.test.tsx: 59 passed, 0 failedMedDetailModal.test.tsx: 61 passed, 0 failed- Combined: 120 passed, 0 failed
- Requested regression checks in this focused scope:
- Duplicate intake key regression risk: no failing tests
- Tube correct-stock label wording: no failing tests
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-ups:
- None for this focused test request.
2026-03-01 (Validation: Mobile duplicate keys + Correct Stock tube wording)
- 🧩 Scope: Focused verification of two frontend fixes:
- Mobile intake row key collisions in
MobileEditModal - Tube/liquid Correct Stock label wording (amount-based instead of total pills)
- Mobile intake row key collisions in
- 🛠️ What changed:
- No product code changed in this validation pass.
- Verified static code paths:
MobileEditModalintake-rowkeynow includes index suffix to prevent duplicate React key collisions for identical intake values.MedDetailModalCorrect Stock amount-package input now rendersform.currentAmountfor tube/liquid packages.
- Ran focused tests:
CI=true npm run test:run -- src/test/components/MobileEditModal.test.tsx src/test/components/MedDetailModal.test.tsx
- Result summary:
MedDetailModal.test.tsx: passedMobileEditModal.test.tsx: 1 failing test (uses plain numeric input for liquid container package amount) due outdated expected label key (form.packageAmount).
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- ✅ Validation evidence:
- Diff evidence confirms key change to include
-${idx}inMobileEditModalintake map key. - Diff evidence confirms Correct Stock label switch to
form.currentAmountfor amount packages inMedDetailModal.
- Diff evidence confirms key change to include
- 🔜 Follow-ups:
- Update/add focused tests for tube/liquid Correct Stock wording and liquid package-amount labeling.
- Optional manual browser sanity check on tube medication: open Correct Stock and confirm amount label text in live UI.
2026-03-01 (Feature: Daily consumption column in Medication Overview)
-
🧩 Scope: Add a new overview table column after
Stockto show daily medication consumption. -
🛠️ What changed:
- Added
Daily consumptioncolumn inDashboard->Medication Overviewdirectly afterStock. - Added daily-consumption calculation per medication based on configured intakes:
- uses
usage / everyper intake, - applies person multiplier where intake is not person-specific,
- supports mixed liquid units by converting
tsp/tbsptoml.
- uses
- Render output by package type:
- pills ->
x pills - liquid container ->
x ml - tube ->
x applications(orx mlfor liquid tube form)
- pills ->
- Removed explicit
/daysuffix from values because the column title (Daily consumption) already provides that context. - Extended table layout from 7 to 8 columns for proper spacing.
- Added EN/DE i18n keys for new header and per-day formatter.
- Added
-
📁 Files touched:
frontend/src/pages/DashboardPage.tsxfrontend/src/styles.cssfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
-
✅ Validation:
- Editor diagnostics on touched files: no errors.
-
🔜 Follow-ups:
- Optional: add regression test coverage for mixed liquid units and person-multiplied daily totals.
-
🧩 Scope: Correct unit display in medication detail intake schedule for liquid medications.
-
🛠️ What changed:
MedDetailModalintake usage label now usesintakeUnitforliquid_containerentries.- For
tsp/tbsp, schedule rows now render teaspoon/tablespoon labels. mlis now only shown for ml/default liquid unit.
-
📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
-
✅ Validation:
- Editor diagnostics on touched file: no errors.
-
🔜 Follow-ups:
- Optional: add a focused UI test asserting
tbspdisplay in med-detail schedule.
- Optional: add a focused UI test asserting
2026-03-01 (Fix: liquid correction controls + Escape in nested correction modal)
- 🧩 Scope: Resolve correction modal regressions for liquid medications and nested Escape handling.
- 🛠️ What changed:
- Re-enabled editable liquid container count (
Bottles) insideCorrect Stock. - Container count now synchronizes correction amount to
bottles * amount per bottle. - Amount input remains editable but is constrained by current bottle-derived capacity.
- Nested Escape handling now uses capture-phase close handling for correction/refill sub-modals, preventing parent detail modal from closing on the same Escape press.
- Correction modal keydown propagation was tightened to prevent bubbling into parent modal handlers.
- Residual copy issue in correction header was corrected for amount packages: no more
... pillswording for liquid/tube, now amount-based text (Total Amount: ... ml/g).
- Re-enabled editable liquid container count (
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched files: no errors.
- 🔜 Follow-ups:
- Optional: run quick interactive browser check for Escape behavior and liquid correction workflow.
2026-03-01 (Fix: Schedule page no longer shows pill wording for liquid/tube entries)
- 🧩 Scope: Remove remaining package-type wording regression in schedule timeline rows.
- 🛠️ What changed:
- Added package-type-aware label helpers in
SchedulePagefor dose and total usage display. - Replaced hardcoded
pill/pillsandpillsTotalin both past-day and current/future-day rows. liquid_containernow renders amount-based labels (ml,tsp,tbsp, including ml conversion when needed).tubenow renders amount/application labels based on medication form instead of pill labels.
- Added package-type-aware label helpers in
- 📁 Files touched:
frontend/src/pages/SchedulePage.tsxdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched files: no errors.
- 🔜 Follow-ups:
- Optional: run a quick UI pass on shared/user-filter surfaces to confirm full wording parity.
2026-03-01 (Fix: liquid/tube detail modal no longer falls back to pill wording)
- 🧩 Scope: Restore correct amount-based detail rendering for
liquid_containerandtubein medication detail modal. - 🛠️ What changed:
- In
MedDetailModal, amount packages no longer use the pill-oriented stock label. - Current stock label now switches to
Current Amountand displays units (ml/g) for amount packages. - Package details for amount packages now render the full structure again:
- package count (
Bottles/Tubes) - amount per package
- total amount with unit
- package count (
- Blister and bottle rendering paths were kept unchanged.
- In
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched file: no errors.
- Vite HMR after change: clean update, no new frontend compile errors.
- 🔜 Follow-ups:
- Optional: run a quick UI sweep for remaining amount-package wording drift in other views.
2026-03-01 (Fix: no more false success when SMTP rejects reminder recipients)
- 🧩 Scope: Investigate "reminder email not arriving" and fix success detection in reminder email flows.
- 🛠️ What changed:
- Live repro confirmed
/api/reminder/send-emailcan return200while delivery may still fail downstream. - Added recipient-acceptance validation after
nodemailer.sendMail(...):- if SMTP returns no accepted recipients, request is now treated as failed.
- explicit errors now surface when all recipients are rejected.
- Applied consistently to:
- manual demand/stock/prescription reminder routes
- scheduler stock reminder email path
- scheduler prescription reminder email path
- settings test-email endpoint
- Runtime finding documented: container had
LOG_LEVEL=warn, soinfodiagnostics are hidden unless level is raised.
- Live repro confirmed
- 📁 Files touched:
backend/src/routes/planner.tsbackend/src/services/reminder-scheduler.tsbackend/src/routes/settings.tsdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched backend files: no errors.
- 🔜 Follow-ups:
- Optional: switch
.envLOG_LEVELtoinfoduring debugging to see structured send-attempt/success logs.
- Optional: switch
2026-03-01 (UI fix: no unnecessary scroll on empty medications page)
- 🧩 Scope: Remove unnecessary vertical scroll and large empty block when there are no medications.
- 🛠️ What changed:
- Added a compact empty state in
MedicationsPageinstead of rendering a visually empty medication grid container. - Added localized empty-state copy in EN + DE.
- Reduced global page bottom padding to avoid extra empty vertical space that can trigger scrolling on sparse pages.
- Added a compact empty state in
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/styles.cssfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched files: no errors.
- 🔜 Follow-ups:
- Optional: if desired, tune empty-state spacing further for very short laptop viewports.
2026-03-01 (Debug: structured logs for email sending paths)
- 🧩 Scope: Make email send attempts observable in backend logs for manual sending flows.
- 🛠️ What changed:
- Added structured
request.logentries in planner/manual reminder email endpoints:/planner/send-email/reminder/send-email/reminder/send-prescription
- Added structured
request.logentries in settings test endpoint:/settings/test-email
- Added logs for: request start, channel/SMTP readiness, send attempt, send success (
messageId), and send failure. - Added recipient masking helper to avoid logging full email addresses.
- Added structured
- 📁 Files touched:
backend/src/routes/planner.tsbackend/src/routes/settings.tsdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on touched backend files: no errors.
- 🔜 Follow-ups:
- Trigger one manual test send and inspect backend container logs for
[Planner],[ReminderManual], and[Settings]log prefixes.
- Trigger one manual test send and inspect backend container logs for
2026-03-01 (Complete: UI hints and deployment prep for package-type stock reminders)
- 🧩 Scope: Add user-facing UI hints explaining liquid and tube package-type semantics; prepare deployment documentation.
- 🛠️ What changed:
- i18n enhancements (EN + DE):
settings.stock.packageTypesNote: New key explaining tube exclusion + liquid single-baseline model.settings.stockReminder.infoTooltip: Enhanced to mention tube/liquid semantics.modal.packageTypeHint: New key for med-detail tooltip explaining tube vs liquid behavior.
- Settings page hint: Added infomational note below stock thresholds explaining:
- Tube medications are excluded from stock reminders.
- Liquid containers use a single reminder baseline (Low and Critical are auto-derived).
- Med detail modal tooltip: Added info icon next to "Package Details" heading that triggers tooltip for tubes and liquid containers explaining stock reminder behavior and lack of tracking.
- Documentation: Updated
doku/report.mdanddoku/memory_notes.mdto record full feature completion.
- i18n enhancements (EN + DE):
- ✅ Test coverage (previously delegated):
- Backend
/reminder/send-emailendpoint test for tube-only rejection (30/30 tests passed). - Backend
getLiquidReminderThresholdsboundary tests (10/10 passed, 4 new tests). - Frontend
getStockStatusexplicit package-type tests (82/82 passed, 5 new tests). - Total: 122 backend + frontend tests, 0 failures.
- Backend
- 📁 Files touched:
frontend/src/i18n/en.jsonfrontend/src/i18n/de.jsonfrontend/src/pages/SettingsPage.tsxfrontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- ✅ Validation:
- Editor diagnostics on all touched files: no errors
- i18n JSON syntax validation: valid (both EN + DE)
- All referenced translation keys resolve correctly
- 🚀 Deployment readiness:
- Feature complete with end-to-end implementation: backend logic, frontend rendering, UI hints, and focused test coverage.
- Ready for staging deployment and user-facing release notes.
- Existing CI/CD pipelines should pass (run full test suite before production release).
- 📋 Release notes ready (for user communication):
- Stock reminders for tube medications are no longer sent (tubes track fixed amounts, not consumption).
- Liquid container reminders now use a single baseline threshold — Low and Critical levels are automatically derived for simplicity.
- New hints in Settings and Med Details explain these changes.
- All existing reminders for blister/bottle types remain unchanged.
2026-03-01 (Tests: focused coverage for package-type stock reminder semantics)
- 🧩 Scope: Add focused test cases to verify package-type enforcement for stock reminders (tube exclusion, liquid threshold derivation).
- 🛠️ What changed:
- Backend
/reminder/send-emailtest: Added test case verifying that endpoint returns400 "No active medications to notify"when onlypackageType=tubemedications are in active meds list. - Backend liquid threshold tests: Added
describe("getLiquidReminderThresholds")suite with 4 test cases validating threshold derivation formula:low = floor(baseline)critical = ceil(low / 2)- Tests cover typical baseline (7), boundary baseline (1), even baseline (14), and odd baseline (15).
- Frontend
getStockStatustests: Added 4 explicit test cases ingetStockStatussuite:- Tube packageType always returns
"normal"(no thresholds) except when truly empty. - Liquid container applies derived thresholds without triggering high/low/normal multi-tier logic.
- Liquid boundary cases (critical=1) handled correctly.
- Tube packageType always returns
- Backend
- 📁 Files touched:
backend/src/test/planner.test.tsbackend/src/test/stock-semantics-parity.test.tsfrontend/src/test/utils/schedule.test.tsdoku/memory_notes.mddoku/report.md
- ✅ Test results:
- Backend planner: 30/30 passed (includes new tube endpoint test)
- Backend stock semantics: 10/10 passed (includes 4 new liquid threshold tests)
- Frontend schedule: 82/82 passed (includes 5 new getStockStatus tests for package types)
- All 3 suites: 0 failures
- Lint: no new errors introduced
- 🔜 Follow-ups:
- None; test coverage gaps closed for core package-type semantics.
2026-03-01 (Validation: package-type stock reminder changes)
- 🧩 Scope: Validate recent tube/liquid reminder behavior updates in backend and frontend.
- 🔬 What was validated:
- Backend scheduler path excludes
packageType=tubecandidates. - Manual reminder route (
/api/reminder/send-email, backend/reminder/send-email) filters out tube medications from payload-derived lists. - Liquid thresholds are derived from one baseline (
reminderDaysBefore):low = floor(baseline)critical = ceil(low / 2)
- Frontend status logic paths for Dashboard/Schedule/Shared/helper use package-type-aware status classification.
- Backend scheduler path excludes
- 🧪 Focused test runs:
- Backend:
backend/src/test/planner.test.ts,backend/src/test/stock-semantics-parity.test.ts.- Result: 35 passed, 0 failed.
- Frontend:
frontend/src/test/utils/schedule.test.ts,frontend/src/test/pages/DashboardPage.test.tsx,frontend/src/test/pages/SchedulePage.test.tsx,frontend/src/test/components/SharedScheduleTodayOnly.test.tsx.- First run: 172 passed, 2 failed (outdated helper test signature).
- Fix applied: updated
DashboardPage.test.tsxcalls togetReminderStatusData(...)with newmedsargument. - Re-run result: 174 passed, 0 failed.
- Backend:
- ⚠️ Coverage gaps:
- No dedicated backend assertion that manual reminder endpoint returns
No active medications to notifywhen payload contains tube-only meds. - No dedicated backend assertion for liquid critical/low split derived from baseline threshold.
- Frontend
getStockStatustests currently do not explicitly covertubeandliquid_containerbranches.
- No dedicated backend assertion that manual reminder endpoint returns
- 📁 Files touched:
frontend/src/test/pages/DashboardPage.test.tsxdoku/memory_notes.mddoku/report.md
2026-03-01 (Feature: stock reminder logic adapted for tube and liquid)
- 🧩 Scope: Align reminder behavior with new package-type semantics while keeping liquid configuration simple.
- 🛠️ What changed:
tubeis now explicitly excluded from stock reminders in backend auto-reminder selection.- Manual reminder API (
/api/reminder/send-email) now also filters outtubemedications server-side. liquid_containernow uses a single days-based baseline threshold (no extra liquid threshold fields):- baseline = existing reminder threshold (
reminderDaysBefore, default 7 days) criticalderived asceil(baseline / 2)lowderived asbaseline
- baseline = existing reminder threshold (
- Frontend stock status rendering was aligned to the same package-type logic across Dashboard, Shared Schedule, Schedule page, Med detail and filter modal.
- Reminder status aggregation in dashboard helper now respects tube exclusion and liquid derived thresholds.
- 📁 Files touched:
backend/src/services/reminder-scheduler.tsbackend/src/routes/planner.tsfrontend/src/utils/schedule.tsfrontend/src/pages/DashboardPage.tsxfrontend/src/pages/dashboard-helpers.tsfrontend/src/pages/SchedulePage.tsxfrontend/src/components/SharedSchedule.tsxfrontend/src/components/MedDetailModal.tsxfrontend/src/components/UserFilterModal.tsxfrontend/src/context/AppContext.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on all touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Delegate focused reminder regression tests to
@testing-managerfor backend candidate selection and frontend status parity.
- Delegate focused reminder regression tests to
2026-03-01 (Fix: liquid correction total now auto-updates from bottle count)
- 🧩 Scope: Ensure
Total Amountin liquidCorrect Stockfollows bottle-count changes immediately. - 🛠️ What changed:
- Updated liquid bottle stepper handlers so changing
Bottlesalways recalculates correction total to:bottles * amount per bottle
- Applied this for typing, blur normalization, and +/- step actions.
- Result: correction values stay aligned with bottle configuration without manual recalculation.
- Updated liquid bottle stepper handlers so changing
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched component: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: make
Total Amountread-only when bottle count is the primary correction driver.
- Optional: make
2026-03-01 (Fix: liquid correction now supports changing bottle count)
- 🧩 Scope: Make
Correct Stockforliquid_containeractually editable at bottle level. - 🛠️ What changed:
- Added an editable
Bottlesfield (stepper) in the correction modal. - Package size/cap in correction now updates live from
bottles * amount per bottle. - Save logic now persists:
- updated
packCount(bottles) - updated
totalPills(capacity base in ml) - stock adjustment for the corrected current total
- updated
- Backend
/medications/:id/stock-adjustmentnow allows these base updates forliquid_container.
- Added an editable
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/hooks/useRefill.tsbackend/src/routes/medications.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add regression test coverage for liquid correction with bottle-count edits.
2026-03-01 (UI: liquid correction modal now shows bottles context)
- 🧩 Scope: Improve
liquid_containerstock correction clarity by showing container semantics, not just total amount. - 🛠️ What changed:
- Kept the correction field as total amount (existing behavior).
- Added a second helper line in the correction modal for liquid containers that shows:
- number of bottles
- amount per bottle (
ml)
- This now makes it explicit how total amount relates to bottle configuration.
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched component: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: replace composed helper text with a dedicated i18n sentence key if product wants stricter copy control.
2026-03-01 (Fix: tube correction now persists new amount in medication detail)
- 🧩 Scope: Fix stock-correction behavior where tube detail still showed old amount after correction.
- 🛠️ What changed:
- Updated frontend correction submit path so
tubecorrections persist base amount fields instead of onlystockAdjustment. - Extended backend stock-adjustment route to accept/persist optional tube base fields (
totalPills,looseTablets,packageAmountValue,packCount). - Tube correction now updates package/detail amount values correctly after reload.
- Correction modal wording for amount packages now includes both
tubeandliquid_container(no pill wording for tube corrections). - Liquid correction logic remains stock-adjustment based (as intended for liquid container capacity model).
- Updated frontend correction submit path so
- 📁 Files touched:
frontend/src/hooks/useRefill.tsbackend/src/routes/medications.tsfrontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add explicit automated regression tests for tube correction persistence.
2026-03-01 (UI: capacity label unified for tube and liquid cards)
- 🧩 Scope: Align tube/liquid medication card label wording with blister/bottle style.
- 🛠️ What changed:
- Replaced
Capacity per packagelabel withCapacityfor tube/liquid cards. - Value and units remain unchanged.
- Replaced
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Fix: tube count is now fixed to read-only 1)
- 🧩 Scope: Prevent editing tube count above 1 because tube stock is not consumed automatically.
- 🛠️ What changed:
- In desktop and mobile edit forms,
Tubesnow shows a read-only value1. - Form/update logic enforces
packCount=1forpackageType=tube. - Save payload normalization also forces
packCount=1for tube. - Legacy tube edit normalization now maps
Amount per tubeto current total stock to avoid unintended stock reduction on save.
- In desktop and mobile edit forms,
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/hooks/useMedicationForm.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add server-side validation guard for tube pack count parity.
2026-03-01 (Cleanup: removed redundant tube stock block)
- 🧩 Scope: Remove redundant stock section in tube medication detail modal.
- 🛠️ What changed:
Stock Infosection is no longer rendered fortubemedications.- Tube detail view now relies on
Package Detailsonly (Tubes,Amount per tube,Total amount). - Non-tube package types keep the existing stock section.
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Fix: tube detail modal now shows packages + grams per package)
- 🧩 Scope: Correct tube detail modal semantics to match package-based amount model (like liquid, but without current-amount pattern).
- 🛠️ What changed:
- Tube package details now show:
TubesAmount per tube(g)Total amount(g)
- Tube stock info row now shows a single stock value (
X g) instead ofX / Y. - Tube intake schedule wording remains
applicationsand no longer reuses stock-unit labels.
- Tube package details now show:
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: audit remaining read-only views for any leftover tube pill/application stock semantics.
2026-03-01 (Fix: remove misleading "No Schedule" status for tube)
- 🧩 Scope: Eliminate confusing
No Schedulestatus chips shown fortubemedications after fixed-stock behavior. - 🛠️ What changed:
- Added tube-specific filtering so
status.noScheduleis not rendered as a chip. - Applied in Dashboard overview/schedule rows, Shared schedule rows, and Schedule page timeline rows.
- Other package types keep existing stock-status behavior.
- Added tube-specific filtering so
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxfrontend/src/components/SharedSchedule.tsxfrontend/src/pages/SchedulePage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add explicit UI hint for tube stock semantics if needed.
2026-03-01 (Fix: tube stock card now shows single value)
- 🧩 Scope: Adjust medication card stock formatting for
tubeto remove denominator display. - 🛠️ What changed:
- Changed tube card stock from
X / Y gtoX g. - Kept denominator-style stock display unchanged for non-tube package types.
- Removed tube stock over-capacity warning in that card row since denominator is no longer rendered.
- Changed tube card stock from
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: align tube stock display format in additional views if product wants full UI parity.
2026-03-01 (Fix: tube stock remains fixed and is no longer auto-consumed)
- 🧩 Scope: Stop automatic stock depletion for
tubemedications because per-application amount is undefined. - 🛠️ What changed:
- Changed stock normalization so
tubealways contributes0automatic consumption. - Applied this consistently in frontend coverage calculations and shared schedule coverage.
- Applied same rule in backend scheduler/planner stock math path to keep server/client behavior aligned.
- Result: stock for tube now stays fixed (for example remains
600based on configured amount) unless manually corrected/refilled.
- Changed stock normalization so
- 📁 Files touched:
backend/src/utils/scheduler-utils.tsfrontend/src/utils/schedule.tsfrontend/src/components/SharedSchedule.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add automated regression test for fixed tube coverage over time.
2026-03-01 (Fix: shared schedule now matches liquid-container semantics)
- 🧩 Scope: Align public shared schedule rendering and stock math for
liquid_containerwith dashboard/detail behavior. - 🛠️ What changed:
- Replaced pill-based shared timeline labels for liquid meds with intake-unit-aware amount labels.
- Dose rows now render liquid usage using configured intake unit (
ml,tsp,tbsp) and convertedmlcontext where applicable. - Total badge in each shared day row now uses liquid amount semantics for liquid meds instead of
pills total. - Shared stock coverage/depletion calculations now convert
tsp/tbspintake usage tomlbefore computing daily usage and consumed amount.
- 📁 Files touched:
frontend/src/components/SharedSchedule.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched component: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add automated regression test for shared liquid labels and coverage.
2026-03-01 (Hotfix: frontend build error in useEscapeKey.ts)
- 🧩 Scope: Resolve Vite/esbuild transform error (
Expected ';' but found 'process'). - 🛠️ What changed:
- Fixed malformed multiline comment in
frontend/src/hooks/useEscapeKey.ts. - No behavior change; parser hotfix only.
- Fixed malformed multiline comment in
- 📁 Files touched:
frontend/src/hooks/useEscapeKey.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Fix: Escape closes only stock-correction sub-modal)
- 🧩 Scope: Resolve nested modal behavior where pressing
EscapeinCorrect Stockalso closed parent medication detail modal. - 🛠️ What changed:
- Prevented duplicate Escape handling between nested modal and global app-level key handler.
- Nested sub-modals now capture and consume Escape first.
- Global Escape handler now ignores already-consumed key events.
- Result: pressing
Escapein stock-correction closes only that sub-modal.
- 📁 Files touched:
frontend/src/hooks/useEscapeKey.tsfrontend/src/components/MedDetailModal.tsxfrontend/src/App.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add regression UI test for nested modal Escape sequence.
2026-03-01 (Fix: Correct Stock opens with current amount for liquid container)
- 🧩 Scope: Resolve issue where stock-correction input started at
0forliquid_container. - 🛠️ What changed:
- Fixed
useRefilllogic to treat all amount package types uniformly:bottletubeliquid_container
openEditStockModalnow pre-fills amount packages with current stock amount (not blister split logic).submitStockCorrectionnow uses matching amount-package math for these package types.
- Fixed
- 📁 Files touched:
frontend/src/hooks/useRefill.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add regression tests for amount-package stock-correction defaults.
2026-03-01 (Fix: Correct Stock modal for liquid container uses amount labels)
- 🧩 Scope: Correct stock-correction dialog wording for
liquid_containerso it is not pill-based. - 🛠️ What changed:
- In
Correct Stockmodal, liquid-container input label now uses amount wording (Total amount) instead ofTotal pills. - Package-size info and max-cap warning now use amount units (
ml) for liquid containers instead ofpills. - Added dedicated i18n keys for amount-based package-size/cap messages.
- In
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: update refill-modal wording for liquid container (
Pills to add) to amount wording.
- Optional: update refill-modal wording for liquid container (
2026-03-01 (Fix: medication detail for liquid container no longer pill-based)
- 🧩 Scope: Correct
MedDetailModalrendering forliquid_containermedications. - 🛠️ What changed:
- Updated stock section to amount semantics for liquid container:
- label uses amount wording
- values include
mlunit (for example335 / 450 ml)
- Updated package details section to show liquid-specific information:
BottlesAmount per bottle (ml)Total amount (ml)
- Updated intake schedule rows for liquid to use intake-unit-aware amount text (instead of pill-style output), including
tsp/tbspconversion context. - Hidden pill-weight line for amount package types in this modal.
- Updated stock section to amount semantics for liquid container:
- 📁 Files touched:
frontend/src/components/MedDetailModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: adjust refill modal wording for liquid container (
Pills to add-> amount wording).
- Optional: adjust refill modal wording for liquid container (
2026-03-01 (Fix: raw i18n keys in liquid schedule rows)
- 🧩 Scope: Correct display where schedule rows showed translation keys (for example
form.blisters.teaspoons) instead of real text. - 🛠️ What changed:
- Added missing i18n keys for teaspoon/tablespoon labels in both locales:
form.blisters.teaspoons(_one/_other)form.blisters.tablespoons(_one/_other)
- This restores proper rendered labels in dashboard schedule/check-off rows.
- Added missing i18n keys for teaspoon/tablespoon labels in both locales:
- 📁 Files touched:
frontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Rollback: dashboard no longer shows X intakes)
- 🧩 Scope: Revert the recent liquid check-off wording change per user request.
- 🛠️ What changed:
- Removed the
X intakesdisplay style in dashboard liquid schedule rows. - Restored the previous unit-based liquid rendering path (using
ml/tsp/tbspwith convertedmlcontext for liquid doses).
- Removed the
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Adjustment: dashboard check-off uses intake count only)
- 🧩 Scope: Apply user-requested simplification for liquid schedule/check-off labels.
- 🛠️ What changed:
- Removed spoon/ml annotation format in this area (no more strings like
Teaspoon (5 ml)/Tablespoon (15 ml)). - Liquid usage labels now show only intake counts:
- EN:
2 intakes,47 intakes - DE:
2 Einnahmen,47 Einnahmen
- EN:
- Added/used pluralized i18n key
form.blisters.intakes.
- Removed spoon/ml annotation format in this area (no more strings like
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Fix: intake label in check-off area now pluralized + total ml)
- 🧩 Scope: Correct liquid intake display format in dashboard schedule/check-off rows.
- 🛠️ What changed:
- Replaced old format like
2 Teaspoon (5 ml). - New format now shows pluralized unit + total converted amount:
2 teaspoons 10 ml2 tablespoons 30 ml
- Removed parentheses in this view.
- Updated daily total badge calculation for liquid meds to derive from dose rows and show converted
mltotals.
- Replaced old format like
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Hardening: intake unit loaded directly from intakesJson)
- 🧩 Scope: Resolve remaining regression where
tbsp/tspsometimes reappeared asmlafter save. - 🛠️ What changed:
- Confirmed database persistence is correct (
intakes_jsoncontainsintakeUnitvalues). - Added a defensive parse+overlay in
backend/src/routes/medications.ts:- reads
intakeUnitdirectly from rawintakesJson - overlays it onto parsed intakes by index before returning API responses
- reads
- Applied this in the medication GET path and related intake parsing paths used during update/planner calculations.
- Restarted
backend-devso the patch is active.
- Confirmed database persistence is correct (
- 📁 Files touched:
backend/src/routes/medications.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched backend route: no errors - local DB check: record keeps
intakeUnit="tbsp"inintakes_json
- editor diagnostics (
- 🔜 Follow-ups:
- If still reproducible, capture and inspect live
/api/medications?includeObsolete=trueresponse for the same medication ID.
- If still reproducible, capture and inspect live
2026-03-01 (Fix: tbsp/tsp now persist and render correctly in Upcoming Schedule)
- 🧩 Scope: Resolve intake-unit regression where changing liquid intake unit to
tbsp/tspreverted tomlafter save/reload. - 🛠️ What changed:
- Fixed backend intake parser to preserve
intakeUnitwhen readingintakesJson. - Added intake-unit validation on parse (
ml,tsp,tbsp) with safe fallback for legacy rows. - Propagated
intakeUnitthrough frontend schedule event flow so UI receives the saved unit. - Updated Dashboard upcoming dose labels for liquid container meds to render per-intake unit (
ml/tsp/tbsp) instead of forcingml.
- Fixed backend intake parser to preserve
- 📁 Files touched:
backend/src/utils/scheduler-utils.tsfrontend/src/types/index.tsfrontend/src/utils/schedule.tsfrontend/src/context/AppContext.tsxfrontend/src/pages/DashboardPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on all touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: if mixed intake units are configured in one day for a single medication, refine total badge rendering to show a normalized unit summary.
2026-03-01 (Medication cards: bottle count shown for Pill Bottle)
- 🧩 Scope: Add package-count visibility for
Pill Bottlecards. - 🛠️ What changed:
- Added
Bottles: <packCount>to bottle card details. - Kept bottle capacity display (
Capacity: <value>) and stock line unchanged. - Result matches requested format:
Type: Pill BottleBottles: <count>Capacity: <value>Stock: <current> / <capacity> pills
- Added
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: mirror bottle count in detail/report views for full read-only parity.
2026-03-01 (Hotfix: MobileEditModal useCallback runtime error)
- 🧩 Scope: Resolve dashboard/mobile form crash caused by missing React hook import.
- 🛠️ What changed:
- Added missing
useCallbackimport inMobileEditModal. - Fixes runtime error:
Uncaught ReferenceError: useCallback is not defined.
- Added missing
- 📁 Files touched:
frontend/src/components/MobileEditModal.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- None.
2026-03-01 (Liquid intake units now affect stock math end-to-end)
- 🧩 Scope: Make
Intake unit(ml,tsp,tbsp) impact consumption calculations and align schedule form labels with selected unit. - 🛠️ What changed:
- Implemented real conversion for liquid stock usage:
ml->usagetsp->usage * 5tbsp->usage * 15
- Applied conversion in backend stock-consumption paths and frontend coverage calculation so both sides behave consistently.
- Updated Desktop + Mobile schedule forms for
liquid_containerso usage label follows selected intake unit:Usage (ml),Usage (tsp),Usage (tbsp).
- Added i18n keys in EN/DE for new usage labels.
- Implemented real conversion for liquid stock usage:
- 📁 Files touched:
backend/src/utils/scheduler-utils.tsbackend/src/services/reminder-scheduler.tsfrontend/src/utils/schedule.tsfrontend/src/pages/MedicationsPage.tsxfrontend/src/components/MobileEditModal.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on all touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: show selected intake unit in read-only schedule lines/cards for complete visual parity.
2026-03-01 (Medication cards: package count shown for tube/liquid)
- 🧩 Scope: Show number of packages directly in medication cards for
tubeandliquid_container. - 🛠️ What changed:
- Added package-count line in the card details section for amount-based package types.
- Type-specific labels are used:
tube->Tubesliquid_container->Bottles
- Existing
Capacity per packageline remains and now appears together with the package count.
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: mirror package-count detail in other read views (detail modal/report) for full parity.
2026-03-01 (Fix: singular/plural for tube labels in Upcoming Schedules)
- 🧩 Scope: Correct singular/plural wording for tube usage labels in dashboard upcoming schedule rows and badges.
- 🛠️ What changed:
- Updated dashboard formatters to use count-aware translation for application units:
t("form.blisters.applications", { count })
- Added pluralization keys in i18n:
- EN:
applications_one,applications_other - DE:
applications_one,applications_other
- EN:
- Result examples:
1 application/1 Anwendung2 applications/2 Anwendungen
- Updated dashboard formatters to use count-aware translation for application units:
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: review additional screens for any remaining non-count-aware unit labels.
2026-03-01 (Fix: Upcoming Schedule labels for tube/liquid)
- 🧩 Scope: Correct broken text rendering in dashboard upcoming schedule rows for
tubeandliquid_container. - 🛠️ What changed:
- Fixed wrong i18n key paths in
DashboardPageformatters. - Replaced invalid keys:
blisters.applications->form.blisters.applicationsform.ml->form.packageAmountUnitMl
- This fixes outputs like
1 blisters.applicationsand1 form.mlin upcoming rows.
- Fixed wrong i18n key paths in
- 📁 Files touched:
frontend/src/pages/DashboardPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: run a wider i18n key-path scan to catch other legacy raw-key references.
2026-03-01 (Root fix: recurring Stock > Capacity artifact removed)
- 🧩 Scope: Remove recurring over-capacity display (
453/450,604/600) forliquid_containerandtube. - 🛠️ 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:
frontend/src/types/index.tsfrontend/src/test/types.test.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add focused
calculateCoverageunit test coverage for amount package types.
- Optional: add focused
2026-03-01 (Fix: tube/topical save no longer fails with generic error)
- 🧩 Scope: Resolve save failures for amount-based package types (
tube,liquid_container), especiallytube/topical. - 🛠️ What changed:
- Added payload normalization before save for amount packages:
packCountis forced to>= 1packageAmountValueis coerced to integer>= 1- derived totals (
totalPills,looseTablets) are based on normalized values
- On package switch to
tube/liquid_container, form now initializespackageAmountValueto at least1. - Improved frontend error extraction to read Fastify/Zod
_errorspayloads and show the first concrete validation message instead of onlyFailed to save.
- Added payload normalization before save for amount packages:
- 📁 Files touched:
frontend/src/hooks/useMedicationForm.tsfrontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: add explicit inline form validation hint for amount packages when user enters invalid/non-integer values.
2026-03-01 (Follow-up: fixed +2 stock artifact for amount packages)
- 🧩 Scope: Correct medication-card stock fallback for
tubeandliquid_container. - 🛠️ What changed:
- Fixed card stock fallback that incorrectly used
getPackageSizefor amount packages. - For
tube/liquid_container, card stock now uses amount totals (totalPills ?? looseTablets) and no longer addspackCount. - This removes artifacts like
Stock: 302 / 302 mlwhen true total amount is300 ml.
- Fixed card stock fallback that incorrectly used
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: unify amount stock calculations in shared utility to avoid duplicate logic.
2026-03-01 (Follow-up: fixed wrong amount values in medication cards)
- 🧩 Scope: Correct wrong
Capacity per packageand missingStockunit in card view for amount-based package types. - 🛠️ What changed:
- Card capacity for
tubeandliquid_containerno longer reads frompillsPerBlister(which caused1 ml/1 gin many records). - Capacity now uses this fallback chain:
packageAmountValuetotalPills / packCounttotalPills(orlooseTabletsas final fallback)
Stockfortubenow includes unit suffix (gorml) instead of showing unitless values.
- Card capacity for
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched file: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: dedicated pass to align stock semantics as container counts in card view.
2026-03-01 (Capacity now shows per-package unit for amount packages)
- 🧩 Scope: Correct medication-card capacity display for
liquid_containerandtube. - 🛠️ What changed:
- In medication cards,
Capacityfor amount-based package types is now shown as per package instead of total. liquid_containercapacity now displays withml(for example150 mlper container).tubecapacity now displays with unit by form:- liquid tube ->
ml - non-liquid tube ->
g
- liquid tube ->
- Added dedicated i18n label key
medications.details.capacityPerPackage(EN/DE).
- In medication cards,
- 📁 Files touched:
frontend/src/pages/MedicationsPage.tsxfrontend/src/i18n/en.jsonfrontend/src/i18n/de.jsondoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
- editor diagnostics (
get_errors) on touched files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Optional: align
Stockcard wording/semantics in a separate UI pass.
- Optional: align
2026-03-01 (Liquid Container Package UX now follows Tube pattern)
- 🧩 Scope: Simplify
liquid_containerpackage editing by removing pill-style stock fields and using the same pattern astube. - 🛠️ What changed:
- Desktop and mobile package tabs for
liquid_containernow show only:Flaschen/Bottles(count)Inhalt pro Flasche/Amount per bottle(ml)- derived
Gesamtmenge/Total amount
- Removed manual liquid package inputs for
Current AmountandTotal Amountsteppers from edit forms. - Removed the extra liquid-specific package amount row in package tabs (now integrated in the same 3-field structure as tube).
- Save payload logic now derives liquid stock fields from count × amount-per-bottle:
packCount >= 1blistersPerPack = 1pillsPerBlister = 1totalPills = packCount * packageAmountValuelooseTablets = packCount * packageAmountValue
- Added legacy-safe edit mapping so older liquid records are normalized for the new UI model without destructive reset.
- Added new i18n keys:
form.bottlesform.packageAmountPerBottle
- Desktop and mobile package tabs 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
- 🔬 Validation run:
- editor diagnostics (
get_errors) on all touched frontend files: no errors
- editor diagnostics (
- 🔜 Follow-ups:
- Automated test execution/CI validation is delegated to
@testing-managerper repository rules.
- Automated test execution/CI validation is delegated to
2026-02-28 (PR #359 backend CI fix)
- 🧩 Scope: Triage and resolve failing backend CI check on branch
feat/topical-no-depletion-plannerwith minimal change scope. - 🛠️ What changed:
- Reproduced backend CI locally with the same command sequence as
.github/workflows/test.yml. - Identified TypeScript compile failure:
backend/src/routes/planner.tsreferencestr.common.unitsandtr.common.ml.backend/src/i18n/translations.tsdid not define those keys incommon.
- Added missing
common.unitsandcommon.mlkeys to the translation type and both language maps (en,de).
- Reproduced backend CI locally with the same command sequence as
- 📁 Files touched:
backend/src/i18n/translations.tsdoku/memory_notes.mddoku/report.md
- 🔬 Validation run:
cd backend && npm run lint-> passedcd backend && npx tsc --noEmit-> passedcd backend && CI=true npm run test:coverage-> 21 files passed, 572 tests passed
- 🔜 Follow-ups:
- Remote push/PR update must be performed by
@release-managerper repository governance.
- Remote push/PR update must be performed by
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.
2026-03-02 - Pre-PR Gate Validation (MedicationsPage label/order UI update)
- Scope validated:
frontend/src/pages/MedicationsPage.tsx(usage label selection by intake unit and medication end-date field order adjustment). - Commands executed:
cd frontend && npm run lintcd frontend && CI=true npm run test:run -- src/test/utils/schedule.test.tscd frontend && PLAYWRIGHT_HTML_OPEN=never PLAYWRIGHT_WORKERS=1 npx playwright test e2e/medication-edit.spec.ts e2e/schedule.spec.ts --config=playwright.stable.config.ts --workers=1
- Results:
- Lint: PASS (
biome checkclean). - Targeted frontend unit test: PASS (82 passed).
- Targeted frontend E2E tests: PASS (23 passed).
- Lint: PASS (
- Gate decision: PASS for pre-PR local quality gate on this change scope.