mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-31 06:04:11 +01:00
feat(evals): link the dated catalog snapshot in report navigation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
5956f59c7b
commit
43af4c4844
3 files changed
+18
No files matched your search
@@ -3082,3 +3082,8 @@ not from retained conversations or private artifacts.
|
||||
The renderer requires a new output directory and makes it private; it does not
|
||||
publish the preview or modify existing campaign files. Normal campaign rendering
|
||||
and retained result cards continue to use the existing bundle command.
|
||||
|
||||
The shared report navigation links the dated, immutable catalog snapshot.
|
||||
Deploying this generator does not rewrite existing published history HTML.
|
||||
Activating the link on an existing page requires a separately reviewed,
|
||||
conditional navigation-only update. The metadata command publishes nothing.
|
||||
@@ -100,6 +100,18 @@ describe("display-only catalog overview", () => {
|
||||
await expect(regenerateCatalogOverview({metadataFile:metadata,outputDirectory:path.join(dir,'big-out')})).rejects.toThrow('bounded');
|
||||
} finally { await rm(dir,{recursive:true,force:true}); }
|
||||
});
|
||||
it("links the dated immutable snapshot from real campaign and metadata navigation", () => {
|
||||
const data=fixture();
|
||||
const ordinary=renderRunnerE2EDashboard({title:"Campaign",generatedAt:data.asOf,expected:[],catalog:[],entries:[]});
|
||||
for (const html of [ordinary,page(data)]) {
|
||||
const dom=new JSDOM(html),link=dom.window.document.querySelector<HTMLAnchorElement>('[data-nav-catalog]')!;
|
||||
expect(link.textContent).toContain('Chat catalog · Oct 29');
|
||||
expect(link.href).toBe('https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/chat-catalog-overview-20261029-175400z/');
|
||||
expect(dom.window.getComputedStyle(link).display).not.toBe('none');
|
||||
expect(dom.window.document.querySelectorAll('[data-nav-catalog]')).toHaveLength(1);
|
||||
dom.window.close();
|
||||
}
|
||||
});
|
||||
it("keeps the normal campaign branch and its missing-result behavior", () => {
|
||||
const normal=renderRunnerE2EDashboard({title:'Existing campaign',generatedAt:'2026-10-29T17:54:00Z',expected:[],catalog:[],entries:[]});
|
||||
expect(normal).toContain('aria-label="Campaign summary"');
|
||||
|
||||
@@ -37,6 +37,7 @@ export function renderReportShell(input: {
|
||||
<a class="brand-lockup report-brand" href="https://pages.paperclip.ing/evals/" aria-label="Paperclip evaluations">${paperclipReportLogo}<small>Evaluations</small></a>
|
||||
<div class="report-sidebar-scroll"><nav class="report-global-nav" aria-label="Evaluations">
|
||||
<a href="${campaign ? "?view=all" : "?view=overview"}" data-nav-view="${campaign ? "all" : "overview"}" aria-current="page"><span aria-hidden="true">◫</span>${campaign ? "All results" : "Overview"}</a>
|
||||
<a href="https://d1p6rlowie26tp.cloudfront.net/runner-e2e/campaigns/chat-catalog-overview-20261029-175400z/" data-nav-catalog><span aria-hidden="true">▦</span>Chat catalog · Oct 29</a>
|
||||
<a href="?view=attention" data-nav-view="attention"><span aria-hidden="true">○</span>Needs attention</a>
|
||||
<a href="${h(root)}?view=history" ${campaign ? "" : 'data-nav-view="history"'}><span aria-hidden="true">↶</span>Campaign history</a>
|
||||
</nav>${!campaign && presets.length ? `<nav class="report-global-nav" aria-label="Run presets"><p class="report-side-label">Run presets</p>${presets.map(preset => `<a href="?view=history&preset=${encodeURIComponent(preset)}" data-index-preset-link="${h(preset)}">${h(preset === "qa-smoke" ? "QA smoke" : preset)}</a>`).join("")}</nav>` : ""}${tree}</div><div class="report-sidebar-footer">E2E tests${campaign ? `<span>${input.catalog!.length} executions</span>` : ""}</div>
|
||||
|
||||
Reference in new issue
Block a user