You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,6 +373,7 @@ TextAgent has undergone significant evolution since its inception. What started
373
373
374
374
| Date | Feature / Update |
375
375
|------|-----------------|
376
+
|**2026-03-09**| ⚡ **Bundle Size Reduction** — lazy-loaded mermaid (~518 KB), deferred Phase 2–5 feature modules (AI, exporters, speech, templates, docgen) via `requestIdleCallback`, removed `manualChunks` Vite config; startup bundle reduced from ~4.6 MB to ~1.6 MB (65% reduction); converters, export, math, and mermaid chunks now load on demand |
376
377
|**2026-03-09**| 🛠️ **Quality & Config Alignment** — fixed copy-button selector mismatch (`copy-md-button` → `copy-markdown-button`); unified preview-theme storage key to `md-viewer-preview-theme`; HTML export now self-contained with all CSS inlined + theme attributes; PDF export reuses shared rendering pipeline (`renderMarkdownToContainer`); aligned license to MIT across `package.json`, `LICENSE`, and `README`; unified changelog path to `changelogs/` in pre-commit hook + GitHub Actions; removed duplicate `public/firestore.rules` and `public/nginx.conf`; repaired desktop `prepare.js` (removed stale `script.js` copy) and updated `desktop-app/README.md`; added ESLint, Prettier, and Playwright with 4 smoke tests (import, export, share, view-mode) |
377
378
|**2026-03-08**| 🐧 **Compile & Run** — `{{Linux:}}` tag now supports `Language:` + `Script:` fields for compiling and executing 25+ languages (C, C++, Rust, Go, Java, Python, TypeScript, Kotlin, Scala, Ruby, Swift, Haskell, Dart, C#, PHP, Lua…) via [Judge0 CE](https://ce.judge0.com); inline output with stdout, stderr, compile errors, execution time & memory stats; 10 new language-specific coding templates |
378
379
|**2026-03-08**| 🐧 **Linux Terminal** — new `{{Linux:}}` tag opens a full Debian Linux terminal ([WebVM](https://webvm.io)) in a new browser window; `Packages:` field for package reminders with visual badges; persistent sessions via IndexedDB; toolbar 🐧 Terminal button; Linux Terminal coding template; fully independent module (`linux-docgen.js`) |
- Lazy-loaded mermaid (~518 KB) in `vendor-globals.js` via async `getMermaid()` getter
4
+
- Made `initMermaid()` async in `app-core.js`, loads mermaid on first use only
5
+
- Made `renderMarkdown()` async in `renderer.js`, lazy-loads mermaid when diagrams are present
6
+
- Deferred Phase 2–5 feature modules (AI, exporters, speech, templates, docgen) via `requestIdleCallback` in `main.js`
7
+
- Removed `manualChunks` from `vite.config.js` so Vite auto-splits lazy imports into separate chunks
8
+
- Startup bundle reduced from ~4.6 MB to ~1.6 MB (65% reduction)
9
+
10
+
---
11
+
12
+
## Summary
13
+
Reduced startup bundle size by 65% (~3 MB) by lazy-loading mermaid, deferring non-critical feature modules via `requestIdleCallback`, and removing the `manualChunks` Vite config that forced lazy-imported libs into the startup bundle.
14
+
15
+
---
16
+
17
+
## 1. Lazy-Load Mermaid
18
+
**Files:**`src/vendor-globals.js`
19
+
**What:** Replaced eager `import mermaid from 'mermaid'` with async `getMermaid()` getter (same pattern as existing export/converter/math getters).
20
+
**Impact:**~518 KB removed from startup bundle; mermaid only loaded when user types a ```mermaid block.
21
+
22
+
## 2. Async Mermaid Initialization
23
+
**Files:**`js/app-core.js`
24
+
**What:** Made `M.initMermaid()` async; removed eager `initMermaid()` call at module load time.
25
+
**Impact:** No startup mermaid initialization; mermaid initialized lazily on first diagram render.
26
+
27
+
## 3. Async Render Pipeline
28
+
**Files:**`js/renderer.js`
29
+
**What:** Made `renderMarkdown()` async; lazy-loads mermaid via `getMermaid()` only when `.mermaid` nodes found.
30
+
**Impact:** Documents without mermaid diagrams never load the mermaid library.
0 commit comments