fix: preserve lazy navigation intent
This commit is contained in:
parent
8d7511cdbf
commit
5c8683821e
@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- **Lazy-navigation race protection.** A restored-section callback can no longer replace a newer user navigation
|
||||
request while section-specific modules are still loading, including under CPU throttling.
|
||||
- **Constrained workload coverage.** Added a 4× CPU-throttled 500-character browser workload regression that
|
||||
records bounded DOM/audio/heap/image-cache metrics while preserving pagination.
|
||||
- **Bounded library image lifecycle.** Profile, concept-art, and voice-library images now use a viewport-aware
|
||||
|
||||
@ -437,7 +437,14 @@
|
||||
window._enginesSidebarCat = localStorage.getItem('ttsvc_engines_cat') || 'llm';
|
||||
var _startSection = window._navRequestedSection || hashSection() || ((_savedSection && SECTIONS.includes(_savedSection)) ? _savedSection : 's-voices');
|
||||
if (typeof window.ensureFeatureModules === 'function') {
|
||||
window.ensureFeatureModules(_startSection).then(function () { showSection(_startSection); }, function () { showSection(_startSection); });
|
||||
var activateStart = function () {
|
||||
// A first user click can arrive while the restored section's lazy group
|
||||
// is still loading. Do not let that delayed startup callback overwrite
|
||||
// the newer navigation intent (especially visible under CPU throttling).
|
||||
if (window._navRequestedSection && window._navRequestedSection !== _startSection) return;
|
||||
showSection(_startSection);
|
||||
};
|
||||
window.ensureFeatureModules(_startSection).then(activateStart, activateStart);
|
||||
} else showSection(_startSection);
|
||||
|
||||
window.addEventListener('hashchange', function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user