From 0ce01d4c65cde9d475e8253af54b3f1222ed2df1 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Thu, 14 May 2026 17:27:19 -0400 Subject: [PATCH] chore(ui): bump bundle size guard for CodeMirror editor upgrade Total dist/ui gzipped grew from ~1.5MB to ~1.6MB after the CodeEditor switch from react-simple-code-editor + prism-react-renderer to CodeMirror 6. The verify-bundle script preamble notes the cap is a sanity check for accidental large dependencies, not a hard performance target; this is an intentional editor upgrade to restore native selection/copy in the codex config.toml viewer. --- scripts/verify-bundle.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/verify-bundle.js b/scripts/verify-bundle.js index dfd18fc6..0bd34e42 100644 --- a/scripts/verify-bundle.js +++ b/scripts/verify-bundle.js @@ -16,7 +16,10 @@ const path = require('path'); const zlib = require('zlib'); const UI_DIR = path.join(__dirname, '../dist/ui'); -const MAX_SIZE = 1.5 * 1024 * 1024; // 1.5MB - reasonable for full-featured React dashboard +// 1.75MB - bumped from 1.5MB when the code editor moved from +// react-simple-code-editor + prism-react-renderer (~18KB) to CodeMirror 6 +// (~80KB gzipped) to restore native selection/copy in the raw config viewers. +const MAX_SIZE = 1.75 * 1024 * 1024; function getGzipSize(filePath) { const content = fs.readFileSync(filePath);