fix(theme): align reference layouts and restore passing contracts

Align homepage and category discovery, modern widgets, admin controls, quotes, and comments with the reference theme. Remove superseded paths and add rendering and behavior coverage. Update stale asset and finance contracts; all 760 Node tests and 139 widget assertions pass.
This commit is contained in:
kate522 committed 2026-10-29 19:16:03 +08:00
1 parent b520d29368
commit 8aa116ec43
63 files changed
+1985 -2304

No files matched your search

@@ -21,7 +21,7 @@ const termMeta = read('src/Core/TermMeta.php');
const filtersHelper = read('inc/helpers/aksrt-archive-filters.php');
const categoryTpl = read('category.php');
const tagTpl = read('tag.php');
const archiveJs = read('assets/js/core/archive.js');
const listJs = read('assets/js/runtime/main.js');
const globalController = read('src/Admin/GlobalController.php');
// 参考主题字段键(顺序即参考主题定义顺序)。
@@ -150,18 +150,16 @@ test('前台链路:覆盖与门禁(参考主题 zib-category.php 语义)',
test('前台链路:维度筛选渲染与查询过滤', () => {
// 渲染:维度 chip 组(全部 chip 参考主题 focus 语义)。
assert.match(filtersHelper, /function aksrt_archive_build_custom_filter_groups\(/);
assert.match(filtersHelper, /data-filter-dim/);
assert.match(filtersHelper, /ajax-replace="true" class="ajax-next/);
assert.match(filtersHelper, /\$keys !== 'all' && !in_array\(\$dim_key, \(array\) \$keys, true\)/);
assert.match(categoryTpl, /aksrt_archive_build_custom_filter_groups\(/);
assert.match(tagTpl, /aksrt_archive_build_custom_filter_groups\(/);
// 查询:_aksrt_cf_{key} meta_query LIKE(主查询 + AJAX 端点)。
assert.match(termMeta, /'_aksrt_cf_' \. \$dim_key/);
assert.match(termMeta, /'compare'\s*=>\s*'LIKE'/);
assert.match(globalController, /'custom_filter'\s*=>\s*\['type' => 'string'/);
assert.match(globalController, /json_decode\(\$custom_raw, true\)/);
assert.match(globalController, /'_aksrt_cf_' \. \$dim_key/);
// JS:维度 chip 状态、请求参数与 URL 同步。
assert.match(archiveJs, /data-filter-dim/);
assert.match(archiveJs, /JSON\.stringify\(state\.custom\)/);
assert.match(archiveJs, /state\.custom\[dimKey\]/);
// Category filtering uses the same HTML AJAX pipeline as the homepage.
assert.doesNotMatch(globalController, /rest_archive_posts|\/archive\/posts/);
assert.match(listJs, /win-ajax-replace/);
assert.match(listJs, /post_ajax/);
assert.match(filtersHelper, /'key'\s*=>\s*'_aksrt_cf_|\$dim_key/);
});