feat(research): isolate candidates and add reviewed paper promotion

This commit is contained in:
Boki 2026-10-24 18:46:55 -04:00
parent 26b97265c6
commit 25b5cbf481
128 changed files with 13038 additions and 1388 deletions

View file

@ -296,6 +296,22 @@ async function ready(value = preview()) {
await flush(() => reply(request('/api/v2/experiments/preview', 'POST'), { preview: value }));
return value;
}
test('same-event candidate toggle then Preview never captures the old builtin strategy', async () => {
await list();
await flush(() => change('Experiment name', 'Candidate draft'));
const checkbox = [...host.querySelectorAll('input[type="checkbox"]')].find(input =>
input.closest('label')?.textContent?.includes('Use an isolated candidate version')
) as HTMLInputElement;
expect(checkbox).toBeDefined();
await flush(() => {
checkbox.click();
button('Preview experiment').click();
});
expect(requests.filter(item => item.path === '/api/v2/experiments/preview')).toHaveLength(0);
expect(button('Preview experiment').disabled).toBe(true);
expect(host.textContent).toContain('Select an immutable candidate');
});
async function showDetail(value?: ExperimentDetail) {
const routes = createElement(
router.Routes,