mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4453] [MERGED] Fix theme editor live preview lag #6385
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4453
Author: @SpicyMarinara
Created: 8/2/2026
Status: ✅ Merged
Merged: 8/2/2026
Merged by: @SpicyMarinara
Base:
staging← Head:agent/fix-theme-editor-preview-lag📝 Commits (1)
5374008Fix theme editor live preview lag📊 Changes
2 files changed (+83 additions, -14 deletions)
View changed files
📝
e2e/core-flows.e2e.ts(+54 -0)📝
packages/client/src/components/panels/SettingsPanel.tsx(+29 -14)📄 Description
Linked issue
Closes #4452
Why this change
The custom theme editor rewrote its app-level preview stylesheet for every character typed. In the supplied Opera performance recording, each rewrite invalidated styles across 2,754 elements and took roughly 55–71 ms, making dense-theme editing visibly fall behind input. JavaScript and garbage collection were comparatively small, so the root cause was repeated full-document style recalculation rather than a sustained heap leak.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated validation completed:
pnpm checkpnpm exec playwright test e2e/core-flows.e2e.ts --grep 'custom theme live preview batches stylesheet updates while typing'(2 passed: desktop Chromium and mobile Chromium)git diff --checkManual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
The supplied Opera DevTools trace is the performance evidence for the original issue. The regression test observes the live-preview stylesheet directly on desktop and mobile.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.