19 KiB
19 KiB
Agent Memory Notes
Purpose: persistent agent work memory to survive context loss.
Usage Rules
- Update this file during and after meaningful work.
- Record decisions, touched files, constraints, and unresolved follow-ups.
- Keep entries concise and chronological.
How to maintain (1-minute template)
Use this block for each meaningful task:
### YYYY-MM-DD
- 🧩 Task:
- ✅ Decisions:
- 📁 Files touched:
- 🔜 Follow-up/open points:
Entries
2026-02-27 (split-and-ship all pending local changes)
- 🧩 Task: Split one large local working tree into coherent PRs and merge all to
mainend-to-end. - ✅ Decisions:
- Created and merged 4 PRs to keep scopes reviewable while ensuring all pending changes were shipped.
- PR mapping:
- #334
feat/form-login-enabled(Issue #309) - #336
chore/improve-logging(Issue #335) - #339
fix/typescript-strictness-react19(Issue #337) - #341
chore/dependabot-agent-governance(Issue #340)
- #334
- For PR #341, required checks were initially skipped by path filtering; added minimal no-op backend/frontend comment touches so required checks executed and merge satisfied ruleset.
- Verified linked project items for issues
#309,#335,#337,#340areDone.
- 📁 Files touched:
- All changed files were fully distributed across PRs and merged.
- Mandatory reporting updated:
doku/memory_notes.md,doku/report.md.
- 🔜 Follow-up/open points:
- None pending from this split/merge task.
2026-02-27 (pre-PR gate validation for chore/dependabot-agent-governance)
- 🧩 Task: Validate minimal relevant local non-interactive checks for governance/config/docs changes.
- ✅ Decisions:
- Confirmed changed scope with
git status --shortand validated only listed files. - Ran repo-defined lint gate (
npm run lint) to satisfy local pre-PR lint requirement. - Ran parser-level YAML/frontmatter checks for changed
.ymland agent markdown files. - Ran a targeted
markdownlint-cli2check; it reported many style errors, but this linter is not part of this repository's configured gate.
- Confirmed changed scope with
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Local pre-PR gate for this scope is satisfied by configured checks (lint + syntax validation); optional markdown style cleanup can be handled in a separate docs-formatting pass.
2026-02-27 (PR3 local gate rerun after MedDetailModal test fix)
- 🧩 Task: Re-run PR3 local gate on
fix/typescript-strictness-react19afterMedDetailModalassertion fix. - ✅ Decisions:
- Re-ran
frontend checkviaCI=true npm --prefix /Users/danielvolz/git/medassist/frontend run check. - Re-ran the same focused Vitest subset from prior gate run (12 files including
MedDetailModal.test.tsx). - Treated React
act(...)warnings and JSDOMscrollTo()notices as non-blocking because all tests passed.
- Re-ran
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Pre-PR local gate for the requested frontend scope is now satisfied.
2026-02-27 (pre-PR gate validation for fix/typescript-strictness-react19)
- 🧩 Task: Validate minimal relevant local non-interactive frontend lint/tests for React 19 + TS strictness scope.
- ✅ Decisions:
- Ran only frontend checks relevant to the changed scope:
check(Biome +tsc --noEmit) and targeted Vitest on changed test files. - Treated React
act(...)warnings and JSDOMscrollTonotices as non-blocking because they did not fail tests.
- Ran only frontend checks relevant to the changed scope:
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Gate is blocked by one failing test assertion in
src/test/components/MedDetailModal.test.tsxexpectingundefinedwhere implementation currently passesfalseas second arg toonSubmitRefill.
- Gate is blocked by one failing test assertion in
2026-02-27
- 🧩 Task: Implement Issue #309 — Optionally disable form login when OIDC enabled
- ✅ Decisions:
- Env var:
FORM_LOGIN_ENABLED(notLOCAL_AUTH_ENABLED— "local" is ambiguous, "form login" matches the UI element) - Renamed internal field
localAuthEnabled→formLoginEnabledthroughout for consistency - Default
truefor backward compat - First-user override: form login forced on when no users exist (needsSetup)
- Lockout guard: startup error when no login method available
- Mismatch warning: log when REGISTRATION_ENABLED=true but form login off
- No DB changes, no i18n changes, no README update
- Env var:
- 📁 Files touched:
backend/src/plugins/env.ts— added FORM_LOGIN_ENABLED + validationbackend/src/plugins/auth.ts— renamed field + wired to env var + first-user overridebackend/src/routes/auth.ts— renamed guard references + error codefrontend/src/components/Auth.tsx— renamed interface + conditionalsfrontend/src/test/components/Auth.test.tsx— renamed in mocksfrontend/src/test/components/AppHeader.test.tsx— renamed in mocksbackend/src/test/auth.test.ts— renamed env mock + assertion.env.example— documented new var
- 🔜 Follow-up: E2E tests for OIDC-only mode (delegate to @testing-manager)
2026-02-27 (pre-PR gate validation for chore/improve-logging)
- 🧩 Task: Validate local lint/tests for branch
chore/improve-loggingon changed logging/nginx/backend-route files. - ✅ Decisions:
- Ran minimal relevant non-interactive checks only: backend lint, frontend lint, and targeted backend route test file (
e2e-routes.test.ts). - No additional broad suites were executed to keep scope minimal.
- Ran minimal relevant non-interactive checks only: backend lint, frontend lint, and targeted backend route test file (
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Frontend lint still reports one warning in
frontend/src/components/MedicationAvatar.tsx(useExhaustiveDependencies, extra dependencyimageUrl). - Pre-PR gate is not clean until this lint warning is resolved.
- Frontend lint still reports one warning in
2026-02-26
- Added mandatory memory/report persistence rules to
.github/copilot-instructions.mdandAGENTS.md. - Removed obsolete mandatory persistence rule for
doku/APP_BEHAVIOR.mdfromAGENTS.md. - Created
doku/memory_notes.mdanddoku/report.mdas the new required persistence/reporting files.
2026-02-26 — Logging Implementation Plan
- 🧩 Task: Create implementation plan to fix noisy logging (nginx 5s polling spam, missing timestamps, unfilterable levels).
- ✅ Decisions:
- Use Fastify per-route
logLeveloption (notdisableRequestLogging) to suppress health/polling request logs. - Suppress
GET /doses/takenandGET /healthatinfolevel (visible atdebug). - Add separate nginx location blocks for polling paths with
access_log offatinfolevel. - Add ISO timestamps to startup logger (
backend/src/utils/logger.ts). - Add
pino-prettyas devDependency for human-readable dev logs. - Use nginx
log_format timedwith$time_iso8601.
- Use Fastify per-route
- 📁 Files touched:
plan/feature-structured-logging-1.md(created). - 🔜 Follow-up: Implement the plan (5 phases, 18 tasks).
2026-02-26 — Logging Plan Implementation (complete)
- 🧩 Task: Implement all 5 phases of the structured logging plan.
- ✅ Decisions:
- Phase 1: Added
logLevel: 'warn'toGET /health,logLevel: 'debug'toGET /doses/takenandGET /share/:token/doses— suppresses Pino automatic request logs atinfolevel. - Phase 2: Updated startup logger (
backend/src/utils/logger.ts) to prepend[ISO timestamp] [LEVEL]prefix. Addedpino-prettydevDependency with transport config active only whenNODE_ENV !== 'production' && !== 'test'. - Phase 3+4: nginx.conf now has dedicated location blocks for polling endpoints using
${NGINX_POLLING_LOG}variable.nginx-entrypoint.shdifferentiatesdebug(all logs) /info(polling suppressed) /warn+(all suppressed). Addedlog_format timedwith ISO timestamps. - Phase 5: Updated
.env.exampleandREADME.mdwith detailed LOG_LEVEL behavior descriptions.
- Phase 1: Added
- 📁 Files touched:
backend/src/routes/health.ts— logLevel: 'warn'backend/src/routes/doses.ts— logLevel: 'debug' on GET /doses/taken and GET /share/:token/dosesbackend/src/utils/logger.ts— ISO timestamps on all startup log messagesbackend/src/index.ts— pino-pretty transport for dev modebackend/package.json— added pino-pretty devDependencyfrontend/nginx.conf— polling location blocks, log_format timedfrontend/nginx-entrypoint.sh— 3-tier LOG_LEVEL logic (debug/info/warn+).env.example— expanded LOG_LEVEL docsREADME.md— expanded LOG_LEVEL description
- 🔜 Follow-up: Docker build + manual verification (TEST-004 through TEST-008). Hand off to @testing-manager for any automated test coverage.
2026-02-26 (follow-up)
- Added a short "How to maintain" template section to this file and to
doku/report.md. - Updated report entry so this follow-up is documented for user review.
2026-02-26 (emoji template follow-up)
- Added emoji-based label conventions for faster scanning in this file template.
- Updated
doku/report.mdtemplate to match the same emoji convention.
2026-02-26 (testing-manager instruction hardening)
- 🧩 Task: Strengthen
testing-manageragent instructions for lint gates, real/reliable tests, and current test setup commands. - ✅ Decisions:
- Added hard lint gate: all errors and simple/fixable warnings must be resolved before PR-ready handoff.
- Added explicit anti-fake-test rules and validity checklist to enforce real functional verification and regression safety.
- Updated backend/frontend Vitest commands to non-watch CI-safe
test:runusage and aligned Playwright examples.
- 📁 Files touched:
.github/agents/testing-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Keep this instruction set mirrored if additional testing policy docs are introduced later.
2026-02-26 (pre-PR local quality gate clarification)
- 🧩 Task: Clarify that PRs must not be created before local lint/tests are green.
- ✅ Decisions:
- Added explicit rule: before PR creation, all lint errors and relevant tests must pass locally.
- Added explicit rule: no CI-first failures; broken behavior must reproduce and be fixed locally before handoff.
- 📁 Files touched:
.github/agents/testing-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Apply same wording to other governance docs only if requested.
2026-02-26 (release-manager local gate alignment)
- 🧩 Task: Apply the same pre-PR local lint/test gate policy to
release-managerinstructions. - ✅ Decisions:
- Added explicit pre-PR local quality gate requirement to
release-managercritical rules. - Added explicit no CI-first-failure policy for release orchestration.
- Updated PR workflow steps to require local gate confirmation before push/PR creation.
- Added explicit pre-PR local quality gate requirement to
- 📁 Files touched:
.github/agents/release-manager.agent.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Keep both manager agents (
testing-manager,release-manager) aligned on this gate language.
- Keep both manager agents (
2026-02-26 (React 19 upgrade best-practice clarification)
- 🧩 Task: Validate and refine the React 19 upgrade plan with official guidance.
- ✅ Decisions:
- Keep
@types/reactand@types/react-dom, but bump both to^19.xduring the React upgrade. - Do not force
useContexttouse()migration in the upgrade PR; only fix what is required for compatibility. - Keep strict scope boundary: version upgrade only; adopt new React 19 features in separate follow-up PRs.
- Keep
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- When implementation starts, apply the same scope boundary in commit and PR structure.
2026-02-26 (React 19 implementation)
- 🧩 Task: Implement the scoped React 19 dependency upgrade.
- ✅ Decisions:
- Upgraded
react/react-domto^19.2.0. - Kept
@types/reactand@types/react-domand upgraded both to^19.2.2. - Did not include optional API migrations (
useContexttouse(), Actions APIs, RSC changes).
- Upgraded
- 📁 Files touched:
frontend/package.jsonfrontend/package-lock.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Run local install/lint/check in a dedicated testing handoff to validate full dependency tree behavior.
2026-02-26 (testing handoff run for React 19 upgrade)
- 🧩 Task: Execute frontend lint/check/relevant tests and apply only mandatory compatibility fixes.
- ✅ Decisions:
- Fixed only strict compatibility/type issues in touched tests (
ics,schedule,MobileEditModal) without feature migration. - Did not expand scope into broad unrelated test refactors.
- Fixed only strict compatibility/type issues in touched tests (
- 📁 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-up/open points:
frontend checkstill blocked by unrelatedMedDetailModal.test.tsxprop-shape mismatches (usePrescriptionRefill,onUsePrescriptionRefillChange, andRefillEntryfield changes).- Existing lint warning remains in
frontend/src/components/MedicationAvatar.tsx(useExhaustiveDependencies).
2026-02-26 (blocker follow-up: lint fix + testing-manager handoff)
- 🧩 Task: Remove remaining lint warning and prepare formal handoff for out-of-scope MedDetailModal test drift.
- ✅ Decisions:
- Fixed
MedicationAvatarwarning by tracking previousimageUrlvia ref in effect logic. - Kept
MedDetailModal.test.tsxchanges out of this implementation due testing ownership boundary and prepared explicit handoff content instead.
- Fixed
- 📁 Files touched:
frontend/src/components/MedicationAvatar.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
@testing-managershould alignMedDetailModaltests with currentMedDetailModalProps(usePrescriptionRefill,onUsePrescriptionRefillChange) andRefillEntryshape (refillDate,loosePillsAdded).
2026-02-26 (automatic delegation preference applied)
- 🧩 Task: Apply user preference to delegate testing work automatically without additional confirmation prompts.
- ✅ Decisions:
- Hand off residual test/type drift work to
@testing-managerimmediately when detected. - Do not pause for approval before delegation unless there is a blocking ambiguity.
- Hand off residual test/type drift work to
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Keep this delegation style for future testing ownership boundaries.
2026-02-26 (continued type-fix sweep to green frontend check)
- 🧩 Task: Continue and clear remaining
frontend checkblockers after delegated MedDetailModal fixes. - ✅ Decisions:
- Applied minimal compatibility fixes in production files only where type/lint failed (
MobileEditModal,SharedSchedule,AppContext,dashboard-helpers,DashboardPage,stock.ts). - Applied fixture-only updates in tests for new required
Medication/StockThresholdsshapes and minor mock typing issues. - Kept scope to type/lint compatibility; no feature behavior migration.
- Applied minimal compatibility fixes in production files only where type/lint failed (
- 📁 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-up/open points:
frontend checkis now green.- Focused tests pass; remaining broader suite execution can be done as separate validation step if requested.
2026-02-26 (npm EINTEGRITY fix)
- 🧩 Task: Resolve npm tarball corruption/integrity install failure after React 19 lockfile update.
- ✅ Decisions:
- Verified official registry integrity values with
npm viewand corrected lockfile hashes. - Did not change versions; only fixed integrity metadata for
@types/react@19.2.2and@types/react-dom@19.2.2.
- Verified official registry integrity values with
2026-02-26 (dependency update automation)
- 🧩 Task: Implement automatic dependency update flow with safe merge policy.
- ✅ Decisions:
- Extended existing
.github/dependabot.ymlinstead of replacing it. - Added grouped minor/patch updates for root npm and GitHub Actions, plus scoped labels (
frontend,backend,root). - Added
.github/workflows/dependabot-automerge.ymlto enable auto-merge only for Dependabot npm/GitHub Actions patch+minor updates. - Kept major updates manual by design.
- Synced docs in
README.mdand updated React badge to 19.
- Extended existing
- 📁 Files touched:
.github/dependabot.yml.github/workflows/dependabot-automerge.ymlREADME.mddoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- If branch protection requires specific checks, ensure required status checks are set so auto-merge waits correctly.
- 📁 Files touched:
frontend/package-lock.jsondoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
npm cinow succeeds cleanly.
2026-02-26 (npm deprecation warnings assessment)
- 🧩 Task: Assess reported npm deprecation warnings and identify real source/package owners.
- ✅ Decisions:
- Warnings are not from
frontend; they originate inbackendtransitive dependencies. @esbuild-kit/*comes fromdrizzle-kit@0.31.9(currently latest).node-domexceptioncomes via@libsql/client -> node-fetch -> fetch-blob(currently latest published chain).- Treat as non-blocking upstream warnings for now (no local secure/functional regression).
- Warnings are not from
- 📁 Files touched:
doku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
- Re-check on future dependency releases; warnings can be removed once upstream chains migrate.
2026-02-26 (MedDetailModal test type drift fix)
- 🧩 Task: Unblock the targeted
MedDetailModaltest type drift after React 19 changes. - ✅ Decisions:
- Kept scope minimal and test-only: updated
frontend/src/test/components/MedDetailModal.test.tsxonly. - Added missing required props in
defaultProps:usePrescriptionRefill,onUsePrescriptionRefillChange. - Updated
RefillEntryfixtures to current shape by replacing legacy fields withrefillDateandloosePillsAdded. - Did not run the targeted test command because the requested precondition (
npm run checkpassing) is not met.
- Kept scope minimal and test-only: updated
- 📁 Files touched:
frontend/src/test/components/MedDetailModal.test.tsxdoku/memory_notes.mddoku/report.md
- 🔜 Follow-up/open points:
frontend checkremains blocked by unrelated TypeScript errors in other files (outside MedDetailModal test scope).