fix(js): release parallel pending state

When data-slhx-policy=parallel runs overlapping requests against one target, release pending UI bookkeeping for each completed request instead of only the last pending handle.

req: convention/006

req: convention/007

req: convention/008
This commit is contained in:
slhx agent
2026-06-01 20:24:43 +02:00
parent e6486c1b35
commit 4295e93da7
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -152,6 +152,17 @@ fn runtime_latest_request_policy_releases_superseded_pending_state() {
assert!(source.contains("if (pending.get(target)?.abort === abort)"));
}
#[test]
fn runtime_parallel_request_policy_releases_each_pending_state() {
// req: convention/006 req: convention/007 req: convention/008
let source = slhx_js::RUNTIME_JS;
assert!(source.contains("else if (policy === \"parallel\") {\n showPending(target, false);\n }"));
assert!(source.contains("const pendingClassStates = new WeakMap()"));
assert!(source.contains("const indicatorStates = new WeakMap()"));
assert!(source.contains("const disabledStates = new WeakMap()"));
}
#[test]
fn runtime_exposes_page_swap_hooks() {
let source = slhx_js::RUNTIME_JS;