Skip to content

Correct comments and docstrings that name a gone watcher, the wrong walk key and a stale kind list - #6972

Merged
leaf-agent merged 1 commit into
mainfrom
fix/stale-comments-survey
Nov 24, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/stale-comments-survey

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

This fixes comments, docstrings and one test assertion that the rolling survey found describing code that no longer exists. No behavior changes.

  • browser/runtime/widget-api.js: the comment over dragging, el, reachedForWords and worksInside called them "the one watcher of the page's readings" and pointed to module-reading.md. None of them watches readings: they are the drag and press helpers module-input.md documents. A package author reading the public API file was sent to the wrong reference. The comment is dropped.
  • src/leaf/history.py: the header listed by hand the kinds kept out of history, and the list had drifted from SHOWN. It left out activation, plan, render, seen and others. It now points at SHOWN.
  • Test docstrings: five said the obligation walk answers d or a (four in tests/browser/widgets/test_obligations.py, one in tests/browser/projection/test_thread_replies.py). The walk is m (queue.walk in browser/runtime/queue-walk.js), and those tests press m. One comment also named commentOnAddressable, which no longer exists.
  • tests/journeys/test_render_diff_controls.py: the test asserted that .lf-diff-wrap, .lf-diff-review and .lf-diff-next were absent. No code has written those classes since Simplify diff controls and preserve compact line comments #2175, so the assertion passed whatever the diff drew (tests/AGENTS.md, "Absences"). It is removed.

Ran pre-commit on the changed files and tests/model -k history (36 passed). The journey test runs in this PR's CI because its file changed.

…alk key and a stale kind list

- `widget-api.js`: the comment over `dragging`, `el`, `reachedForWords`
  and `worksInside` called them "the one watcher of the page's readings".
  None of them watches readings: they are the drag and press helpers
  `module-input.md` documents. Dropped.
- `history.py`'s header listed by hand the kinds kept out of history, and
  the list had drifted from `SHOWN`, which leaves out more. It now points
  at `SHOWN`.
- Five test docstrings said the obligation walk answers `d` or `a`; the
  walk is `m` (`queue-walk.js`, `queue.walk`) and every test presses `m`.
  One named `commentOnAddressable`, which no longer exists.
- `test_render_diff_controls.py` asserted that `.lf-diff-wrap`,
  `.lf-diff-review` and `.lf-diff-next` were absent. No code writes those
  classes since #2175, so the assertion passed whatever the diff drew.
  Removed.
@leaf-agent
leaf-agent merged commit 1327396 into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/stale-comments-survey branch November 24, 2026 07:11
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