aboutsummaryrefslogtreecommitdiffstats
path: root/frontend-vanilla/src/regression.test.ts
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-02-18 21:52:21 +0000
committerClaude <noreply@anthropic.com>2026-02-18 21:52:21 +0000
commit1362f00d39e90aef8a8338887222541a5a992178 (patch)
tree11a98c935af0b3da96580425c2ca71ea5686e356 /frontend-vanilla/src/regression.test.ts
parent7776e81b39130c211eb0ec566c6467a28a9fa64c (diff)
downloadneko-1362f00d39e90aef8a8338887222541a5a992178.tar.gz
neko-1362f00d39e90aef8a8338887222541a5a992178.tar.bz2
neko-1362f00d39e90aef8a8338887222541a5a992178.zip
Fix theme performance regressions affecting mobile scroll
The new theme CSS files introduced several patterns that cause scroll jank and memory pressure, especially on mobile: - terminal.css: Full-viewport fixed pseudo-element with repeating gradient scanlines forced GPU compositing on every scroll frame. Now limited to desktop only with will-change layer promotion. - codex.css/sakura.css: text-rendering: optimizeLegibility on body triggered expensive kerning/ligature computation on all text. - codex.css: font-feature-settings forced text shaper on every glyph. - codex.css: hyphens: auto required dictionary lookups during layout. - style.css: transition: all on buttons and sidebar links caused unnecessary animation work during scroll hover state changes. - main.ts: checkReadItems did O(n) individual querySelector calls per scroll tick; switched to single querySelectorAll batch query. - Polling interval reduced from 1s to 3s (scroll handler already covers the normal case, polling is just a robustness fallback). https://claude.ai/code/session_0187FXrbScDSWfbNEk9SfJaj
Diffstat (limited to 'frontend-vanilla/src/regression.test.ts')
-rw-r--r--frontend-vanilla/src/regression.test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend-vanilla/src/regression.test.ts b/frontend-vanilla/src/regression.test.ts
index 972b221..7f72ed5 100644
--- a/frontend-vanilla/src/regression.test.ts
+++ b/frontend-vanilla/src/regression.test.ts
@@ -202,8 +202,8 @@ describe('Scroll-to-Read Regression Tests', () => {
// Dispatch scroll on WINDOW, not mainContent
window.dispatchEvent(new Event('scroll'));
- // Wait for potential debounce/poll
- await new Promise(resolve => setTimeout(resolve, 1100));
+ // Wait for potential debounce/poll (3000ms interval + buffer)
+ await new Promise(resolve => setTimeout(resolve, 3100));
// Expect it to handle it
expect(apiFetch).toHaveBeenCalledWith(expect.stringContaining('/api/item/12345'), expect.objectContaining({