[PR #5989] [MERGED] fix(ui): prevent Accent Pulse WebKit crashes and idle repaint bursts #7017

Closed
opened 2026-10-23 04:15:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5989
Author: @SpicyMarinara
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5988-iphone-accent-pulse-rendering


📝 Commits (2)

  • 104acd6 test(ui): reproduce idle Accent Pulse rendering work (#5988)
  • 493c63f fix(ui): prevent Accent Pulse WebKit crashes and idle repaint bursts

📊 Changes

4 files changed (+124 additions, -39 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
➕ e2e/accent-pulse.e2e.ts (+80 -0)
📝 packages/client/src/App.tsx (+31 -39)
📝 packages/client/src/styles/globals.css (+12 -0)

📄 Description

Linked issue

Closes #5988. Owner: @SpicyMarinara.

Why this change

Accent Pulse can crash WebKit's content process while opening Settings/Appearance with a solid accent. Three native crash reports from the local production/development repro abort in WebCore::Style::Color::resolvedColor() while applying a nested color-mix() background. The same production path with Pulse off survives. The transition-only mitigation still crashes; resolving the animated color before publishing root tokens fixes the repro.

Pulse also starts hundreds of paint-property transitions while idle, and enabling its Appearance preview resumes Home stars, logo and Professor effects behind the settings panel. This unnecessary rendering work is relevant to the reported iPhone heating.

The supplied iPhone history has one explicit settings refresh and two later page starts without recorded reload requests. It does not prove those restarts have the same native cause or establish a JavaScript memory leak. Its memory/session figures describe the Docker server, not the phone.

What changed

  • Reuse the existing browser color probe to resolve each live accent before changing inherited CSS tokens. Preserve color alpha/gamut and existing cursor normalization.
  • On coarse-pointer screens, retain opacity/transform transitions while Pulse is active and stop repeatedly interpolating paint properties between its existing 500 ms ticks.
  • Keep covered Home effects paused in Appearance independently of the working accent preview. Existing visibility, focus, typing and reduced-motion guards remain in use.
  • Add the runnable mobile browser regression and an Unreleased changelog entry. No dependencies or new settings.

Validation

Passed pnpm check (including localization, formatting, lint, E2E types and production builds).

Passed 25 selected browser cases across desktop Chromium, mobile Chromium and mobile WebKit (8 platform-specific skips):

pnpm smoke:ui e2e/accent-pulse.e2e.ts e2e/core-flows.e2e.ts e2e/client-runtime-diagnostics.e2e.ts --grep 'mobile Accent Pulse|gradient Accent Pulse|modal backdrops|home shell and primary|turning off the custom mouse pointer|support diagnostics persists|preload recovery is marked|Roleplay edit and older-message'

The new regression exercises real idle transition events, solid/gradient accents, dark/light themes, Home pause/resume and reduced-motion changes. It failed before the fix and passes afterward, including the native WebKit crash path.

Production measurements on isolated synthetic data, eight idle seconds in Appearance, gradient Pulse on:

Measurement Before After
WebKit transition events 832 0
Chromium transition events 1,216 0
Chromium main-thread task time 0.877 s 0.392 s
Chromium style recalculations 489 33

Pulse still cycles at 2 Hz. These desktop-hosted browser measurements demonstrate a rendering reduction, not a physical-device temperature result. Five-minute production WebKit idle runs passed in both Appearance and Chat Settings with solid Pulse on: zero crashes, reloads or JavaScript errors; DOM counts stayed exactly 1,722 and 665 respectively; the accent continued cycling. The Chat Name section still expanded and the drawer closed normally afterward.

  • Manually verify temperature and page stability during an extended session on the affected iPhone.
  • Manually verify solid/gradient Pulse and touch interactions with the user's chosen theme.

Docs and release impact

Added an Unreleased fix entry. No new UI copy, documentation changes or version bump.

UI evidence (if applicable)

Production before/after screenshots, measurements and native crash summary. Download the HTML to view its embedded screenshots. No real user data or full native crash reports are included.

The deliberate ceiling is that root accent tokens still update at 2 Hz. Coarse-pointer paint/dimension transitions settle immediately while Pulse is active; opacity and transform motion remain. Physical iPhone heat, battery drain and long-session stability still require on-device confirmation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5989 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/9/2026 **Status:** ✅ Merged **Merged:** 9/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5988-iphone-accent-pulse-rendering` --- ### 📝 Commits (2) - [`104acd6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/104acd64a70df4c31ac9387aae1be0a99c0690d8) test(ui): reproduce idle Accent Pulse rendering work (#5988) - [`493c63f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/493c63f437544b9431b7bbe3e97a9b24af5fe6e6) fix(ui): prevent Accent Pulse WebKit crashes and idle repaint bursts ### 📊 Changes **4 files changed** (+124 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) ➕ `e2e/accent-pulse.e2e.ts` (+80 -0) 📝 `packages/client/src/App.tsx` (+31 -39) 📝 `packages/client/src/styles/globals.css` (+12 -0) </details> ### 📄 Description ## Linked issue Closes #5988. Owner: @SpicyMarinara. ## Why this change Accent Pulse can crash WebKit's content process while opening Settings/Appearance with a solid accent. Three native crash reports from the local production/development repro abort in `WebCore::Style::Color::resolvedColor()` while applying a nested `color-mix()` background. The same production path with Pulse off survives. The transition-only mitigation still crashes; resolving the animated color before publishing root tokens fixes the repro. Pulse also starts hundreds of paint-property transitions while idle, and enabling its Appearance preview resumes Home stars, logo and Professor effects behind the settings panel. This unnecessary rendering work is relevant to the reported iPhone heating. The supplied iPhone history has one explicit settings refresh and two later page starts without recorded reload requests. It does not prove those restarts have the same native cause or establish a JavaScript memory leak. Its memory/session figures describe the Docker server, not the phone. ## What changed - Reuse the existing browser color probe to resolve each live accent before changing inherited CSS tokens. Preserve color alpha/gamut and existing cursor normalization. - On coarse-pointer screens, retain opacity/transform transitions while Pulse is active and stop repeatedly interpolating paint properties between its existing 500 ms ticks. - Keep covered Home effects paused in Appearance independently of the working accent preview. Existing visibility, focus, typing and reduced-motion guards remain in use. - Add the runnable mobile browser regression and an Unreleased changelog entry. No dependencies or new settings. ## Validation Passed `pnpm check` (including localization, formatting, lint, E2E types and production builds). Passed 25 selected browser cases across desktop Chromium, mobile Chromium and mobile WebKit (8 platform-specific skips): ```sh pnpm smoke:ui e2e/accent-pulse.e2e.ts e2e/core-flows.e2e.ts e2e/client-runtime-diagnostics.e2e.ts --grep 'mobile Accent Pulse|gradient Accent Pulse|modal backdrops|home shell and primary|turning off the custom mouse pointer|support diagnostics persists|preload recovery is marked|Roleplay edit and older-message' ``` The new regression exercises real idle transition events, solid/gradient accents, dark/light themes, Home pause/resume and reduced-motion changes. It failed before the fix and passes afterward, including the native WebKit crash path. Production measurements on isolated synthetic data, eight idle seconds in Appearance, gradient Pulse on: | Measurement | Before | After | | --- | ---: | ---: | | WebKit transition events | 832 | 0 | | Chromium transition events | 1,216 | 0 | | Chromium main-thread task time | 0.877 s | 0.392 s | | Chromium style recalculations | 489 | 33 | Pulse still cycles at 2 Hz. These desktop-hosted browser measurements demonstrate a rendering reduction, not a physical-device temperature result. Five-minute production WebKit idle runs passed in both Appearance and Chat Settings with solid Pulse on: zero crashes, reloads or JavaScript errors; DOM counts stayed exactly 1,722 and 665 respectively; the accent continued cycling. The Chat Name section still expanded and the drawer closed normally afterward. - [ ] Manually verify temperature and page stability during an extended session on the affected iPhone. - [ ] Manually verify solid/gradient Pulse and touch interactions with the user's chosen theme. ## Docs and release impact Added an Unreleased fix entry. No new UI copy, documentation changes or version bump. ## UI evidence (if applicable) [Production before/after screenshots, measurements and native crash summary](https://gist.github.com/SpicyMarinara/e0c322015407ec34ecc5f130c240a409). Download the HTML to view its embedded screenshots. No real user data or full native crash reports are included. The deliberate ceiling is that root accent tokens still update at 2 Hz. Coarse-pointer paint/dimension transitions settle immediately while Pulse is active; opacity and transform motion remain. Physical iPhone heat, battery drain and long-session stability still require on-device confirmation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:15:46 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7017
No description provided.