Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fb74b82
fix(screening): menus open within their field and their dialog, and a…
sickerine Nov 28, 2026
e86031c
fix(screening): settled papers hold through every change of who revie…
sickerine Nov 28, 2026
da38e9c
fix(screening): an answer joins a cast vote as it stands, and files s…
sickerine Nov 28, 2026
14875b4
fix(screening): a draft let go of is never taken up by Start while it…
sickerine Nov 28, 2026
5bcbac2
fix(screening): titles that differ by a mark of their script are neve…
sickerine Nov 28, 2026
a2d9a00
fix(screening): a Zotero step's papers go in together, with where the…
sickerine Nov 28, 2026
0f2f49b
fix(screening): only the reading going on now can fail a source
sickerine Nov 28, 2026
346d652
fix(screening): a check's new papers are counted exactly, and Answers…
sickerine Nov 28, 2026
08ae271
fix(sharing): Activity and the whole record say when an item stops be…
sickerine Nov 28, 2026
b31f1ae
fix(screening): a settled paper's reason stays in its column, whole i…
sickerine Nov 28, 2026
c9428d2
fix(screening): a model's price a paper is what it has spent a paper,…
sickerine Nov 28, 2026
61091bd
fix(screening): a Settings save is checked before any invitation goes…
sickerine Nov 28, 2026
f0d07ed
fix(screening): what the cross-family review of round 3 found
sickerine Nov 28, 2026
17afe8e
fix(screening): People's Add a model list is as wide as the dialog it…
sickerine Nov 28, 2026
2f661b0
fix(screening): a settled paper's note gives way before its reason
sickerine Nov 28, 2026
30f6481
fix(screening): someone who reviewed a screening before can be invite…
sickerine Nov 28, 2026
9da211f
fix(screening): invitations to people who reviewed a screening before…
sickerine Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/command-center/command-center-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function CommandCenterFilters<TSort extends string>({
{sortOptions.map((option) => <span key={option.value} aria-hidden className="invisible whitespace-nowrap [grid-area:1/1]">{option.label}</span>)}
</span>
</SelectTrigger>
<SelectContent>
{/* Under its field and as wide as it, as every field's list opens. */}
<SelectContent position="popper" className="w-(--radix-select-trigger-width) min-w-0">
{sortOptions.map((option) => (
<SelectItem key={option.value} value={option.value}>
{option.label}
Expand Down
5 changes: 4 additions & 1 deletion components/models/model-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export function ModelPicker({
tasks = [],
exclude,
price,
width = "w-[38rem]",
}: {
current: Current | undefined;
/** The picked model, and its effort when the picker asked for one. */
Expand All @@ -259,6 +260,8 @@ export function ModelPicker({
tasks?: AiTask[];
/** Slugs to leave out, such as models already added. */
exclude?: string[];
/** How wide the list opens: narrower inside a dialog than its own width, so it never runs past the dialog's edge. */
width?: string;
/** The cost column in the place's own unit, where it charges in one. */
price?: PickerPrice;
}) {
Expand Down Expand Up @@ -362,7 +365,7 @@ export function ModelPicker({
<PopoverContent
align={align}
side={side}
className="@container/picker relative flex w-[38rem] max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-2xl p-0"
className={cn("@container/picker relative flex max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-2xl p-0", width)}
data-model-picker
ref={panel}
// Escape in the effort step goes back to the list instead of closing.
Expand Down
2 changes: 1 addition & 1 deletion components/screening/activity-words.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function changeSays(say: EffectsSay, row: Logged): { what: string; effect
}
}
// A change from before changes carried a code, or one another page made: said by its kind.
const KIND: Record<string, string> = { created: t("activity.started"), renamed: t("activity.renamed", { name: words.quoted(detail) }), edited: detail || t("activity.changedIt"), added: detail ? t("activity.added", { what: detail }) : t("activity.addedPapers"), removed: detail ? t("activity.removed", { what: detail }) : t("activity.removedPapers"), screened: t("activity.screened", { count }), paused: t("activity.paused"), resumed: t("activity.resumed"), retried: t("activity.readAgain"), stopped: t("activity.stopped"), moved: detail ? t("activity.movedFrom", { from: detail }) : t("activity.movedAway"), shared: detail ? t("activity.shared", { who: detail }) : t("activity.sharedSomeone") };
const KIND: Record<string, string> = { created: t("activity.started"), renamed: t("activity.renamed", { name: words.quoted(detail) }), edited: detail || t("activity.changedIt"), added: detail ? t("activity.added", { what: detail }) : t("activity.addedPapers"), removed: detail ? t("activity.removed", { what: detail }) : t("activity.removedPapers"), screened: t("activity.screened", { count }), paused: t("activity.paused"), resumed: t("activity.resumed"), retried: t("activity.readAgain"), stopped: t("activity.stopped"), moved: detail ? t("activity.movedFrom", { from: detail }) : t("activity.movedAway"), shared: detail ? t("activity.shared", { who: detail }) : t("activity.sharedSomeone"), unshared: t("activity.unshared", { who: detail }) };
return { what: KIND[row.happened] ?? (detail || t("activity.changedIt")) };
}

Expand Down
4 changes: 2 additions & 2 deletions components/screening/dialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export function PeopleDialog({ open, onClose, state, onAdd, onRemove, onDemote }
</>
)}
{finished ? null : (
<AddModel taken={models.map((model) => modelKey(model.model!))} pdfs={pdfsOf(screening.sources)} onPick={(model) => onAdd(modelReviewer(model, Date.now()))}>
<AddModel align="end" width="w-lg" taken={models.map((model) => modelKey(model.model!))} pdfs={pdfsOf(screening.sources)} onPick={(model) => onAdd(modelReviewer(model, Date.now()))}>
<Button variant="outline" size="sm" className="ms-auto h-8"><AiIcon />{t("peopleDialog.addModel")}</Button>
</AddModel>
)}
Expand Down Expand Up @@ -285,7 +285,7 @@ export function PeopleDialog({ open, onClose, state, onAdd, onRemove, onDemote }
key: one.id,
avatar: <ReviewerMark reviewer={one} className="size-9" />,
name: one.name,
detail: t("peopleDialog.modelRead", { failed: String(Boolean(one.tally?.failed)), price: perPaper({ words, t: list }, one.model!), done: gotThrough(one.tally), of: theirsOf(one.tally) }),
detail: t("peopleDialog.modelRead", { failed: String(Boolean(one.tally?.failed)), price: perPaper({ words, t: list }, one.model!, one.tally), done: gotThrough(one.tally), of: theirsOf(one.tally) }),
role: { kind: "edit" as const, label: t("peopleDialog.model") },
...(may ? { onRemove: () => onRemove(one) } : {}),
})),
Expand Down
2 changes: 1 addition & 1 deletion components/screening/export-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export function ExportDialog({ open, onClose, state, tab, onTab }: { open: boole
</td>
<td className="px-3 text-xs text-muted-foreground"><span className="block max-w-28 truncate">{row.vote.note ?? t("votes.none")}</span></td>
<td className="px-3"><ResultChip result={row.result} /></td>
<td className="whitespace-nowrap px-3 text-xs text-muted-foreground">{words.ago(row.vote.at)}</td>
<td className="whitespace-nowrap px-3 text-xs text-muted-foreground">{words.ago(row.vote.castAt ?? row.vote.at)}</td>
</tr>
))}
</tbody>
Expand Down
7 changes: 4 additions & 3 deletions components/screening/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const votesCsv = (screening: Screening, papers: Paper[], whose?: string)
return [
paper.id, doiOf(paper) ?? "", paper.title, paper.year ?? "", reviewer.name, kindOf(reviewer), status, vote ? DECISION_LABEL[vote.decision] : "",
vote?.reason ? failedLabel(vote.reason, reasonCriteria(screening)) : "", ...criteria.map((criterion) => vote?.answers[criterion.key] ?? ""), vote?.note ?? "", RESULT_LABEL[settled.result],
settled.resolvedBy ? nameOn(screening, settled.resolvedBy) : "", settled.note ?? "", vote ? iso(vote.at) : "",
settled.resolvedBy ? nameOn(screening, settled.resolvedBy) : "", settled.note ?? "", vote ? iso(vote.castAt ?? vote.at) : "",
];
}),
]);
Expand Down Expand Up @@ -469,7 +469,7 @@ export function methodsOf(out: Taken) {
`Records from ${plural(screening.sources.length, "source", "sources")} (${screening.sources.map((source) => source.name).join("; ")}; n = ${num(found)}) were brought into Openscholar.${unreadNow.length ? ` ${listed(unreadNow.map((source) => source.name))} could not be read when last tried, so ${unreadNow.length === 1 ? "its records are" : "their records are"} not among those counted here.` : ""}${partlyRead.length ? ` ${listed(partlyRead.map((source) => source.name))} could not be read in full when last tried; the records ${partlyRead.length === 1 ? "it gave" : "they gave"} before that are counted, and the rest ${partlyRead.length === 1 ? "is" : "are"} not.` : ""}${bare ? ` ${plural(bare, "record", "records")} with no abstract and no PDF ${bare === 1 ? "was" : "were"} left out.` : ""}${left - bare ? ` ${plural(left - bare, "more", "more")} could not be read or found.` : ""} ${!merged ? "No duplicates were found, and" : `After ${plural(merged, "duplicate was", "duplicates were")} merged,`} ${num(kept)} ${open ? "went into screening" : kept === 1 ? "was screened" : "were screened"}.`,
looks.later && looks.lastAt ? `${[0, screening.sources.length].includes(growing(screening).length) ? "The sources were" : `The ${growing(screening).length} of the ${screening.sources.length} sources that gain records over time (${growing(screening).map((source) => source.name).join("; ")}) were`} searched again ${looks.later === 1 ? "once" : `${looks.later} times`} after screening began, most recently on ${fullDay(looks.lastAt)}; ${looks.added ? `${looks.added} of the records identified came from ${looks.later === 1 ? "that search" : "those searches"}` : "no further records were found"}.${looks.unread ? ` ${looks.unread === looks.later ? (looks.later === 1 ? "That search" : "Each of those searches") : `${looks.unread} of those searches`} could not read every source, so ${looks.unread === 1 ? "it is" : "they are"} incomplete.` : ""}${screening.living && running ? ` A further search is scheduled ${EVERY_LABEL[screening.living.every].toLowerCase()}.` : ""}` : "",
// Said of the records, not of work done: true before the first vote and after the last.
`${partial ? "Records were" : `Each record ${is}`} assessed on ${partial ? "title and abstract" : "its title and abstract"}${screening.criteria.length ? ` against ${plural(screening.criteria.length, "criterion", "criteria")}${((musts) => (musts && models.length ? `, ${musts === screening.criteria.length ? (musts === 1 ? "a must-have" : "all must-haves") : `${musts} of them must-haves`}; an AI model ${running ? "votes" : "voted"} to include a record only where it ${running ? "finds" : "found"} ${musts === 1 ? "that criterion" : "them all"} met` : ""))(screening.criteria.filter((c) => c.must).length)}` : ""}.${filed ? ` ${plural(filed, "record", "records")} with no abstract but a PDF ${filed === 1 ? is : are} assessed on ${filed === 1 ? "its" : "their"} full text instead.` : ""}`,
`${partial ? "Records were" : `Each record ${is}`} assessed on ${partial ? "title and abstract" : "its title and abstract"}${screening.criteria.length ? ` against ${plural(screening.criteria.length, "criterion", "criteria")}${(figures?.changedParts ?? []).includes("criteria") ? " as they were last set" : ""}${((musts) => (musts && models.length ? `, ${musts === screening.criteria.length ? (musts === 1 ? "a must-have" : "all must-haves") : `${musts} of them must-haves`}; an AI model ${running ? "votes" : "voted"} to include a record only where it ${running ? "finds" : "found"} ${musts === 1 ? "that criterion" : "them all"} met` : ""))(screening.criteria.filter((c) => c.must).length)}` : ""}.${filed ? ` ${plural(filed, "record", "records")} with no abstract but a PDF ${filed === 1 ? is : are} assessed on ${filed === 1 ? "its" : "their"} full text instead.` : ""}`,
// Who a record is given to, which is the method. How many of them voted is in the votes themselves: a record can be settled before each has.
readers ? `${readers} ${one(Math.min(each, pool))} assigned to ${short.length ? "the records" : `each record${late.length ? " still open when they joined" : ""}`}${screening.rule.blind !== "after" ? `. Every vote on a record ${running ? "is" : "was"} visible to the reviewers at any time, before they cast their own` : hidesVotes(screening.rule, hidingReaders(screening, out.invited), modelsVoting(screening)) ? `. A reviewer ${running ? "does" : "did"} not see the other ${advised ? "human reviewers' votes" : "votes"} on a record before casting their own${advised ? `, and ${running ? "can" : "could"} see the AI models' votes already cast on it` : ""}` : advised ? `. The reviewer ${running ? "sees" : "saw"} the AI models' votes on a record before casting their own` : ""}.${short.length ? ` ${short.map((person) => `${person.name} was given ${num(person.tally?.dealt ?? 0)} of the ${num(kept)}`).join(", and ")}.` : ""}${late.length ? ` ${listed(late.map((person) => person.name))} joined after screening began and ${late.length === 1 ? "was" : "were"} given only records still open then.` : ""}${offPeople.length ? ` ${listed(offPeople.map((person) => person.name))} ${offPeople.length === 1 ? "was" : "were"} taken off after screening began, and the votes they cast until then were kept.` : ""}` : offPeople.length ? `${listed(offPeople.map((person) => person.name))} ${offPeople.length === 1 ? "was a human reviewer" : "were human reviewers"} until taken off, and the votes cast until then were kept.` : "No human reviewer was assigned to the records.",
everyModel.length ? `${everyModel.length === 1 ? "One AI model" : `${everyModel.length} AI models`} (${everyModel.map((m) => { const effort = m.model ? (m.model.effort ?? effortOf(m.model)) : null; return m.model ? (effort && effort !== "none" ? `${m.model.name}, ${EFFORT_WORDS[effort]} reasoning effort` : m.model.name) : m.name; }).join("; ")}) ${running && !offModels.length ? (models.length === 1 ? "votes" : "vote") : running ? "have voted" : "voted"} on the records${people.length ? (advised ? ` as advice only (the human reviewers ${running ? "decide" : "decided"} each record they ${running ? "are" : "were"} given)` : ` as ${everyModel.length === 1 ? "an additional reviewer" : "additional reviewers"}`) : ""}, giving an answer for every criterion${unread ? `; ${plural(unread, "reading", "readings")} by a model failed, and ${unread === 1 ? "that record" : "those records"} ${one(unread)} ${othersLeft}` : ""}.${offModels.length ? ` ${listed(offModels.map((m) => m.name))} ${offModels.length === 1 ? "was" : "were"} taken off after screening began, and ${offModels.length === 1 ? "its" : "their"} votes cast until then were kept.` : ""}${modelsShort.length ? ` ${modelsShort.join(" ")}` : ""}${failedOffSays}` : failedOff.length ? failedOffSays.trim() : "No AI model took part.",
Expand Down Expand Up @@ -557,7 +557,8 @@ export async function recordOf(convex: ConvexReactClient, workspaceId: Id<"works
reason: vote.reason ?? null,
answers: vote.answers,
note: vote.note ?? null,
voted_at: iso(vote.at),
voted_at: iso(vote.castAt ?? vote.at),
...(vote.castAt ? { answers_changed_at: iso(vote.at) } : {}),
...(reviewer.kind === "model" ? { read: Object.fromEntries(reasonCriteria(screening).flatMap((criterion) => { const [sentence, confidence] = [vote.passages?.[criterion.key], vote.confidences?.[criterion.key]]; return vote.answers[criterion.key] ? [[criterion.key, { passage: sentence === undefined || sentence === null ? null : (sentencesOf(paper.abstract)[sentence] ?? null), confidence: confidence === undefined ? null : Number(confidence.toFixed(2)) }]] : []; })) } : {}),
}] : [])),
// Who was on a paper and cast no vote on it: someone who has yet to, someone the paper was settled without, a model that couldn't read it.
Expand Down
10 changes: 5 additions & 5 deletions components/screening/index-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { searchHistory } from "./address";
import { askedHref, newHref, overviewHref, papersHref, reviewerHref, screenHref } from "./links";
import { draftOf, useKept } from "./drafts";
import { OVERS, ScreeningMenuItems, useScreeningOverlays, type Over } from "./overlays";
import { Faces, FilterMenu, Help, LinkChip, StateChip, votesBy, RESULT_ICON, ResultBar, TabCount, tinted, MODELS_READING, MODELS_SAY, FIGURE_LINK } from "./pieces";
import { Faces, FilterMenu, Help, LinkChip, votesBy, RESULT_ICON, ResultBar, TabCount, tinted, MODELS_READING, MODELS_SAY, FIGURE_LINK } from "./pieces";
import { toReviewers, useOpenScreening, type Summary } from "./store";
import { ScrollArea } from "@/components/ui/scroll-area";
import { useWords } from "./words";
Expand Down Expand Up @@ -271,8 +271,8 @@ export function ScreeningsIndex() {
at: (chunks) => <span className="whitespace-nowrap">{chunks}</span>,
})}
{elsewhere ? <span className="flex min-w-0"><WorkspaceTag size="sm" workspace={{ kind: row.workspace.kind, name: row.workspace.name, imageUrl: row.workspace.imageUrl, colour: row.workspace.colour, workspaceId: row.workspace.id }} /></span> : null}
{/* Found by a search or under All, a finished one says so on its card, as the Show filter would. */}
{row.finishedAt ? <Chip icon={CircleCheck} className="h-5 px-1.5">{t("show.finished")}</Chip> : row.living ? <Chip icon={RefreshCw} className="h-5 px-1.5">{words.living(row.living.every)}</Chip> : null}
{/* Found by a search or under All, a finished one says so on its card, as the Show filter would: under Finished every one is. */}
{row.finishedAt ? (show !== "finished" ? <Chip icon={CircleCheck} className="h-5 px-1.5">{t("show.finished")}</Chip> : null) : row.living ? <Chip icon={RefreshCw} className="h-5 px-1.5">{words.living(row.living.every)}</Chip> : null}
{/* A member who isn't one of its reviewers can still change it: only someone it was shared with is a viewer. */}
{!row.isReviewer ? <Chip icon={Eye} className="h-5 px-1.5">{words.looker(row.member)}</Chip> : null}
</span>
Expand Down Expand Up @@ -303,8 +303,8 @@ export function ScreeningsIndex() {
: models ? <LinkChip href={overviewHref(id)} tone={MODELS_SAY[models].stop ? "warning" : undefined} icon={MODELS_SAY[models].icon} className="relative shrink-0">{tp(`modelsSay.${models}.says`)}</LinkChip>
: null}
{/* Where its papers stand shows where nothing waits for you. */}
{forYou || conflicts ? null
: row.finishedAt ? (stands.include ? <LinkChip href={papersHref(id, { result: "include" })} tone="success" icon={CircleCheck} className="relative shrink-0">{t("finishedIncluded", { included: words.num(stands.include) })}</LinkChip> : <StateChip tone="success" icon={CircleCheck} className="relative shrink-0">{t("finishedIncluded", { included: words.num(0) })}</StateChip>)
{/* A finished one's papers are said once, under its bar. */}
{forYou || conflicts || row.finishedAt ? null
: models ? null
: stands.waiting ? <LinkChip href={papersHref(id, { result: "waiting" })} icon={Hourglass} className="relative shrink-0">{t("waitingForVotes", { count: words.num(stands.waiting) })}</LinkChip>
: stands.conflict ? <LinkChip href={papersHref(id, { result: "conflict" })} tone="info" icon={GitCompare} className="relative shrink-0">{t("inConflictFor", { count: words.num(stands.conflict), who: resolver })}</LinkChip>
Expand Down
2 changes: 1 addition & 1 deletion components/screening/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ function Facts({ open }: { open: Open }) {
className="flex flex-col"
title={t("credits.title")}
help={
<Help title={t("credits.helpTitle")} facts={models.length ? models.map((model) => <HelpFact key={model.id} icon={Coins}>{t("credits.modelCost", { name: model.name, cost: perPaper({ words, t: tl }, model.model!) })}</HelpFact>) : <HelpFact>{t("credits.peopleOnly")}</HelpFact>}>
<Help title={t("credits.helpTitle")} facts={models.length ? models.map((model) => <HelpFact key={model.id} icon={Coins}>{t("credits.modelCost", { name: model.name, cost: perPaper({ words, t: tl }, model.model!, model.tally) })}</HelpFact>) : <HelpFact>{t("credits.peopleOnly")}</HelpFact>}>
<p>{t("credits.free")}</p>
</Help>
}
Expand Down
Loading
Loading