Repository navigation
Remove code nothing reads and correct references to names that are gone - #5696
Conversation
Dead code: - keyboard/scopes.js: drop `buttonReadings` and its `buttonCommand` reader. #5638 moved command hints and control keys onto `reachingNow`, leaving only tests reading it. The five command-controls asserts that read it go; each test still asserts the button's `aria-disabled` and what its press runs. - framework/application.js: drop the `publishing()` method, which nothing calls. - keyboard/command-reference.js: drop an `aria-label` write that `closeControl` already makes. - validation/source_history.py: drop `PredecessorReading.committed_active`, which nothing reads; the local of that name still picks the predecessor. Stale references: - evals/shared-contribution-actions: the rubric's accepted entry options now match `ENTRY_OPTIONS`. It accepted `className`, which the runtime refuses since #5329, and refused `action` and `voice`, which it accepts. - undo.js: a Resolve offers Undo only when it leaves no thread open (#5630). - traffic.js: `sends` and `acked` also count /api/media uploads. - lf-call-diff.js: rows are placed with `setChildLists`. - margin-layout.js, annotation-theme.css: `seatRows` is `seatRow`. - chrome.css: drop three comments naming `foldOut`, `msgNode` and a rule that no longer follows them. - tests/browser/margin/test_entries.py: inline hosts are built in inline-contributions.js, not `syncInlineOffers`. - notes/feeds/README.md: #4058 is closed; point at notes/threads.md's section. No runtime behavior changes.
|
@leaf-agent The rubric fix still leaves a handwritten copy of
|
The `shared-contribution-actions` rubric spells out the entry options and enum values the runtime accepts, a handwritten copy of `ENTRY_OPTIONS` and the schema's value lists. `CONTRIBUTION_ENTRY_SCHEMA` now also lists the entry options under `options`, and a runtime test fails when the rubric's lists differ from the schema's, so the rubric can't drift again the way its `className` did.
|
Added the consistency test in bd5c2aa. |
This removes four pieces of code nothing reads and corrects comments, a test docstring, a note and an eval rubric that name things since renamed or removed. The one change that affects a result is the
shared-contribution-actionsrubric: it acceptedclassName, an entry option the runtime has refused since #5329, and failed answers that useactionorvoice, whichENTRY_OPTIONSaccepts. It now lists exactly the entry options, and a runtime test (tests/runtime/contribution-entry-schema.test.mjs) fails when the rubric's options, behaviors, tones, ranks or states differ fromCONTRIBUTION_ENTRY_SCHEMA, which now also lists the entry options underoptions. Nothing else changes at runtime.Dead code:
buttonReadings/buttonCommandinkeyboard/scopes.js. The map was still filled on every button reflection, but Previews say only the keys that reach a control and take Escape first wherever they show; the shift watch credits a preview riding its target #5638 moved its two runtime readers (command hints and control keys) ontoreachingNow. Five asserts intests/runtime/command-controls.test.mjsread it. Each of those tests still asserts the button'saria-disabled, and where it presses the button, what the press runs.publishing()on the application inframework/application.js, which has no caller.aria-labelwrite on the command reference's close control.closeControlalready writes that label throughroleElement.PredecessorReading.committed_activeinvalidation/source_history.py, which no reader uses. The local variable of that name still picks the predecessor.Stale references:
undo.jssays a Resolve offers Undo, but since Offer each moment's next press at the panel field's end #5630 a Resolve offers Undo only when it leaves no thread open.traffic.jssayssendsandackedcount only/api/event, but they also count/api/mediauploads.lf-call-diff.jsnamessetChildren; rows are placed withsetChildLists.margin-layout.jsandannotation-theme.cssnameseatRows, which is nowseatRow.chrome.csscomments namefoldOutandmsgNode, which no longer exist, or describe a rule that no longer follows them.tests/browser/margin/test_entries.pydocstring namessyncInlineOffers, which no longer exists.notes/feeds/README.mdlinked the closed Explore independent jobs #4058 as open work. It now points at thenotes/threads.mdsection that issue's closing comment named.Verified locally:
pnpm run test:runtime: 898 pass. The new test fails whenclassNameis put back in the rubric.tsc -p browser/types/tsconfig.json.pnpm run check:browserandpnpm run test:browser.tests/model/test_interact_document.pyandtest_interact_anchors.py: 308 pass.Found by the nightly survey and review of recent commits. Two findings are left out on purpose:
data-lf-go-to-activehas lost its only stylesheet reader (Draw the contents map inside its sidebar track #5637), but ten tests anddev/leaf_dev/states.pyuse it as the signal that the sequence is armed.seatRows. It sits under.claude/, which needs the control-plane owner's approval.