perf: load the Settings dialog on demand; entry chunk 351.8 → 277.1 kB gzip #420
Merged
jared
merged 2 commits from 2026-10-19 02:56:11 -04:00
perf/lazy-settings into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#420
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #419 (the re-seeded bundle budget): win back the space instead of just raising the limit.
Where the entry chunk's bytes went (source-map attribution of
index-*.jsonlotus):features/settingswas the largest single item at 147 kB minified, but it only renders when the dialog opens.Change
Settingsis loaded on demand (React.lazy). The fallback is a small focusable "Loading settings" spinner, because Settings opens inside a FocusTrap and an empty fallback crashes it ("must have at least one tabbable node"). The chunk is warmed onrequestIdleCallback, so opening Settings rarely waits.SettingsPagesand the status localStorage keys (STATUS_EXPIRY_KEY/STATUS_MSG_KEY) move to tiny modules (features/settings/pages.ts,utils/statusKeys.ts), so the sidebar andClientNonUIFeaturesdon't pull the dialog back in.features/settingsstill exportsSettingsandSettingsPages, so callers don't change.sanitize-html(+ postcss, htmlparser2…) andchroma-jsget their own vendor chunks. With Settings gone, the chunk graph had dropped them into the entry chunk and cancelled most of the gain.Result (gzip):
d7bc6d94)index-*.jsmatrix-sdk)Verified
e2e/security-nudge.spec.ts(4 tests, including Set up → Devices) passes, along with boot check, unit tests, lint and the budget.🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5