Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/performance-budget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ jobs:
- name: Check console performance budget
id: budget
run: |
# Performance budget: main entry must be < 60 KB gzip
MAX_ENTRY_GZIP_KB=60
# Performance budget: main entry must be < 350 KB gzip
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says the entry must be "< 350 KB", but the budget check fails only when GZIP_KB > MAX_ENTRY_GZIP_KB (so == 350 passes). Either adjust the comment to say "<=" or update the comparison to match the intended strictness. Also consider comparing using the unrounded byte value (or more precision) so rounding to 0.1 KB can’t allow a slightly-over-budget bundle to pass.

Suggested change
# Performance budget: main entry must be < 350 KB gzip
# Performance budget: main entry must be <= 350 KB gzip

Copilot uses AI. Check for mistakes.
# This is a realistic threshold for a full-featured enterprise app
# with React, routing, UI components, and core business logic.
MAX_ENTRY_GZIP_KB=350

DIST_DIR="apps/console/dist/assets"
if [ ! -d "$DIST_DIR" ]; then
Expand Down
10 changes: 10 additions & 0 deletions packages/plugin-aggrid/src/ag-grid.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Type declarations for AG Grid CSS imports
* Allows importing CSS files as modules without TypeScript errors
*/

declare module 'ag-grid-community/styles/ag-grid.css';
declare module 'ag-grid-community/styles/ag-theme-quartz.css';
declare module 'ag-grid-community/styles/ag-theme-alpine.css';
declare module 'ag-grid-community/styles/ag-theme-balham.css';
declare module 'ag-grid-community/styles/ag-theme-material.css';
3 changes: 3 additions & 0 deletions packages/plugin-report/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import dts from 'vite-plugin-dts';
import { resolve } from 'path';

export default defineConfig({
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
},
Comment on lines +7 to +9
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This define replacement hardcodes process.env.NODE_ENV into the built output. In this package, ReportRenderer uses process.env.NODE_ENV === 'test' to switch to a simpler table in JSDOM; after hardcoding, consumers running tests against the built artifact won’t be able to trigger that test-only path unless they rebuild with NODE_ENV=test. Consider moving that toggle to a runtime-detectable signal (or an explicit schema/prop flag) and/or switching the code to Vite-native env flags so test/dev behavior remains correct for downstream consumers.

Suggested change
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
},

Copilot uses AI. Check for mistakes.
plugins: [
react(),
dts({
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-view/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import dts from 'vite-plugin-dts';
import { resolve } from 'path';

export default defineConfig({
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
},
Comment on lines +7 to +9
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defining process.env.NODE_ENV here bakes the environment into the emitted library bundle at build time. That means any runtime branching on process.env.NODE_ENV in the plugin will reflect the build environment (often defaulting to 'production' in CI) rather than the consumer’s runtime mode. If you need consumer-runtime dev/test behavior, prefer migrating source checks to Vite-native flags (e.g. import.meta.env.DEV/MODE or a schema/prop flag) and drop the process.* dependency instead of hardcoding it during the library build.

Suggested change
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
},

Copilot uses AI. Check for mistakes.
plugins: [
react(),
dts({
Expand Down
Loading