Skip to content

docs(ui): describe the recent-models store the code actually keeps - #313

Merged
argszero merged 1 commit into
mainfrom
docs/ui-readme-recent-models
Sep 27, 2026
Merged

argszero merged 1 commit into
mainfrom
docs/ui-readme-recent-models

Conversation

@argszero

@argszero argszero commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

ui/README.md's 「市场「最近使用」约定」(v1.20) still described the pre-#255 shape of the
recent-models store: helpers named getRecentIds() / saveRecentIds(), and a stored array of
model ids. #255 (C2138/C2139) renamed those helpers to getRecentKeys() / saveRecentKeys()
and made the stored value the model's identity string (provider/model) — an array index is
not an identity, because it is persisted and then resolved again in a different array
(D.MARKET for a guest session) or in a different catalog order.

Neither dead name exists anywhere in the repository outside that section (two sites, both
ui/README.md), while the same file documents the new contract 220 lines below
(「模型身份:provider/model,不是数组下标(C2138)」) — so the two sections of one document
contradicted each other, and the stale one names two functions a reader cannot find.

Related Issue

None — found while scanning this repository; no issue was filed for it.

Changes

  • ui/README.md: the section now names the helpers and the stored value the code actually uses
    (getRecentKeys / saveRecentKeys / identity strings), states that legacy numeric entries
    are dropped, and adds a one-line C2138(#255)更正 provenance note in the style this file
    already uses for corrected sections, pointing at the existing identity section.
  • No configuration or data-structure change, so config/config.example.toml needs no update.
  • No ui/js/* or ui/index.html change, so no ?v= cache-bust token is bumped.

Tests

The claim itself, measured on the branch tree:

$ git grep -nE "getRecentIds|saveRecentIds" -- .                    # zero hits
$ git grep -c "getRecentKeys\|saveRecentKeys" -- ui/js/app.js       # 3 + 3, the names now cited
$ git grep -n "atp-recent-models" -- ui/js/app.js                   # the storage key, as cited

Checklist

  • Branch name follows the convention (docs/…)
  • Commit message uses Conventional Commits (docs(ui): …)
  • Single responsibility, minimal change (1 file, +4/−3)

`ui/README.md`'s market "recently used" section still documented the v1.20
shape: two helpers named `getRecentIds`/`saveRecentIds`, and a stored array of
model *ids*. #255 (C2138/C2139) renamed those helpers to
`getRecentKeys`/`saveRecentKeys` and made the stored value the model's identity
string (`provider/model`), because an array index is not an identity: it is
persisted, then resolved again in a different array (`D.MARKET` for a guest
session) or in a different catalog order.

Neither name exists anywhere else in the repository (two sites, both this
section), while the same file documents the new contract 218 lines below
("模型身份:`provider/model`,不是数组下标(C2138)"), so the two sections
contradicted each other.

No code change: the text is corrected to name what exists.
@argszero

Copy link
Copy Markdown
Owner Author

Self-review (committer, allow_self_merge): the diff is the three stale lines plus one provenance
note, and the claim it makes is measurable on the branch tree — git grep -nE "getRecentIds|saveRecentIds" returns zero hits after the change and returned two before, both in the
section being corrected. Every identifier the section now cites resolves in ui/js/app.js
(getRecentKeys / saveRecentKeys / markRecentUsed / renderRecent), and the cross-reference it
points at (模型身份:provider/model,不是数组下标(C2138)) is in the same file. CI: both jobs pass
(test / fmt / clippy, msrv). No code, no i18n key, no cache-bust token.

LGTM — merging.

@argszero
argszero merged commit 7470346 into main Sep 27, 2026
2 checks passed
@argszero
argszero deleted the docs/ui-readme-recent-models branch September 27, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant