Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b0010b6
Chat: `React.lazy`/`React.Suspense` with `secureboot` integration, bu…
velkoff Jan 28, 2026
b765d13
Merge branch 'master' into chat-secureboot-lazy
velkoff Jan 29, 2026
54c9313
Merge branch 'master' into chat-secureboot-lazy
velkoff Feb 5, 2026
491b822
sync `bundle.js`; add guardrail to prevent `bundle.core-ui.js` to be …
velkoff Feb 18, 2026
9c31f30
Merge branch 'master' into chat-secureboot-lazy
velkoff Feb 18, 2026
9f2f7c8
sync `bundle.js`
velkoff Feb 18, 2026
46ef733
Merge branch 'master' into chat-secureboot-lazy
velkoff Feb 26, 2026
5237b77
sync bundle.js
velkoff Feb 26, 2026
fd5b043
Merge branch 'master' into chat-secureboot-lazy
velkoff Mar 11, 2026
4e8a13b
sync `bundle.js`
velkoff Mar 11, 2026
0097c2b
Merge branch 'master' into chat-secureboot-lazy
velkoff Mar 17, 2026
4fff0fb
sync `bundle.js
velkoff Mar 17, 2026
9acea10
Merge branch 'master' into chat-secureboot-lazy
velkoff Apr 6, 2026
cac4afd
Merge branch 'master' into chat-secureboot-lazy
velkoff Apr 9, 2026
eb8f0fd
sync `bundle.js`
velkoff Apr 9, 2026
9ed5319
Merge branch 'master' into chat-secureboot-lazy
velkoff Apr 16, 2026
9d07d40
sync `bundle.js`
velkoff Apr 16, 2026
132d549
Merge branch 'master' into chat-secureboot-lazy
velkoff Apr 23, 2026
933e5cc
sync `bundle.js`
velkoff Apr 23, 2026
29b4b45
Merge branch 'master' into chat-secureboot-lazy
velkoff May 18, 2026
ef463db
Merge branch 'master' into chat-secureboot-lazy
velkoff Jun 2, 2026
16d372f
Merge branch 'master' into chat-secureboot-lazy
velkoff Jun 4, 2026
f31aad3
Merge branch 'master' into chat-secureboot-lazy
velkoff Jun 30, 2026
888cab2
sync `bundle.js`
velkoff Jun 30, 2026
ce559e8
Merge branch 'master' into chat-secureboot-lazy
velkoff Jul 21, 2026
a84ccd4
Merge branch 'master' into chat-secureboot-lazy
velkoff Aug 20, 2026
53f9096
sync `bundle.js`
velkoff Aug 20, 2026
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
1 change: 0 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"env": {
"development": {
"plugins": [
"react-hot-loader/babel",
"@babel/transform-react-display-name",
[
"@babel/plugin-proposal-decorators",
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ karma.conf.js
nacl-fast.js
pdf.worker.js
js/cmsSnapshot.js
js/chat/bundle.js
js/chat/bundle*.js
js/transfers/meths/firefox-extension.js
contrib/Electron/main.js
*.sh
Expand All @@ -30,5 +30,6 @@ js/utils/aws.js
js/chat/emojidata/emojis.json
eslint-local-rules.js
Gruntfile.js
webpack.config.js
sqlite3.js
sqlite3-worker1.js
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
],
"rules": {
"complexity": [2, 28],
"es/no-dynamic-import": "off",
"es/no-optional-chaining": "off",
"local-rules/classes": "off",
"no-negated-condition": "off",
Expand Down
2 changes: 1 addition & 1 deletion .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"maxSize": "340kb",
"format": ["javascript", "jsx"],
"reporters": ["console", "badge"],
"ignore": ["**/node_modules/**", "**/tests/**", "**/vendor/**", "**/**/bundle.js"],
"ignore": ["**/node_modules/**", "**/tests/**", "**/vendor/**", "**/**/bundle.js", "**/bundle.*.js"],
"tokensToSkip": ["comment", "empty", "new_line", "ignore"],
"gitignore": true
}
21 changes: 12 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,23 @@ Development Environment
-----------------------

Since adding React to our toolkit (because of the needs and
requirements added by the MEGAchat), there is a new file
(``js/chat/bundle.js``) to be generated to run the code (it is not
available in the repository).
requirements added by the MEGAchat), there are new files
(``js/chat/bundle.js`` and ``js/chat/bundle.*.js`` chunks) to be
generated to run the code (they are not available in the repository).

This file is generated by ``webpack``, and depending on the
These files are generated by ``webpack``, and depending on the
environment you may run the webclient in development in two different
methods.

A simple script watches for changes in React UI related files,
generates required artifacts automatically (in memory, no files
generated), serves them (via HTTP), and updates the UI with changes
live (including relevant code reloads). This process is very fast,
easy and efficient. You will get this convenience just by running the
following:
generates required artifacts automatically (in memory, with
no files generated) and serves them (via HTTP).

**Note:** Hot Module Replacement (HMR) is intentionally disabled to ensure
the development environment strictly mirrors the production security model
(`secureboot`). You will need to refresh the page to see your changes.

You can run the development server with:

```
scripts/dev_server.sh
Expand Down
27 changes: 27 additions & 0 deletions css/chat-bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,33 @@ body.theme-dark .lhp-container .lhp-filter-tag {
margin-top: 24px;
}

.meetings-error {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
border: 1px solid tomato;
}
.meetings-error--content {
text-align: center;
color: var(--text-color-medium);
}
.meetings-error--content i {
display: block;
margin: 32px auto;
width: 195px;
height: 65px;
}
.meetings-error--content a {
text-decoration: underline;
color: var(--text-color-high);
}
.meetings-error--details {
margin: 58px 0;
font: var(--text-code1);
}

.meetings-call {
position: fixed;
top: 0;
Expand Down
1 change: 1 addition & 0 deletions css/chat-bundle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@use 'meetings/_leftPanel.scss';
@use 'meetings/_inviteParticipantsPanel.scss';
@use 'meetings/_chatOverlay.scss';
@use 'meetings/_errorBoundary.scss';

// The main `Meetings` in-call container
@use 'meetings/_call.scss';
Expand Down
30 changes: 30 additions & 0 deletions css/meetings/_errorBoundary.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.meetings-error {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
border: 1px solid tomato;

&--content {
text-align: center;
color: var(--text-color-medium);

i {
display: block;
margin: 32px auto;
width: 195px;
height: 65px;
}

a {
text-decoration: underline;
color: var(--text-color-high);
}
}

&--details {
margin: 58px 0;
font: var(--text-code1);
}
}
12 changes: 9 additions & 3 deletions js/chat/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
### Generated files used by the MEGA WebClient chat application.


---
bundle.js: The libraries and custom JavaScript/JSX files (specified in webpack.config.js) necessary for MEGA chat.
**bundle.js** / **bundle.*.js**: The libraries and custom JavaScript/JSX files necessary for MEGAchat.

The architecture uses **Lazy Loading** (via React Suspense) to split the application into:
1. `bundle.js`: The lightweight entry point.
2. `bundle.*.js`: Lazy-loaded chunks (e.g., `bundle.call.js`, `bundle.contacts-panel.js`) loaded on-demand.

Lazy chunk loading is intercepted by `megaChunkLoader` to route requests through `secureboot`'s `M.require()`; this
ensures all chunks undergo strict XHR + SHA-256 hash verification before execution.

> NB: This unobfuscated, unminified file is created with Webpack using:
> NB: These unobfuscated, unminified files are created with Webpack using:
>
> ```bash
> npm update && npm install --production && ./scripts/build.sh
Expand Down
Loading