From 7581feb3586e855ef734d6b3642b2d9d0814ec43 Mon Sep 17 00:00:00 2001 From: argszero Date: Thu, 15 Oct 2026 08:31:16 +0800 Subject: [PATCH] docs(ui): drop the ownerless table count from the sortVal comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `sortVal` note in `buildDataTable`'s local sort comparator claimed the default ("sort by `row[key]`") leaves "the other 6 tables" unchanged. The "6" counts nothing real: the sentence never names its universe, and no natural reading gives 6 today -- - the comparator's own scope: `buildDataTable` is called exactly once (`app.js` render of `#tx-table`), so the tables that go through this comparator number 1, not 7; - the app's written tables: `ui/index.html` carries 7 static `` tables and `table_gate.rs`'s `TABLES` lists exactly those 7; `#tx-table` is a `.table-wrap` div (`NON_TBODY_LIVE_CONTAINERS`), so it is not among them, leaving 7 here too (8 with the raise-request table; the prototype has 8). Provenance is born-wrong rather than drift: `git log -S` returns a single commit, `f6eed10` (#196), whose message itself says "unchanged for the other six tables" -- so the number was written this way and never matched a carrier. The direction is the standing one for this family: the count has no owner, so delete it instead of refreshing it (any refreshed number installs the next stale sentence). `缺省仍是 row[key]。` already states the invariant in full; the parenthetical only added false precision. No behaviour change: comments and one cache-buster only. The app.js cache-buster moves so the comment reaches a browser that already cached the file. cargo test 557/0; cargo fmt --check rc=0; cargo clippy --all-targets -- -D warnings rc=0. --- ui/index.html | 2 +- ui/js/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/index.html b/ui/index.html index 736cc18..54211ac 100644 --- a/ui/index.html +++ b/ui/index.html @@ -865,6 +865,6 @@

使用模型

- + diff --git a/ui/js/app.js b/ui/js/app.js index 29be0da..fa1c40b 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -2346,7 +2346,7 @@ for (const sk of state.sort) { const col = columns.find((c) => c.key === sk.key); // C2054:列的**渲染值**可能与行里存的原始值不同(如 pts 的有符号值)—— - // 列可用 `sortVal` 声明「排序按哪个值」,缺省仍是 row[key](其余 6 张表行为不变)。 + // 列可用 `sortVal` 声明「排序按哪个值」,缺省仍是 row[key]。 const av = col && col.sortVal ? col.sortVal(a) : a[sk.key]; const bv = col && col.sortVal ? col.sortVal(b) : b[sk.key]; let cmp;