Skip to content

Drop unread fields from the versions reading and other dead code - #6270

Merged
max-sixty merged 1 commit into
mainfrom
nightly/dead-code-after-recent-changes
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/dead-code-after-recent-changes

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Removes code nothing reads, found by the nightly review. No behavior changes.

  • pickerModel in browser/runtime/version.js built five strings and flags per read that no consumer uses: picker.keyTitle, picker.ariaLabel, picker.compared, picker.news, latest.keyTitle, and the currentRevision, pendingBase and baseRevision fields of selection. The last reader of latest.keyTitle went with olderVersion() in Say an older version in the panel field's words, and offer Open latest at its end #6153; the others were already unread. The fields still read (picker.token/offered, latest.failed/error/disabled/label/shown/news, selection.base/on) stay, and the browser type check (pnpm run check:browser) fails on any read of a removed one, so it confirms none remains.
  • licenseNotices in build/browser/shipped.mjs took a suppliedLicenses argument neither caller (build/vendor.mjs, build/browser/build.mjs) has ever passed; a package without a license file still throws.
  • Tests: a stray import pytest at the end of tests/browser/test_render_controls.py; in tests/model/test_shown_answers.py, a .replace that replaced a string with itself, and an option appended after its group's closing tag rather than through section's extra parameter, which nothing used.

Checked: pnpm run test:runtime (1001 pass), pnpm run check:browser, pnpm run check:tools, and tests/model/test_shown_answers.py pass.

- `pickerModel` (version.js) built `picker.keyTitle`, `picker.ariaLabel`,
  `picker.compared`, `picker.news`, `latest.keyTitle` and three `selection`
  fields that nothing reads; the last reader of `latest.keyTitle` went with
  #6153's `olderVersion()`. The browser type check confirms no reader remains.
- `licenseNotices`' `suppliedLicenses` parameter has had no caller passing it
  since it was added.
- A stray `import pytest` at the end of test_render_controls.py, and in
  test_shown_answers.py a no-op `.replace` and an option appended outside its
  group instead of through `section`'s `extra`.
@max-sixty
max-sixty merged commit 965a232 into main Nov 17, 2026
6 checks passed
@max-sixty
max-sixty deleted the nightly/dead-code-after-recent-changes branch November 17, 2026 07:34
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.

2 participants