Skip to content

feat: new therapeutic appointment v2 template - #118

Merged
maxirmx merged 5 commits into
mainfrom
v0151
Sep 9, 2026
Merged

maxirmx merged 5 commits into
mainfrom
v0151

Conversation

@maxirmx

@maxirmx maxirmx commented Sep 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.91094% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.35%. Comparing base (354f5f7) to head (cce86c3).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/therapeuticAppointment.ts 89.15% 9 Missing ⚠️
packages/contracts/src/therapeutic.ts 97.94% 4 Missing ⚠️
src/components/TherapeuticAppointmentForm.vue 88.46% 3 Missing ⚠️
src/components/TherapeuticAppointmentView.vue 93.18% 3 Missing ⚠️
api-node/src/commands.ts 75.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-section to align-items: center will 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.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/publish-api-node.yml
Comment thread .github/workflows/publish.yml
Comment thread src/repositories/index.ts
Comment thread src/styles.css
@maxirmx
maxirmx marked this pull request as ready for review September 9, 2026 21:19
@maxirmx
maxirmx merged commit d17712d into main Sep 9, 2026
6 checks passed
@maxirmx
maxirmx deleted the v0151 branch September 9, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Терапевтический приём. Новая версия

2 participants