docs: state what the code does, not what it replaced - #68
Merged
Conversation
Several comments explained the change that introduced them — the DiffSource enum against the earlier staged/commit_id pair, the keymap registry against the any_overlay_active gate, shadow detection against the gap it filled. That reasoning belongs in the commit and PR that made the change; in the source it is stale the moment a reader arrives without memory of the prior code. Keep the facts a future maintainer needs, drop the comparisons. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
adehad
force-pushed
the
chore/comment-rot
branch
from
August 3, 2026 11:51
e9493d8 to
c6941b6
Compare
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.
Six comments landed in #62 and #65 that explain the change which introduced them rather than the code as it stands:
DiffSource's doc comment argued the enum against the earlierstaged: bool+commit_idpairkey_handler.rsopened with "Two mechanisms replace what used to be hand-rolled here"keymap/registry.rsnoted thatWorkspace && !modal"replaces the hand-rolledany_overlay_activegate"keymap/shadow.rsdescribed what "used to go completely unreported", and a test doc named the binding that motivated itkeymap/summary.rslabelled a test with "the drift that motivated this work"keymap/display.rsdescribed a fixture as the literal the help "used to carry"A reader arriving later has no memory of the prior code, so that text is noise at best and misleading once the surrounding code moves again. The rationale belongs in the commit message and the PR description, which is where I have put it.
Each is rewritten to state the constraint or invariant that still holds — what
DiffSource's variants mean and why only two of them can be staged, what!modalscopes, why predicate comparison alone cannot see nested contexts, and what each test pins. My fault for letting them through in the first place.No behaviour change.
🤖 Generated with Claude Code