ci(lighthouse): raise script-count budget to 220, align warn to 210 (#8740)

* fix(work-context): use project icon for header title icon

The header title icon read the active work context's icon, but
selectActiveWorkContext forced icon: null for projects (a leftover
from when projects had no icon field). Pass the project's own icon
through so the header matches the side nav.

* ci(lighthouse): raise script-count budget 200->220, align warn to 210

The Lighthouse `resource-summary.script.count` budget in budget.json was
an exact hard cap of 200 that the app has crept up against as it grows
(master passed at <=200; a recent build hit 201 and failed CI on an
unrelated PR). Bump the hard budget to 220 to restore headroom.

The parallel warn threshold in .lighthouserc.json was 170 - already
exceeded by ~30, so it fired on every run as permanent, meaningless
noise. Raise it to 210 so it sits just below the 220 hard cap and again
functions as an early warning before the budget is breached.
This commit is contained in:
Johannes Millan 2026-07-03 18:13:23 +02:00 committed by GitHub
parent 421dc353e8
commit 25d7d6a379
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 3 deletions

View file

@ -219,6 +219,49 @@ describe('workContext selectors', () => {
expect(result.taskIds).toEqual(['active']);
});
it('should pass through the project icon (regression: header title icon)', () => {
const project = {
id: 'p1',
title: 'P1',
icon: 'rocket',
taskIds: [],
backlogTaskIds: [],
theme: { primary: '#fff' },
} as any;
const result = selectActiveWorkContext.projector(
{ activeId: 'p1', activeType: WorkContextType.PROJECT } as any,
fakeEntityStateFromArray([project]),
fakeEntityStateFromArray([TODAY_TAG]),
(fakeEntityStateFromArray([]) as any).entities,
[],
todayStr,
0,
);
expect(result.icon).toBe('rocket');
});
it('should default project icon to null when unset', () => {
const project = {
id: 'p1',
title: 'P1',
taskIds: [],
backlogTaskIds: [],
theme: { primary: '#fff' },
} as any;
const result = selectActiveWorkContext.projector(
{ activeId: 'p1', activeType: WorkContextType.PROJECT } as any,
fakeEntityStateFromArray([project]),
fakeEntityStateFromArray([TODAY_TAG]),
(fakeEntityStateFromArray([]) as any).entities,
[],
todayStr,
0,
);
expect(result.icon).toBeNull();
});
});
describe('selectTrackableTasksForActiveContext', () => {
it('should select tasks for project', () => {

View file

@ -208,7 +208,10 @@ export const selectActiveWorkContext = createSelector(
}
return {
...project,
icon: null,
// Keep the project's own icon so consumers (e.g. the header title icon)
// match the side nav; fall back to null when unset. `...project` already
// carries `icon`, but stay explicit since this used to force null.
icon: project.icon ?? null,
taskIds: project.taskIds || [],
isEnableBacklog: project.isEnableBacklog,
backlogTaskIds: project.backlogTaskIds || [],

View file

@ -21,7 +21,7 @@
"cumulative-layout-shift": ["warn", { "maxNumericValue": 0.1 }],
"total-blocking-time": ["warn", { "maxNumericValue": 300 }],
"interactive": ["warn", { "maxNumericValue": 5000 }],
"resource-summary.script.count": ["warn", { "maxNumericValue": 170 }],
"resource-summary.script.count": ["warn", { "maxNumericValue": 210 }],
"resource-summary.total.count": ["warn", { "maxNumericValue": 300 }],
"resource-summary.font.size": ["warn", { "maxNumericValue": 520000 }]
}

View file

@ -26,7 +26,7 @@
"resourceCounts": [
{
"resourceType": "script",
"budget": 200
"budget": 220
},
{
"resourceType": "stylesheet",