docs(ui): name only the bump sites, test and hint the code still has - #315
Merged
Merged
Conversation
Three sentences in ui/README.md named something a reader cannot find. Each is corrected in place, with the change that invalidated it named (the idiom the file already uses for its endpoint-card and login-page sections). 1. bump() wiring. The line claimed 4 balance-change sites including "raise-request approval" and an "isMe" guard. The code has 3 sites (4 bump() calls: two for the wallet top-up, one for the operator crediting themselves, one for the chat deduction). The approval site lived in the local mock branch that mutated D.USER.balance in place; 89963f3 (#94, zero-mock) deleted that branch and approveRaise() now only reloads the list, so the bump went with it. The same refactor inlined the self-top-up guard to `u.email === D.USER.email`. 2. The login "remember me" bullet still said a `demo-hint` element showed the demo account. 35291b3 (#90, v0.6.0 demo-seed removal) deleted that element; the class rule in ui/css/style.css is now orphaned and the `login.demo` pack key already sits in the unreachable sunset list. 3. The C2113 section cited `transactions_model_and_key_filters_match_the_displayed_placeholder`. No such test ever existed: dfa7318 (#231) added the README line and a test named `tx_model_and_key_filters_match_the_displayed_placeholder` in the same commit. The name now matches the file it cites. The corrections describe what was removed rather than re-printing the removed identifiers, so a grep for a stale name still lands nowhere (this is how the C2138 correction above already reads; the login-page section is the deliberate exception -- there the deleted selectors are the section's own subject). Docs only: no production code, no i18n key, no cache-bust token. The orphaned .demo-hint rule is left alone on purpose (removing CSS is a separate, cache-busting change). cargo test 413/0, fmt/clippy clean.
Owner
Author
|
✅ Self-review (Committer; Docs-only change,
Merging. |
7 tasks done
argszero
added a commit
that referenced
this pull request
Sep 28, 2026
`ui/README.md`'s "设置 / 管理 / 运营布局约定(v1.22)" section still calls the operator overview's key card "上游 key 健康" and lists its three pills as "健康 / N 个异常 / 全部失败". That was true when `7d9b56e` (PR #174) wrote the line; C2158 (#269, `e5ee178`) then renamed the card and rewrote the pills, because the data has no health signal at all — `/api/ops/runtime` only returns `total` / `on` / `off`. #269 updated only the section it added itself further down this same file (`:1080`, which says the opposite), leaving this line behind, and its edit sheet (4 files / 7 edits) never listed it. Correct the wording to what the code ships: the title is `ops.keys.title` ("上游 key 状态") and the pills are `ops.keys.allOn` / `someOff` / `allOff` ("全部启用 / N 个停用 / 全部停用"). No gate: this is prose restating an implementation name, and the repo's standing decision for that axis is to fix the data, not to guard the prose (see PRs #309, #310, #312–#315). Verified on the branch tree: `cargo test` 417 passed / 0 failed (unchanged baseline), `cargo fmt --check` and `cargo clippy --all-targets -D warnings` both clean. The other claims on the same line were re-checked and are still true (`version` ← `env!("CARGO_PKG_VERSION")`, the five `uptime_*` fields, `split_uptime`, `fmtUptime`'s top-two-nonzero units, `ops.uptime.*`, `today_hours` zero-filled 0–23). The one remaining occurrence of the old wording (`:1084`) is the C2158 section quoting it as history and is left untouched.
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three sentences in
ui/README.mdnamed something a reader cannot find. Each is corrected in place, naming the change that invalidated it — the idiom this file already uses for its endpoint-card and login-page sections.1. The
bump()wiring (## 动效与系统偏好约定)The line claimed 4 balance-change sites — wallet top-up, chat deduction, raise-request approval, and the operator crediting themselves via an
isMeguard.The code has 3 sites / 4
bump()calls (ui/js/app.js):bump($("#side-balance"))+bump($("#wallet-balance"))(:1360,:1361)u.email === D.USER.emailguard (:3102,:3107):3304The approval site lived in the local mock branch that mutated
D.USER.balancein place and replayed it intoD.TRANSACTIONS.89963f3(#94, zero-mock, v1.22) deleted that branch —approveRaise()now POSTs and reloads the list — so the bump went with it, and theisMeguard became the inline comparison above.Not restored: whether the approver's own balance should bump again is a product decision, not a documentation fix; the doc now describes what the code does.
2. The login "remember me" bullet (
## 登录页约定)It still said a
demo-hintelement showed the demo account.35291b3(#90, v0.6.0 demo-seed removal) deleted that element. Today the class rule inui/css/style.css:734is orphaned (no element carries the class) and thelogin.demopack key already sits in the unreachable sunset list (src/i18n_pack.rs).3. The C2113 section (
## 交易表「模型」/「Key」列)It cited
transactions_model_and_key_filters_match_the_displayed_placeholder(`src/routes/wallet.rs`). No such test ever existed —dfa7318(#231) added the README line and, in the same commit, the testtx_model_and_key_filters_match_the_displayed_placeholder(src/routes/wallet.rs:1644). The name now matches the file it cites.A note on how the corrections read
They describe what was removed instead of re-printing the removed identifiers, so a grep for a stale name still lands nowhere — the same way the C2138 correction above already reads. The login-page section keeps naming its deleted selectors on purpose: there they are the section's own subject.
Tests
cargo test— 413 passed, 0 failedcargo fmt --check— cleancargo clippy --all-targets -- -D warnings— cleanDocs only: no production code, no i18n key, no cache-bust token.
Deliberately not in this PR
The orphaned
.demo-hintrule inui/css/style.cssis real dead CSS, but deleting it is a code change (and needs astyle.css?v=bump), so it belongs in its own PR rather than riding along with a documentation fix.