Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
- Coverage 94.29% 87.35% -6.95%
==========================================
Files 78 90 +12
Lines 6908 8634 +1726
Branches 2936 3619 +683
==========================================
+ Hits 6514 7542 +1028
- Misses 389 1087 +698
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
There are repository-rule and maintainability issues (notably vertical alignment rules in CSS and unnecessary snapshot churn) plus CI/publish workflow action version pinning concerns that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Introduces a new “therapeutic appointment v2” schema and template across the shared contracts, UI editor/view, migrations, and backend validation to eliminate legacy rendering paths and ensure consistent persisted structure.
Changes:
- Added a shared contracts module for therapeutic appointment v2 (schema, option catalog IDs, validators, and migration from legacy payloads).
- Updated UI therapeutic appointment editor/view to support new fields (problem descriptions, conditional free-text fields), hierarchical read-only rendering, and migration notes.
- Enforced schema v2 at API + UI repository boundaries, and expanded unit/e2e coverage plus coverage reporting for the api-node workspace.
File summaries
| File | Description |
|---|---|
| vitest.config.ts | Includes the new contracts therapeutic module in coverage collection. |
| tests/therapeuticMigration.spec.ts | Adds focused tests for contract-level migration + validation behaviors. |
| tests/therapeuticAppointmentForm.spec.ts | Updates/extends form tests for new v2 behaviors and new free-text fields. |
| tests/therapeuticAppointment.spec.ts | Expands template/catalog/validation/search tests for v2 schema and catalog snapshot. |
| tests/repositoryFacade.spec.ts | Ensures therapeutic history is migrated before being exposed/cached; enforces schema v2 on save. |
| tests/medicalRecordEntry.spec.ts | Updates medical record rendering expectations for v2 therapeutic appointment read-only output. |
| tests/doctorPages.spec.ts | Updates doctor page flows to open migrated therapeutic history in the v2 editor/view. |
| src/therapeuticAppointment.ts | Implements v2 draft/value shape, migration integration, selection rules, hierarchical selection grouping, and search indexing. |
| src/styles.css | Adjusts therapeutic form/layout styles and adds migration notes styling. |
| src/repositories/types.ts | Re-exports therapeutic v2 validator/migration helpers. |
| src/repositories/index.ts | Migrates therapeutic appointment sections in snapshots and enforces v2 schema at save boundary. |
| src/components/TherapeuticSelectionView.vue | Switches selection rendering to a reusable recursive detail list component. |
| src/components/TherapeuticSelectionDetailList.vue | Adds recursive nested selection detail rendering with stable keys for hierarchy. |
| src/components/TherapeuticQuestionGroups.vue | Adds support for conditional free-text fields alongside catalog selections. |
| src/components/TherapeuticAppointmentView.vue | Reworks read-only rendering into populated tabs and adds migration notes block. |
| src/components/TherapeuticAppointmentForm.vue | Adds problem description, renders migration notes, and wires conditional free-text fields. |
| packages/contracts/src/therapeutic.ts | New therapeutic v2 contract: schema, IDs, migration, and validation. |
| packages/contracts/src/index.ts | Exposes therapeutic v2 exports and updates section templateVersion union to v2. |
| packages/contracts/package.json | Bumps contracts package version to 0.15.2. |
| package.json | Bumps root version and runs api-node coverage as part of root coverage script. |
| package-lock.json | Updates lockfile versions in line with workspace version bumps. |
| eslint.config.js | Adds an additional coverage glob ignore. |
| e2e/operational.spec.ts | Extends e2e coverage for new therapeutic v2 behaviors and layout assertions. |
| api-node/vitest.config.ts | Adds coverage reporters for api-node Vitest runs. |
| api-node/test/rows.spec.ts | Tests migration of legacy therapeutic sections at projection boundary. |
| api-node/test/commands.spec.ts | Enforces schema v2 therapeutic validation at the API command boundary. |
| api-node/src/rows.ts | Migrates therapeutic sections to v2 when projecting DB rows into drafts. |
| api-node/src/commands.ts | Rejects non-v2 therapeutic payloads and marks structured sections as v2. |
| api-node/package.json | Adds api-node coverage script and bumps version to 0.15.2. |
| .github/workflows/publish.yml | Updates action version specifiers used for UI publish workflow. |
| .github/workflows/publish-api-node.yml | Updates action version specifiers used for API publish workflow. |
| .github/workflows/ci.yml | Updates action version specifiers and uploads both UI + api-node coverage. |
Review details
Suppressed comments (1)
src/styles.css:1257
- AGENTS.md requires table/table-like row layouts to keep cell contents top-aligned rather than vertically centered (AGENTS.md:26). Switching
.medical-card-comment-sectiontoalign-items: centerwill vertically center the heading against the textarea and breaks that alignment rule (especially when headings wrap).
.medical-card-comment-section {
display: grid;
grid-template-columns: minmax(150px, .35fr) minmax(0, 1.65fr);
min-width: 0;
align-items: center;
- Files reviewed: 31/32 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
No description provided.