feat: lazy load things which are low-risk from main#2386
Conversation
Greptile SummaryThis PR lazy-loads a large number of previously eager modules from
Confidence Score: 5/5Safe to merge — the lazy-loading changes are well-isolated behind dynamic imports, the LSP log migration is comprehensive, and no regressions were identified. All dynamic imports are guarded with proper chunk names. The isfilesRestored session-storage key is set in a finally block, so the save-state guard in onEditorUpdate is reliable. The LSP log migration from console-patching to explicit addLspLog calls covers every [LSP:] console call site in the codebase. The openFolder ordering change (folder.listFiles set before emits) is an improvement. No functional regressions found. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App Start / main.js] --> B[Eager: core layout, settings, editorManager]
A --> C[Eager: cm/lsp/connectionState\nhasConnectedServers]
A --> D[Eager: lib/registerPrettierFormatter\nlightweight shim only]
B --> E{User action}
E -->|Open file browser| F[lazy: pages/fileBrowser\nwebpackChunkName: fileBrowser]
E -->|Open terminal| G[lazy: components/terminal\nwebpackChunkName: terminal]
E -->|Command palette| H[lazy: palettes/commandPalette]
E -->|Settings| I[lazy: settings/mainSettings]
E -->|Welcome tab| J[lazy: pages/welcome\nwebpackChunkName: welcome]
E -->|Format file| K[lazy: lib/prettierFormatter\nfull prettier bundle]
E -->|Run tests| L[lazy: test/tester]
D -->|formatter callback| K
subgraph LSP Logging
M[cm/lsp/logs.ts\nlogsByServer Map\nlisteners Set]
N[clientManager.ts] -->|addLspLog| M
O[serverLauncher.ts] -->|addLspLog| M
P[transport.ts] -->|addLspLog| M
Q[workspace.ts] -->|addLspLogFor| M
R[codeActions.ts] -->|addLspLogFor| M
S[rename.ts] -->|addLspLogFor| M
M -->|onLspLog| T[lspInfoDialog\nlazy UI consumer]
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[App Start / main.js] --> B[Eager: core layout, settings, editorManager]
A --> C[Eager: cm/lsp/connectionState\nhasConnectedServers]
A --> D[Eager: lib/registerPrettierFormatter\nlightweight shim only]
B --> E{User action}
E -->|Open file browser| F[lazy: pages/fileBrowser\nwebpackChunkName: fileBrowser]
E -->|Open terminal| G[lazy: components/terminal\nwebpackChunkName: terminal]
E -->|Command palette| H[lazy: palettes/commandPalette]
E -->|Settings| I[lazy: settings/mainSettings]
E -->|Welcome tab| J[lazy: pages/welcome\nwebpackChunkName: welcome]
E -->|Format file| K[lazy: lib/prettierFormatter\nfull prettier bundle]
E -->|Run tests| L[lazy: test/tester]
D -->|formatter callback| K
subgraph LSP Logging
M[cm/lsp/logs.ts\nlogsByServer Map\nlisteners Set]
N[clientManager.ts] -->|addLspLog| M
O[serverLauncher.ts] -->|addLspLog| M
P[transport.ts] -->|addLspLog| M
Q[workspace.ts] -->|addLspLogFor| M
R[codeActions.ts] -->|addLspLogFor| M
S[rename.ts] -->|addLspLogFor| M
M -->|onLspLog| T[lspInfoDialog\nlazy UI consumer]
end
Reviews (6): Last reviewed commit: "fix: greptile review (#2401)" | Re-trigger Greptile |
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Ajit Kumar <dellevenjack@gmail> Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com>
…n/Acode into lazy-load-things
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Ajit Kumar <dellevenjack@gmail>
No description provided.