mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
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:
parent
421dc353e8
commit
25d7d6a379
4 changed files with 49 additions and 3 deletions
|
|
@ -219,6 +219,49 @@ describe('workContext selectors', () => {
|
||||||
|
|
||||||
expect(result.taskIds).toEqual(['active']);
|
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', () => {
|
describe('selectTrackableTasksForActiveContext', () => {
|
||||||
it('should select tasks for project', () => {
|
it('should select tasks for project', () => {
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,10 @@ export const selectActiveWorkContext = createSelector(
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...project,
|
...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 || [],
|
taskIds: project.taskIds || [],
|
||||||
isEnableBacklog: project.isEnableBacklog,
|
isEnableBacklog: project.isEnableBacklog,
|
||||||
backlogTaskIds: project.backlogTaskIds || [],
|
backlogTaskIds: project.backlogTaskIds || [],
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"cumulative-layout-shift": ["warn", { "maxNumericValue": 0.1 }],
|
"cumulative-layout-shift": ["warn", { "maxNumericValue": 0.1 }],
|
||||||
"total-blocking-time": ["warn", { "maxNumericValue": 300 }],
|
"total-blocking-time": ["warn", { "maxNumericValue": 300 }],
|
||||||
"interactive": ["warn", { "maxNumericValue": 5000 }],
|
"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.total.count": ["warn", { "maxNumericValue": 300 }],
|
||||||
"resource-summary.font.size": ["warn", { "maxNumericValue": 520000 }]
|
"resource-summary.font.size": ["warn", { "maxNumericValue": 520000 }]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"resourceCounts": [
|
"resourceCounts": [
|
||||||
{
|
{
|
||||||
"resourceType": "script",
|
"resourceType": "script",
|
||||||
"budget": 200
|
"budget": 220
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceType": "stylesheet",
|
"resourceType": "stylesheet",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue