Let reviewers pull answers from their appraisal of the same study on another outcome - #847
Merged
Merged
Conversation
…r outcome Adds a per-instrument carry-over list, a checklist.copyAnswers mutator that fills only blank sections of a reviewer's own sibling appraisal, and a menu beside the checklist title offering those siblings. Sync schema moves to version 3 for the optional copiedFrom provenance map. Part of #846. Claude-Session: https://claude.ai/code/session_01TAEtViwHmBCJSDSVKkzTD6
Adds a copy popover beside every signalling question, listing the reviewer's answer and comment for that question on their other outcomes with a button to take one. A single-key pull is an explicit act on one field, so unlike a section copy it may replace what is there, and writing a key by hand now clears its copied-from mark. The bulk menu becomes a checkbox list of the study-level sections, each with the reason it cannot copy where one applies. It re-plans against the current ticks, because leaving out a section can block one that relied on it landing alongside, so the count on the button is what will actually land. Part of #846. Claude-Session: https://claude.ai/code/session_016p87n257PNHSzWmRoFLA65
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (22)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A copied answer is the reviewer's answer once they keep it, and the marks said otherwise on the domain header and beside every question. Removing them takes the whole provenance mechanism with it: checklists.copiedFrom, the clearing on a hand-written answer, and the sync schema bump to version 3 that existed only to carry the field. The schema is back to version 2, byte-identical to main's, so the branch no longer migrates anything. Part of #846. Claude-Session: https://claude.ai/code/session_016p87n257PNHSzWmRoFLA65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #846
Problem
RoB 2 and ROBINS-I are appraised per outcome, so a study with three outcomes gets three appraisals from each reviewer against the same instrument on the same paper. Most answers do not vary by outcome: randomisation, deviations from intended interventions, confounding and selection of participants are properties of the trial, not of the outcome measured. Today nothing carries across, so the reviewer re-reads the paper and re-types the same answers and support text once per outcome. That is where self-inconsistency gets in, and it surfaces at reconcile looking like two reviewers disagreeing.
The constraint is that this stays a reviewer aid. Nothing fills in silently, and accepting a copied answer is never the path of least resistance.
Change
Two ways to pull, both explicit, both only from the reviewer's own appraisals of the same study and instrument on a different outcome.
A section copy, from the menu beside the checklist title.
carry-over.tsdeclares which sections are study-level per instrument: RoB 2 preliminary considerations, domains 1 and 2; ROBINS-I planning and confounding, sections C and D, domains 1 to 3. Everything else is per outcome and always starts blank.planAnswerCopydecides what lands, and the menu shows the same plan before the click, so the two cannot disagree. A section only fills where the target is entirely blank, so nothing is overwritten. RoB 2 domain 2 and ROBINS-I domain 1 additionally require the effect of interest to match, since it decides which variant of the domain is being assessed.The menu is a checkbox list: every section, the blocked ones disabled with the reason (
Not answered there,Already answered here,Needs the same effect of interest). It re-plans against the current ticks, because leaving out a section can block one that relied on it landing alongside, so the button's count is what will actually land.A single-question pull, from the copy icon beside each signalling question's response buttons. The popover lists the reviewer's answer and comment for that same question on each other outcome, with a button to take one. It renders on every editable question whenever a sibling exists, so the feature is discoverable from the first checklist a reviewer fills, and it says so when the question is assessed per outcome and the answers are expected to differ. A single-key pull is an explicit act on one field, so unlike a section copy it may replace what is there.
A copied answer is not marked as copied anywhere. It is the reviewer's answer the moment they keep it, and the reviewer chose to take it, so nothing labels it after the fact. No schema change: the sync schema stays at version 2 and this branch migrates nothing.
Notes
checklist.copyAnswerstakes eithersectionsorkeysand validates both against the instrument, rejects a source that is not the reviewer's own on a different outcome of the same study and instrument, and refuses a target that is no longer editable.Verification
pnpm --filter @corates/shared test: 355 passed, including 22 covering the plan and the mutatorpnpm --filter web test: 324 passedpnpm --filter workers test: 129 passedpnpm typecheck,pnpm lint: cleanhttps://claude.ai/code/session_016p87n257PNHSzWmRoFLA65
Summary by CodeRabbit