Skip to content

Commit d83e34d

Browse files
[ci] collapsible sections in ci size report comments (#6118)
## Summary Adjust size reporting scripts to aggregate baseline/current metrics, render collapsible GitHub-friendly tables using `<details>`, and expanded bundle categorisation heuristics ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6118-ci-collapsible-sections-in-ci-size-report-comments-2906d73d365081d0b302c09fa1b98ccb) by [Unito](https://www.unito.io)
1 parent c6b528b commit d83e34d

File tree

2 files changed

+537
-102
lines changed

2 files changed

+537
-102
lines changed

scripts/bundle-categories.js

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,81 @@
1818
export const BUNDLE_CATEGORIES = [
1919
{
2020
name: 'App Entry Points',
21-
description: 'Main application bundles',
22-
patterns: [/^index-.*\.js$/],
21+
description: 'Main entry bundles and manifests',
22+
patterns: [/^index-.*\.js$/i, /^manifest-.*\.js$/i],
2323
order: 1
2424
},
2525
{
26-
name: 'Core Views',
27-
description: 'Major application views and screens',
28-
patterns: [/GraphView-.*\.js$/, /UserSelectView-.*\.js$/],
26+
name: 'Graph Workspace',
27+
description: 'Graph editor runtime, canvas, workflow orchestration',
28+
patterns: [
29+
/Graph(View|State)?-.*\.js$/i,
30+
/(Canvas|Workflow|History|NodeGraph|Compositor)-.*\.js$/i
31+
],
2932
order: 2
3033
},
3134
{
32-
name: 'UI Panels',
33-
description: 'Settings and configuration panels',
34-
patterns: [/.*Panel-.*\.js$/],
35+
name: 'Views & Navigation',
36+
description: 'Top-level views, pages, and routed surfaces',
37+
patterns: [/.*(View|Page|Layout|Screen|Route)-.*\.js$/i],
3538
order: 3
3639
},
3740
{
38-
name: 'UI Components',
39-
description: 'Reusable UI components',
40-
patterns: [/Avatar-.*\.js$/, /Badge-.*\.js$/],
41+
name: 'Panels & Settings',
42+
description: 'Configuration panels, inspectors, and settings screens',
43+
patterns: [/.*(Panel|Settings|Config|Preferences|Manager)-.*\.js$/i],
4144
order: 4
4245
},
4346
{
44-
name: 'Services',
45-
description: 'Business logic and services',
46-
patterns: [/.*Service-.*\.js$/, /.*Store-.*\.js$/],
47+
name: 'User & Accounts',
48+
description: 'Authentication, profile, and account management bundles',
49+
patterns: [
50+
/.*((User(Panel|Select|Auth|Account|Profile|Settings|Preferences|Manager|List|Menu|Modal))|Account|Auth|Profile|Login|Signup|Password).*-.+\.js$/i
51+
],
4752
order: 5
4853
},
4954
{
50-
name: 'Utilities',
51-
description: 'Helper functions and utilities',
52-
patterns: [/.*[Uu]til.*\.js$/],
55+
name: 'Editors & Dialogs',
56+
description: 'Modals, dialogs, drawers, and in-app editors',
57+
patterns: [/.*(Modal|Dialog|Drawer|Editor)-.*\.js$/i],
5358
order: 6
5459
},
60+
{
61+
name: 'UI Components',
62+
description: 'Reusable component library chunks',
63+
patterns: [
64+
/.*(Button|Avatar|Badge|Dropdown|Tabs|Table|List|Card|Form|Input|Toggle|Menu|Toolbar|Sidebar)-.*\.js$/i,
65+
/.*\.vue_vue_type_script_setup_true_lang-.*\.js$/i
66+
],
67+
order: 7
68+
},
69+
{
70+
name: 'Data & Services',
71+
description: 'Stores, services, APIs, and repositories',
72+
patterns: [/.*(Service|Store|Api|Repository)-.*\.js$/i],
73+
order: 8
74+
},
75+
{
76+
name: 'Utilities & Hooks',
77+
description: 'Helpers, composables, and utility bundles',
78+
patterns: [
79+
/.*(Util|Utils|Helper|Composable|Hook)-.*\.js$/i,
80+
/use[A-Z].*\.js$/
81+
],
82+
order: 9
83+
},
84+
{
85+
name: 'Vendor & Third-Party',
86+
description: 'External libraries and shared vendor chunks',
87+
patterns: [
88+
/^(chunk|vendor|prime|three|lodash|chart|firebase|yjs|axios|uuid)-.*\.js$/i
89+
],
90+
order: 10
91+
},
5592
{
5693
name: 'Other',
57-
description: 'Uncategorized bundles',
58-
patterns: [/.*/], // Catch-all pattern
94+
description: 'Bundles that do not match a named category',
95+
patterns: [/.*/],
5996
order: 99
6097
}
6198
]

0 commit comments

Comments
 (0)