Skip to content

Commit cb170bf

Browse files
chore: address copilot review feedback
- Update web-vitals mock and tests to include FCP/TTFB - Annotate audit reports with post-fix status note
1 parent 7e48b0c commit cb170bf

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

agentic/audits/2026-04-27-all.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
## Summary
1414
The anyplot repository exhibits high technical excellence in its frontend and core AI generation workflows but suffers from critical infrastructure and baseline safety issues. The use of experimental Python 3.14, a major command injection vulnerability in CI/CD, and broken Python syntax in automation scripts significantly compromise production readiness.
1515

16+
**Note:** Several critical and high-severity findings listed below (Python syntax errors, invalid model name, documentation drift, and missing Web Vitals) were addressed in PR #5506.
17+
1618
## Quick Wins (Importance ≥4 & Effort=S)
1719
| # | Finding | Auto-fix | Files | Hint |
1820
|---|---------|----------|-------|------|

agentic/audits/latest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
## Summary
1414
The anyplot repository exhibits high technical excellence in its frontend and core AI generation workflows but suffers from critical infrastructure and baseline safety issues. The use of experimental Python 3.14, a major command injection vulnerability in CI/CD, and broken Python syntax in automation scripts significantly compromise production readiness.
1515

16+
**Note:** Several critical and high-severity findings listed below (Python syntax errors, invalid model name, documentation drift, and missing Web Vitals) were addressed in PR #5506.
17+
1618
## Quick Wins (Importance ≥4 & Effort=S)
1719
| # | Finding | Auto-fix | Files | Hint |
1820
|---|---------|----------|-------|------|

app/src/analytics/reportWebVitals.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ vi.mock('web-vitals', () => ({
88
onLCP: (cb: (m: { value: number; rating: string }) => void) => cb({ value: 2500, rating: 'good' }),
99
onCLS: (cb: (m: { value: number; rating: string }) => void) => cb({ value: 0.15, rating: 'needs-improvement' }),
1010
onINP: (cb: (m: { value: number; rating: string }) => void) => cb({ value: 200, rating: 'good' }),
11+
onFCP: (cb: (m: { value: number; rating: string }) => void) => cb({ value: 1200, rating: 'good' }),
12+
onTTFB: (cb: (m: { value: number; rating: string }) => void) => cb({ value: 400, rating: 'good' }),
1113
}));
1214

1315
describe('reportWebVitals', () => {
@@ -66,6 +68,12 @@ describe('reportWebVitals', () => {
6668
expect(window.plausible).toHaveBeenCalledWith('INP', {
6769
props: { value: '200', rating: 'good' },
6870
});
71+
expect(window.plausible).toHaveBeenCalledWith('FCP', {
72+
props: { value: '1200', rating: 'good' },
73+
});
74+
expect(window.plausible).toHaveBeenCalledWith('TTFB', {
75+
props: { value: '400', rating: 'good' },
76+
});
6977
});
7078

7179
it('merges ambient analytics props (e.g. theme) into CWV events', async () => {
@@ -89,5 +97,11 @@ describe('reportWebVitals', () => {
8997
expect(window.plausible).toHaveBeenCalledWith('INP', {
9098
props: { theme: 'dark', value: '200', rating: 'good' },
9199
});
100+
expect(window.plausible).toHaveBeenCalledWith('FCP', {
101+
props: { theme: 'dark', value: '1200', rating: 'good' },
102+
});
103+
expect(window.plausible).toHaveBeenCalledWith('TTFB', {
104+
props: { theme: 'dark', value: '400', rating: 'good' },
105+
});
92106
});
93107
});

0 commit comments

Comments
 (0)