Rebuild company overview analysis page

This commit is contained in:
2026-03-12 20:39:30 -04:00
parent b9a1d8ba40
commit ba385586bc
29 changed files with 2040 additions and 888 deletions

View File

@@ -485,6 +485,14 @@ if (process.env.RUN_TASK_WORKFLOW_E2E === '1') {
latestFilingSummary: { accessionNumber: string; summary: string | null } | null;
keyMetrics: { revenue: number | null; netMargin: number | null };
position: { company_name: string | null } | null;
companyProfile: { source: string; description: string | null };
valuationSnapshot: { source: string; marketCap: number | null; evToRevenue: number | null };
bullBear: { source: string; bull: string[]; bear: string[] };
recentDevelopments: {
status: string;
items: Array<{ kind: string; accessionNumber: string | null }>;
weeklySnapshot: { source: string; itemCount: number } | null;
};
};
}).analysis;
@@ -499,6 +507,12 @@ if (process.env.RUN_TASK_WORKFLOW_E2E === '1') {
expect(payload.keyMetrics.revenue).toBe(41000000000);
expect(payload.keyMetrics.netMargin).not.toBeNull();
expect(payload.position?.company_name).toBe('Netflix, Inc.');
expect(['sec_derived', 'unavailable']).toContain(payload.companyProfile.source);
expect(['derived', 'partial', 'unavailable']).toContain(payload.valuationSnapshot.source);
expect(['ai_synthesized', 'memo_fallback', 'unavailable']).toContain(payload.bullBear.source);
expect(['ready', 'partial', 'unavailable']).toContain(payload.recentDevelopments.status);
expect(payload.recentDevelopments.items[0]?.accessionNumber).toBe('0000000000-26-000777');
expect(payload.recentDevelopments.weeklySnapshot?.itemCount ?? 0).toBeGreaterThanOrEqual(1);
const updatedEntry = await jsonRequest('PATCH', `/api/research/journal/${entryId}`, {
title: 'Thesis refresh v2',