feat(research): retain exact experiment and report citations in findings
This commit is contained in:
parent
46a4f13acd
commit
06039d17ba
36 changed files with 4170 additions and 253 deletions
|
|
@ -0,0 +1,15 @@
|
|||
export function RegimeEvidenceUnavailable() {
|
||||
return (
|
||||
<section aria-label="Regime evidence" className="text-sm space-y-1">
|
||||
<h2 className="font-semibold">Regime evidence unavailable</h2>
|
||||
<p>
|
||||
No versioned as-of regime annotations were retained for these results. Regime sample counts,
|
||||
unclassified samples and window coverage are unavailable.
|
||||
</p>
|
||||
<p>
|
||||
Strategy names, parameters and current market classifications do not establish historical
|
||||
regime evidence.
|
||||
</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
import { useState } from 'react';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import type { FindingDraftSource } from '@/features/research/components/findingSources';
|
||||
import { SaveSourceFindingDialog } from '@/features/research/components/SaveFindingDialog';
|
||||
|
||||
export function SourceFindingAction({
|
||||
source,
|
||||
unavailable,
|
||||
disabled,
|
||||
onDirtyChange,
|
||||
}: {
|
||||
source: FindingDraftSource | null;
|
||||
unavailable: string;
|
||||
disabled?: boolean;
|
||||
onDirtyChange: (dirty: boolean) => void;
|
||||
}) {
|
||||
const [snapshot, setSnapshot] = useState<FindingDraftSource | null>(null);
|
||||
const eligible = source?.runs.some(run => run.metrics.length);
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
disabled={disabled || !eligible}
|
||||
onClick={() => {
|
||||
if (source && eligible) {
|
||||
setSnapshot(structuredClone(source));
|
||||
}
|
||||
}}
|
||||
>
|
||||
Save research finding
|
||||
</Button>
|
||||
{!eligible && (
|
||||
<p className="text-sm">
|
||||
{source
|
||||
? 'No completed, comparable measurements are available to cite yet.'
|
||||
: unavailable}
|
||||
</p>
|
||||
)}
|
||||
{snapshot && (
|
||||
<SaveSourceFindingDialog
|
||||
source={snapshot}
|
||||
onClose={() => setSnapshot(null)}
|
||||
onDirtyChange={onDirtyChange}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue