fix(runs,studio,admin,valueset): UAT Sections 6-8 fixes (issue #29)#44
Conversation
Previously finalizeAsyncRun used the evaluationDate (a historical date in the past) to compute duration_ms, yielding values like '69068s'. Now the method fetches the actual started_at timestamp from the runs table so that duration reflects the true wall-clock time of the CQL evaluation (e.g. 179s). Also sets the JVM default timezone to UTC in BackendApplication to ensure consistent timestamp handling across all environments. Verified end-to-end with Playwright: new async run shows 179s duration vs the old seeded 60s constant. Unit tests (RunControllerTest, CsvExportServiceTest) pass cleanly.
- runs: fix async run duration computation — use actual DB started_at timestamp instead of evaluationDate for durationMs; also fix measurement_period_start/end to use the correct 1-year window relative to evaluationDate (not repeating started_at twice) - valueset: fix ensureDemoValueSets() — ensure all 4 demo value sets (audiogram, TB, HAZWOPER, flu) are seeded with their correct CQL- matching canonical OIDs and display codes before resolveCheck runs - studio/CqlTab: add 'New Version' button that opens a dialog for entering a change summary and cloning the current CQL into a new draft measure version (requires canClone prop) - admin/page.tsx: add confirmation dialog before disabling the scheduler to prevent accidental disables during a demo
CqlTab now requires canClone and onCreateNewVersion since the stash added the New Version button to the editor toolbar. Wire those props from the parent studio/[id]/page.tsx so TypeScript is satisfied and ROLE_AUTHOR users see the button inside the CQL editor panel.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
💡 Codex Reviewhttps://github.com/Taleef7/workwell/blob/3f5dabaf4a73b0499eb723f4e44ce97a753eb47c/frontend/app/(dashboard)/studio/[id]/page.tsx#L174-L176 The new CQL-tab clone flow calls workwell/frontend/app/(dashboard)/cases/page.tsx Lines 93 to 96 in 3f5daba This effect now only pushes ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Taleef7
left a comment
There was a problem hiding this comment.
Expert review notes for PR #44:
- The CQL-tab New Version modal is wired through React state in a way that makes the new button fail or submit a stale summary. The child passes
summary, but the parent callssetChangeSummary(summary)and immediately invokescreateNewVersion(), which still reads the previouschangeSummaryvalue. - Issue #29 explicitly requires anomalous historical durations over 1 hour to display as
-orStalled. This PR corrects newly finalized async runs, but it does not cap existing stale/stuckdurationMsvalues in the Runs list or Run Detail, so the original reported66345s/68535srecords can still render raw.
I would treat these as blockers before merge.
| onCompiled={load} | ||
| onError={(msg) => setError(msg || null)} | ||
| canClone={canClone} | ||
| onCreateNewVersion={async (summary) => { |
There was a problem hiding this comment.
This still reads the old changeSummary state. setChangeSummary(summary) is asynchronous, so createNewVersion() immediately sees the previous state value, which is usually empty for the CQL-tab modal and triggers the required-summary error. Please pass the summary directly into the clone function, or make the API call here with the summary argument instead of going through state.
…ions-6-8 # Conflicts: # frontend/app/(dashboard)/cases/page.tsx
|
Addressed the PR #44 review blockers and pushed them in fb9e0aa.\n\n- CQL New Version now passes the modal summary directly into the clone request and only closes the dialog after a successful create.\n- Runs list and Run Detail now render anomalous durationMs values over 1 hour as '-' for completed/non-running rows or 'Stalled' for running rows.\n- The Cases search URL-sync feedback is covered by the merged main-branch guarded URL/state sync implementation.\n- Merged origin/main into the PR branch, resolving the merge conflict.\n\nVerification run locally:\n- frontend: corepack pnpm lint (0 errors, existing next-font anonymous default export warning)\n- frontend: corepack pnpm test (40 passed)\n- frontend: corepack pnpm build (passed)\n- backend focused: .\gradlew.bat test --tests com.workwell.export.* --tests com.workwell.web.RunControllerTest (BUILD SUCCESSFUL)\n\nGitHub currently reports Frontend, Vercel, and Vercel Preview Comments passing; Backend CI jobs are still in progress. |
…seeds The sections-6-8 PR rewrote ValueSetGovernanceService.ensureDemoValueSets() so seeded demo value-set names match the CQL `valueset "..."` declarations (required for findUnattachedReferences to detect real gaps instead of flagging the seed itself). The new ensureValueSet() helper UPDATEs the same UUIDs that V013__value_set_governance.sql inserted, overwriting: Audiogram Procedure Codes -> Audiogram Procedures TB Screening Procedure Codes -> TB Screening Procedures HAZWOPER Medical Clearance Codes -> HAZWOPER Surveillance Exams Influenza Vaccine Immunization Codes -> Influenza Vaccines ValueSetGovernanceIntegrationTest.resolveCheckWithSeededDemoValueSetsLinked still asserted the V013 name, so the run-time seed-overwrite broke the anyMatch assertion. MeasureControllerTest mocks used the same old names as fixtures; mocks were self-consistent so they passed, but kept stale truth. This commit aligns both with the post-PR seed names. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Fixes for UAT Sections 6 (Run History), 7 (Studio/CQL), and 8 (Admin panel) from GitHub issue #29.
Changes
Backend
RunPersistenceService.java
BackendApplication.java
ValueSetGovernanceService.java
esolveCheck finds matching codes.
Frontend
CqlTab.tsx
studio/[id]/page.tsx
�dmin/page.tsx
Verification
Issue
Closes #29 (UAT Sections 6-8)